TypeScript operations queries doesn't mark fields optional

Given a schema like:
type Child {
  parent: Parent
}

The default typescript-operations output for Child is:
export type Child = {
  parent?: Maybe<Parent>;
}

Which is fine, however, if I write a query:
 query Foo {
  child(...) { parent { name } }
}

The generated type is:
export type FooQuery = {
  { __typename?: 'Query' } &
  { child: (
    { __typename?: "Child" } &
    & parent: (
      { __typename? "Parent" } &
      Pick<Parent, "name">
    )
  )}
}

(I'm butchering the nested types a bit.)
Note that parent here in the query is parent and not parent?.
This inconsistency between the top-level type and the query type means I can't do:
const child: Child = newFactoryMethodForChild();
assertTestWithFooQueryResult({ query: { child }));

(Again being somewhat loose with syntax.)
Because there is a type error that Child's parent is optional (Parent | null | undefined) but the query's munged-together anonymous type wants parent to be Parent | null.
This is internally inconsistent.
Note that if I use avoidOptionals: true, it turns the top-level Child into parent: Maybe<Parent> and so now my "factory method that makes Childs" and "unit test that handles foo query results" structurally matches and compiles fine.
However there are other downsides to avoidOptionals (specifically that it should never apply to input types), so it'd be nice to keep avoidOptionals off (on the client-side types; on the server-side types I think avoidOptionals is generally best-practice fwiw).

@stephenh While dealing with the schema types - we can allow optionals and allow undefined because the GraphQL engine knows how to handle that.
But, if you are writing a query and ask for specific fields, the GraphQL engine will always return the field for you, and if an nullable field, it means that it could be either a value, or null - but the field will always be there.
You should not use Child (or any base type generated by typescript plugin) directly as a consumer of queries - because it represents the complete type and not the selection set your query is asking for.
You can customize the output with avoidOptionals or maybeValue and change the output according to your needs.


Balancer - pruned subgraph panicked at graph/src/components/subgraph/proof_of_indexing/online.rs:137:26:

Bug report
the subgraph is stuck on block number 54559455 on polygon network
Qm hash - QmeUa1DYUkYwVMFMtxjPobSaGyMhbUVyMU5Uknpcua3bCC
error encountered is
stderr F thread 'QmeUa1DYUkYwVMFMtxjPobSaGyMhbUVyMU5Uknpcua3bCC[702734]' panicked at graph/src/components/subgraph/proof_of_indexing/online.rs:137:26:

they deployed 2 polygon subgraphs, pruned and unpruned. both uses the same grafting base and block. unpruned has synced last week:
QmWW1BQ4PfHtLbLRxyMyNVsGdR14rnUaZAyCFKz34Yx7bC
but pruned (using indexerHints for the first time) is stuck:
QmeUa1DYUkYwVMFMtxjPobSaGyMhbUVyMU5Uknpcua3bCC
graft:
base: QmfFmtcLKRugnPe8HFmmvdtUgM6gvUSSsFXGeCTX6sH4Zg
block: 54559455
they simply deployed with the indexerHints set to pruning 100k blocks and grafted onto another Subgraph
repo - https://github.com/balancer/balancer-subgraph-v2/tree/dev
Relevant log output
No response
IPFS hash
QmeUa1DYUkYwVMFMtxjPobSaGyMhbUVyMU5Uknpcua3bCC
Subgraph name or link to explorer
No response
Some information to help us out

[ ] Tick this box if this bug is caused by a regression found in the latest release.
[ ] Tick this box if this bug is specific to the hosted service.
[X] I have searched the issue tracker to make sure this issue is not a duplicate.

OS information
None

hey, leaving a comment here to receive notifications. let me know if you need any other info!

hey folks - any updates here? this has been preventing us from launching new pools on Balancer =/

@mendesfabio You grafted a specVersion 1.0.0 subgraph on top of a specVersion 0.0.4 subgraph, that is not supported due to a change in the Proof of Indexing algorithm. Are you able to use the unpruned subgraph for now, while you resync the pruned one without grafting?

we've found a way around it, thank you!

@mendesfabio it would be good for the community to provide what the workaround was so it could help others facing such issues in the future. :)


[Program Card Images] Add warning to PublicFileNameFormatter about modifying file keys

Description
This PR adds some documentation to the PublicFileNameFormatter class warning that if the file key format is changed, then the cloud storage bucket permissions may also need to be changed.
Release notes
Checklist
General
Read the full guidelines for PRs here

[x] Added the correct label: < feature | enhancement | bug | dependencies | infrastructure | ignore-for-release | database >
[x] Assigned to a specific person, civiform/developers, or a more specific round-robin list.

Issue(s) this completes
Epic #5676

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

main

PR #6294

PR #6279

PR #6299   👈

This stack of pull requests is managed by Graphite.

Merge activity

Jan 5, 3:37 PM: Graphite rebased this pull request as part of a merge.


Generate openapi spec and the nakama console client using the original proto names

This will use the original proto names for generating OpenAPI definitions (stop it from converting to camelCase), and accordingly adjusts the generator to stop converting case styles.
It should avoid issues where a different case style from the expected (generator always assumed snake_case) was being used in the source proto, thus breaking the generated client.

@zyro let's have a quick chat about this offline.


Fula-sec react-native incompatibility (ReferenceError: Can't find variable: BigInt)

We have an issue to use the fula-sec package in react-native projects.
The issue is that some fula-sec's dependencies use the BigInt type that react-native does not support.
There is a workaround here but it does not work for me, I guess because we used the Hermes engine.
Hermes team is working on this issue as well, and in the future probably Hermes will support BigInt.

@ghorbani-m from my perspective running a cryptographic algorithm on react-native will be near impossible (after you fix this you have to fix the missing secure random generator the list will go on)
@ruffiano89 how much go-fula-sec is feasible?

@farhoud if only encryption part then yes, but completely changing .... I have to do some research on go packages

@farhoud  I agree, totally we need to move the encryption layer to the gomobile (go-fula) to encrypt files on the fly while streaming the files.
I am thinking that can we add all fula-sec functionalities to the go-fula project and use them in react-native-fula?
The reason is I don't like to add another .aar file to the Fotos app and increase the size of apk.

@ghorbani-m
did you try this?
https://github.com/margelo/react-native-bignumber

For random i think you can :

https://www.npmjs.com/package/expo-random

We are heavily depend on did from ceramic network.
And I don't know if Jamshid can rewrite them in go.
So lets try to run DID usage on js. If we fail we can come up with something.

@ghorbani-m did you try this?

https://github.com/margelo/react-native-bignumber
but any way you will be blocked here:
https://github.com/StableLib/stablelib/blob/master/packages/random/source/system.ts
if no other lib is using web/node crypto api

I don't need use BigInt directly in the Fotos, actually, the fula-sec dependencies used BigInt so we can not import fula-sec in a react-native project

@ghorbani-m
https://github.com/indutny/elliptic us bn.js you can use this:
https://github.com/margelo/react-native-bignumber#as-a-drop-in-replacement
so fula-sec it uses react-native-bignumber instead of using bn.js

If you could provide more info like logs and other things i can be more helpful.

Much appreciate if you send us error log
Pls look at this also.
Fixed Android BigInt Error
https://github.com/facebook/react-native/issues/28492#issuecomment-897732834

I've worked more on this issue and solved the BigInt issue by rn-nodeify.
After that, I got another issue and the root was using etherjs in react-native which needs some prerequisites for react-native and finally solved that through @ethersproject/shims package.
To get a fast conclusion tried to install etherJs on the Fotos project directly and tried to create a Wallet same as we used in the Fula-sec (ethers.Wallet.createRandom()).
It works and I create a wallet programmatically but there is another issue, creating a wallet in react-native is too slow and for me takes around 30s!

Finally, I resolved the BigInt issue by rn-nodeify package.
@ruffiano89
Now I am trying to use the new release of fula-sec (0.6.6) but get an error.
My code:
import { FulaDID } from "@functionland/fula-sec"
.
.
.
const fulaDID = new FulaDID();
await fulaDID.create("password", "signiture");

Error message:
[TypeError: Cannot convert undefined value to object]

Finally, I resolved the BigInt issue by rn-nodeify package. @ruffiano89 Now I am trying to use the new release of fula-sec (0.6.6) but get an error.
My code:
import { FulaDID } from "@functionland/fula-sec"
.
.
.
const fulaDID = new FulaDID();
await fulaDID.create("password", "signiture");

Error message:
[TypeError: Cannot convert undefined value to object]

The reason was crypto.getRandomValues that has been used in the fula-sec dependencies.
Solution
We need to add react-native-get-random-values package to the project and follow the rules.


Orchard bug fixes

Content size small
Space between Orchard title and seedlot registration progress is bigger than expected
Data aren't saved when click on next and back button

The listed bugs were fixed under the #175 task.


not support m0 tarmac log

need add features

elf_and_log.zip

Thanks for this sample. Indeed, this is a type of Tarmac that TTU's parser is not yet able to handle. At a glance, the differences seem to be:

there's no space between the numeric timestamp and the unit ("396ns" instead of "396 ns")
the instruction-set state and CPU mode fields are missing from IT and IS instruction lines, along with the : that usually separates those from the instruction.

Can you say something about where this trace came from? Your title suggests that the CPU was Cortex-M0, but what was the Tarmac-generating tool?
As a workaround for the moment, I found I was able to reprocess your trace into one that TTU can handle using the following Perl one-liner:
perl -pe 's{^(\d+)(ns)}{$1 $2}; s{^(\S+ \S+ (IT|IS) \S+ \S+)}{$1 T svc_s :}' tarmac1.log > fixed.log

This is tarmac rtl module from Cortex-M0-AT510-r0p0-00rel0

I've just pushed changes that should enable these tools to parse that Tarmac file.
Unfortunately, they still can't do it by default, because the missing instruction-set state (compared to the usual format) needs to be filled in. But there's a new command-line option --implicit-thumb that should allow this file to be parsed.


Task settings - Page header displayed if none selected in notification settings for task

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.3.83-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Create a task
Click task on the header to open details
Click settings and observe notification

Expected Result:
Place holder text or none
Actual Result:
Notification preferences page (Page header) is displayed
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop
[x] Windows: Chrome

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

Windows: Chrome

https://github.com/Expensify/App/assets/78819774/16c27e6c-a078-4f48-b4fd-cbc6f9bc6053

View all open jobs on GitHub

all good


out of ram detect

Hello, since the new update of multi admin, my server does not detect anymore when it is out of ram, I have to restart it manually, I'm on Ubuntu 16.04, thank you

Could you give any more information about the problem? Maybe something like how much RAM you have, and which versions you were using, the version you started with and the version you switched to?

Ubuntu 16.04 XFCE (64 bits), 2 Go RAM, MultiAdmin 1.4.3 works and the new version (1.4.4) doesn't detect ram.


Adding common permissions to each node

Fixes #6.
Signed-off-by: Abrar Rahman Protyasha<EMAIL_ADDRESS>

FYI, some talking points:

I had to manually add the common profile XMLs to this repository because they are not registered to ament index through sros2. ros2/sros2#147 lays the bedding for that, but for time reasons and because it's stale, I opted to go with the current solution. If that PR gets merged (and I'm happy to look at it once there's time), the common profile XMLs in the _common folder can be removed from this repository.
What to do about the difference between node "type"s? I'm primarily thinking of node vs lifecycle node, since they have a different set of "common" permissions. I have thoughts about implementing it (some grounding in types.py and _common/_profile.py), but haven't done so because there doesn't seem to be much talk of a LifecycleNode tag in ros2/design#266.

@clalancette final check of the changes in 25d9db8 and in b54b125?


disable flaky multicluster pilot tests

Temporary to get pilot-multicluster job required. Issue #28834 tracks fixing these flakes.

@stevenctl: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test release-notes_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test release-notes_istio

lint_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test release-notes_istio

lint_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test lint_istio

analyze-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test analyze-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test release-notes_istio

lint_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test lint_istio

analyze-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test analyze-tests_istio

integ-pilot-k8s-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test lint_istio

analyze-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test analyze-tests_istio

integ-pilot-k8s-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test integ-pilot-k8s-tests_istio

release-notes_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test release-notes_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

analyze-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test analyze-tests_istio

integ-pilot-k8s-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test integ-pilot-k8s-tests_istio

release-notes_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test release-notes_istio

lint_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test lint_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-pilot-k8s-tests_istio
e785a2350a4ef3f0810bd53d5f756e5d8b5f2174
link
/test integ-pilot-k8s-tests_istio

release-notes_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test release-notes_istio

lint_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test lint_istio

analyze-tests_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test analyze-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

release-notes_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test release-notes_istio

lint_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test lint_istio

analyze-tests_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test analyze-tests_istio

integ-pilot-k8s-tests_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test integ-pilot-k8s-tests_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test lint_istio

analyze-tests_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test analyze-tests_istio

integ-pilot-k8s-tests_istio
cdca83d367ea3262f1051b42bbd039c9e714c811
link
/test integ-pilot-k8s-tests_istio

release-notes_istio
8fcf50679c7ed4b8f96cc78ddc0dfe5a163c0707
link
/test release-notes_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

In response to a cherrypick label: #28836 failed to apply on top of branch "release-1.8":
Applying: disable flaky multicluster tests
Using index info to reconstruct a base tree...
M	tests/integration/pilot/common/routing.go
Falling back to patching base and 3-way merge...
Auto-merging tests/integration/pilot/common/routing.go
CONFLICT (content): Merge conflict in tests/integration/pilot/common/routing.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 disable flaky multicluster tests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to a cherrypick label: new issue created for failed cherrypick: #28932


Mark event handler as 'passive'

Seen in Chrome console on http://openlayers.org/en/latest/examples/mousewheel-zoom.html
[Violation] Added non-passive event listener to a scroll-blocking '<event>' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
<event> is out of

touchstart
mousewheel
wheel

The warnings are still displayed so this issue isn’t fixed. It can be fixed by implementing my solution in bug https://github.com/openlayers/openlayers/issues/9482 and declaring the passive behavior, whether it is passive or not.

Would it be possible to add {passive: false} to get rid of the warning message in Chrome?

I know it's not necessarily your job to cater to the whims of browser manufacturers... Whether or not the Chrome team used their influence to overreach — the goal of making the web more responsive is good, but I don't like the warning message. I understand that they added it to gain visibility on this important feature, but that doesn't mean I have to like it. In any case, it seems that the warning is here to stay.
A clean DevTools console is a good thing, and false-positive warnings and errors just tend to "cry wolf" and de-sensitize us to the important errors. So to this end, I think it would be good to add {passive: false}.
To implement the this, you could set {passive: false}, which would allow you to preventDefault. But there are browser compatibility considerations — see https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection)


Request an example for using rollbar outside of components/pages (i.e. custom hook or util file)

Hello,
I'm a full stack / DevOps eng, and sadly my React / Next.js knowledge isn't the greatest. I've been having difficulty wrapping my head around how I can access Rollbar and it's provider from custom hook or util files. Would love to see an example

Hye @partounian,   You could use the pattern of the ReactSDK called useRollbar. https://github.com/rollbar/rollbar-react/blob/main/src/hooks/use-rollbar.js.

You could use our hook 'useRollbar' that you can find here


Add support for Symfony v6

Feature Request

Q
A

New Feature
yes

RFC
no

BC Break
no

Summary

Add support for the newly released Symfony v6 packages specifically symfony/event-dispatcher and symfony/console.

@internalsystemerror
Do you know any problems with the new version of the Symfony components?

Just the ones mentioned in the PR description. There is a contract change:
InputInterface::isInteractive(): ?bool is now InputInterface::isInteractive(): bool
and the Question class no longer allows mutliple default values to be passed as an array, only a scalar value. I'm operating on the belief that a multiline default value is how that "should" be done instead.


Store unscaled fee amount in LimitOrder

I plan on using this to calculate the earned fees for settlements.
As part of this I converted many LimitOrder creations in the code to use Default::default().
Test Plan
CI

Codecov Report

Merging #1628 (c500644) into main (cfcc240) will decrease coverage by 0.05%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #1628      +/-   ##
==========================================
- Coverage   66.59%   66.54%   -0.06%
==========================================
  Files         172      172
  Lines       33748    33651      -97
==========================================
- Hits        22476    22394      -82
+ Misses      11272    11257      -15


update the github action for release notes to use the release note labels to automate release note generation

Changes
The first stage in automating release notes.
As I indicated in the mailing list and slack, if we force use of the kind label in our PRs, I can make a subsequent PR to this that will sort release notes by kind
This borrows from upstream tekton, but translates from being encapsulated by github actions to tekton tasks, as well as makes a few other simplifications given the "simpler nature" of our project.
/assign @adambkaplan
/assign @qu1queee
Submitter Checklist

[n/a ] Includes tests if functionality changed/was added
[n/a ] Includes docs if changes are user-facing
[y ] Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes
NONE

An example of the release notes I get in Changes.md when I run HEAD against the v0.3.0 tag:
#595 by qu1queee: Restructure BuildRun reconcile code into separate classes.
#593 by qu1queee: Move controller/reconcile logic into reconciler pkg
#592 by HeavyWombat: Fixed an issue where the build-controller fails to Reconcile with a panic due to a nil pointer dereference. The issue can arise in case there is a failed TaskRun with a pod that has still running (unfinished) containers.

I believe this PR's test runs will benefit from @SaschaSchwarze0 's https://github.com/shipwright-io/build/pull/614

/refresh

let's see if I have to close/reopen this to refresh the e2e list after https://github.com/shipwright-io/build/pull/614 merged

/retest

/skip

/close

yep closing / reopening was needed to clear out the new defunct tests

ok all green e2e's ... thanks @SaschaSchwarze0
now circling back to pulling new changes into a separate shell script
@adambkaplan @qu1queee my first thought is to update the new script to deal with PR kind labels in a separate PR, once the use of the prow plugin has merged and there a couple of PRs with both release notes and kind labels to test with

ok @adambkaplan @qu1queee e2e's are green and new logic broken out into a script file
let the opinions on how to write bash commence :-)

/approve

updates pushed @adambkaplan
I'll update the PR on whether tests are green if you are waiting on that for lgtm

@gabemontero let me check this today, not sure why you approve your own pr, I find this strange.

pushed an update with the changes @HeavyWombat recommended - thanks !!
explanations in the comment threads for changes that were not pulled in

/lgtm


Writing data with timestamp not working

From your example:
    // create an array of points
    $points = array(
        new Point(
            'test_metric',
            0.64,
            array('host' => 'server01', 'region' => 'us-west'),
            array('cpucount' => 10),
<PHONE_NUMBER>
        ),
        new Point(
            'test_metric',
            0.84,
            array('host' => 'server01', 'region' => 'us-west'),
            array('cpucount' => 10),
<PHONE_NUMBER>
        )
    );

    $newPoints = $database->writePoints($points);

with InfluxDB 0.9.1 timestamp is added as 1970-01-01T00:00:01.435255849Z
Same wrong database entry if I do:
        new Point(
            'test_metric',
            0.84,
            array('host' => 'server01', 'region' => 'us-west'),
            array('cpucount' => 10),
            time()
        )

Hey Skynet,
Thanks for pointing it out. @thecodeassassin just made a change in both the documentation and code to allow specify the precision when writing points.
Please check it out.
Thanks

@skynet by default the precision is nanoseconds. This is also the default in InfluxDB. Check https://influxdb.com/docs/v0.9/guides/writing_data.html (section Time Format)


Fix Deployment Errors

This commit fixes, and cleans up, the mount points for the probes. It also
sets the default volume to 1Gi, which is the default across most other Helm
charts; as this value is expected to be provided during a production deployment.

What this PR does / why we need it:
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ ] DCO signed
[ ] Chart Version bumped
[ ] Variables are documented in the README.md

Damn, the DCO.
@samhain1138 can you run git commit --amend --sign-off && git push --force-with-lease to master, please? Hopefully that helps

@rawkode I think it's complaining about your commit not being signed...

@rawkode never mind, I rebased and signed it. Thanks!

Yes, but I can't send a new PR with a force commit. Can you provide admin access to this repo and I'll push to master?

Ah, even better. Thanks, @samhain1138


Update TestBench Page

Is your feature request related to a problem? Please describe.
The testbench generate data page https://circuitverse.org/testbench doesn't really have styling and doesn't look like the rest of the site, also doesn't have a header and footer (and doesn't seem to be linked to anywhere on the site other than in docs?)
Describe the solution you'd like
Update the design of the page, add a header and footer and possibly a link in the tools tab  on the simulator page?
Are you working on this? (Yes/No)
No

@satu0king  can i  add header and footer to the testbench page

I would like to add the requires features like header and footer with a lot more styling.Can I work on this issue?

@akash-arelli  This issue  will be closed soon we are working on the integration  part of testbench  this was  just random pr I made ,after it became  gsoc project so  we are working on it  you can check gsoc 2020 project in you will find this as  first project

@ryuk156 you can maybe help him get acquainted with the current status of this very project so that he can start with contributing to this as well?

@ryuk156  is this issue almost closed?can you tell me about "integration part of testbench" project and what functionalities would the organisation like me to add?

@akash-arelli  the basic idea behind  testbench  is to check  whether  to check circuit  is correct or not so we planned something  like  when user create testbench  the json object is generated  that consist cases,  input array and output array  as part of integration  user can can create may testbench  he /she want this multiple  generated  testbench  are stored in user account and this testbench  will be used when user need it like eg: if a teacher want to check multiple  assignments  he/she will not check every project again and again adding input to them and waiting  for output  instead of that testbench  can be used for every project to check whether  the circuit  made by student is correct  or not and when login to the CV  all the previously  made testbench  will be available  user dont have to create  testbench  again and again


New feature/ids field finder

Summary
This PR introduces a new findall method that searches for specific fields within multiple IDS objects.
The target fields can be specified using either Symbols or Regex patterns.
The findall method returns an IDS_Field_Finder struct for each matched field, containing detailed information that allows for verbose terminal output and plot recipes.
Note: The plot @recipes will be represnted in another PR soon.
Examples
Here are some quick examples.
1. Default behavior
# By default, it searches everything under the given IDS
# Following commands produce the same result
findall(dd.equilibrium.time_slice[].global_quantities)
findall(dd.equilibrium.time_slice[].global_quantities, r"") # Same behavior (Default)
findall(dd.equilibrium.time_slice[].global_quantities, :all) # Same behavior

2. Finding a single field within a single root IDS
 # Find fields matching a single symbol within a IDS structure
IFF = findall(dd.equilibrium.time_slice, :psi)

3. Finding multiple fields within multiple root IDS objects
 # Search for multiple symbols within multiple root IDS objects
IFF = findall([dd.equilibrium, dd.core_sources], [:psi, :j_tor])

4. Keyword argument of include_subfields::Bool=true
  # Control subfield inclusion using the `include_subfields` keyword
IFF = findall(dd, r"prof.*2d"; include_subfields=false)
IFF = findall(dd, r"prof.*2d"; include_subfields=true) # Default behavior

5. Lazy evaluation of the value of found field objects
 # Retrieve actual values of found field objects (lazy evaluation)
IFF[1].value
IFF[end].value

I'd like to avoid this syntax. It doesn't add anything and it conflicts with the idea of plotting a quantity named :all
findall(dd.equilibrium.time_slice[].global_quantities, :all)

Thanks for the quick and thorough review! @orso82
I reflected on all of your comments as follows:

changed color from ":yellow" to ":blue"
removed the ":all" keywords.

I have tested it and merged it. It may be good to write a regression test for this.


fix: Fixed the auth for newer namespace creation

Fixed auth for newer namespace creation.
Fixed a flaky test.

Codecov Report
Base: 31.81% // Head: 31.81% // No change to project coverage :thumbsup:

Coverage data is based on head (e8b7487) compared to base (0a68a4b).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #597   +/-   ##
=======================================
  Coverage   31.81%   31.81%
=======================================
  Files          96       96
  Lines       11268    11268
=======================================
  Hits         3585     3585
  Misses       7361     7361
  Partials      322      322

Impacted Files
Coverage Δ

api/server/v1/tx.go
0.00% <ø> (ø)

server/middleware/auth.go
30.43% <ø> (ø)

server/middleware/namespace.go
0.00% <0.00%> (ø)

server/request/request.go
13.87% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


[Question] Alternative with self-hosted database

I am searching a way to use a polymerfire based app in a LAN, without internet and firebase access.
Is there any alternatives which is polymer compatible and uses a firebase alternative?
Best would be a drop-in replacement the app side.

I don't think that would be possible. Unless you know how firebase works on the backend or create a pseudo-firebase js to replace the original firebase which polymerfire uses, and then tweak all of the elements in polymerfire to use the pseudo-firebase js connector to your makeshift local database.

Your best bet would probably to use pouchdb. you can find it at webcomponents.org.


Added one pair of vid_pid for Arduino Nano

Hey, thank you for your great Arduino libraries.
I wanted to try out rust for embedded on one of my Arduino Nano's and noticed, that the guess_port method failed for my device due to missing vid,pid pairs for the arduino nano via:
Error: no matching serial port found, use -P or set RAVEDUDE_PORT in your environment

Caused by: Not able to guess port

I added at least my pair and added a sentence about this failure inside Readme.
[34817.652918] usb 1-4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[34817.652927] usb 1-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[34817.652932] usb 1-4: Product: USB Serial
[34817.654680] ch341 1-4:1.0: ch341-uart converter detected
[34817.655335] usb 1-4: ch341-uart converter now attached to ttyUSB0

Bus 001 Device 009: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

Hi, thanks a lot for the PR.
Unfortunately, the story isn't quite as simple... CH341 is a generic USB-to-serial converter chip which is built into many devices.  The VID:PID pair here does not uniquely identify an Arduino Nano (clone) - it could be any other device using this chip as well.  Genuine Nano's have the same problem, they use a generic chip from FTDI whose VID:PID also does not uniquely identify the device.
In contrast, for example the Arduino Uno has a VID:PID (2341:0043) which is unique to this board - thus we can match on it.  For Arduino Nano, we don't have any such option available... Thus I would rather not include any port guessing for this board and prompt the user to select the correct port explicitly.  While it might be working for you right now, this could go wrong for people who have other CH341 based devices connected at the same time.
That said, the README change is not a bad idea!

Hi Rahix, sorry for my late response.
Oh okay, no problem. I reverted my changes to the port_guessing such that you can include only the Readme change.
I have no problem, with manually choosing the port, but I noticed, that it looks like the Platform IO project still decided to guess a port and let the user manually adjust the port, if a wrong port was chosen.
I just tried to flash a simple LED/C program and I didn't needed to select my device.
I added a link to a post from their forum for a use-case similar to mine, I think:
https://community.platformio.org/t/auto-detect-port-explained/16062/2
Just out of curiosity, is there a deeper motivation behind your decision?

Just out of curiosity, is there a deeper motivation behind your decision?

Well, I am a huge opponent of "smart" software:  If there is an obvious path to choose, do it, but in face of ambiguity, I think software should never guess.  At least software targetting tech-savvy people, that is.
As I wrote above, these CH341 chips show up in all kinds of devices, so assuming that it is the right one feels wrong to me.
That said, I certainly agree that usability of ravedude in this regard is quite bad and some form of a solution is needed... My "plan" is to implement a prompt when devices were found but could not be identified.  The user can then select one of the devices and optionally have it written to a config file for next time.


Power on individual zones

Is it possible to setup zone 1 vs zone 2 power individuality? My pioneer VSX receiver has 2 zones and would want to be able to just power on zone 2 by itself

If the iControl AV app supports it. it should be possible. I cannot help you implementing this since I have no longer access to a suitable pioneer av receiver.


Bugfix wanet validation

This PR is about fixing so that the datasets in val_data are using the same warping field for the WanetBackdoor as the training set.
Remaining steps:

[x] ~Train detector for BackdoorTask does not work, self.get_path() gives path to train_detector, but should use path to train_classifier~ Problem identified between computer and chair
[x] Set _control_grid as Optional argument and initialize in post_init to get it into the config.yaml for reproducibility
[x] ~Remove unneeded~ Update store and load commands in backdoor to use control_grid instead

I managed with a lot fewer changes than I first thought, but I also added some that were mostly by taste.
There is one thing I believe we've discussed already and that's whether the WanetBackdoor store should save full warping field or only control grid. I reverted this because it was confusing in some checks when control grids were different but not warping fields. And to solve the fact that warping grid width could possibly change from loading I chose throw a warning there.
There is the possibility of setting the width to Optional and only throw a warning/error if it is actually overwritten. I haven't done it yet, but it would be a simple change.

Thanks for the responses and changes! Happy for you to merge this at any time (with or without making copying in backdoors more consistent, I can also do that separately when I get a chance)


StripDataSource

This PR demonstrates one possible way to strip proprietary information out of profiles. It provides an adapter for the DataSource interface that takes another DataSource and then filters all the resulting ItemMetas to redact all the string contents of those profiles. At the moment it's a pretty heavy hammer so it just strips out everything.

If you want something that is not quite a drastic hammer (e.g., being more specific about what gets stripped instead of taking out essentially every human-readable string), then it will probably need to be implemented at the StateDataSource level instead of as an adapter on the DataSource. But what's in this PR is definitely the fastest way to get this done.


Add "trending" sort order to search page

Fixes #3447
Add zscore to Project document mapping
Add zscore to _project_docs query to populate on reindex
Add "Trending" sort order to search ordering dropdown

The results in the screenshot are not particularly relevant since I populated the zscore with random values on 100 project. It'd be nice to test it with proper values if possible to guage how useful the sort order is.

I think we probably want to break this into two PRs:

a PR which adds the zscore to the index
a PR which enables the search option.

That way, we can deploy #1, let the index rebuild (IIRC this is happening every 6 hours now?) and then deploy #2.

I'll be splitting this PR into two as suggested, but I while working on this I found I agree with #3932.
I think if we included the package's downloads in the index and give it a boost score we could have the standard search align more to the results expected by users. Does that sound reasonable? I could include it in the first split PR from this one if so.

Split into #5252 and #5253


How to export item from drop down in admin

I have a module Project with drop down lists, and inside of Project I have project names , like Project1, Project2, Project3 etc..
So , when I export to xls or csv , I got integer instead of names.
For example, when I export list, I got 1 or 3 or any other number instead of name Project1 or Project3 etc..
How can I solve this ?
I couldn't find any answer about that, and I would appreciate any answer.

Where are the project names stored? It would help if you could paste the relevant code of your model(s).

Where are the project names stored? It would help if you could paste the relevant code of your model(s).

Here is my model.py and simply I just want to export this to XLS or CSV, but when I export instead of fields names I got ID of ForeignKey... only numbers.
class Furgo(models.Model):
title = models.CharField(max_length=50)
date = models.DateField(null=True)
author = models.CharField(max_length=30, blank=True)
worktime = models.CharField(max_length=50, blank=True)
code = models.CharField(max_length=50)
utilisation = models.ForeignKey('Utilisation', on_delete=models.CASCADE, blank=True, default=None)
project = models.ForeignKey('Project', on_delete=models.CASCADE, blank=True, default=None, )
comment = RichTextField(blank='')
comment_project = RichTextField(blank='')
comment_equipment = RichTextField(blank='')
comment_car = RichTextField(blank='')
categories = models.ManyToManyField('Category', blank=True)
class Meta:
    verbose_name = 'furgo'
    verbose_name_plural = 'furgos'

class Utilisation(models.Model):
name = models.CharField(max_length=30, blank=True, )
def __str__(self):
    return self.name

class AutoCar(models.Model):
car = models.ManyToManyField('AutoCar')
def str(self):
return self.car
class Project(models.Model):
name = models.CharField(max_length=30, blank=True, default=None)
def __str__(self):
    return self.name

This is happening because Django Import/Export doesn't know what to do with your ForeignKey fields. By default, it will just export the content of the fields themselves (i.e. integers) rather than the records they point to.
There are a couple of ways of fixing this. (I'm not an expert, so please forgive me if they don't work as well as I'd hope.)
Both of them require you to create a a customised ModelResource subclass. So try creating resources.py and adding this:
from import_export import resources, fields
from .models import Furgo

class Furgo(resources.ModelResource):

	class Meta:
		model = Furgo
		fields = ('title', 'date', 'author', 'worktime', 'code')

Some of this is explained in the Getting Started documentation. You also need to specify your new Resource class in the FurgoAdmin - see that page for how.
1. Specify a related field in the fields
It may be enough to add a relational field name to the fields attribute:
	fields = ('title', 'date', 'author', 'worktime', 'code', 'project__name`)

Try this on its own first. It should work for exporting but not for importing.
However, if it doesn't work, or you need importing too, then try...
2. Use a ForeignKey widget
You can read more about this widget here.
from import_export import resources, fields
from import_export.widgets import ForeignKeyWidget
from .models import Project

class Furgo(resources.ModelResource):
	project = fields.Field(
		attribute='project',
		column_name='project',
		widget=ForeignKeyWidget(Project, 'name')
	)

	class Meta:
		model = Furgo
		fields = ('title', 'date', 'author', 'worktime', 'code', 'project')

@yozlet
Well, If I find a way how to buy a beer of Jack Daniels to you !
You are helping a lot with this infos.
Here is complete code from resource.py
from import_export import resources, fields
from import_export.widgets import ForeignKeyWidget
from .models import Project, Utilisation, Car, Author
class FurgoResource(resources.ModelResource):
author = fields.Field(attribute='author', column_name='author', widget=ForeignKeyWidget(Author, 'name'))
date = fields.Field(attribute='date', column_name='date')
worktime = fields.Field(attribute='worktime', column_name='worktime')
code = fields.Field(attribute='code', column_name='code')
comment = fields.Field(attribute='comment', column_name='comment')
comment_project = fields.Field(attribute='comment_project', column_name='comment_project')
comment_equipment = fields.Field(attribute='comment_equipment', column_name='comment_equipment')
comment_car = fields.Field(attribute='comment_car', column_name='comment_car')
project = fields.Field(attribute='project', column_name='project', widget=ForeignKeyWidget(Project, 'name'))
utilisation = fields.Field(attribute='utilisation', column_name='utilisation', widget=ForeignKeyWidget(Utilisation, 'name'))
car = fields.Field(attribute='car', column_name='car', widget=ForeignKeyWidget(Car, 'name'))
fields = ('author', 'date', 'worktime', 'code', 'project', 'car', 'utilisation')

class Meta:
model = Project

@milanmaximo Sorry for taking a while to respond! Did you fix it? I think I see some other changes to make if you still need help.


Fix UnitySensorROS git URI in README

Fixed a small typo in URI.
UnitySensorsROS git repository seems to be merged to the main UnitySensors repo.

Thank you for your fix.
As you mentioned, the UnitySensorsROS repository is now renamed into UnitySensors (this repository !).
And because of that, this typo was occurred, I think.
By the way, thank you for your fix.
I will merge it.


update crate name in README

heya! I was using leafwing today and got a warning when I copy/pasted the name from the readme instructions because the crate name uses dashes and not underscores.
Not sure if you want it to show underscores intentionally but figured I'd PR a change anyway.
thanks for the crate, it's very useful!

Thanks for the fix :)


Challenge: Add a link to each challenge which opens the location of the solution in github

Challenge: Add a link to each challenge which opens the location of the solution in github

@sadanandpai I can work on this


updated react-router-dom to v6

Upgraded to latest version of react-router-dom.

@robertraviv may remove the .env.example accidently?

Yeah, I just renamed the same file locally to .env instead of duplicating first...


No access to ConstraintViolationException.constraintName

Hello Hibernate team,
I'm migrating an existing app to Quarkus and I want also to use Hibernate reactive.
Quarkus platform version is: 2.11.1.Final
In the current dependency pulled in: org.hibernate.reactive:hibernate-reactive-core:1.1.7.Final, it seems there is no access to the "constraintName" property of ConstraintViolationException class.
Is this on purpose, then how can I check the reason of the violation.
Could you please have a look?
Regards,
Daniel

You are right, we don't extract the code from the error message.
Right now you need to parse the error message if you want to extract the constraint name.
For future reference, at the moment the error message for Postgres is:
org.hibernate.HibernateException: io.vertx.pgclient.PgException: ERROR: duplicate key value violates unique constraint "uk_ddwji91nxj43borrm1ii72th8" (23505)

On top of this, we don't seem to throw the right exception when there is a constraint violation.
We should throw a ConstraintViolationException but we throw a generic HibernateException. It's possible to see this via MutinyExceptionsTest.
I've only given this a quick look though.
We should probably wait until the integreation with ORM 6 is done.

Thank you @DavideD for the very quick reply.
Didn't mention we are using Oracle, but I guess the message will be similar and I can deal with it.
Maybe worth to open another issue to track the Exception type issue, this seems to be more serious?
Best regards.

This was something I discusses with @tsegismont on the train one day recently.
Basically, the whole exception mapping stuff in Hibernate (IIRC) is currently unimplementable in HR because the SQL client doesn't expose the error codes we would need to implement that.
So this is actually bigger problem (really a missing feature).
I believe there is now issue open against the Vert.x client.

The SQL state or vendor error code are now accessible from the exception


Memory leak when using functional components with Vue router in Vue 2.7.14

Reproduction
https://github.com/diegoexplicatis/vue-2-functional-component-memory-leak
Steps to reproduce the bug
See README.md of reproduction link
Project setup
npm install

Run project
npm run serve

How to reproduce memory leak

Open base url of project (printed in console)

Click on "Go to Test Component"

Click on Home

Open developer tools and take a heap snapshot

Filter for "Objects retained by detached DOM nodes"

See there are detached elements, e.g. a paragraph element with id = testParagraph.

Manually trigger garbage collection

Take another heap snapshot and filter for "Object retained by detached DOM nodes" again

See that e.g. the paragrpah is still being retained => paragraph element has leaked (it is detached from the DOM but is not being garbage collected)

Go to FunctionalComponent.vue to line 4 and change the parameter for functional to "false"

Redo steps 1 - 8

See that there are not detached elements (even without manually garbage collecting) => all elements have been properly garbage collected

Expected behavior
I would expect that after executing steps 1-8,  e.g. the paragraph element is not being retained anymore and has been garbage collected independent of the value for the functional parameter in FunctionComponent.vue
Actual behavior
Instead the paragraph element is being retained when using functional: true and does not get garbage collected.
Additional information
System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
    Memory: 6.27 GB / 23.86 GB
Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
    Edge: Chromium (128.0.2739.79)
    Internet Explorer: 11.0.19041.4355
npmPackages:
    vue: ^2.7.14 => 2.7.16

@posva The memory usage does continually increase. When repeating steps 2. and 3. five times I get five detached paragraph elements that do not get garbage collected!

You already opened https://github.com/vuejs/vue/issues/13212
If this is important to you, try coming up with a PR or upgrade to Vue 3
Herodevs can help you out with Vue 2 support


Investigate appropriate replay session rates for Sentry

User Need
As an Operations Engineering Team
I want to know that we have appropriately sized quotas available for Session Replays
so that we don't run out of the quota before the end of the month.
Value
By understand appropriate levels of usage we can size the subscription appropriately so that we don't run out of sessions. We ran out this month (November) due to the way a project was configured. The MoJ quota is set to the default of 500 sessions.
Functional Requirements:

We should understand best practice guidance on appropriate levels
We should understand who is using the current feature.
We should ask Sentry for some usage estimates

Acceptance Criteria:

We have data that helps us understand usage so that we can estimate an appropriate level for the organisation.

Notes:
<!-- Here's a brief explanation of each field:

**We should add this feature to our Sentry anomaly detection. Separate story required.**

We have data and can decide on how to increase quota


stable, dev PyTorch in Dockerfile and conda gh actions

What does this PR do?

Fixes #2090
Before submitting

[x] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] If you made a notable change (that affects users), did you update the CHANGELOG?

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

The new added github actions will be merged into docker-builds.yml if approved

maybe but in Conda env we are running only CPU tests compare to the CUDA-pip image we run in Drone with the full suite case

Found out pytorch CUDA image itself is also using conda, so go with it right now.
would you like to change to pip?

Found out pytorch CUDA image itself is also using conda, so go with it right now.
would you like to change to pip?

Well but is conda activated by default?

Found out pytorch CUDA image itself is also using conda, so go with it right now.
would you like to change to pip?

Well but is conda activated by default?

yes

for GPU testing with stable and dev PyTorch on Drone, shall we do testing in parallel or one after another?
I go for one after another
WDYT?

@Borda I have noticed that PyTorch & Conda github actions is installing gpu version of pytorch while we are not testing with gpu. Is this for some reasons or shall i add cpuonly package in environment.yml to save a few pkg installing minutes?

@Borda mind review this so far?
so that i can proceed https://github.com/PyTorchLightning/pytorch-lightning/pull/3074#issuecomment-681859896 and https://github.com/PyTorchLightning/pytorch-lightning/pull/3074#issuecomment-680894091

btw, is it still wip?

btw, is it still wip?

I haven't worked on Drone CI for GPU testing, so can be said wip
waiting for review of current base-cuda Dokerfile

@Borda do I need to change this docker image?
https://github.com/PyTorchLightning/pytorch-lightning/blob/64ee25ed9cd1d44bb276b61683bbdfee0b00ff9d/.drone.yml#L23

@Borda do I need to change this docker image?
https://github.com/PyTorchLightning/pytorch-lightning/blob/64ee25ed9cd1d44bb276b61683bbdfee0b00ff9d/.drone.yml#L23

you cannot until it is build for the first time and push to the docker hub...

@Borda do I need to change this docker image?
https://github.com/PyTorchLightning/pytorch-lightning/blob/64ee25ed9cd1d44bb276b61683bbdfee0b00ff9d/.drone.yml#L23

you cannot until it is build for the first time and push to the docker hub...

Ok then, shall we build the docker from this PR without merging into master?
OR build the docker from master and make another follow PR of this?

@Borda ready to review

let's wait this build is merged #3383

@ydcjeff blocking #3383 is merged, can you pls rebase so we can finish this one...

@Borda good to go

just thinking that the image is very similar to the conda one, see would it make sense to later build the `Conda image on base CUDA?

yes, that's a great option.

@Borda Don't we need to install extra.txt and amp?

@tgaddair mind help with building Horovod for Conda env?

@Borda Don't we need to install amp?

in Conda we have it already as package
https://github.com/PyTorchLightning/pytorch-lightning/blob/93cf6d00541c1e6c6aef30010e62ed471c423af5/environment.yml#L35

Hey @Borda, what's the issue you're seeing with Horovod?

It was failing without special reason...

It was failing without special reason...

Is it still failing?  Looks like tests are passing, did you disable something?

@tgaddair Thank you for your reply.
At first, installing horovod was failing with if we set MAKEFLAG resulting in the error of unknow argument of VERBOSE=1
Accidently, I found out your PR on horovod and temporarily commnet out MAKEFLAGS and it worked.
Is this the correct way to fix for now?
Tests are installing horovod 0.20.

Hey @ydcjeff, glad you found that fix.  We will probably release v0.20.1 in a week or two, so I will try and remember to update this when we do.
Yes, unsetting MAKEFLAGS is a workaround.  Another option is to install with pip install --global-option="--quiet" , so the verbose flag does not get set.

Hey @ydcjeff, glad you found that fix. We will probably release v0.20.1 in a week or two, so I will try and remember to update this when we do.
Yes, unsetting MAKEFLAGS is a workaround. Another option is to install with pip install --global-option="--quiet" , so the verbose flag does not get set.

wound this global work also when it is installed with Conda?

LGTM, just the build seems to be failing on PT 1.7

that is b/c torchvision was installed as 0.2.1, haven't faced that kind of lower version in previous commits.

Hey @ydcjeff, glad you found that fix. We will probably release v0.20.1 in a week or two, so I will try and remember to update this when we do.
Yes, unsetting MAKEFLAGS is a workaround. Another option is to install with pip install --global-option="--quiet" , so the verbose flag does not get set.

wound this global work also when it is installed with Conda?

I think it works

@ydcjeff seems that tests for pt 1.7 are failing so I would recommend to keep the CI ready and just comment for now...
then make another PR which would fix the failing test and uncomment the testing


Redpanda v22.1.x coroutine

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: BenPope:x: tchaikovYou have signed the CLA already but the status is still pending? Let us recheck it.


test_where fails with AssertionError

test_where fails with the Assertion Error:
nosetests test_search.py
==================================================================
FAIL: test_where (test_search.TestWhere_param_0)  parameter: {'cond_shape': (2, 3, 4), 'y_shape': (2, 3, 4), 'x_shape': (2, 3, 4)}
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<path>/cupy/testing/helper.py", line 627, in test_func
    impl(self, *args, **kw_copy)
  File "<path>/cupy/testing/helper.py", line 115, in test_func
    check_func(cupy_result, numpy_result)
  File "<path>/cupy/testing/helper.py", line 165, in check_func
    rtol, atol, err_msg, verbose)
  File "<path>/cupy/testing/array.py", line 26, in assert_allclose
    rtol=rtol, atol=atol, err_msg=err_msg, verbose=verbose)
  File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 1391, in assert_allclose
    verbose=verbose, header=header)
  File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 733, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1e-07, atol=0

(mismatch 100.0%)
 x: array([[[ 5.488135,  0.      ,  0.      ,  5.448832],
        [ 0.      ,  0.      ,  0.      ,  0.      ],
        [ 0.      ,  0.      ,  0.      ,  5.288949]],...
 y: array([[[ 5.      ,  7.151894,  6.027634,  5.      ],
        [ 4.236548,  6.458941,  4.375872,  8.91773 ],
        [ 9.636628,  3.834415,  7.91725 ,  5.      ]],...
-------------------- >> begin captured stdout << ---------------------
{'x_type': <type 'numpy.float64'>, 'y_type': <type 'numpy.uint16'>, 'cond_type': <type 'numpy.bool_'>}

Similar error is seen for the other three parameters of the test case.

TestWhere.test_where was replaced with other test cases. https://github.com/pfnet/chainer/commit/8a31b1078192f41fe2ec472ba12b7be603eb0f16 Could you run test with the latest version?

I am currently using v1.18.0 of chainer and I think I will need to continue with it for some more time. Do you think that the test had any such issue before it was replaced with the newer test cases?

I executed this test with chainer v1.18.0, and it passed. And of course we always checks if all test cases are passed before releasing each version.
Can you tell me details of your environment?


Fixing our motive section

Issue that this pull request solves
Closes: #248  (SWoC participant)
Proposed changes

[x] On hovering, the whole card content should be white
[x] Make the icon size a bit smaller

Brief description of what is fixed or changed
added margins on icons and change color of text on hovering
Types of changes
Put an x in the boxes that apply

[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (Documentation content changed)
[ ] Other (please describe):

Checklist
Put an x in the boxes that apply

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] My changes does not break the current system and it passes all the current test cases.

Screenshots

Other information
Any other information that is important to this pull request

@salil-naik   padding: 20px 10px; already added in .single-features and  padding-right:18px I have added in .features-icon

@salil-naik   padding: 20px 10px; already added in .single-features and  padding-right:18px I have added in .features-icon

@abhay313 we need equal padding on all 4 sides. So put padding:20px. Remove 10px.

@abhay313 we need equal padding on all 4 sides. So put padding:20px. Remove 10px.

done @salil-naik

done @salil-naik

Check it once

Check it once

@abhay313 looks nice and clean just replace the first icon with [this](https://fontawesome.com/icons/bullhorn?style=solid one and it would be good to go!

@abhay313 looks nice and clean just replace the first icon with [this](https://fontawesome.com/icons/bullhorn?style=solid one and it would be good to go!

Is it fine ?

Is it fine ?


Add contract tabs for matched proxy contracts

Closes #1251, and also displays the source code of the proxy's implementation address in a new tab.
Things to consider:

Having separate tabs for a proxy Contract and proxy Read Contract tab is great for when other proxy types are supported, since proxy contracts might be verified and add functions on top of the implementation contract's functions.
On the other hand, it takes up space in the header
Maybe we should be clear about which type of proxy is matched and give a link to the implementation contract somewhere, e.g. in the proxy's Contracts tab.

do you have some contract address I could use to test it (on sepolia or mainnet)? otherwise I can search for it

@wmitsuda 0x9Ba02A9919beB4EA7B409B8528A675ce86dA5469 on mainnet is one example.

uh, it got a conflict because of another merge, could you rebase plz?

0x9Ba02A9919beB4EA7B409B8528A675ce86dA5469

that's strange, was able to get Sourcify working again, but this address seems to not be verified, see:

do you see something different in your env @sealer3 ?

@wmitsuda No, I believe I verified the implementation contract myself recently, so it may not be distributed via IPFS yet. Try using the HTTP Sourcify repo.

can't find it in the HTTP repo as well... maybe they restored the repo from a backup?

The implementation is at https://repo.sourcify.dev/contracts/full_match/1/0xE7fd730dD22d4C834CF6d5b8D539de8b14567AF4/metadata.json
and it should look like this in the UI:

now I see it, for some reason it is in the http repo, but not published in ipns. And because the ipfs chrome plugin intercepts published websites, when trying to access the http repo I was being redirected to the ipns one, I had to disable ipfs completely.
it looks good, it is working :)
but I think we can do some UI polishing here. I think I'll close the release 2.1 first with only withdrawals and postpone the merge of this one to the next release so we can think of some improvements.
I'll post my suggestion here.

Yes, and we should probably also tell users somewhere what type of proxy it is and the implementation address.


0.6.11 compilation error: UnimplementedFeatureError: Encoding type "struct StdInvariant.FuzzSelector memory[] memory" not yet implemented.

Component
Forge
Have you ensured that all of these are up to date?

[x] Foundry
[x] Foundryup

What version of Foundry are you on?
forge 0.2.0 (ecddbdb 2023-02-17T00:11:42.4198088Z)
What command(s) is the bug in?
forge test --match-contract "<any 0.6.11 solidity contract>" -vvvvv
Operating System
Linux
Describe the bug
Solidity 0.6.11 compilation error: UnimplementedFeatureError: Encoding type "struct StdInvariant.FuzzSelector memory[] memory" not yet implemented.
In: lib/forge-std/src/StdInvariant.sol
Quite a common problem when compiling old versions. Most likely due to the fact that the structure is used in returns.

Looks like you just need to add the pragma experimental ABIEncoderV2; directive for >=0.6.2 <0.8.0, because if you compile it with >=0.7.4 <0.8.0 it gives a more detailed error:
Compiler run failed
error[6594]: test/Counter.t.sol:7:1: TypeError: Contract "CounterTest" does not use ABIEncoderV2 but wants to inherit from a contract which uses types that require it. Use "pragma experimental ABIEncoderV2;" for the inheriting contract as well to enable the feature.
contract CounterTest is Test {
^ (Relevant source part starts here and spans across multiple lines).
lib/forge-std/src/StdInvariant.sol:61:5: Type only supported by ABIEncoderV2
    function excludeArtifacts() public view returns (string[] memory excludedArtifacts_) {
    ^ (Relevant source part starts here and spans across multiple lines).
lib/forge-std/src/StdInvariant.sol:73:5: Type only supported by ABIEncoderV2
    function targetArtifacts() public view returns (string[] memory targetedArtifacts_) {
    ^ (Relevant source part starts here and spans across multiple lines).
lib/forge-std/src/StdInvariant.sol:77:5: Type only supported by ABIEncoderV2
    function targetArtifactSelectors() public view returns (FuzzSelector[] memory targetedArtifactSelectors_) {
    ^ (Relevant source part starts here and spans across multiple lines).
lib/forge-std/src/StdInvariant.sol:85:5: Type only supported by ABIEncoderV2
    function targetSelectors() public view returns (FuzzSelector[] memory targetedSelectors_) {
    ^ (Relevant source part starts here and spans across multiple lines).

Yes, it works fine

@DaniPopes thanks a ton! Works like a charm.


Publish pre-built plugins

Is your feature request related to a problem? Please describe.
Building protoc from source is annoying. That's why toolchains_protoc exists and why Bazel has introduced the --incompatible_enable_proto_toolchain_resolution flag. But, if you want to use gRPC plugins, you still have to build protoc from source, because plugins in //src/compiler depend on it.
Describe the solution you'd like
Release pre-built binaries for the gRPC plugins, at least for common platforms (Linux / Mac, x86_64 / aarch64). I've already implemented this on a fork with a fairly minimal GitHub action. See e.g. this release. Can I try to upstream this functionality?
Describe alternatives you've considered
Keep using the binaries distributed by my fork, but that means I have to manually rebase and trigger the workflow whenever we want new releases.
Additional context
See this discussion.

This sounds useful and it needs to cover all the platforms and languages to support. Also our build pipeline doesn't use github action so it needs to be done differently.

request similar to https://github.com/grpc/grpc/issues/33575


Boilerplates => npm packages

This will simplify matters

@einari
We must come up with a package naming strategy. This strategy should perhaps also capture a convention that enables us to easily discover boilerplate packages.
Suggestions:

@dolittle/boilerplates/
@dolittle/boilerplates/<BoilerplateType [application, boundedContext, artifact]>/
@dolittle/boilerplates.<BoilerplateType [Application, BoundedContext, Artifact]>/

Artifact Templates are also a thing, they're kinda like boilerplates, but they are specific to artifacts. They could also be "package-ified"


fix bug with files and directories that have dollar sign in name

this is a fix for issue #420 which seems to be the better than the fix-hack proposed in that thread.

@alegen Good work. Thanks for the contribution.


Using 'zinnia.plugins.placeholder.EntryPlaceholder' as Entry Base Model causes DatabaseError

When using ''zinnia.plugins.placeholder.EntryPlaceholder', as ZINNIA_ENTRY_BASE_MODEL as suggested in the configuration docs, a DatabaseError is generated when visiting http://localhost:8000/admin/zinnia/. (0.8.1 release).
Examination reveals that the column zinnia_entry.content_placeholder_id does not get created by either the syncdb or migrate commands.
Creating the column manually (ALTER TABLE zinnia_entry ADD COLUMN content_placeholder_id integer on PostgreSQL) is an interim fix.

I believe this is being referred to in the installation instruction of cmsplugin-zinnia. Though, with Django 1.8+ the mentioned instruction do not directly help, and are merely a hint on how to fix the issue. A complete solution in the README would be nice.

As explained in the Zinnia docs with Django 1.7+ we can use the MIGRATION_MODULES settings to provide a full set of migrations properly inside our own projects. You can go about it like this:
You have this in your project settings already:
ZINNIA_ENTRY_BASE_MODEL = 'cmsplugin_zinnia.placeholder.EntryPlaceholder'

Now run python manage.py migrate, and afterwards python manage.py makemigrations.
This will create an additional migration 0003_entry_content_placeholder.py in the migrations folder of zinnia (i.e. the zinnia package in the site-packages of your virtual environment). You can copy all migrations of Zinnia including the new one to a migrations folder in your project, e.g. myproject/migrations/zinnia/.
Now, add this to your project settings:
MIGRATION_MODULES = {
    'zinnia': 'myproject.migrations.zinnia',
    # (you may have other migrations here already for django CMS 3 plugins)
}

(Note that the Zinnia documentation suggests to collapse all prior migrations into an initial migration. However, when you do it this way your migrations fully match Zinnia's migration, which may be good for retracing changes for historical and debugging reasons one day.)
 Zinnia will work with django CMS' placeholders, and you can re-execute those migrations again from zero anytime.


Add devcontainer and make some clean up

[x] Add the option to use VSCode Remote Containers for easy streamlined development environment.
[x] Removed unused dependencies as well as some leftover files. Fixes #30
[x] Moved scxml.py from xstate to tests since it's just test utility.

Should be ready for merge now


Add stack web ui page

What changes are proposed in this pull request?
User can see stacks info by web ui
Why are the changes needed?
Add a stacks label on web ui is more convenient than use url.
Does this PR introduce any user facing changes?
Web ui add a menu to show stacks

Codecov Report

Merging #14293 (919a569) into master (6a18760) will decrease coverage by 25.67%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master   #14293       +/-   ##
=============================================
- Coverage     43.03%   17.36%   -25.68%
+ Complexity     9308     2723     -6585
=============================================
  Files          1448     1448
  Lines         84203    84203
  Branches      10178    10178
=============================================
- Hits          36239    14619    -21620
- Misses        44960    68316    +23356
+ Partials       3004     1268     -1736

Impacted Files
Coverage Δ

...mon/src/main/java/alluxio/shell/CommandReturn.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...mon/src/main/java/alluxio/util/ExceptionUtils.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...n/src/main/java/alluxio/wire/AlluxioProxyInfo.java
0.00% <0.00%> (-100.00%)
:arrow_down:

.../src/main/java/alluxio/wire/AlluxioMasterInfo.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...src/main/java/alluxio/job/meta/JobIdGenerator.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...n/src/main/java/alluxio/stress/BaseParameters.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...src/main/java/alluxio/client/UnderStorageType.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...main/java/alluxio/underfs/options/ListOptions.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...main/java/alluxio/worker/block/io/BlockReader.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...main/java/alluxio/worker/block/io/BlockWriter.java
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 676 more

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 6a18760...919a569. Read the comment docs.


One billion words. How to find/make the dictionary of tokens

Hey, I am trying to get the builtin dataset -onebillionword - working. However, I am a little mystified as to where to find/get/create a dictionary for the init of the vocabulary.
from fuel.datasets import OneBillionWord
word = OneBillionWord(('training',),[0,1,2,3,4,5],???)

vocabulary (dict) – A dictionary mapping tokens to integers. This dictionary is expected to contain the tokens ,  and , representing “start of sentence”, “end of sentence”, and “out-of-vocabulary” (OoV). The latter will be used whenever a token cannot be found in the vocabulary.

Is there one stored somewhere in fuel? Or is there one on the net? or ???

you could do something like:
from collections import Counter

test_str = 'this this is a test'
words = Counter(test_str.split())
min_freq = 1
vocab = {i[0]:v for v,i in enumerate(words.items()) if i[1] >= min_freq}
vocab_size = len(vocab)
vocab['<S>'] = vocab_size
vocab['</S>'] = vocab_size+1
vocab['<UNK>'] = vocab_size+2

Since there are a lot of unique tokens in the billion word corpus, you probably want to use something like collections.Counter to filter out tokens below a frequency threshold, or just define a hard cutoff for the number of tokens you want in your vocabulary. So read the billion word corpus into a list of tokens, then count them and discard the tokens below your threshold as in the example above.

Ok, cool. I think it makes more sense to me (my first time playing around with NLP data). I didnt quite understand what the tokens were for...
Although, I still dont quite get how i would

read the billion word corpus into a list of tokens, ...
As first I need a dict of tokens, to read the onebillionwords.

Although I guess I could go make one, i just thought there would be some more elegant/cleaner way, like;
from fuel.datasets import OneBillionWord.English.vocab as vocab
Anyway, now i get
OSError: 1-billion-word/training-monolingual.tokenized.shuffled/news.en-00001-of-00100 not found in Fuel's data path
I had a quick look for where the data should be, but couldnt find it.

Here's a realistic example using the Fuel source code for inspiration -- first you need to download the 1-billion-word corpus, untar it, rename the inner directory to 1-billion-word, and put it in your $FUEL_DATA_PATH (note that I found the renaming thing by reading this code).
import codecs
import os
from collections import Counter

from fuel.utils import find_in_data_path

which_partitions = range(1,5)
files = [find_in_data_path(os.path.join(
         '1-billion-word', 'training-monolingual.tokenized.shuffled',
         'news.en-{:05d}-of-00100'.format(partition)))
         for partition in which_partitions]

words = Counter()

for f in files:
    with codecs.open(f, encoding='utf8') as inp:
        lines = [l.split() for l in inp.read().strip().split('\n')]
        words.update(word for line in lines for word in line)

min_freq = 10
vocab = {i[0]:v for v,i in enumerate(words.items()) if i[1] >= min_freq}
vocab_size = len(vocab)
vocab['<S>'] = vocab_size
vocab['</S>'] = vocab_size+1
vocab['<UNK>'] = vocab_size+2

A few caveats --

the billion word dataset is huge, so I'm just loading the first 4 partitions in this example. That should give you a good idea of the most frequent tokens anyway. You could definitely run out of RAM as the size of your Counter grows.
the TextFile dataset in Fuel depends upon the input files being whitespace tokenized -- for the billion words dataset this is already the case, but for other data you would need to make sure that the files are tokenized properly.
usually for model development it's easier to know the exact size of the vocab, instead of thresholding based on frequency, if you want to do that you could replace

    vocab = {i[0]:v for v,i in enumerate(words.items()) if i[1] >= min_freq}

with:
    vocab = {i[0]:v for v,i in enumerate(words.most_common()[:50000])}

Your final vocab size would then be 50000+3 (because we added the unknown, begin and end tokens).

I usually do this preprocessing once, then use cPickle to save the vocab dict somewhere, then load the pickled dict later. Otherwise, every time you run your code you'll have to wait for the vocab to build, which will get boring :smile:

BTW I'm not a fuel developer but I suspect it would be better for you to ask this kind of question on the mailing list, since issues are typically for things related to development, like bugs and proposed features.

Ok, thanks. I'll have a deeper look into it in a couple of days, have a few other things on atm.
And yea, I get that. I'll close the issue and ask these questions somewhere else. (still new to all this stuff).
Anyway, thanks a lot for the help chris.


QA-15249 Using maxNameSize for renaming validation

JIRA

https://jira.jahia.org/browse/QA-15249
Description

Backport from v3. Using the maxNameSize for input length validation when renaming.
Tests
The following are included in this PR

[ ] Unit Tests (Most changes should have unit tests)
[ ] Integration Tests

Checklist

I have considered the following implications of my change:

[ ] Security (in particular for changes to authentication, authorization, data fetching, ...)
[ ] Performance
[ ] Migration
[ ] Code maintainability

Documentation

[ ] Inline documentation
[ ] Internal Documentation (wiki)
[ ] User-facing Documentation

Has this variable been defined somewhere? I'm looking at the change in master and I see that it was being set here but I'm not seeing that in 2_x branch.
Also I would recommend changing that as well here as it was also part of that change https://github.com/Jahia/jcontent/pull/606/files?w=1

Good catch about new folder, thank you; and I added the line to the config now;


Some questions about the linear growth of pcm-iio test data

Hi, thanks for your outstanding work. I am using pcm-iio to test the continuous transfer of PCIe and I observed that the values of IB write (bytes),IB read (bytes) are gradually increasing linearly during the test. But my experimental characteristic should be to maintain a stable transfer, and I got a stable result by making a difference to the adjacent values.
But after checking the source implementation I found that the test value is the difference before and after using getIIOCounterState() to get the time interval and it resets the variable. If the register count is not empty
What is the cause of this? Thank you very much!

the tool should output the number of events occured during the measurement period. Could you please share the raw output of the pcm-iio tool?

Sampling every 0.05 seconds

Sampling every 0.05 seconds

Sampling every 0.05 seconds
test_iio_0.05.txt

I'm very sorry, I found that it was a problem with my own image drawing code, the detection data should be fine, thank you very much for your answer！


False Positive on hibernate:hibernate-validator-annotation-processor ?

[I'm new to OWASP Dependency-Check]
Is this what you mean by a False Positive? A vendor provided an OWASP report that lists
DocumentQueManager.war: hibernate-validator-annotation-processor.jar
cpe:2.3:a:hibernate:hibernate-validator:5.3.5:::::::*
<EMAIL_ADDRESS>MEDIUM	1	Highest	23
The CPE reference is a hyper link that goes to NVD but there is no such CPE. Searches of the CPE database do not find it.
https://nvd.nist.gov/vuln/search/results?form_type=Advanced&results_type=overview&search_type=all&cpe_vendor=cpe%3A%2F%3Ahibernate&cpe_product=cpe%3A%2F%3Ahibernate%3Ahibernate-validator&cpe_version=cpe%3A%2F%3Ahibernate%3Ahibernate-validator%3A5.3.5
The Maven hyperlink does find a valid page for the full string and version but lists no vulnerabilities.
https://ossindex.sonatype.org/component/pkg:maven/org.hibernate/hibernate-validator-annotation-processor@5.3.5.Final?utm_source=dependency-check&utm_medium=integration&utm_content=6.0.2
I see CPEs for hibernate:hibernate-validator which is a subset of the dependency shown on the OWASP report.
I also see CPEs for red-hot:hibernate_validator (wrong supplier, underscore instead of hyphen.)
Is this a case of matching on a substring? Should they just exclude it from scanning? Or is there a way to make the scanning more exact?
I worry about excluding. If a real vulnerability were later reported against hibernate-validator-annotation-processor.jar would we ever know?

Gut feel is that it is both a false positive as well as an erroneously included jar in your war-file.
From documentation it appears that this library is meant to be used at compile-time to evaluate the correct usage of hibernate validator annotations in your code and as such is not required to be present at runtime.
For the maven build case it should suffice to define it as annotation processor in the compiler plugin configuration (annotationProcessPaths) rather than a dependency of your project.

Thank you very much! I'll have the vendor see about refining their build files.


Error when generating a certificate via mbedtls_x509write_crt_pem and then parsing it.

Description

Type: Bug
Priority: Major

Bug
mbed TLS build:
Version: 2.16.8 (build statically, with GCC)
Due to the changes in #2632 (and its backport #3488), creating a PEM certificate via mbedtls_x509write_crt_pem, then reading it into a mbedtls_x509_crt via mbedtls_x509_crt_parse will fail when passing the full buffer size in 2.16.8  while not failing in 2.16.7.
(see example code below, compiled with gcc example.c -I./build/include/ -Lbuild/library/ -lmbedtls -lmbedx509 -lmbedcrypto -Wl,-rpath,"build/library").
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/entropy.h>
#include <mbedtls/pem.h>
#include <mbedtls/ssl.h>

#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
	// Init entropy/random number generator.
	mbedtls_entropy_context entropy;
	mbedtls_ctr_drbg_context ctr_drbg;

	mbedtls_ctr_drbg_init(&ctr_drbg);
	mbedtls_entropy_init(&entropy);

	mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0);

	// Create key
	mbedtls_pk_context pkey;
	mbedtls_pk_init(&pkey);
	int ret = mbedtls_pk_setup(&pkey, mbedtls_pk_info_from_type(MBEDTLS_PK_RSA));
	ret = mbedtls_rsa_gen_key(mbedtls_pk_rsa(pkey), mbedtls_ctr_drbg_random, &ctr_drbg, 2048, 65537);

	// Create certificate
	mbedtls_x509write_cert crt;
	mbedtls_x509write_crt_init(&crt);

	mbedtls_x509write_crt_set_subject_key(&crt, &(pkey));
	mbedtls_x509write_crt_set_issuer_key(&crt, &(pkey));
	mbedtls_x509write_crt_set_subject_name(&crt, "CN=example.com,O=A Game Company,C=IT");
	mbedtls_x509write_crt_set_issuer_name(&crt, "CN=example.com,O=A Game Company,C=IT");
	mbedtls_x509write_crt_set_version(&crt, MBEDTLS_X509_CRT_VERSION_3);
	mbedtls_x509write_crt_set_md_alg(&crt, MBEDTLS_MD_SHA256);

	mbedtls_mpi serial;
	mbedtls_mpi_init(&serial);
	uint8_t rand_serial[20];
	mbedtls_ctr_drbg_random(&ctr_drbg, rand_serial, 20);
	mbedtls_mpi_read_binary(&serial, rand_serial, 20);
	mbedtls_x509write_crt_set_serial(&crt, &serial);

	mbedtls_x509write_crt_set_validity(&crt, "20140101000000", "20340101000000");
	mbedtls_x509write_crt_set_basic_constraints(&crt, 1, -1);
	mbedtls_x509write_crt_set_basic_constraints(&crt, 1, 0);

	// Write certificate to buffer.
	unsigned char buf[4096];
	memset(buf, 0, 4096);
	mbedtls_x509_crt out;
	mbedtls_x509_crt_init(&out);
	mbedtls_x509write_crt_pem(&crt, buf, 4096, mbedtls_ctr_drbg_random, &ctr_drbg); // In 2.16.8, due to #3488/#2632 , this writes at the end of the buffer.

	// Parse the wrote buffer in output certificate.
	int err = mbedtls_x509_crt_parse(&out, buf, 4096); // This fail in 2.16.8 because buf[buflen-1] is not '\0'.
	// buf[4095] = '\0'; would work around it while still hacky.
	// Using `strlen((char *)buf) + 1` instead of 4096 would also work.
	if (err != 0) {
	        mbedtls_mpi_free(&serial);
	        mbedtls_x509write_crt_free(&crt);
	        printf("Generated invalid certificate\n");
	        return 1;
	}

	mbedtls_mpi_free(&serial);
	mbedtls_x509write_crt_free(&crt);
	mbedtls_x509_crt_free(&out);
	return 0;
}

Hi! Do you guys already have a potential patch that you think fixes this? If so, then do feel free to submit that for review.

Hi, no actually, we added the aforementioned workaround in our code, using strlen to detect the actual written bytes.

I agree that this is a bug. It's an unintended regression. I've posted a more detailed analysis in #3896.
I think that we should relax the idiom for PEM parsing functions to require the input to be null-terminated, i.e. require that there is a null byte in the buffer, even if it isn't the last byte.

Hi @Faless. Thanks for your report, especially providing an example file which makes it very easy to reproduce the problem and understand what exactly is going on. And of course pointing to the PR that introduced the issue is appreciated!
Also, sorry for not replying earlier - we usually try to give at least an initial reply within a few business days, but for some reason we appear to have missed this report.
Regarding the issue, I agree that this is a change of observable behaviour in mbedtls_x509write_crt_pem() which breaks working and reasonable code. Now if we wanted to be picky about it, the documentation never said the bytes at the end of the buffer would be preserved, so the code was relying on undocumented behaviour. But to be honest, that assumption was quite reasonable, and I don't think we really realised this change would have that effect - if we had, we probably would have thought twice about backporting it.
Regarding the resolution, I'm think we could make mbedtls_x509write_crt_pem() zeroize all bytes at the end of the buffer. While it wouldn't completely restore the 2.16.7 behaviour (which is probably not desirable because it would increase stack usage again, and some people may have come to rely on the lower stack usage in the meantime), it would at least fix the common case that your example is demonstrating. Would you agree this would be a reasonable resolution?

Oops, I failed to refresh the page before replying and didn't noticed that Paul and Gilles had already done so.

About this topic and facilitating round trip; did someone wrote a support function such as?

mbedtls_x509write_cert_init_with_x509(mbedtls_x509write_cert * ctx, const mbedtls_x509_cert * existing);

THX if any.

@Faless give away
#	define ___CERT_PEM_BEGIN "-----BEGIN CERTIFICATE-----\n"
#	define ___CERT_PEM_END   "-----END CERTIFICATE-----\n"
#	define ___MAX_HEAP_BLOCK_ALLOWED  /* implementation */

#	define mbedtlext_addrck(addr)        (addr != NULL)
#	define mbedtlext_alloc(size)         malloc(size)
#	define mbedtlext_dealloc(addr)       free(addr)
#	define mbedtlext_memcpy(dst, src, n) memcpy(dst, src, n)

#	define mbedtlext_reinterpret_cast(type, expr) (type)expr

#	define mbedtlext_sizeck(size) \
	(size > 0 && mbedtlext_reinterpret_cast(size_t, size) < ___MAX_HEAP_BLOCK_ALLOWED)

#	define mbedtlext_offsetck(expr, limit) \
	(mbedtlext_reinterpret_cast(off_t, (expr)) >= 0 && mbedtlext_reinterpret_cast(off_t, (limit)) \
	>= 0 && mbedtlext_reinterpret_cast(size_t, (expr)) < mbedtlext_reinterpret_cast(size_t, (limit)))

int mbedtlext_x509_crt_write_der(
	  const mbedtls_x509_crt * crts
	, size_t                   ncrt
	, off_t                    idx
	, size_t *                 olen
	, unsigned char **         dst
) {
	int ret = -1;

	const mbedtls_x509_crt * crt;

	if (
		   mbedtlext_addrck(crts)
		&& mbedtlext_sizeck(ncrt)
		&& mbedtlext_offsetck(idx, ncrt)
		&& mbedtlext_addrck(olen)
		&& mbedtlext_addrck(dst)
	) {
		*olen = 0;
		 crt  = &(crts);
		while (idx && mbedtlext_addrck(crt)) {
			crt = crt->next;
			--idx;
		}
		if (idx == 0 && mbedtlext_addrck(crt)) {
			if (
				   mbedtlext_addrck(crt->raw.p)
				&& mbedtlext_sizeck(crt->raw.len)
			) {
				if (mbedtlext_sizeck(crt->raw.len)) {
					*dst = mbedtlext_alloc(crt->raw.len);
					if (mbedtlext_addrck(dst)) {
						mbedtlext_memcpy(*dst, crt->raw.p, crt->raw.len);
						*olen = crt->raw.len;
						 ret  = 0;
					}
				}
			}
		}
	}
	return ret;
}

int mbedtlext_x509_crt_write_pem(
	  const mbedtls_x509_crt * crts
	, size_t                   ncrt
	, off_t                    idx
	, char **                  dst
) {
	int ret = -1;

	const mbedtls_x509_crt * crt;
	size_t blen;

	if (
		   mbedtlext_addrck(crts)
		&& mbedtlext_sizeck(ncrt)
		&& mbedtlext_offsetck(idx, ncrt)
		&& mbedtlext_addrck(dst)
	) {
		crt = &(crts);
		while (idx && mbedtlext_addrck(crt)) {
			crt = crt->next;
			--idx;
		}
		if (idx == 0 && mbedtlext_addrck(crt)) {
			if (
				   mbedtlext_addrck(crt->raw.p)
				&& mbedtlext_sizeck(crt->raw.len)
			) {
				ret = mbedtls_pem_write_buffer(
					  ___CERT_PEM_BEGIN
					, ___CERT_PEM_END
					, crt->raw.p
					, crt->raw.len
					, null
					, 0
					, &blen
				);
			}
			if (
				   (ret == 0 || ret == MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL)
				&& mbedtlext_sizeck(blen)
			) {
				if (mbedtlext_sizeck(crt->raw.len)) {
					*dst = mbedtlext_alloc(blen + 1);
					if (mbedtlext_addrck(*dst)) {
						if (0 != (ret = mbedtls_pem_write_buffer(
								  ___CERT_PEM_BEGIN
								, ___CERT_PEM_END
								, crt->raw.p
								, crt->raw.len
								, mbedtlext_reinterpret_cast(unsigned char *, *dst)
								, blen
								, &blen
						))) {
							mbedtlext_dealloc(*dst);
							return ret;
						}
						*dst[blen] = '\0';
					} else {
						ret = -3;
					}
				} else {
					ret = -2;
				}
			}
		}
	}
	return ret;
}


Create new Validations columns properly

Thread-safe preparation of Validations cleanup query
Followup to RIPD-870

This is a followup to #1556, which was only merged to develop 4 days ago (as of this writing). It had two problems.

I didn't follow the established pattern for table modifications (https://github.com/ripple/rippled/pull/1556#discussion_r54768875).
The Validations clean up query prepare was thread unsafe, causing occasional crashes.

This PR fixes both issues.
Reviewers: @vinniefalco @seelabs

Current coverage is 67.13%

Merging #1585 into develop will decrease coverage by -0.04% as of 38e8a21

@@            develop   #1585   diff @@
=======================================
  Files           893     893
  Stmts         64299   64314    +15
  Branches          0       0
  Methods           0       0
=======================================
- Hit           43193   43180    -13
  Partial           0       0
- Missed        21106   21134    +28

Review entire Coverage Diff as of 38e8a21

Powered by Codecov. Updated on successful CI builds.

We may have to eat the 0.04% coverage loss on this, because the new addValidationSeqFields stack includes !config_->RUN_STANDALONE. But since #1556 added 1.03%, we're still ahead.
...I suppose I could write a test, but it would require creating outdated temp tables, and I'm not sure it's worth it for run-once migration code.

Sometimes we are going to lose a tiny bit of coverage, its impossible to prevent that completely.

And, FWIW, sometimes we lose coverage for good reasons.  Like when we reduce the number of lines in tested code.  I believe in many cases that's still a win.

Confirmed that no longer throws on startup. Thank you! This makes debugging much easier as I no longer have to deal with false alarms from catch throw.

@seelabs Just to be a completist, when migrating from the old table structure, an exception will be thrown on the first startup before the migration runs. These are caused by the CREATE INDEX on the fields that don't exist yet. (https://github.com/ximinez/rippled/blob/ripd870/src/ripple/app/main/DBInit.cpp#L105-L108) I figured it was better to have a fresh install start up quickly and cleanly in one shot rather than trying to be too clever.

:+1:

:+1:

:+1:


Quantag IT

@NikitaTudakov what is the purpose of this PR?

Oh sorry, I thought I did in in my fork


Add VTA support test

Add unit test with real VTA.
Or replace missed *Checked functions test with the actual VTA call.

The VTA compatibility support was enabled in
Revision: a4acbb236a62be0145df349e0cadc410b088e82b
Date: 23.01.2023 17:36:50


[Lona Studio] Implement bottom pane hide/show

Summary
This button should hide/show the bottom section of the UI, but currently it does nothing!

Let's fix that. Some new users have been pretty confused by why the bottom hasn't been responding...
Proposed Implementation
When the activePanes change... https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/WorkspaceViewController.swift#L84
We currently ignore the bottom pane: https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/WorkspaceViewController.swift#L301
Instead, we need to hide/show the bottomItem in the ComponentEditorViewController: https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/ComponentEditorViewController.swift#L213-L216
The easiest way to do this is probably to expose the bottomItem as a public or internal variable of the ComponentEditorViewController, but this isn't a great approach, since then we're exposing implementation details to a parent view controller. If we make bottomItem a member variable, it should be private.
Instead, let's add a variable var utilitiesViewVisible: Bool (with a didSet block) to ComponentEditorViewController, which we can then update from the WorkspaceViewController. The WorkspaceViewController contains an instance of ComponentEditorViewController we can use: https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/WorkspaceViewController.swift#L127
We'll also need to add/copy something similar to setVisibility into ComponentEditorViewController to do the actual hiding/showing.
https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/WorkspaceViewController.swift#L305-L315

For bonus points, also update the splitter https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/ComponentEditorViewController.swift#L151 to have a thickness of 0 when the bottom pane is hidden: https://github.com/airbnb/Lona/blob/9ee49dfbb9d3dce6309c90b93c51c6949cf4f214/studio/LonaStudio/Workspace/SectionSplitter.swift#L22

I'd recommend starting by setting a breakpoint in activePanes so you can see how clicking the toolbar button updates this value and take it from there.

I'll take this issue.

This is fixed right?


chore: update dependencies for compatibility with PHP 8.3

I hope this MR is based on the next version of the package.

Thank you

@DavertMik I fix a broken pipe in this PR. Please merge again.

when we can expect this? Just wanted to try thestomatio but this blocks me.

Done!
https://github.com/testomatio/php-list-tests/releases/tag/0.2.4
Thanks!

@DavertMik thank you
Sadly, with this update now there is  another issue: https://github.com/testomatio/php-reporter/issues/5