Do not copy source code for Reciprocal licenses

According to the description:
// Reciprocal licenses allow usage of software made available under such
// licenses freely in *unmodified* form. If the third-party source code is
// modified in any way these modifications to the original third-party
// source code must be made available.

For software that uses Reciprocal licenses, we don't need to copy the source directory as long as the code is unmodified. As normally users use third-party tools to vendor the dependencies, it seems to be overly cautious to always copy source code for Reciprocal licenses.

While I agree with that, how are we enforcing the copy of the licensed code if there's any change in it?

how are we enforcing the copy of the licensed code if there's any change in it?

can't we use the go.sum file to ensure there aren't any local changes in the vendor folder?

how are we enforcing the copy of the licensed code if there's any change in it?

can't we use the go.sum file to ensure there aren't any local changes in the vendor folder?

We could follow that approach, but we should also confirm the dependencies that have changed and only copy the code for those ones which have a reciprocal license. That's the optimal behavior, so I'm wondering what's the middle point we might be agreeing here.

We could follow that approach, but we should also confirm the dependencies that have changed and only copy the code for those ones which have a reciprocal license. That's the optimal behavior, so I'm wondering what's the middle point we might be agreeing here.

what you mentioned (in bold) makes sense to me and is a good middle ground

Is there any change in the vendor/ code anyway? If so, how it is guaranteed that it not gets lost when doing an update? For such a case one would need to record the change somewhere else anyway and in this case, one could also add the source code the third_party directory, too.
If this is not a good default, maybe it would make sense to at least make it configurable with a dedicated command-line option (like the confidence_threshold) as each project knows best whether it ever has modified a vendor dependency.

It looks like long term we'll be able to ensure the vendor directory is not modified
https://github.com/golang/go/issues/27348

It looks like long term we'll be able to ensure the vendor directory is not modified
https://github.com/golang/go/issues/27348

You can probably quickly hash the modules in the vendor folder and compare them with hash in go.sum no?

@wlynch do you have thoughts on this PR?

Did some research today - this would need more work.
We can't guarantee that all users are vendoring their dependencies. If for whatever reason the upstream source is unavailable, deleted, or modified, you could get into a state where the source used in a binary would no longer be available and would not meet license obligations (for licenses like MPL 2.0 the obligation is on the binary distributor).
We would need to keep this behavior for non-vendored dependencies.
For vendored dependencies, relying on vendor/ + verification seems reasonable.

An opt-out flag SGTM, so long as we include a warning about the consequences of doing so.
I haven't poked around the x/mod code recently, but I'm curious if we can easily detect if the module has been vendored at all (even if we can't verify the go.sum easily yet). 🤔

@Bobgy any change you could include this in your v2 work?


Make opt_lut less chatty

The opt_lut pass, now enabled by default on iCE40, prints thousands of lines of debug messages. I think it predates the suppression of debug messages in e158ea209 so it didn't use that facility. Use it now.

I was just about to do something similar! +1
One gentle and tangential suggestion I have is for opt_lut (in fact, all passes should do this) to print a single line stating how many things it actually optimised.

But it does that:
Eliminated 1 LUTs.
Combined 14 LUTs.

Oops. Sorry. I must have missed that! As you were.


No funciona chrome-web-visual selector

Create two containers, one with the playwright/chrome:latest image and the other with the dgtlmoon/changedetection.io:latest image.
Start dgtlmoon/changedetection.io:latest
With the command: docker run -d --name UpdatesGPL -p port:port -e WEBDRIVER_URL="http://ip:port/wd/hub" dgtlmoon/changedetection.io:latest
I opened changedetection and now it keeps telling me the error that it cannot open the visual selector.

How do I see or know what I'm doing wrong?
It's Docker I don't have docker compose It's an AAPANEL with Docker

Please just use the docker-compose yml file that is included with this project, we do not support looking after your custom configuration
The docker compose file is fully tested
On 10 August 2024 06:45:42 UTC, David Morales @.***> wrote:

I clarify: in Docker
--
Reply to this email directly or view it on GitHub:
https://github.com/dgtlmoon/changedetection.io/issues/2559#issuecomment-2279774884
You are receiving this because you are subscribed to this thread.
Message ID: @.***>


Updating of objects fails with "Update " button

Describe the bug
When trying to update chosen object draft it errors.
To Reproduce
Steps to reproduce the behaviour:

Select draft submission on  main page
click to edit an object
update object
see error

Expected behavior
Updating of an object should happen without errors.
Screenshots
https://user-images.githubusercontent.com/47525503/130409911-34d3a6d7-0e6f-4d59-bbf8-ca2fbe7830c7.mov
Additional context

There was also another minor bug: Warning: Failed prop type: The prop justify of ForwardRef(Grid) is deprecated. Use justifyContent instead, the prop was renamed. This will be fixed with the above mentioned bug.

Wondering why there are two different versions of cardheaders? Both are shown after clicking edit at homepage draft list. Fails with button “Update Study”, when study has button “Update draft” it works? This requires more investigating.

There are two different versions of card headers because: one is editing submitted object, the other one is editing draft so when clicking Update Study or Update draft, there are two different functions handling each case.
The issue is with Update Study button so I think there are some issues with the submitted object that is patching.

Thanks! For me it is confusing that those come after clicking edit under the same "Your Draft Submissions" list, different folders though.


RabbitMQCollector - legacy mode re-evaluated every time collection is run - logic only works first time

On the first collection run the legacy bool is correctly evaluated as true for configurations lacking the vhost block. However on subsequent runs the legacy bool switches back to false as vhosts is now present self.config. This means when diamond starts up we get the correct legacy behaviour once and then afterwards the metrics all move to the non-legacy location.
I'd be happy to have a crack at fixing this myself. I thought to move the 'legacy' calculation to a spot where it's done just once at start-up - would get_default_config be the right place?

This repo has moved to https://github.com/python-diamond/Diamond
Please open a new ticket there if this issue is not resolved with the current code there.
Thanks!


Utilize optimizer callbacks

Instead of caching debug printing hyperparameters directly inside the objective function, we should probably separate out all this logic and instead place it inside a callback. This could also easily allow for more fine-grained debugging functionality, including animated plots of the optimizer's progress for example.

Commit 2188c4f begins this practice. Will need to write a demo to take full advantage of this.


Clarity on step 9

In step 9 it says:

To resolve the ambiguity, rename the namespace from Calculator to CalculatorProgram in both Program.cs and CalculatorLibrary.cs.
namespace CalculatorProgram

There is no Calculator namespace in CalculatorLibrary.cs, it has the CalculatorLibrary namespace.
I checked further down the tutorial for the "it should resemble this code" section for both and can see there isn't anything in CalculatorLibrary.cs called "CalculatorProgram".
Should the step actually be only to update the namespace in Program.cs, rather than in both?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 80ccbb63-7f84-55e6-1b3e-f48400aa17ae
Version Independent ID: 6aba5d1b-f8ce-7b82-560e-c6a9926423ac
Content: Tutorial 2: Extend your C# console app - Visual Studio (Windows)
Content Source: docs/get-started/csharp/tutorial-console-part-2.md
Product: visual-studio-windows
Technology: vs-ide-general
GitHub Login: @anandmeg
Microsoft Alias: meghaanand

@ghogen FYI, too.

@anandmeg -- Megha, please review this update in private PR 8945.


No PSOL library binary available yet for v<IP_ADDRESS>?

Would love to compile nginx with the latest version of pagespeed but unfortunately the latest PSOL binary is not uploaded yet: http://dl.google.com/dl/page-speed/psol/<IP_ADDRESS>.tar.gz
Not sure if compiling it myself would be the right way forward, with all the little quirks that come with it.. without an automation script.

You probably want https://dl.google.com/dl/page-speed/psol/<IP_ADDRESS>-x64.tar.gz or https://dl.google.com/dl/page-speed/psol/<IP_ADDRESS>-ia32.tar.gz
See https://github.com/pagespeed/ngx_pagespeed/issues/1337#issuecomment-266844908
Where did you you get that url?
(If there's a stale doc somewhere, I'd like to update it).

Thanks Otto, I didn't retrieve the URL somewhere, I guessed it from previous instructions (where the version numbers were the same).
I have my own Ansible playbook to compile nginx with Pagespeed and other nginx modules, and I wanted to update the version numbers.

Ok, cool! Closing this issue then.


ENH: scipy.optimize.minimize with method=SLSQP returns KKT multipliers TAKE 2

@msparapa this is an updated version of your PR #9839 to return the KKT multipliers from SLSQP. (To save git hassles).
For reviewers:

This needs tests. This PR naively returns the values that SLSQP said should be returned (https://github.com/scipy/scipy/blob/main/scipy/optimize/slsqp/slsqp_optmz.f#L154). EDIT: I've added some simple tests.
A dict containing the KKT multipliers is returned. The 'eq' key contains a list of the multipliers for the equality constraints, in the order in which they appear in the constraints list. A similar approach is used for the inequality constraints.
HOWEVER, if new-style NonlinearConstraint or LinearConstraint are used, then it's possible for a single new-style constraint to simultaneously contain both inequality and equality constraints. The first step in SLSQP is to separate these mixed new-style constraints into separated old-style constraints. This means that if there is mixing within a single constraint, then the returned list of multipliers is going to appear to be of a different length to the original new-style constraints. Hopefully this doesn't lead to confusion.
The original PR said that it seems to be necessary to call slsqp again to force the multipliers to be updated. This won't cause any more function evaluations, but it will add extra overhead. I don't particularly want to dive into the fortran code to see if this can be 'fixed'.

@mdhaber do you have time to review this?

Can't guarantee a complete review but I write some tests to see if it's doing the right thing. Maybe this weekend, but I have a lot of work to do for the SciPy conference right now.

Started playing with this:

From https://www.bauer.uh.edu/rsusmel/phd/MR-11.pdf Slide 39
import numpy as np
from scipy.optimize import minimize

def f(x):
    x1, x2 = x
    return (x1 - 4)**2 + (x2 - 4)**2

def con(x):
    x1, x2 = x
    c1 = 2*x1 + 3*x2 - 6
    c2 = 12 - 3*x1 - 2*x2
    return [c1, c2]

bounds = [(0, None), (0, None)]

x0 = [3, 4]
res = minimize(f, x0, method='slsqp', constraints=[{"type": "ineq", "fun": con}])
res.kkt  # kkt: {'eq': [], 'ineq': [array([0.        , 1.23076922])]}

Checks out!

@andyfaff could you write a general test that the necessary conditions are satisfied? (Sufficient conditions would be a plus!) They don't look too hard to express in code, and then we could test with any example problem.

Thank you for doing this. I no longer have the capacity to contribute to this problem like I did back in 2019, but I'm still very interested in this feature!

9929b3 makes changes as suggested by @jaharris85, thank you. I checked that the entries in _kkt_mult where correct by retaining the extra slsqp call and comparing _kkt_mult to w[:m] using an np.testing.assert_allclose in _minimize_slsqp. I then ran the test suite in test_slsqp (meaning all the SLSQP tests would've examined the assertion). There were no fails. Following this I removed the extra slsqp call, and the assert.

@mdhaber, I think the PR is probably good as-is, in that it's returning the multipliers that SLSQP works out. If I understand the generalised test you suggested would be examining if SLSQP is doing its job correctly?
The only other point might be to consider if the Optimize.kkt dict has the right kind of structure. There are multiple ways people can pass constraints to slsqp (mixing up ineq, with eq, etc), and the return needs to be understandable. Hopefully the note I added makes sense.

If I understand the generalised test you suggested would be examining if SLSQP is doing its job correctly?

It would, but that would not be the purpose. It would allow us to test more general problems, e.g. if a new-style constraint contained mixed inequality and equality constraints, to see whether the information from SLSQP is being interpreted correctly in non-trivial cases.

@andyfaff I've had my hands full with stats, but I'll come back to this over the summer (maybe late June). I can write the tests I suggested (to smoke out potential problems like https://github.com/scipy/scipy/pull/15641#discussion_r846899891) then, and I think then I could merge this.

@Tenavi , @mdhaber this PR is in a state that is close to merging. However, it really needs someone with domain knowledge of how KKT multipliers work to be able to complete it (I don't have that knowledge).
viz: what should the sign of the multipliers be for a given type of constraint, as mentioned by @Tenavi? I can supply the coding knowledge, but I can't supply the maths knowledge.

what should the sign of the multipliers be for a given type of constraint, as mentioned by @Tenavi?

Based on some research, I think the multipliers on equality constraints $\lambda_i$ can be of either sign, and multipliers on inequality constraints $\mu_i$ will always be positive.
Most resources show the inequality constraints in the form $g(x) \leq 0$ and show dual feasibility conditions $\mu_i \geq 0$.
One reference here shows inequality constraints of the form $g(x) \geq 0$, but still $\mu_i \geq 0$. What changes is the sign of some terms in the KKT stationarity constraint.
andyfaff/scipy#25 adds a test against this reference that fails with the abs and passes with the abs removed.

After merging your PR to my feature branch it appears that something has messed the git history up. Various commits appear twice. I may have to squash some commits before this is eventually merged.

Don't change the code, but be explicit in the documentation that the correspondence between constraints and multipliers is only guaranteed in the case of old-style constraints.
If the user uses new-style constraints, don't return the KKT multipliers.
If the user uses new-style constraints, return KKT multipliers in a format that corresponds with them.

I think the use of these multipliers will be fairly rare. My preference would be to document how they're structured, assuming that old-style constraints were used; and inform the user that interpretation for new-style will be complicated and mixed up if the new-style constraints have a mix of inequality/equality.
By the time the constraints are passed to optimize._slsqp_py._minimize_slsqp they've all been converted to old-style, so there would be no way of reconstituting them into a form that makes sense for the new-style constraint.

After merging your PR to my feature branch it appears that something has messed the git history up

Rebasing on main creates new copies of previous commits, but my branch was based on your original commits. You merged my branch into yours, so now there are both.
Others have different preferences, but if I'm to review, please merge from here on instead of rebasing. I would end up squash merging anyway, so the final history would be clean.

so there would be no way of reconstituting them

Not without retaining all that information, no. It is definitely the hardest option!

My preference would be to document how they're structured, assuming that old-style constraint dicts were used

Sure, so something like 1. That's fine with me.
Wow, finally CI in main is green again!

Regarding the multipliers associated with the bounds: they come after the multipliers associated with the constraints in the W array. See appendix A of A Software Package for Sequential Quadratic Programming.

@andyfaff I think this is close. It just needs the multipliers associated with the simple bounds and documentation of how the multipliers correspond with the constraints only if the user passes in old-style constraints.

@andyfaff I think this is close. It just needs the multipliers associated with the simple bounds and documentation of how the multipliers correspond with the constraints only if the user passes in old-style constraints.

Sorry for my lack of activity on this issue. @mdhaber, by this comment do you mean that

We don't yet have multipliers corresponding to constraints like $x > 3$?
The documentation should be written assuming the user passes old-style constraints?

Yes, exactly. Currently, this PR does not return the Lagrange multipliers corresponding with bounds, but it easily could.
Yes. If the user passes new-style constraints, it's very challenging to succinctly describe how those objects get turned into constraints and in what order their corresponding Lagrange multipliers will appear.

@mdhaber I made the requested modifications, but the git version history may get a little ugly. The changes are in https://github.com/Tenavi/scipy/tree/slsqp_kkt, a branch on my fork from the most recent scipy version. I tried to fork from @andyfaff 's repo but I couldn't build scipy for some reason.
I can try to create a pull request into https://github.com/andyfaff/scipy/tree/kkt but this will also need to incorporate all the changes made to main since @andyfaff 's last pull. Alternatively, I can create a new pull request to scipy main. What's the best course of action?

I just merged main here for now. The merge conflicts with your branch weren't bad, so I'll just push those here. If they look good to @andyfaff, I think we can continue working with this PR rather than creating a new one.

How do things look @mdhaber ? Is there anything else I can contribute at this point?

Actually @Tenavi please address the CI failures while you're waiting for @andyfaff to review.
Non-deprecated objects in __all__: 69
Objects in refguide: 69

scipy.optimize.minimize
-----------------------

File "build/testenv/lib/python3.9/site-packages/scipy/optimize/_minimize.py", line 544, in minimize
Failed example:
    eps = 0.01
    cons[0]['fun'] = lambda x: x[0] - 2 * x[1] + 2 - eps
Exception raised:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/doctest.py", line 1334, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest minimize[14]>", line 1
        eps = 0.01
                  ^
    SyntaxError: multiple statements found while compiling a single statement

File "build/testenv/lib/python3.9/site-packages/scipy/optimize/_minimize.py", line 552, in minimize
Failed example:
    f0 = res.fun # Keep track of the previous optimal value
    res = minimize(fun, (2, 0), method='SLSQP', bounds=bnds,
                   constraints=cons)
    f1 = res.fun # New optimal value
    f1 - f0
Exception raised:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/doctest.py", line 1334, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest minimize[16]>", line 1
        f0 = res.fun # Keep track of the previous optimal value
                     ^
    SyntaxError: multiple statements found while compiling a single statement

@mdhaber : this PR addresses the CI/CD failures you found. I think the base branch needs to by updated to sync with the upstream scipy:main?


Improve Stats/src/stats-0.html

Need to improve this component on  Stats/src/stats-0.html
Improvements required :
add dark components
Any reference image?

Any external reference?

You can checkout this one for better understanding.

@nik132-eng go ahead


Generate hive clients inside the RP

Which issue this PR addresses:
Maybe part of M4
What this PR does / why we need it:
Rather than depending on hive/pkg/clientset, which includes dependencies on the whole installer (thus solving none of the goals of M5 for tech debt :) ), we can depend on the API definition and build our own client set.
Test plan for issue:
dunno right now
Is there any documentation that needs to be updated for this PR?
N/A

@m1kola As an aside, Hive isn't going to be keeping pkg/client for much longer: https://issues.redhat.com/browse/HIVE-1950

@m1kola it's that the package has that dependency, we still need to have a bunch of junk in our go.mod. For example, in a test project with this:
package main

import (
	hivev1 "github.com/openshift/hive/pkg/client/clientset/versioned/typed/hive/v1"
)

func main() {
	hivev1.NewForConfig(nil)
}

And a go.mod file that is this:
module github.com/hawkowl/hivetest

go 1.17

require (
    github.com/openshift/hive v1.1.16
	github.com/openshift/hive/apis v0.0.0
)

replace (
github.com/openshift/hive/apis => github.com/openshift/hive/apis v0.0.0-20220513200946-2a02c5dfd7fe
)

Then if I run go mod tidy (with or without -compat=1.17):
~/c/test [1] $ go mod tidy -compat=1.17                                                                                12:44:54
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>reading sigs.k8s.io/cluster-api-provider-aws/go.mod at revision v0.0.0: unknown revision v0.0.0

If I add the nightmare of replace directives from ARO-RP's go.mod, I can then run go mod tidy -compat=1.17 (the compat tag just means that it does the smarter tree resolution rather than 1.16s, because it will be compatible with 1 version behind), which then fails on:
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>invalid version: unknown revision c9b9d0b9dc46

So, even if it doesn't vendor all of the installer's deps since they're not strictly required, we do have to keep the giant mess of replace directives to keep the installer happy, which is what I'd like to avoid :)

@hawkowl thanks for the example. I see what you mean now. I agree with you that having to satisfy indirect dependencies is not fun (especially installer ones).

As an aside, Hive isn't going to be keeping pkg/client for much longer: https://issues.redhat.com/browse/HIVE-1950

This decision means that every codebase that consumes hive clients will be forced to generate clients themselves. It will be ARO as well as, I think, OSD, OCM and probably more. There are also outside consumers of this package (based on a quick github search).
For ARO specifically, I think it is a slippery slope: if we start generating hive client today - should we also start generating everything which is not in k8s.io/client-go and github.com/openshift/client-go? For example:

We import github.com/openshift/machine-config-operator/pkg/generated/clientset/versioned. Should we generate it as well?
We also used to use  github.com/openshift/machine-api-operator/pkg/generated/clientset/versioned
I think it is likely we will be importing more clients which are not in client-go.

IMO - we need the same approach for these clients. Or these clients should make it easier to consume them (I would prefer way).

Since it's not entirely clear if we want to use the clientsets long term or use the c-r code, I have made #2220 which just vendors in the existing clientsets so that we can get stuff going, and when we get rid of the rest of the installer dependencies we can look at the c-r rewrite for this code.
Closing in preference to #2220.


Add a CompositeBatchIterator

Some of the changes required to integrate the CompositeBatchIterator
should be considered temporary (especially BatchIteratorBuilder).
This is required as long as there are still RowReceiver implementations
and is likely to change once they're removed.

Superseded by https://github.com/crate/crate/pull/5013


[move-prover] Refactoring: forking boogie translator and refining bytecode translator

This is an incremental step towards prover refactoring for bytecode transformation architecture:

Forking the boogie translator into a new crate move-prover/boogie-backend. This contains a copy of the (much simplified) version of bytecode and spec expressions to boogie translation. All logic about translating function spec blocks is gone as this happens now as bytecode transformation. According to line count, the overall code size is shrinking down to 30%. Unfortunately we cannot see the diff of this fork with github, and everything in the new boogie-backend appears as new, but it is not.
The old backend is still there and runs by default. To use the new backend and bytecode from the command line, one can use --v2.
Moving ProverOptions and BoogieOptions out of cli.rs and into the according crates, so it can be accessed there.
Refining SpecInstrumenter to more precisely deal with the different abort condition failures and generate the same diagnosis (or better) than the old Boogie backend.
Implementing tracing for execution traces as a bytecode transformation DebugInstrumenter.
The tests arithm.move, aborts_if.move, and aborts_if_with_code.move are now operating with the v2 compilation scheme.

Invariants are still not supported, as well as many functional tests haven't been ported to v2 yet (specifically around resource access).
Motivation
Simplify prover architecture and make it less dependent from Boogie.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Ported some existing tests.
Related PRs
NA

release binaries dependency change summary:
target packages:
  A boogie-backend 0.1.0 (workspace, path 'language/move-prover/boogie-backend')
    * features: [none]

release binaries dependency change summary:
target packages:
  A boogie-backend 0.1.0 (workspace, path 'language/move-prover/boogie-backend')
    * features: [none]

/land

/land

:exclamation: Land has been canceled due to this PR being updated with new commits. Please issue another Land command if you want to requeue this PR.

:exclamation: Land has been canceled due to this PR being updated with new commits. Please issue another Land command if you want to requeue this PR.

release binaries dependency change summary:
target packages:
  A boogie-backend 0.1.0 (workspace, path 'language/move-prover/boogie-backend')
    * features: [none]

release binaries dependency change summary:
target packages:
  A boogie-backend 0.1.0 (workspace, path 'language/move-prover/boogie-backend')
    * features: [none]

/land

/land

/land

/land

:broken_heart: Test Failed - ci-test-success

:broken_heart: Test Failed - ci-test-success

release binaries dependency change summary:
target packages:
  A boogie-backend 0.1.0 (workspace, path 'language/move-prover/boogie-backend')
    * features: [none]

release binaries dependency change summary:
target packages:
  A boogie-backend 0.1.0 (workspace, path 'language/move-prover/boogie-backend')
    * features: [none]

/land

/land

:broken_heart: Test Failed - Build images and run cluster test

:broken_heart: Test Failed - Build images and run cluster test

/land

/land

:broken_heart: Test Failed - Build images and run cluster test

:broken_heart: Test Failed - Build images and run cluster test

/land

/land

:broken_heart: Test Failed - Build images and run cluster test

:broken_heart: Test Failed - Build images and run cluster test

/land

/land

:broken_heart: Test Failed - Build images and run cluster test

:broken_heart: Test Failed - Build images and run cluster test

/land

/land


Fixes tests running indefinitely when there's compiler errors

Hopefully fixes #5
This PR is not tested. I couldn't be bothered to install Node or setup a dev environment for VSCode extensions, this PR is entirely a webedit.

Surprisingly, it works.

Thanks! Pushing update soon

Update pushed, will be available in a few minutes!


Update wildfly/jboss plugin to gain parity with google

Example log:
2022-01-18 13:44:35,372 INFO  [org.wildfly.security] (ServerService Thread Pool -- 27) ELY00001: WildFly Elytron version 1.18.1.Final

Example output:
{
    "timestamp": "2022-01-18T13:44:35.372-05:00",
    "severity": 30,
    "severity_text": "INFO",
    "labels": {
        "file_name": "wildfly.log",
        "log_type": "jboss",
        "plugin_id": "jboss"
    },
    "record": {
        "message": "ELY00001: WildFly Elytron version 1.18.1.Final\n",
        "messageCode": "ELY00001",
        "source": "org.wildfly.security",
        "thread": "ServerService Thread Pool -- 27"
    }
}

Example log2
2022-02-03 15:38:01,506 DEBUG [org.jboss.as.config] (MSC service thread 1-1) Configured system properties:
                   [Standalone] =
                   awt.toolkit = sun.awt.X11.XToolkit
                   file.encoding = UTF-8
                   file.separator = /

Example output2:
{
    "timestamp": "2022-02-03T15:38:01.506-05:00",
    "severity": 20,
    "severity_text": "DEBUG",
    "labels": {
        "file_name": "wildfly.log",
        "log_type": "jboss",
        "plugin_id": "jboss"
    },
    "record": {
        "message": "Configured system properties:\n                   [Standalone] =\n                   awt.toolkit = sun.awt.X11.XToolkit\n                   file.encoding = UTF-8\n                   file.separator = /\n",
        "messageCode": "",
        "source": "org.jboss.as.config",
        "thread": "MSC service thread 1-1"
    }
}

What stanza version is this tested with? Im not sure what the issue is, but CI is running into this error:
{
  "level":"error",
  "ts":1645452802.341552,
  "caller":"agent/builder.go:70",
  "msg":"Got errors parsing plugins","errors":[
    {
      "error":"parse plugin file:
        could not unmarshal plugin file: yaml: line 12: did not find expected key: {
          \"path\":\"../plugins/jboss.yaml\"
        }"
      }
    ],
    "stacktrace":"github.com/observiq/stanza/agent.(*LogAgentBuilder).Build\n\t/home/runner/go/pkg/mod/github.com/observiq/stanza@v1.2.10/agent/builder.go:70\ngithub.com/observiq/stanza-plugins.newAgent\n\t/home/runner/work/stanza-plugins/stanza-plugins/test/config_test.go:47\ngithub.com/observiq/stanza-plugins.TestConfigs.func1\n\t/home/runner/work/stanza-plugins/stanza-plugins/test/config_test.go:26\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.16.14/x64/src/testing/testing.go:1203"}


{ canonicalize: true } stringifies the payload twice

Hi!
When using the new { canonicalize: true } param in createJWT, the JWT generated looks incorrect. It produces something like: IntcImFsZ1wiOlwiRVMyNTZLXCJ9Ig.IntcImFcIjpcImFcIixcInpcIjpcInpcIn0i.aKyOmGo5Dx2VsvDZAAHMxNtgqBeI0-qij4OB2AsISFdGsnNDJNEptZkQjY497mzX1LdMPS84pzykqalPtMwqMQ (extracted from the tests).

The issue is that the lib runs JSON.stringify on an already-stringified object: https://github.com/decentralized-identity/did-jwt/blob/4cfd3eef41d93cd0829b50c9a9bde9be3a0512d0/src/JWT.ts#L133 (canonicalizeData returns a string)
I can make a PR to remove the extra JSON.stringify.
Thanks!

great catch!
yes, a PR is welcome.


CAMEL-19352: improve mybatis doc

Description

Target

[ ] I checked that the commit is targeting the correct branch (note that Camel 3 uses camel-3.x, whereas Camel 4 uses the main branch)

Tracking

[ ] If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

[ ] I checked that each commit in the pull request has a meaningful subject line and body.

[ ] I formatted the code using mvn -Pformat,fastinstall install && mvn -Psourcecheck

I wonder if

camel.component.mybatis.sql-session-factory=#sqlSessionFactory

We should make Camel mybatis component have autowried for SqlSessionFactory, then it would automatic detect the mybatis-spring-boot configured and use it OOTB. We do this for some of the other components.

I wonder if

camel.component.mybatis.sql-session-factory=#sqlSessionFactory

We should make Camel mybatis component have autowried for SqlSessionFactory, then it would automatic detect the mybatis-spring-boot configured and use it OOTB. We do this for some of the other components.

Yes, this would be great, may you provide an example?

its easy you just need to mark it in the annotation, such as
https://github.com/apache/camel/blob/main/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java#L39


Feature Request: (Try JSoup Online) Add a feature to print out the code in use

Some websites that have tools to try out code online, like for CSS for example, you could find a feature that prints out the code that was used to make the specific CSS so that a user can use it in their own code, like www.htmlcssbuttongenerator.com
I think it would be amazing to have that on the Try JSoup tool.

Thanks -- it's a good idea that I've also considered in different ways. I don't currently plan to implement it, but might one of these days.


Missing mandatory status on created Snomed CodeSystem

Status is mandatory accroding to the Fhir profile.
https://groups.google.com/forum/#!topic/hapi-fhir/Z2p5Uo1ds80

Looks good, thanks for the PR. Merging now.


New ES5 methods <

New ES5 methods <http://kangax.github.com/es5-compat-table/>

This issue was imported from Google Moderator
Moderator votes: +12
Issue added by duri on 2011-08-24
To vote this issue up or down, simply include +1 or -1 in your comment.

Now available at http://caniuse.com/#feat=es5


For migration class name always use PascalCase-style + refactoring tests

Q
A

Is bugfix?
❌

New feature?
❌

Breaks BC?
✔

Fixed issues
#73

👍


Error to import getStringIO from reportlab.lib.utils

Hello, how are you?
I am getting error with xhtml2pdf library nowadays.
ImportError: cannot import name 'getStringIO' from 'reportlab.lib.utils' (/usr/local/lib/python3.9/site-packages/reportlab/lib/utils.py)
Yeah, I found that reportlab library was upgraded on 18th of February. I am sure the error is occurring with this package upgrading.
Can you please check and fix it as soon as possible?
Regards,
Mark

As a quick fix you can pin reportlab to version 3.6.6.
I highly doubt there will be a fix in xhtml2pdf anytime soon, given the latest release was in January 2020.

Thank you.
On Wed, Feb 23, 2022 at 7:08 PM Sebastian Potasiak @.***>
wrote:

As a quick fix you can pin reportlab to version 3.6.6.
I highly doubt there will be a fix in xhtml2pdf anytime soon, given the
latest release was in January 2020.
—
Reply to this email directly, view it on GitHub
https://github.com/xhtml2pdf/xhtml2pdf/issues/595#issuecomment-1048671280,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVBCEC4MPCYP33ET3SVHN63U4S52RANCNFSM5PD3MU2Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

There is fix #590 and merged. @LegoStormtroopr can you release new version with the fix?

New version 0.2.6  comes with a fix for it


Casts in enum expressions make the converter fail an assertion

$subject, a test case (both a simple one and the full-blown one that triggered it in the user case) exists in https://github.com/mstorsjo/c99-to-c89/commit/enum-cast.

I face this issue while compiling ffmpeg qsv module:
qsv.c
Assertion failed: cache2.n[0] == 2, file convert.c, line 546

I can workaround this by replacing MFX_MAKEFOURCC define with actual values:
#define MFX_MAKEFOURCC(A,B,C,D)    ((((int)A))+(((int)B)<<8)+(((int)C)<<16)+(((int)D)<<24))

    MFX_FOURCC_YV12         = MFX_MAKEFOURCC('Y','V','1','2'),

Thank @lieff  show me the way to modify mfxcommon.h:
#define MFX_MAKEFOURCC(A,B,C,D)    (((D*256+C)*256+B)*256+A)
That passed the c99-to-c89 converter!

Glad to hear!


RVQ loss

firstly,thanks to ur code,and then i have a quentison,when i use RVQ,it will return 8 loss,how do u solve this problem,u add all loss to one?

i have the same problem. have you solved it？

I just use the mean() value to monitor it


Zonal mean bounds

This PR is required because when zonal means are loaded from a PP file (i.e. lbproc contains 64) the CF Standard says that cell bounds must be set for any axis that is referred to by a cell method (see the final sentence of the third paragraph of http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#cell-methods). This currently doesn't happen and it breaks the downstream CMIP6 processing tools that we don't have control of.
I'm not that experienced with Iris development and so apologies about anything that I've done that's not Iris like. Please let me know of any problems and I'll try and fix them
For the tests, https://github.com/SciTools/iris-test-data/pull/49 is required.

Hi @jonseddon
many thanks for the proposal, this seems like a logical and sensible change to me.
Please may you move your new test case into the PP integration test module
https://github.com/SciTools/iris/blob/master/lib/iris/tests/integration/test_pp.py
add the class (with the data skipper) it at the bottom of this module?
I have just merged the new test data file.
https://github.com/SciTools/iris-test-data/commits/master
you will need to add the commit sha1 into
https://github.com/SciTools/iris/blob/master/.travis.yml#L25
to make sure the testing picks up this new file
hopefully the tests will then pass for us
thank you
mark

Hi @marqh,
I made those changes but looking at the Travis logs (https://travis-ci.org/SciTools/iris/jobs/194505888#L151), the previous .travis.yml file is being used as the old SHA1 value is shown rather than the new value (942e6344d6e6d00c85d824dadd49b5d6f57f4b4a) that I just committed. Can you suggest how I should get the updated .travis.yml to be used?
Thanks,
Jon

I made those changes but looking at the Travis logs (https://travis-ci.org/SciTools/iris/jobs/194505888#L151), the previous .travis.yml file is being used as the old SHA1 value is shown rather than the new value (942e6344d6e6d00c85d824dadd49b5d6f57f4b4a) that I just committed. Can you suggest how I should get the updated .travis.yml to be used?

Hi @jonseddon
I am really struggling to understand this.  i can see the change in your code and it is not being used in Travis, i cannot fathom how.
I don't see why this should happen
I am happy, the change looks fine.  Perhaps, as we work nearby, you could pop over monday/tuesday and we could fix this between us?

closed by #2336


[WIP] Add convertBytes function to solve PSET base64 encoding/decoding

This PR aims to solve the PSET base64 encoding / decoding errors
TL;DR

adds the function convertBytes in pset.go = the element's convertBytes function.
use the convertBytes + a function that encode to base64 the result of compressed bytes in ToBase64 method.

IT WORKS: you can decode the PSET using the CLI !!! I overwrite example.go (just for quick test) : try by yourself.
The following base64 encoded PSET has been created with example.go:
https://gist.github.com/louisinger/3120d0945dd4ccc13e8d41f839730402
Note that the CLI is now able to decode the pset but I don't really check if all the values are correctly retrieved. Need more work to be finished, I've open the PR to take comments and advices before modifying a lot of functions.
TO DO:

[ ] Use the convertBytes to handle the decoding of base64.
[ ] Rewrite tests that use base64
[ ] Rewrite base64 unit testing

it closes #110
@sekulicd @tiero @altafan please review

correct me if I'm wrong @altafan but we can already decode the base64 pset, it's just that the go-elements one are "heavier" (ie. longer) than the one produced by elements-cli ?

correct me if I'm wrong @altafan but we can already decode the base64 pset, it's just that the go-elements one are "heavier" (ie. longer) than the one produced by elements-cli ?

Sometimes it failed if I remember well
My bad maybe I hyped myself too early 🤣


#Added Code of conduct file !

Thanks Sir !! for your concern i have added the file, please merge my PR with the label of hacktoberfest-accepted. 😀

@myselfdeepdas sorry but we not want this file as this project is part of gdsc. You can contribute to other issues.


504 GATEWAY_TIMEOUT

Not sure how to resolve the below issue, any assistance welcome!

What is your rclone version (eg output from rclone -V)
rclone: Version "v1.38"

Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows Server 2012 R2, 64 bit

Which cloud storage system are you using? (eg Google Drive)
Amazon Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone copy E:\Updates\Files acd:uploaded -vv

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
2017/10/07 10:10:26 DEBUG : Controller/Ghost.zip: Error detected after finished upload - waiting to see if object was uploaded correctly: HTTP code 504: "504 GATEWAY_TIMEOUT": no response body ("504 GATEWAY_TIMEOUT")
2017/10/07 10:10:26 DEBUG : Controller/Ghost.zip: Object not found - waiting (1/840)
2017/10/07 10:10:32 DEBUG : Controller/Ghost.zip: Object not found - waiting (2/840)
2017/10/07 10:10:37 DEBUG : Controller/Ghost.zip: Object not found - waiting (3/840)
2017/10/07 10:10:42 DEBUG : Controller/Ghost.zip: Object not found - waiting (4/840)
2017/10/07 10:10:47 DEBUG : Controller/Ghost.zip: Object not found - waiting (5/840)
2017/10/07 10:10:52 DEBUG : Controller/Ghost.zip: Object not found - waiting (6/840)
2017/10/07 10:10:57 DEBUG : Controller/Ghost.zip: Object not found - waiting (7/840)
2017/10/07 10:11:02 DEBUG : Controller/Ghost.zip: Object found with correct size<PHONE_NUMBER>6 after waiting (8/840) - 35s - returning with no error
2017/10/07 10:11:02 INFO  : Controller/Ghost.zip: Copied (new)
2017/10/07 10:11:02 INFO  :
Transferred:   23.307 GBytes (12.058 MBytes/s)
Errors:                 0
Checks:                 0
Transferred:            1
Elapsed time:    32m59.2s

2017/10/07 10:11:02 DEBUG : Go routines at exit 7
2017/10/07 10:11:02 DEBUG : rclone: Version "v1.38" finishing with parameters ["rclone" "copy" "E:\Updates\Files" "acd:uploaded" "-vv"]

Rclone handled that error for you. Notice no error logs or counted errors.
So I think everything is working

This looks to be a question. If you have anything else, please use the forums.


Hide routes until authenticated

like this stackoverflow answer, it would make it much easier to deal with error checking if I knew someone was logged in.

Nearly there.... 2247d0f89014ed5eebed498413e93a919b465afd


Add pylint ruff rule

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d50c66b) 100.00% compared to head (3ddef6b) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #157   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           10        10
  Lines          304       304
  Branches        60        60
=========================================
  Hits           304       304

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add deployment of ganesha in the ooo-collocation CI job

Is your feature request related to a problem? Please describe.
The ooo-collocation job is not deploying Ganesha, so don't test that there.
Describe the solution you'd like
The ooo-collocation job should be updated to deploy Ganesha and the hosts/inventory updated with the new parameters as well.

@guits @dsavineau can I help with this? do we just need the list of variables passed by tripleo to add them in the CI job?

@gfidente basically you need to update the inventory file https://github.com/ceph/ceph-ansible/blob/master/tests/functional/ooo-collocation/hosts


reduce accuracy requirement in test_sum_matrix

Issue #1241 reported two test errors. One of those was test_ecos_bb_mi_lp_2, which is a known failure case for ECOS_BB and has since been disabled by default. The other issue was that tolerances in test_sum_matrix (in test_dpp.py) were too stringent. This sets more reasonable tolerances for test_sum_matrix (and other tests in that file) and so should close #1241.

A previous build succeeded; I stopped this one because I made a tiny change and I didn't want to waste GH Actions compute.
Merging.


Descriptor set/pipeline layout refactoring

Changelog:
- **Breaking** `DescriptorSetDesc` is converted from a trait to a struct. `DescriptorSetLayout` can take this struct in its constructor, as alternative to the iterator which was already possible previously.
- **Breaking** `PipelineLayout` is now built from a list of descriptor set layouts and push constant ranges, like in plain Vulkan. It no longer constructs its own descriptor set layouts internally.
- **Breaking** `PipelineLayoutDescPcRange` is renamed to `PipelineLayoutPcRange`.
- **Breaking** `PipelineLayoutDesc` is no longer needed and is removed. Its functionality has been moved to `DescriptorSetDesc` and `PipelineLayoutPcRange`. This also applies to `ComputeEntryPoint`, `GraphicsEntryPoint` and `EntryPointAbstract`.
- **Breaking** `PipelineLayout` now has a `descriptor_set_layouts` method which returns a slice of all the layouts, replacing the previous `descriptor_set_layout` which only returned one at a time.

The primary purpose of this change is bringing Vulkano closer to Vulkan, by constructing pipeline layouts from descriptor set layouts. This is how Vulkan users will expect it to work, so it's less surprising. It also means that you can re-use descriptor set layouts for multiple pipeline layouts if you want, which was not possible previously.
The second major change is making DescriptorSetDesc a struct. This matches the change that was made previously with RenderPassDesc and PipelineLayoutDesc (which ironically has been made obsolete again by this PR).

@Rua Verified and merged. Thank you for your work!
I noticed that this PR has changes that require the latest Rust compiler version(with array into_iter features). I will add corresponding notes to the changelog.


realm-cli push -y --project=PROJECT_ID does not create new app when realm_config.json exists

When realm_config.json file exists in the root of a realm project realm-cli push -y --project=PROJECT_ID  does not create a new app like stated in this page https://www.mongodb.com/docs/realm/manage-apps/deploy/automated/sdlc/#std-label-sdlc-create-app. Instead of creating an app, the cli updates the one that is configured in realm_config.js.
If I delete these keys from realm_config.json
"app_id": "test-ehitv",
"name": "test",

and then run realm-cli push -y --project=PROJECT_ID  it asks me to input the app name

If I type a name and hit enter, I can finally see a new app in mongodb realm.
My suggestion is to add a new flag called --name in this command. If this flag is passed, then the cli will create or update an app. I thought that --remote would do this, but it only updates an existing app when giving the "app's id". This new flag could also set the app's id instead of generating a weird one.

Hi @AllanOricil ... thanks for the feedback here!
You're observations on the actual behavior are indeed correct for the current version of the CLI.  The link to documentation you provided is calling that step out as part of an initial setup (and not for a repeated call).  You can notice later in the "Update a Realm App" section that the same command is again listed.
You've already noted on it somewhat, but for the realm-cli push command to create a new app, you'll need to first remove the "app_id" field out of the project's root configuration file (leaving the "name" field should be just fine and serve as a default for the CLI prompt that appears when -y is not specified).
One of the features we're actively developing on is to create a better user experience for those that wish to use a single file tree to control changes to multiple Realm apps (effectively letting one --local path make calls against many --remote app ids).  Using --remote like you said would help with existing apps, but we aren't yet in a world where the CLI can use the push command to update or create new apps at will (without some manual editing of the app's root configuration file).
Have you looked into the realm-cli app create command?  At the expense of actually making changes to the realm_config.json file you have present (so maybe run it in an empty directory or one that doesn't contain important project data), you can quickly and iteratively use this command to create many apps up front.  From there, you should have the "app_id" values you care about to provide to --remote so that you can push changes to the apps you wish to update (it also has the --name flag you mention).
Hope this helps ... your feedback is valuable here!  While we won't be making any large changes to the current push command in the short-term, I think your use case slides in nicely with the framework we've been developing on in order to more seamlessly allow a single file tree to manage multiple Realm apps.

The realm-cli app create does not work well in my deployment workflows because it also creates an empty project.
My suggestion is to rename this command to realm-cli app scaffold as scaffold is the more common word for clis that generate files/folders. And use realm-cli app create to only create an app inside realm. You can also add a flag to automatically push the local project after creating the app, if one exists.
I have a use case for this change. I have an app that has Values being referenced in Rules. These values are also bind to Secrets. If I try to deploy my app as is, it won't work because those Secrets are missing. To solve this problem I have to deploy an empty app, grab its ID, create secrets and finally push my app. And to achieve this in my deployment pipeline I had to use the API.


Enable/Disable method.

I tried to disable calendar view calendar.setEnabled(checked); but it turns out to be that this method not implemented.
Any workarounds for this?  Meanwhile, I tried setClickable() it also not working. Probably can show another view over it but it seems quite a dirty solution.

You can call setSelectionMode(SELECTION_MODE_NONE) to prevent dates from being clickable. Is that what you're looking to do?

@ar-g Feel free to reopen this issue if @ekchang solution does not work for you. Closing for now

@ekchang solution does not work for me, me need select days and enabled select any
day


Add instrumentation and logging to BQ sink.

Acceptance criteria:

Analysis of metrics for BQ sink.
Implementation.

Discussion:
Insert time.
Counter for success/failures of insert messages.
No of Error messages(deserialisation and repose errors from bigquery) or dlqed.
Log the offsetinfo when the error happens.
table/dataset creation logging and metrics.
stencil Proto update logging and metrics. (log exceptions etc)
Think about completeness/freshness/deduplication.

Option 1:
sink_messages_total(type)

Counter to indicate how many messages were pass through sink
The values of type can be(total, success, failures)
sum(sink_messages_total(type=total))  = sum(sink_messages_total(type=success|failure))

global_messages_total(type)

counter to indicate how many unique messages were pass through firehose.
type can be (total, sink, dlq, ignored)
sum(global_messages_total(type=total)) = sum(global_messages_total(type=sink|dlq|ignored))

retry_messages_total(type)

counter to indicate how many messages were processed by SinkWithRetryDecorator
type can be (total, success, failures)

dlq_messages_total(type)

counter to indicate how many messages were processed by SinkWithDLQ
type can be (total, success, failures)

error_messages_total(errortype)

counter to indicate how many messages has errors after processed by sink
errortypes are defined in ErrorTypes class

Option 2:
input_message_total(scope)

counter to indicate input messages to different scopes.
scope= consumer,sink,retry,dlq

success_message_total(scope)

counter to indicate success messages for different scopes
scope= consumer,sink,retry,dlq

failed_message_counter

counter to indicate failed messages for different scopes
scope= consumer,sink,retry,dlq

Insert time-> BQ insert time. [Sink metrics]
Counter for success/failures of insert messages. [ Sink metrics]
No of Error messages(deserialisation and repose errors from bigquery) or dlqed.[ Sink metrics]
Log the offsetinfo when the error happens[log bigquery errors while parsing, and print optic, offset , partition in abstract sink]
table/dataset creation logging and metrics.[BigqueryOperationTotal, api_name=, table=,dataset=] [time_taken_operation]
stencil Proto update logging. (log exceptions etc)
Think about completeness/freshness/deduplication.


Binance Crpyto Currency Exhange Market Data Example. SSL Websocket.

Hello, first thanks for the library.
I have written following test code modified from the examples, and helpful information I found on some issue links.
This test subscribes to bitcoin price on Binance exchange and prints price updates to console.
It also recovers from network failure (you can unplug / replug network cable).
The async examples look quite complicated to me and with all the chains of callbacks etc seems a bit tricky to implement this case robustly.
Is this code ok, can you spot any problems? Is there a better way to do this with Async methods?
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//

#include "./root_certificates.hpp"

#include <boost/beast/core.hpp>
#include <boost/beast/ssl.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/beast/websocket/ssl.hpp>

#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/stream.hpp>

#include <cstdlib>
#include <functional>
#include <iostream>
#include <memory>
#include <string>

namespace beast = boost::beast;         // from <boost/beast.hpp>
namespace http = beast::http;           // from <boost/beast/http.hpp>
namespace websocket = beast::websocket; // from <boost/beast/websocket.hpp>
namespace net = boost::asio;            // from <boost/asio.hpp>
namespace ssl = boost::asio::ssl;       // from <boost/asio/ssl.hpp>
using tcp = boost::asio::ip::tcp;       // from <boost/asio/ip/tcp.hpp>

//Class to connect to a websocket endpoint and receive data continuously counterparty closes or stopped manually
class WebSocketSession : public std::enable_shared_from_this<WebSocketSession>
{
	net::io_context & _ioContext;
	ssl::context& _sslContext;
	tcp::resolver _tcpResolver;
	std::shared_ptr<websocket::stream<beast::ssl_stream<tcp::socket>>> _ws;
	beast::flat_buffer _buffer;
	std::string _host;
	std::string _hostAndPort;
	char const * _port;
	std::string _target;
	std::string _text;
	tcp::endpoint _tcpEndPoint;
	bool _terminate = false;

	void ConnectAndReceive()
	{
		// Look up the domain name
		auto const tcpResolverResults = _tcpResolver.resolve(_host, _port);

		// Make the connection on the IP address we get from a lookup
		_tcpEndPoint = net::connect(get_lowest_layer(*_ws), tcpResolverResults);

		// Set SNI Hostname (many hosts need this to handshake successfully)
		if (!SSL_set_tlsext_host_name(_ws->next_layer().native_handle(), _host.c_str())) {
			throw beast::system_error(
				beast::error_code(static_cast<int>(::ERR_get_error()), net::error::get_ssl_category()), "Failed to set SNI Hostname");
		}
		// Update the _host string. This will provide the value of the
		// Host HTTP header during the WebSocket handshake.
		// See https://tools.ietf.org/html/rfc7230#section-5.4
		_hostAndPort = _host + ':' + std::to_string(_tcpEndPoint.port());

		// Perform the SSL handshake
		_ws->next_layer().handshake(ssl::stream_base::client);

		// Set a decorator to change the User-Agent of the handshake
		_ws->set_option(websocket::stream_base::decorator(
			[](websocket::request_type& req)
			{
				req.set(http::field::user_agent,
					std::string(BOOST_BEAST_VERSION_STRING) +
					" websocket-client-coro");
			}));

		// Perform the websocket handshake
		_ws->handshake(_hostAndPort, _target);

		//Read Messages
		try {
			while (true) //expect to read continuously until a connection failure
			{
				if (!_terminate) {
					_ws->read(_buffer);

					if (_buffer.size() > 0)
					{
						std::cout << beast::make_printable(_buffer.data()) << std::endl;
					}
					_buffer.clear();
				}
				else {
					_ws->close(boost::beast::websocket::close_code::normal);
				}

			}
		}
		catch (beast::system_error const& se) {
			if (se.code() == websocket::error::closed) {
				std::cout << "socket was closed." << std::endl;
			}
			else {
				std::cout << "exception: " << se.code() << ", " << se.code().message() << ", " << se.what();
			}
		}
		catch (std::exception& ex) {
			std::cout << "exception: " << ex.what();
		}

	}

public:

	// Resolver and socket require an io_context
	explicit
		WebSocketSession(net::io_context& ioc,
			ssl::context& ctx,
			char const* host,
			char const* port,
			char const* target)
		: _ioContext(ioc),
		_sslContext(ctx),
		_tcpResolver(_ioContext),
		_host(host),
		_port(port),
		_target(target),
		_hostAndPort()
	{
	}

	void Stop() {
		_terminate = true;
	}

	void Start()
	{
		while (!_terminate) {

			_ws = std::make_shared<websocket::stream<beast::ssl_stream<tcp::socket>>>(_ioContext, _sslContext);

			try {
				ConnectAndReceive(); //initalizes websocket and polls continuously for messages until socket closed or an exception occurs
			}
			catch (beast::system_error const& se) {
				std::cout << "exception: " << se.code() << ", " << se.code().message() << std::endl;
				Sleep(1000); //just wait a little while to not spam
			}

			_ws.reset();
		}

		//if we get to here process has been terminated
	}

};

//------------------------------------------------------------------------------

int main(int argc, char** argv)
{
	auto host = "stream.binance.com";
	auto port = "9443";
	auto target = "/ws/btcusdt@depth@100ms"; //bitcoin full order book endpoint, 100ms updates
	auto text = "";

	// The io_context is required for all I/O
	net::io_context ioc;
	// The SSL context is required, and holds certificates
	ssl::context ctx{ ssl::context::tlsv12_client };
	ctx.set_verify_mode(ssl::verify_none);
	// This holds the root certificate used for verification
	load_root_certificates(ctx);

	// Run the I/O service. The call will return when
	// the socket is closed.
	ioc.run();

	std::string inputStr;
	std::thread t;

	std::shared_ptr<WebSocketSession> websocketSession;

	while (inputStr != "x") {
		std::cout << "Press 'r' to run. Press 's' to stop. Press 'x' to Exit." << std::endl;
		std::cin >> inputStr;

		if (inputStr == "r") { //run
			if (websocketSession.use_count() == 0) { //should not run twice
				t = std::thread(
					[&websocketSession, &ioc, &ctx, host, port, target]
					{
						websocketSession = std::make_shared<WebSocketSession>(ioc, ctx, host, port, target);
						websocketSession->Start(); //within a thread so doesn't block
					});
			}
		}
		else if (inputStr == "s" || inputStr == "x") { //stop & exit
			if (websocketSession.use_count()) { //running
				websocketSession->Stop();
				t.join();
				t.~thread();
				websocketSession.reset();
			}

		}
	}

	return EXIT_SUCCESS;
}

First, I take it this code works?
“better” will depend on your use case. If you have a recent compiler, coroutines can make the code simpler to read (sometimes).
Is there any specific part of your program that concerns you?

yes, this code works. I'm using VS2019.
Nothing in particular concerns me - but i'm new to this library, so maybe it looks like a hack-job to someone with more experience?
Like how I implemented stop, if following is called within stop the the process crashes.
_ws->close(boost::beast::websocket::close_code::normal);
So I'm using a boolean there instead which is checked on the read-loop so it can be processed on the same thread - as I read in other issue that the library is not threadsafe when not using async methods.

Yes the documentation of both beast and asio (upon which it is built) is explicit about io objects not being thread safe.
If you have more than one thread, you must post() or dispatch() initiating functions onto the correct strand. You must also take care not to initiate two writes at the same time (use a queue).
I have another example you may find instructive (one moment)

https://github.com/test-scenarios/boost_beast_websocket_echo
This has both c++20 coroutine examples and c++11

Reading the intro on your link, i guess i have avoided most of the asio complexity with this example then.
I don't really have time to become an asio expert, so maybe better for our production code safety for me to stay away from the async methods for moment! :D
As long as there is nothing glaringly wrong with my approach.

Beast requires to you to be familiar with asio. There is a refresher in the documentation.
https://www.boost.org/doc/libs/develop/libs/beast/doc/html/beast/using_io/asio_refresher.html

Asio is hard to learn because its documentation expects a certain level of knowledge in computer science, asynchronous messaging and underlying network IO. I've been using Asio for some time in production projects. My first attempts were wrong, because I didn't understand (and didn't bother to read up properly) on the meanings of Execution Context, Implicit Strand, Completion Handler and Completion Token. I just wanted to dive in and make things happen.

That is what i was referring to. In this code I am not using Implicit Strand, Completion Handler and Completion Token.
As far as Asynchronous messaging & network IO, I have an understanding.

hi @vinniefalco yes that is the one I based some code on

Extended example with json parser (simdjson required), basic callbacks class/interface, and a simple Exchange class that can handle multiple websockets for simultaneous price subscriptions.
Subscribes to bitcoin & ethereum prices.
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//

#include "./root_certificates.hpp"

#include <boost/beast/core.hpp>
#include <boost/beast/ssl.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/beast/websocket/ssl.hpp>

#include <boost/asio/connect.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/stream.hpp>
#include "simdjson/simdjson.h"

#include <cstdlib>
#include <functional>
#include <iostream>
#include <memory>
#include <string>

namespace beast = boost::beast;         // from <boost/beast.hpp>
namespace http = beast::http;           // from <boost/beast/http.hpp>
namespace websocket = beast::websocket; // from <boost/beast/websocket.hpp>
namespace net = boost::asio;            // from <boost/asio.hpp>
namespace ssl = boost::asio::ssl;       // from <boost/asio/ssl.hpp>
using tcp = boost::asio::ip::tcp;       // from <boost/asio/ip/tcp.hpp>

class WebSocketSessionCallbacks
{
public:
	//notifies of a connection failure - socket disconnect, problem passing message, socket closed etc
	virtual void WebSocketConnectionDown(const std::string & sessionName) = 0;

	//a message received on the socket
	virtual void WebSocketMessageReceived(const std::string& sessionName, simdjson::simdjson_result<simdjson::dom::element>& jsonResult) = 0;
};

//Class to connect to a websocket endpoint and receive data continuously counterparty closes or stopped manually
class WebSocketSession : public std::enable_shared_from_this<WebSocketSession>
{
	net::io_context & _ioContext;
	ssl::context& _sslContext;
	tcp::resolver _tcpResolver;
	std::shared_ptr<websocket::stream<beast::ssl_stream<tcp::socket>>> _ws;
	beast::flat_buffer _buffer;
	std::string _host;
	std::string _hostAndPort;
	char const * _port;
	std::string _target;
	std::string _text;
	tcp::endpoint _tcpEndPoint;
	bool _terminate = false;
	simdjson::dom::parser _jsonParser;
	WebSocketSessionCallbacks & _callbacks;
	std::thread _workerThread;
	std::string _sessionIdenfitier;

	void ConnectAndReceive()
	{
		// Look up the domain name
		auto const tcpResolverResults = _tcpResolver.resolve(_host, _port);

		// Make the connection on the IP address we get from a lookup
		_tcpEndPoint = net::connect(get_lowest_layer(*_ws), tcpResolverResults);

		// Set SNI Hostname (many hosts need this to handshake successfully)
		if (!SSL_set_tlsext_host_name(_ws->next_layer().native_handle(), _host.c_str())) {
			throw beast::system_error(
				beast::error_code(static_cast<int>(::ERR_get_error()), net::error::get_ssl_category()), "Failed to set SNI Hostname");
		}
		// Update the _host string. This will provide the value of the
		// Host HTTP header during the WebSocket handshake.
		// See https://tools.ietf.org/html/rfc7230#section-5.4
		_hostAndPort = _host + ':' + std::to_string(_tcpEndPoint.port());

		// Perform the SSL handshake
		_ws->next_layer().handshake(ssl::stream_base::client);

		// Set a decorator to change the User-Agent of the handshake
		_ws->set_option(websocket::stream_base::decorator(
			[](websocket::request_type& req)
			{
				req.set(http::field::user_agent,
					std::string(BOOST_BEAST_VERSION_STRING) +
					" websocket-client-coro");
			}));

		// Perform the websocket handshake
		_ws->handshake(_hostAndPort, _target);

		//Read Messages
		try {
			bool terminating = false;
			while (true) //expect to read continuously until a connection failure or manually terminated
			{
				if (!_terminate || terminating) {
					_ws->read(_buffer);

					if (_buffer.size() > 0)
					{
						std::string bufferString = boost::beast::buffers_to_string(_buffer.data());
						auto jsonResult = _jsonParser.parse(bufferString);

						_callbacks.WebSocketMessageReceived(_sessionIdenfitier, jsonResult);

					}
					_buffer.clear();
				}
				else { //termination has been requested
					_ws->close(boost::beast::websocket::close_code::normal);
					terminating = true; //we could break out of while here, but then we would not read any final message from cpty after we send close?
				}
			}
		}
		catch (beast::system_error const& se) {
			if (se.code() == websocket::error::closed) {
				std::cout << "socket was closed." << std::endl;
			}
			else {
				std::cout << "exception: " << se.code() << ", " << se.code().message() << ", " << std::endl;
			}
		}
		catch (std::exception& ex) {
			std::cout << "exception: " << ex.what() << std::endl;
		}

		_callbacks.WebSocketConnectionDown(_sessionIdenfitier);
	}

public:

	// Resolver and socket require an io_context
	explicit
		WebSocketSession(WebSocketSessionCallbacks & callbacks,
			std::string & sessionIdenfitier,
			net::io_context& ioc,
			ssl::context& ctx,
			char const* host,
			char const* port,
			char const* target)
		:
		_callbacks(callbacks),
		_sessionIdenfitier(sessionIdenfitier),
		_ioContext(ioc),
		_sslContext(ctx),
		_tcpResolver(_ioContext),
		_host(host),
		_port(port),
		_target(target),
		_hostAndPort()
	{
	}

	void Stop() {
		_terminate = true;
		_workerThread.join();
		_workerThread.~thread();
	}

	//Connect to WebSocket on a new thread and start receiving data
	void Start()
	{
		_workerThread = std::thread(
			[this]
			{
				while (!_terminate) {

					_ws = std::make_shared<websocket::stream<beast::ssl_stream<tcp::socket>>>(_ioContext, _sslContext);

					try {
						//initalizes websocket and polls continuously for messages until socket closed or an exception occurs
						ConnectAndReceive();
					}
					//catches network or ssl handshake errors in attemting to establish the websocket
					catch (beast::system_error const& se) {

						_callbacks.WebSocketConnectionDown(_sessionIdenfitier); //notify failed connection

						std::cout << "exception: " << se.code() << ", " << se.code().message() << std::endl;
						Sleep(1000); //just wait a little while to not spam
					}

					_ws.reset();
				}
				//if we get to here Stop has been Called
				std::cout << "WebSocketSession Stopped." << std::endl;
			});
	}

};

//------------------------------------------------------------------------------
class BinanceExchange : public WebSocketSessionCallbacks
{
	const char * _host = "stream.binance.com";
	const char * _port = "9443";

	net::io_context& _ioc;
	ssl::context& _ctx;
	std::map<std::string, std::shared_ptr<WebSocketSession>> _cryptoCurrencySubscriptions;

	//implement useful application logic with the websocket callbacks ->

	//notifies of a connection failure - socket disconnect, problem passing message, socket closed etc
	virtual void WebSocketConnectionDown(const std::string& sessionName) override
	{
		std::cout << sessionName << ": " << "Connection is down. Orderbook should be cleared" << std::endl;
	}

	//a message received on the socket
	virtual void WebSocketMessageReceived(const std::string& sessionName, simdjson::simdjson_result<simdjson::dom::element>& jsonResult) override
	{
		std::cout << sessionName << ": " << jsonResult << std::endl;
	}

public:

	BinanceExchange(net::io_context& ioc, ssl::context& ctx)
		: _ioc(ioc),
		_ctx(ctx)
	{
	};

	void SubscribeCryptoCurrency(std::string symbol)
	{
		std::string target = "/ws/" + symbol + "@depth@100ms"; //full order book endpoint, 100ms updates

		if (_cryptoCurrencySubscriptions.find(symbol) == _cryptoCurrencySubscriptions.end()) {
			_cryptoCurrencySubscriptions[symbol] = std::make_shared<WebSocketSession>(*this, symbol, _ioc, _ctx, _host, _port, target.c_str());
			_cryptoCurrencySubscriptions[symbol]->Start(); //subscribes to market data on a new thread
		}
		else {
			std::cout << "Symbol " << symbol << " already subscribed.";
		}

	}

	void UnSubscribeCryptoCurrency(std::string symbol) {
		if (_cryptoCurrencySubscriptions.find(symbol) != _cryptoCurrencySubscriptions.end()) {
			_cryptoCurrencySubscriptions[symbol]->Stop();
			_cryptoCurrencySubscriptions.erase(symbol);
		}
		else {
			std::cout << "Symbol " << symbol << " not found.";
		}
	}

};

int main(int argc, char** argv)
{
	// The io_context is required for all I/O
	net::io_context ioc;
	// The SSL context is required, and holds certificates
	ssl::context ctx{ ssl::context::tlsv12_client };
	ctx.set_verify_mode(ssl::verify_none);
	// This holds the root certificate used for verification
	load_root_certificates(ctx);

	// Run the I/O service. The call will return when
	// the socket is closed.
	ioc.run();

	BinanceExchange binanceExchange(ioc, ctx);

	std::string inputStr;
	std::thread t;

	while (inputStr != "x") {
		std::cout << "Press 'r' to run. Press 's' to stop. Press 'x' to Exit." << std::endl;
		std::cin >> inputStr;

		if (inputStr == "r") { //run
			binanceExchange.SubscribeCryptoCurrency("btcusdt");
			binanceExchange.SubscribeCryptoCurrency("ethusdt");
		}
		else if (inputStr == "s" || inputStr == "x") { //stop & exit

			binanceExchange.UnSubscribeCryptoCurrency("btcusdt");
			binanceExchange.UnSubscribeCryptoCurrency("ethusdt");

		}
	}

	return EXIT_SUCCESS;
}

JSON is in Boost now: https://www.boost.org/doc/libs/develop/libs/json/doc/html/index.html

@vinniefalco after some research I choose simdjson because of the performance benchmarks noted here and the fact this will be going into a trading application https://github.com/simdjson/simdjson
My knowledge on c++ json libraries is low. I imagine the boost one is appropriate for most scenarios.

I imagine the boost one is appropriate for most scenarios.

The Boost version is good when you want to modify the JSON or if you want to create a new one. SIMDJson produces a read-only structure, while Boost.JSON produces a modifiable container.

Hi, I have encountered an issue in my code above when trying to close the connection.
On a web-socket where data from server to my client is received irregularly, then I cannot close my application.
As "_ws->read(_buffer)" blocks indefinitely until some data is received on it.
And if I send _ws->close(boost::beast::websocket::close_code::normal) from another thread, then beast crashes.
I cannot pass a timeout to _ws->read as far as I can see.
I am currently looking at setting the idle-timeout, but that does not seem idea as then the whole websocket would need to be created again each timeout period.
beast::websocket::stream_base::timeout opt{ 							std::chrono::seconds(20),   // handshake timeout 							std::chrono::seconds(5),       // idle timeout. no data recv from peer for 5 sec, then it is timeout 							true   //enable ping-pong to keep alive 						}; 						_ws->set_option(opt);
Is there something I am overlooking?
I thought maybe I could intercept the ping/pong handler and send a close from within there, haven't tried that yet but maybe it crashes doing it there as well.
Thanks

If you’re using the async interface it’s pretty straightforward. You can call async_close while there is an async_read outstanding. You must do it on the same thread/strand as the async_read is running on.
You can achieve this by posting the function which initiates the async_close to the same executor associated with the websocket

If you’re using the sync interface it’s not so easy because there’s no way to interrupt a read unless you resort to Closing the underlying socket using OS calls.
The synchronous interface is designed for simple use cases.

Is this an oversight then of beast synch read method?
Closing a connection is definitely part of simple use-cases. Every workflow should include open and eventually close.
Having to resort to an OS call to close the connection does not seem like correct way?
Usually api's with a blocking methods like this can accept a timeout parameter.
Is my idea to hook into ping/pong worth a try to call close from there?

You can certainly add a ping ping but I expect it won’t help. The server will keep responding with pongs even if there’s no price activity.
Ping pong will detect the case where the connection to the server is interrupted.
most applications that do meaningful IO use async comms. What you could do is set the read timeout on the socket at the OS level.
but before we get into a ping pong of ideas, can you tell me what scenario you’re looking to address?
connection broken, or slow prices?

This is just for application shutdown, I need to close the socket so the read method will stop blocking so the worker thread and class can terminate.
https://github.com/binance/binance-spot-api-docs/blob/master/user-data-stream.md
This binance 'user data stream' sends data very irregularly (can be hours or more between anything being sent).

OK, normally I would use aync code to in an exchange connector, but in your case sync will work. You just need to reach in and close the socket from under the websocket.
something like:
::close(ws.next_layer().native_handle());

this will cause the current read to fail and is ok because sockets at the OS level are thread safe.

ok thanks for the suggestion, I will give it a try!
These binance web-sockets are all just receive only - nothing needs to be sent from my client their server over the socket, which is why I opted for simple synch methods for reading.
For sending data to binance it is all done via HTTP REST requests rather than over websocket.
Thanks

Hi, that worked.
_ws->next_layer().next_layer().close(); for me as my tcp socket is behind ssl layer.
Thanks

or, get_lowest_layer(_ws).close()

or, beast::get_lowest_layer(_ws).close()

Yes, this is the best solution as it will work regardless of the underlying transport.
Glad you got it solved.


Advanced gas and nonce setting

Is your feature request related to a problem? Please describe.
Advanced users would like to set their own gas & nonce settings when sending Tx.
Describe the solution you'd like
At minimum, provide the same settings like in Trust Wallet (check the available settings when sending e.g. ETH and BTC)

It sounds like your query would be best dealt with by the support team.
Please see the link below to our dedicated support line:
Support :Help center
Note: Click on the live chat icon at the bottom corner of the page to start a conversation

@flypaper0 suggested to just give the options "normal/slow" "fast" "very fast". Won't complicate too much for the user

this one has been implemented and released


Release 2.2.9

@ajkavanagh Can we release 2.2.9 with the fix #337 ? It's a critical fix and it would be great to have this released ASAP.

@ajkavanagh what do you think?

Yup, I'll release a new version tomorrow.  All testing with the current version has gone well.

Thanks, @ajkavanagh! Looking forward for the release.

2.2.9 is released.  Thanks to everybody who contributed.


X axis style

Really nice! The buttons still look misaligned when on my machine though when using horizontal/vertical labels..

----

We should probably adjust the dy offset for label_rotation == "vertical". And change text-anchor to middle when label_rotation == "horizontal"

This is working great now. Could you add font-size and color to y axis (no rotation).

Done


Merge Dev

Ok

HI @clarkezone  and @tonuv any update on this pull request? I would like to move my project to the next audiovisualizer nuget release instead of reference this repo branch. thanks


post submission should not be possible before attached image is uploaded and linked

Steps to reproduce:

Create a new post;
Type some text;
Decide to add an image attachment, so you click the (+) button and choose "Upload File"
Select your file;
Click Open
Send your message before the file details are added to your message.

What I expected to happen:
The post won't be sent until the upload action is finished and the attachment link is in my post.
What actually happened:
Post is sent without the attachment link
Additional Notes:
Additionally, trying to send a new message with the same attachment fails. I assume this is because the file is already uploaded to the web based file system and is possibly either errors out (untrapped) or is timing out. Attempts to send a new message with the previously botched attachment just hangs. Renaming the file will then allow you to attach it to a new message.
Chrome Version 44.0.2403.157 (64-bit) on OS X 10.10.3 (14D72i)
nice.social version <IP_ADDRESS>

This has been resolved and is part of Nice as we speak. Thanks for reporting the problem.


Chef not honouring FIPS requirement

Description
https://github.com/chef/chef/blob/master/chef-config/lib/chef-config/config.rb#L1132 is not a proper FIPS fix. Ruby compiled with OpenSSL FIPS and OpenSSL.fips_mode already being true would fail a call to OpenSSL::Digest::MD5.new. Eg:
[ec2-user@ip-10-17-142-203 berkshelf]$ irb
2.4.4 :001 > require 'digest'
 => true
2.4.4 :002 > Digest::MD5.new
md5_dgst.c(82): OpenSSL internal error, assertion failed: Digest MD5 forbidden in FIPS mode!
Aborted

Chef Version
[ec2-user@ip-10-17-142-203 ~]$ chef -v
Chef Development Kit Version: 3.3.23
chef-client version: 14.5.33
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks version: 7.0.6
kitchen version: 1.23.2
inspec version: 2.2.112
[ec2-user@ip-10-17-142-203 ~]$

Platform Version
[ec2-user@ip-10-17-142-203 ~]$ cat /etc/*-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.6 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.6"
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[ec2-user@ip-10-17-142-203 ~]$ uname -a
Linux ip-10-17-142-203.ec2.internal 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 15 17:36:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[ec2-user@ip-10-17-142-203 ~]$ openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017

Anything more I can do to help?

that seems to date back to https://blog.chef.io/2016/03/16/fips-support-now-generally-available-in-chef-client-12-8/ at least to wit:
"A current exception for Chef is the use of MD5 hashes to uniquely identify files stored on the Chef Server. MD5 is used only to generate unique hash IDs for files, and is not used for any cryptographic purpose. Nevertheless, Chef is investigating the effort required to replace this implementation with a FIPS-compatible algorithm."

bigger issue here is that the chef-server doesn't seem to support anything other than md5 checksums -- unless that feature has been merged by the server team but the chef-side of the code was dropped and never completed -- tagging @jaym and @stevendanna to see if they know what happened there.

@frezbo does knife cookbook upload (or download) also have the same error?

I will need to do some archeology.  I know in the past we were still using MD5 in FIPS mode in Chef Server via a non-openssl implementation.

@lamont-granquist I will close this and track further in https://github.com/berkshelf/berkshelf/issues/1802.

Oops. I meant to close https://github.com/berkshelf/berkshelf/issues/1802.Fixed.
Can we track this as an RFC? @robbkidd @lamont-granquist

I think the solution to this is simply that we do not support fips-enabled chef-client on non-omnibus ruby installs.


Add SampleSet.lowest method

Codecov Report

Merging #451 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #451      +/-   ##
==========================================
+ Coverage   93.05%   93.06%   +0.01%
==========================================
  Files          47       47
  Lines        3109     3116       +7
==========================================
+ Hits         2893     2900       +7
  Misses        216      216

Impacted Files
Coverage Δ

dimod/sampleset.py
93.39% <100%> (+0.13%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a330c2...3d4a030. Read the comment docs.


Algorithms related to Linked List in CPP

A proposal to create a folder for Linked List in C++ containing algorithms like cycle detection and correction, slow-fast pointer approaches, etc.
Please assign it to me.

I would like to work on this.

I would like to contribute too for LL in c++ algorithms

Please assign this work to me.


Source URL appears to be broken

This hook started failing recently for us, but I'm not sure what is to blame. The source URL in the CloudFormation console does not match this repository:

It links to an non-existent repo here
However, the code links properly:

Also, this hook was failing on the update of AWS::RDS::DBCluster. The KmsKeyId configuration is set so encryption can be provided to instances in the cluster. I assume this resource is creating underlying instances on which this hook is run - is that correct?

Hi @jkruse14!
Thank you for evaluating this sample hook.  The values for URL-related properties, that today are not matching the updated values in the relevant file in this repository, are not impacting the ability for the hook to evaluate its described target AWS::RDS::DBInstance resource type on preCreate and preUpdate invocation points.
I've tested the AWSSamples::RdsEncrypt::Hook sample hook as follows: first, I've chosen to activate it in my AWS account for the us-east-1 region, I've configured the sample hook with a failure mode of FAIL, and tested as follows:

I've created a test AWS::RDS::DBInstance resource with StorageEncrypted: true set in the template; the hook succeeded with message: Successfully invoked HookHandler for target AWS::RDS::DBInstance. Resource encrypted as expected;

I've tested without StorageEncrypted: true, and the hook failed as expected, with message: Failed Hook due to missing or non-encrypted AWS::RDS::DBInstance resource.;

I've created a test AWS::RDS::DBCluster resource with StorageEncrypted: true set in the template: in this case, the sample AWSSamples::RdsEncrypt::Hook was not being invoked, as this sample hook targets only AWS::RDS::DBInstance resources.  For this test, I've chosen to use aurora-mysql as a value for the Engine property of the cluster I described in my template.

I've created another test AWS::RDS::DBCluster resource with StorageEncrypted: true set in the template - this time I changed the engine to use mysql, and added additional required properties - and also in this case, the sample AWSSamples::RdsEncrypt::Hook was not being invoked.  The resulting stack created by me via CloudFormation only had the RDS DBCluster: when I visited then the RDS console, I saw the cluster and 3 DB instances for it (in my case, I had one writer instance and two reader instances): these instances were not mapped to the CloudFormation stack (that is, not showing as stack resources); thus, the hook was not triggered as well for those as are handled by the cluster I described in my template.

The example logic for the sample AWSSamples::RdsEncrypt::Hook hook is the same for preCreate and preUpdate invocation points: the example hook checks if the RDS instance class (the value you specify in your template for DBInstanceClass) is part of an exclusion list (in this case, the hook succeeds), or if the StorageEncrypted property you specify in the template is not set to 'true' or is missing (in these case, the hook fails; or succeeds otherwise).
Hope the above helps with the ongoing troubleshooting on your side; as per the URL mismatch, I'll relay the feedback to the team.
Let us know if you have any questions!


feat(connectors):- Delete Connector

Description
Delete connector for scenarios like when daps,DS and statusid flag are false, true and active pending etc
Why
For connector registrations where the daps registration was unsuccessful, the deletion is currently blocked.
Issue
https://jira.catena-x.net/browse/CPLP-2780
Checklist
Please delete options that are not relevant.

[x] I have followed the contributing guidelines

[x] I have performed a self-review of my own code

[x] I have successfully tested my changes locally

[x] I have checked that new and existing tests pass locally with my changes

[x] I have commented my code, particularly in hard-to-understand areas

@Phil91 : I did rebase on latest dev. Can you please double check both my and @qxz2mqe 's changes


Requesting project name change

I wanted to contact you privately, but your site doesn't have any such info, so I'm opening an issue.
I'm the maintainer for the Drupal FillPDF module at https://drupal.org/project/fillpdf, and it has similar functionality to this library. I also incorporate it in my FillPDF Service product.
For trademark/lack of confusion reasons, could you choose another name? Thanks.

Thank you for pointing this out. However I don't see a problem with the naming. This is an open source golang library and has nothing to do with Drupal and PHP development?! Same thing with: fill-pdf from NPM. If you don't agree, please explain your problem in detail.
Thanks :)

Well, that's fair enough. If someone actually does ask me for support on
one of those, I'll take it up then. I'll trust that developers won't
experience confusing similarity (
https://en.wikipedia.org/wiki/Confusing_similarity) :)
At this point, it's still theoretical, so I don't really mind, but figured
I should be responsible and say something.
On Mon, Jul 20, 2015 at 3:44 PM, Roland Singer<EMAIL_ADDRESS>wrote:

Thank you for pointing this out. However I don't see a problem with the
naming. This is an open source golang library and has nothing to do with
Drupal and PHP development?! Same thing with: fill-pdf
https://www.npmjs.com/package/fill-pdf from NPM. If you don't agree,
please explain your problem in detail.
Thanks :)
—
Reply to this email directly or view it on GitHub
https://github.com/desertbit/fillpdf/issues/1#issuecomment-122889477.


Integration of the created parser and tokenizer into the system

Now it is necessary to implement separately developed functionality into the created application skeleton: a parser and a tokenizer.
At the same time, the development of the general functionality of the first page is being completed.

Resolved with 511dd22654dd8303f744b6376089e4c8dbb05922. Also, added manual parsing of sentences in case of API errors.


cdc changefeed checkpoint lag >10s when roling upgrade

What did you do?

roling upgrade tidb cluster

What did you expect to see?
lag < 10s
What did you see instead?
lag is >10s

Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):
(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):
(paste TiKV version here)

TiCDC version (execute cdc version):
sh-5.1# /cdc version
Release Version: v6.6.0
Git Commit Hash: 40ba4175a57a45d5facabe1e8f876368ca3a9b59
Git Branch: heads/refs/tags/v6.6.0
UTC Build Time: 2023-02-14 11:56:21
Go Version: go version go1.19.5 linux/amd64
Failpoint Build: false
(paste TiCDC version here)

/severity major

later, the lag > 1h when rolling upgrade

maybe caused by #8329


FEATURE: Create Working Group landing pages in Community section

Why do we need this improvement?
Let's create a Working Group (WG) landing page under the Community section.
How will this change help?
It will give our WGs visibility and help promote their growth.
Screenshots
No response
How could it be implemented/designed?
We could design a parent page for all WGs and then individual ones for each WG.
🚧 Breaking changes
No
👀 Have you checked for similar open issues?

[X] I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

[X] I have read the Contributing Guidelines

Are you willing to work on this issue?
YES

@quetzalliwrites @thulieblack how are we gonna proceed with this one?
If we need a design then @Mayaleeeee can help us with that

This is on hold for now


⚠ Turnos 24x7 has degraded performance

In 3b1d292, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 941 ms

Resolved: Turnos 24x7 performance has improved in ae94965.


WUT v1.8

Hey, so there's a new version of WUT. New features are:

it tracks orphan translations. A new column "Orphans" in the Project is set when finding one. It's useful if a .md page or a .png image is removed in the EN directory. Note that when an original file is renamed, its corresponding translation files are considered "To update", not "Orphan".
it can make stub translation pages in another branch (wut-branch as of current input in the workflow).
it can copy files when they have to be created, just like stubs, but adapted for images for example.
it creates a Pull request when changes are made in the dedicated branch, so we can review manually stubs and copies.
templates can be changed directly in workflow, or in files for Project cards.

Pre-requisites for this new version:

the dedicated GitHub App must have Pull requests read/write permission, otherwise no pull request will be created when files are copied or stubs are made.
the branch wut-branch must exist initially. Also, leave this one to WUT as it will reset it to master's head at every run with copies and stubs.

Note that v1.8 jobs should take longer than v1.7 to run now that orphan translations and images/videos are tracked.
Also, backend was reworked so it is much more reliable and maintainable, but that's another story.
It passed my test repo: https://github.com/Awagi/wiki/actions/runs/165840662
Technical differences in code for nerds: https://github.com/Awagi/wiki-update-tracker/compare/v1.7.1...v1.8.0

-> just updated the description with fancy information


Unhandled timeout exception when calling ContentStack API

The SDK seems to be throwing an unhandled exception when ContentStack API times out.
The following error is thrown during execution of CSHttpConnection.java#L205):
SocketTimeoutException: timeout
In case of timeouts calling ContentStack API, I would expect the ResultCallback to be invoked and contain details about the error, instead of an exception being thrown.

Hey @vitorsdcs thanks for raising this, we will look into the issue .
cc: @cs-raj @netrajpatel @shafeeqd959

Hey @vitorsdcs kindly check out the latest version. Do let us know if you face any further issues.


Fix SNLI notebook

Can someone fix this notebook ? It is quite old and needs to be adapted. There is something weird in the notebook as well. It printed to output when process_outputs was called. This should not happen, so please do not change core when fixing the notebook.

Done


ldflags cannot change value of a constant

https://github.com/xetys/hetzner-kube/blob/5f062d2ffe59aab8ae112a842b44f4ec4139efae/cmd/version.go#L10
^^ this should be var version = "DEVELOP" instead of a const as it cannot be set via ldflags.
$ make VERSION=1.0.0 build
[ ... ]
$ ./dist/hetzner-kube-1.0.0-linux-amd64 version
DEVELOP

@kalbasit nice catch, thx!


Documentation...

I am new to docker, and have setup multiple projects. I got the app stack running and see the basic html file that shows me it works.
However, I have not been able to follow to magento tools documentation to get everything up and working. Could be just me, but maybe check through and let me know if you update this documentation at all. I'd like to try again as this is a great project!

Hi, thanks for the feedback. Could you describe where you got stuck in the magento-tools documentation? It would help me focus my efforts.

Since there has been no action on this issue in quite a while I'm going to close it. Please feel free to open a new one if you have more trouble.


HAWQ-734. Refactor feature test build and some bugfix

cc @wengyanqing @ztao1987 @zhangh43

cc @huor

+1

+1


Implement /search endpoint

/search endpoint needs to be implemented for at least the default tables (tables with an attribute of json_data). On the server side, will need to abstract away the need for a JSON extract step so that the client can pass simple SQL queries based on the information in the data model alone

closing as #16 was merged


Color blindness emulator

Storybook has an accessibility addon that features a color blindness emulator:

I was thinking if we should maybe have something similar. We would have to add some kind of action menu to switch between different modes or configure them via props. It might be useful, but I'm not sure if this is in the scope of axe-mode

@chancestrickland wdyt?

I do like it, but might it increase the scope of the project a bit for an initial feature? Personally I'd rather nail the core behavior related to axe first as a matter of priorities. Totally see huge value here though!

Yeah. I also feel like this increases the scope too much for the initial release.
Also, this got me thinking if axe-mode should be specifically tied to the axe name, or more generally to accessibility instead? Especially with features like this, which do not directly come from axe.
Food for thought?

Yeah, it'd be nice to experiment with other tools and see about making them pluggable. Personally I think axe is the best tool of its kind and others will have too many potential false positives, so I don't hate being tied to axe. Deque is a team I trust to keep it solid for the long haul (Disclosure: the lead dev on axe core is a friend of mine here in San Diego, but that's my opinion no less).


Point Set Registration

A useful feature would be strong baselines for point set registration, e.g., Iterative Closest Point, Coherent Point Drift, PointNetLK, FilterReg to name a few classics and recents.

Following restructuring with v0.9.0, Kaolin library does not include baselines or model training, but rather modular functions to support 3D DL. Thank you for the useful suggestions; we'll keep them in mind.
Here are the latest docs on Kaolin library and what it supports:
https://kaolin.readthedocs.io/en/latest/notes/overview.html