[$250] Book travel - Report screen changes to profile view when clicking Country field

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: <IP_ADDRESS>
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:

Go to staging.new.expensify.com
Go to FAB > Book travel.
Click Book travel.
Click Country.

Expected Result:
The report screen in the background will not change to profile page.
Actual Result:
The report screen in the background changes to profile page while LHN remains the same after opening Country RHP.
Workaround:
Unknown
Platforms:

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

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

Screenshots/Videos
https://github.com/user-attachments/assets/e82cb612-2a8a-44c4-8885-c7244c90ebd4

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~011952935e51b38f07
Upwork Job ID:<PHONE_NUMBER>854953560
Last Price Increase: 2024-08-22
Automatic offers:

rojiphil | Reviewer | 103684843

Issue OwnerCurrent Issue Owner: @rojiphil

We think this issue might be related to the #vip-travel

@izarutskaya is it only when clicking Country that the pages changes or is it any of them?

@izarutskaya bumping my question above from last week

Proposal
Please re-state the problem that we are trying to solve in this issue.
The background screen changes to workspace profile view when open address page from travel page.
What is the root cause of that problem?
The behavior is a bit different now than the video. When we press Book travel, it will open the profile address page and based on the mapping, the workspace address RHP maps to the workspace profile full screen page.
https://github.com/Expensify/App/blob/3559aed60e43c9c179a66fbd5c9dd178cac73324/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts#L5
So, the workspace profile page is shown. It's the same case with the country selection page where the backTo param is the workspace address page which we recursively find the matching root for the backTo params page.
https://github.com/Expensify/App/blob/3559aed60e43c9c179a66fbd5c9dd178cac73324/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts#L112-L135
What changes do you think we should make in order to solve the problem?

We need to add a backTo params to the workspace address page that points to the travel page so getMatchingRootRouteForRHPRoute will return the matching root for the travel page, which is nothing.
https://github.com/Expensify/App/blob/3559aed60e43c9c179a66fbd5c9dd178cac73324/src/ROUTES.ts#L546-L549
getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}/profile/address` as const, backTo),

Then, pass the active route as the backTo.
https://github.com/Expensify/App/blob/3559aed60e43c9c179a66fbd5c9dd178cac73324/src/pages/Travel/ManageTrips.tsx#L64
Navigation.navigate(ROUTES.WORKSPACE_PROFILE_ADDRESS.getRoute(activePolicyID ?? '-1', Navigation.getActiveRoute()));

Next, we need to do the same thing for the address sub-page, that is country and state selection page. Both pages already have a backTo, but for the country selection page, we pass the active route without params, so the nested backTo is removed.
https://github.com/Expensify/App/blob/3559aed60e43c9c179a66fbd5c9dd178cac73324/src/components/CountrySelector.tsx#L78-L80
So, the matching root will still be the workspace profile page. We need to replace it with Navigation.getActiveRoute().
Last, we need to update the route here so it appends the param correctly because the backTo contains a nested backTo (?backTo={...?backTo=...}).
https://github.com/Expensify/App/blob/3559aed60e43c9c179a66fbd5c9dd178cac73324/src/pages/settings/Profile/PersonalDetails/CountrySelectionPage.tsx#L50-L56
} else if (!!backTo && navigation.getState().routes.length === 1) {
    // If "backTo" is not empty and there is only one route, go back to the specific route defined in "backTo" with a country parameter
    Navigation.goBack(appendParam(backTo, 'country', option.value) as Route);
} else {
    // Otherwise, navigate to the specific route defined in "backTo" with a country parameter
    Navigation.navigate(appendParam(backTo, 'country', option.value) as Route);
}

Thanks for the proposal.
The RCA is correct i.e. RHP pages of Address and Country selection map to the workspace profile page in central pane due to which the central pane switches to profile page.
And it makes sense to fix this using backTo
@bernhardoj proposal LGTM
🎀👀🎀 C+ reviewed

PR is ready
cc: @rojiphil

note: not yet merged

Oh! The automation did not get triggered here.
Note: Reached production on 06 Sep

[x]  [@rojiphil] The PR that introduced the bug has been identified. Link to the PR: Offending PR
[x]  [@rojiphil] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: Added comment
[x]  [@rojiphil] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not Required. Existing checklist is good enough to capture such issues.
[x]  [@rojiphil] Determine if we should create a regression test for this bug. : Yes. We can
[x]  [@rojiphil] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Steps:
1	Press FAB > Book travel
2	Press the Book travel button
3	(Web/Desktop) Verify that the screen behind the RHP overlay doesn't change
4	Press Country
5	(Web/Desktop) Verify that the screen behind the RHP overlay doesn't change
6	(Android/mWeb/iOS) Close the address and book travel page and verify you are still in LHN. After that, go back to the address page
7	Change the country to the United States
8	Press State
9	(Web/Desktop) Verify that the screen behind the RHP overlay doesn't change
10	(Android/mWeb/iOS) Close the address and book travel page and verify you are still in LHN.

@abekkala Please help with payment summary here as this reached production 3 weeks ago. I have also added BZ checklist for the issue. Thanks.

PAYMENT SUMMARY:

Fix: @rushatgabhane [$250] paid via NewDot
PR Review: @rojiphil [$250] Offer (previous expired)

PR Review: @rojiphil [$250] Offer (previous expired

@abekkala Accepted offer. Thanks.

@abekkala I think you paid the wrong Contributor

Requested in ND.

@rojiphil payment sent and contract ended - thank you! 🎉

@bernhardoj

@abekkala I think you paid the wrong Contributor

yes, I apolize that I tagged the other cont. - I was viewing PR 46333 that Rojiphil linked rather than yours #48002 . I'ved edited.

PAYMENT SUMMARY:

Fix: @bernhardoj [$250] paid via NewDot https://github.com/Expensify/App/pull/48002
PR Review: @rojiphil [$250] Offer (previous expired) (paid ✅ )

$250 approved for @bernhardoj


[Android] Impossible to share an Instagram Story sticker from URI if forceDialog is false

On android, when using shareSingle on Instagram Stories, you need to activity.grantUriPermission to the URI sent through for the sticker asset. This only happens when forceDialog is set to true.
A fix for this is to call the activity.grantUriPermission when setting the URI, instead of waiting until right before sending the intent.
I have a fix for this. Issue is just to remind me to do this.

:tada: This issue has been resolved in version 3.7.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Incorrect unpacking of value in object

Initial Checks

[X] I have searched GitHub for a duplicate issue and I'm sure this is something new
[X] I have searched Google & StackOverflow for a solution and couldn't find anything
[X] I have read and followed the docs and still think this is a bug
[X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like FastAPI or mypy)

Description
In a specific scenario, there is an issue where unpacking a dictionary into a base model results in an incorrect output:
Python 3.11.2 (main, Feb  8 2023, 14:49:25) [GCC 11.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.10.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from pydantic import BaseModel

In [2]: class Test(BaseModel):
   ...:     a: dict | list | None
   ...:     b: str
   ...:

In [3]: data = {"a": [1, 2, 3], 'b': 'ball'}

In [4]: Test(**data)
Out[4]: Test(a=[1, 2, 3], b='ball')  ✅

In [5]: data = {"a": [{'ids': [1, 2, 3]}, {'ids': [4, 5, 6]}], 'b': 'ball'}

In [6]: Test(**data)
Out[6]: Test(a=[{'ids': [1, 2, 3]}, {'ids': [4, 5, 6]}], b='ball') ✅

In [7]: data = {"a": [{'id': 1, 'value': 1}, {'id': 2, 'value': 2}], 'b': 'ball'}

In [8]: Test(**data)
Out[8]: Test(a={'id': 'value'}, b='ball') ## INCORRECT ❌

But, when I change the sequence of attribute a with list | dict | None it works fine.
In [9]: class Test(BaseModel):
   ...:     a: list | dict | None
   ...:     b: str
   ...:

In [10]: data = {"a": [{'id': 1, 'value': 1}, {'id': 2, 'value': 2}], 'b': 'ball'}

In [11]: Test(**data)
Out[11]: Test(a=[{'id': 1, 'value': 1}, {'id': 2, 'value': 2}], b='ball')

Example Code
No response
Python, Pydantic & OS Version
pydantic version: 1.9.0
pydantic compiled: False
install path: /home/xxxx/.cache/pypoetry/virtualenvs/xxxxxx-zBsOJE54-py3.11/lib/python3.11/site-packages/pydantic
python version: 3.11.2 (main, Feb  8 2023, 14:49:25) [GCC 11.3.0]
platform: Linux-5.19.0-32-generic-x86_64-with-glibc2.35
optional deps. installed: ['dotenv', 'typing-extensions']

Affected Components

[ ] Compatibility between releases
[ ] Data validation/parsing
[ ] Data serialization - .model_dump() and .model_dump_json()
[ ] JSON Schema
[ ] Dataclasses
[ ] Model Config
[ ] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[ ] Generic Models
[ ] Other Model behaviour - model_construct(), pickling, private attributes, ORM mode
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

You need to enable smart_union like:
from pydantic import BaseModel

class Test(BaseModel):
    a: dict | list | None
    b: str

    class Config:
        smart_union = True


httpd websocket callback does not receive valid user_ctx (IDFGH-4732)

Environment

IDF version: v4.4-dev-4-g73db14240

Problem Description
When working with websockets under httpd the user_ctx provided by the user in httpd_uri_t is not passed to the httpd_req_t returned by the handler callback.
Expected Behavior
The data provided via httpd_uri_t.user_ctx shows up in httpd_req_t.user_ctx as it does with regular http requests.
Actual Behavior
httpd_req_t.user_ctx is NULL

@harbaum Please take this patch to test the modify whether could meet your requirement. Thanks.
0001-httpd-Support-user_ctx-in-websocket-handler-callback.zip

I can confirm, that this patch does what it's intended to. My Micropython websocket setup now works nicely.
BTW: Is there a particular reason why the "user_data" is named "user_ctx" in this particular case?

user_data

There is no special reason, it may be the naming style and habit.

Micropython/LVGL use automatic parsers to make use of the user_data fields. That does not work for user_ctx. Is it possible that these be renamed to user_data for consitency?

Micropython/LVGL use automatic parsers to make use of the user_data fields. That does not work for user_ctx. Is it possible that these be renamed to user_data for consitency?

I didn't understand that Micropython/LVGL's use of user_data parsing is related to user_ctx in the code. Can you point out where user_ctx is displayed specifically? Can give an simple example.

The espidf bindings for Micropython as used by LVGL are automatically generated by a script. To carry the micropython context the user_data field is automatically being used.
This is the line where the generator script finds the user_data and uses it:
https://github.com/lvgl/lv_binding_micropython/blob/b0f3b7ede698bb095512795315a9b93d03f62f2f/gen/gen_mpy.py#L1856

I think you could change user_data to user_ctx in the line you mentioned. Modifying the IDF code is not easy, and there are many places to modify. You can choose a simple plan to modify and test first. Hope that can help you.


CMake: Cannot specify EXTRA_COMPONENT_DIRS for my components when building unit-test-app (IDFGH-1269)

When using the old make based system, I can include my own components in the unit-test-app project by adding the EXTRA_COMPONENT_DIRS environment variable when invoking make. The same does not seem to work when using CMake. How do I add my own components to the unit-test app when using CMake (short of modifying the unit-test-app CMakeLists.txt file)?

Hi @bpietsch, you can pass EXTRA_COMPONENT_DIRS when invoking idf.py:
idf.py build -DEXTRA_COMPONENT_DIRS=...

Yup... the help for idf.py doesn't particularly make it obvious that the -D option serves that purpose. Thanks for the quick reply!

The -D option can pass any cache entry in general, not just EXTRA_COMPONENT_DIRS, similar to passing -D arguments for bare CMake (in fact this is just what idf.py does behind the scenes)


Updated Recommended docker version

Issue  #1402

Updated Docker recommended version to 18.06.2
Added a note about CVE-2019-5736

https://access.redhat.com/security/cve/cve-2019-5736

thanks @hpandeycodeit  !!
/lgtm
/assign @jimangel @tengqm
@kubernetes/sig-cluster-lifecycle-pr-reviews

/lgtm
/approve

Thank you! :)


Bootstrap tasks for version.properties and shipkit.gradle

I created two tasks initVersioning and initConfigFile which create configuration files version.properties and shipkit.gradle. There is also a BoostrapPlugin that adds a task initShipkit which groups all these configuration tasks together.
An assumption was made that ./gradlew tasks can be run even when no configuration files exist, that's why all required properties (like github.repository) are set to some defaults. A different problem is bintray.user because it's not set in ReleaseConfiguration, so I moved validation nonNull(bintray.user) to doFirst of BintrayUpload instead of deferredConfiguration. I'm not sure if this is the best solution though, since it will fail later, but on the other hand soon enough so that this task can't be run.

Applied agreed changes and merging


neo4j_tostring fills buffer with trash

I have first fill neo4j database with one transaction:
MERGE (t:Transaction {
  tstamp: "2018-11-14 04:03:14",
  blockht: 550001,
  thash: "0000000000000000000000000000000000000000000000000000305f68736168",
  fee: -390842024046,
  size: 8
})
MERGE (a_0:Address {btc_address: "0MINEDxCOINBASE0000000000000000000"})
MERGE (a_0)-[sf_0:SEND_FROM {amount:0,indx_tx:0,indx_io:0,type:0}]->(t)
MERGE (a_1:Address {btc_address: "0MINEDxCOINBASE0000000000000000000"})
MERGE (a_1)-[sf_1:SEND_FROM {amount:0,indx_tx:0,indx_io:1,type:0}]->(t)
MERGE (a_2:Address {btc_address: "bc1address_0_0"})
MERGE (a_2)<-[st_0:SEND_TO {amount:0,indx_tx:0,indx_io:0,type:1}]-(t)
MERGE (a_3:Address {btc_address: "bc1address_0_1"})
MERGE (a_3)<-[st_1:SEND_TO {amount:1,indx_tx:0,indx_io:1,type:1}]-(t)
MERGE (a_4:Address {btc_address: "bc1address_0_2"})
MERGE (a_4)<-[st_2:SEND_TO {amount:2,indx_tx:0,indx_io:2,type:1}]-(t)
MERGE (a_5:Address {btc_address: "bc1address_0_3"})
MERGE (a_5)<-[st_3:SEND_TO {amount:3,indx_tx:0,indx_io:3,type:1}]-(t)
MERGE (a_6:Address {btc_address: "bc1address_0_4"})
MERGE (a_6)<-[st_4:SEND_TO {amount:4,indx_tx:0,indx_io:4,type:1}]-(t)

next, match
match (t:Transaction {thash: "0000000000000000000000000000000000000000000000000000305f68736168"})
match (a:Address)<-[rel:SEND_TO{indx_io: 0}]-(t)
return rel.amount as amount, a.btc_address as address

returns correct values in http://<IP_ADDRESS>:7474/browser/: 0 and "bc1address_0_0"
but if I use it with c+ connector:
 bool IndepNeo::getAmountAddress(Neo4J *neo4j, string txHash, int ioIdx, string &address, int64_t &amount) {
     string queryStr =
         (string)"match (t:Transaction {thash: \"" + txHash + "\"})\n" +
       "match (a:Address)<-[rel:SEND_TO{indx_io: " + to_string(ioIdx) +  "}]-(t)\n" +
       "return rel.amount as amount, a.btc_address as address";
     vector<neo4j_value_t> results = neo4j->runQueryTransactions(queryStr, 2);
     printf("results.size()=%d\n",results.size());
     if (results.size()<2) return false;
     amount = results[0]._vdata._int;
     char buf[80];
     memset(buf, 0, sizeof(buf));
     neo4j_tostring(results[1], buf, 80);
     printf("readed from neo4j_tostring: %s\n",buf);
     address = buf;
     return true;
}

using neo4j_tostring, in buf is trash

Hi @borneq,
Which wrapper for this library are you using? runQueryTransactions is not part of the API of this library.
Also, please ensure you're using the accessor methods for bringing data out of the results. Do not use _vdata (or any _ prefixed attribute), as these are internal and may not be structured as you believe them to be. The complete API for this library is published here: http://neo4j-client.net/doc/latest/neo4j-client_8h.html
Cheers,
Chris

I am using
std::vector<neo4j_value_t> Neo4J::runQueryTransactions(std::string query, int counter)
where is
neo4j_result_stream_t *results = neo4j_run(connection, query.c_str(), neo4j_null);
			if (results == NULL)
                throw Exception(formatString("neo4j_run error, errno:%d",errno), NEO4J_EXCEPTION_QUERY);
            neo4j_result_t *record = neo4j_fetch_next(results);
            if (record)
            {
                for (int i = 0; i < counter; i++)
                {
                    neo4j_value_t value = neo4j_result_field(record, i);
                    ret.push_back(value);
                }
            }
            neo4j_close_results(results);

and several lines of code to work with exceptions (for example reconnect in special cases)
If I call neo4j_close_results(results), values in ret vector become to have not access?

"I also notice that you're also only obtaining the first result, and not iterating until neo4j_fetch_next(results) returns NULL"
if I for example have "return rel.amount as amount, a.btc_address as address", I must call function neo4j_fetch_next twice or call it once and call neo4j_result_field(record, 0) and neo4j_result_field(record, 1) ? In this case we have two results or two fields?

A Cypher query returns a sequence of results (records), where each result contains multiple fields.
So a query like "MATCH (a)-[rel]->() RETURN rel.amount as amount, a.btc_address as address" could return many results, depending on how many matches it finds for the pattern, and each result will contain two fields (amount and address).
Of course, if you know that there is only one result from your query, then you can just call neo4j_fetch_next the one time. However, your generic runQueryTransactions doesn't have any way to know that is always true.
If you want to wrap it into a C++ API, I'd probably change the signature of that method to std::vector<std::vector<neo4j_value_t>> Neo4J::runQueryTransactions(std::string query).
(Also, rather than passing in counter, use neo4j_nfields(results) to determine the number of fields in each result record.


Generate bash completions for kpod

There are some bash completions checked in for kpod (cri-o/completions/bash/kpod), however, I suggest using the built-in completion rules for urfave/cli to make maintenance easier. It would have some advantages:

For developers who have never written a bash completion (like this guy two thumbs pointed at self)
Easier to keep code in sync with completions

I think this is what OpenShift origin does; for example in the oc help output:
Settings Commands:
  logout          End the current server session
  config          Change configuration files for the client
  whoami          Return information about the current session
  completion      Output shell completion code for the given shell (bash or zsh)

I don't know if urfave/cli can do zsh completions. I think origin uses the same library kubernetes does: https://github.com/spf13/cobra so switching to that might be an option too

I think the built in completion rules was very limited, only handled one level if it improves I say  yes, but I think for a while these will have to be hand maintained.

@mrunalp We have bash completions for kpod, so this can be closed.


[SPARK-37557][SQL] Replace object hash with sort aggregate if child is already sorted

What changes were proposed in this pull request?

This is a follow up of https://github.com/apache/spark/pull/34702#discussion_r762743589 , where we can replace object hash aggregate with sort aggregate as well. This PR is to handle object hash aggregate.
Why are the changes needed?

Increase coverage of rule by handling object hash aggregate as well.
Does this PR introduce any user-facing change?

No.
How was this patch tested?

Modified unit test in ReplaceHashWithSortAggSuite.scala to cover object hash aggregate (by using aggregate expression COLLECT_LIST).

@cloud-fan could you help take a look when you have time? Thanks.

Test build #145968 has started for PR 34824 at commit 0046770.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50443/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50443/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50443/

thanks, merging to master!

Thank you @cloud-fan for review!

Test build #145968 has finished for PR 34824 at commit 0046770.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145968/


web 站点consumer 无法轮询

同一个provider，web 站点的consumer无法轮询，如果是jar包调用可以。刚刚入门，还请大神指点迷经。

没看明白你的问题。
On Thu, Oct 21, 2021, 7:40 PM fengfeng125 @.***> wrote:

同一个provider，web 站点的consumer无法轮询，如果是jar包调用可以。刚刚入门，还请大神指点迷经。
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aeraki-framework/aeraki/issues/108, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAKCWIR52JKA6UFA7J6VXSLUH7333ANCNFSM5GN5JHDA
.


e2e tests are currently failing due to the changes in genesis

We need to update our e2e tests so that they continue to pass. We should also look to add incorporate this into a nightly CI
For Admin Use

[ ] Not duplicate issue
[ ] Appropriate labels applied
[ ] Appropriate contributors tagged
[ ] Contributor assigned/self-assigned

I think we've fixed this specific issue, no? please reopen if needed


Cannot read property 'hours' of undefined

angular: v.1.6.0
angular-material: v.1.1.1
mdPickers: v.0.7.5
i tried to use $mdpTimePicker($scope.currentTime) as a service, but got this error:
angular.js:14324 TypeError: Cannot read property 'hours' of undefined
at s.init (mdPickers.min.js:692)
at new s (mdPickers.min.js:706)
at Object.invoke (angular.js:4839)
at $controllerInit (angular.js:10692)
at nodeLinkFn (angular.js:9569)
at compositeLinkFn (angular.js:8878)
at publicLinkFn (angular.js:8743)
at boundTranscludeFn (angular.js:8921)
at Object.controllersBoundTransclude [as transclude] (angular.js:9688)
at angular.js:31368

since the codepen demo works fine, i was thinking it might be a problem with angular/angular-material - could that be?
is there something i could do to make it work?

problem really was angular v1.6.0
i downgraded and now it works


fastlane frameit - not downloading all frames

Not sure why frame it tries to downloading 169 separate PNG files instead of just downloading one zip file.
But this is caching a lot. I have a 100Mbps connection and randomly one file fails to load (probably due to bad github.io routing) so I am stuck unable to use frameit.
I tried downloading the files manually and it works.  In addition to that frameit does not save progress, so calling it again causes a redownload.
Any way I can get the files manually or in a zip?

Here is how to solve it manually:

Clone or download -> https://github.com/fastlane/frameit-frames
Extract and put latest folder in /Users/youruser/.fastlane/frameit/latest


expand local variables not working.

running into an issue with expanding local variables inside an env file.
working in v9.0.3 with this setup but seems to fail once I've moved over to a new
CRA with env-cmd version 10.1.0
Request URL: http://localhost:5000/$REACT_APP_API_ENV_ORIGIN/
.env file:
REACT_APP_API_ENV_ORIGIN=someAPIURL.com
REACT_APP_API_ENV=$REACT_APP_API_ENV_ORIGIN

package.json:
  "scripts": {
    "build:integration": "env-cmd -f .env.integration craco build"
   }

Wait are you saying that expanding local variables inside of a .env file worked in v9.0.3?
I honestly do not remember ever implementing that feature. It has been requested before, but I have not gotten around to implementing it yet. Someday soon hopefully!
Currently, env expansion only works for arguments passed on the command line.

I might be using the wrong term here but let me expand on my example with the above snippet. it might be up the chain and not related to env-cmd but I'm not 100% sure on that. I'll need to do some more research.
The fix i've done for now is just assigning the url directly instead of referencing it within my env file.
call the following env var inside my react app in 9.0.3 with craco and node version 10.15.3
process.env.REACT_APP_API_ENV/slug

network requests will map to
someAPIURL.com/slug

same code with v10.1.0 within a react app and craco on node v10.15.3
maps to the following and fails
$REACT_APP_API_ENV_ORIGIN/slug

Interesting...could you create a small repo demonstrating this issue that I can use to test with? I know it is a bit more work, but it would really help!
Together, hopefully we can get this issue resolved 😄

you can use dotenvx for this.
HELLO="World"
HELLO2=$HELLO

// index.js
console.log(`Hello ${process.env.HELLO}`)
console.log(`Hello ${process.env.HELLO2}`)

dotenvx run -- node index.js


TestStreamSecretsUpdateFailures test failure

I have seen this a few other times as well: https://prow.istio.io/view/gcs/istio-prow/pr-logs/pull/istio_istio/21825/unit-tests_istio/9885

dupe https://github.com/istio/istio/issues/22024


drc takes surprisingly long with fuzzed yosys input

Describe the bug
This is from https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/2142 where detailed route went from ca. 2 hours to ca. 2 days. The only change is that the synthesis input is fuzzed. Very slightly different initial conditions to Yosys causes slightly different yosys output.
untar drc-slow.tar.gz
./run-me-riscv32i-sky130hs-base.sh

After a while, it no longer converges. Notice that all the time is spent in the 90-100% on 37 violations.
I don't know if it eventually finds resolves all the violations.
OpenROAD v2.0-14511-gedb4e7e37
[deleted]
[INFO DRT-0195] Start 55th optimization iteration.
    Completing 10% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 20% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 30% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 40% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 50% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 60% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 70% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 80% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 90% with 37 violations.
    elapsed time = 00:00:00, memory = 3372.71 (MB).
    Completing 100% with 37 violations.
    elapsed time = 00:21:32, memory = 3372.67 (MB).
[INFO DRT-0199]   Number of violations = 37.
Viol/Layer        met1   met2
Metal Spacing        2      0
Short               24     11
[INFO DRT-0267] cpu time = 00:21:32, elapsed time = 00:21:32, memory = 3372.67 (MB), peak = 3932.95 (MB)

Expected Behavior
Converge reasonably quickly or give up on hopeless problems
Environment
OpenROAD v2.0-14511-gedb4e7e37

To Reproduce
See above
Relevant log output
No response
Screenshots
No response
Additional Context
No response

As mentioned in https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/2142, this is more of a GRT problem than DRT. The input guides are bad due to a wrong configuration for resource reductions.

It would be nice if detailed routing gave up more quickly on hopeless cases. Is this test-case interesting in that regard or should it just be closed?

It would be nice if detailed routing gave up more quickly on hopeless cases. Is this test-case interesting in that regard or should it just be closed?

That's a good point. I think we can keep this issue open to keep track of it. I have the artifacts of the design downloaded, so I can investigate it.

@eder-matheus Perhaps you can file a new github issue using the test-case of this one so that it is more obvious what feature is being requested?
There is no need to read over and over again the history of this issue since it is now "solved".

Its hard to know what's hopeless.  Sometimes it finishes on iter 50.


Deps Upgrade

Description
We need to upgrade most of deps but Next.js 13.1 specifically:

[x] Deprecated next-transpile-modules,
[x] Introduction of modularizeImports, etc.

Type of change

[x] Chore

Screenshots
N/A
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation

@koechkevin @thepsalmist


Secure filename

The file name provided from the frontend can be exploited by potential attackers, for example, a name can be name="../../../passwd" which will then be used by the backend os.path.join(cwd, name) and yields unintended behavior. Therefore it is important to sanitize the user provided file name.  With werkzeug.secure_filename(name), the file name will be sanitized as passwd.

There are merge conflicts.

There are merge conflicts.

I rewrote the part about open command, could you please take a look see if the logic flows?


dbeaver/pro#1954 clear superInheritance for partitions

Closes dbeaver/pro#1954
Relation should not duplicate for scheme erd diagrams

Verified


Does not run on a Raspberry Pi @ Debian

I ran this on a linux machine for several month without problems. Now I tried it on 2 Debian RPIs but without success:
sudo ./ufw-docker-automated
./ufw-docker-automated: 1: ELF: not found
./ufw-docker-automated: 2: @$: not found
./ufw-docker-automated: 2: @?: not found
./ufw-docker-automated: 2: ?: not found
./ufw-docker-automated: 2: ?{?{??: not found
./ufw-docker-automated: 2: ?: not found
./ufw-docker-automated: 2: p?{?: not found
./ufw-docker-automated: 2: b?: not found
./ufw-docker-automated: 1: z?: not found
./ufw-docker-automated: 3:?zR?
                             v: not found
./ufw-docker-automated: 4: Syntax error: ")" unexpected

sudo journalctl -u ufw-docker-automated -f
-- Journal begins at Thu 2019-02-14 11:11:59 CET. --
Dec 26 21:03:12 pi-docker systemd[1]: Started Ufw docker automated.
Dec 26 21:03:12 pi-docker systemd[23123]: ufw-docker-automated.service: Failed to execute /usr/lib/ufw-docker/ufw-docker-automated: Exec format error
Dec 26 21:03:12 pi-docker systemd[23123]: ufw-docker-automated.service: Failed at step EXEC spawning /usr/lib/ufw-docker/ufw-docker-automated: Exec format error
Dec 26 21:03:12 pi-docker systemd[1]: ufw-docker-automated.service: Main process exited, code=exited, status=203/EXEC
Dec 26 21:03:12 pi-docker systemd[1]: ufw-docker-automated.service: Failed with result 'exit-code'.
Dec 26 21:03:12 pi-docker systemd[1]: ufw-docker-automated.service: Scheduled restart job, restart counter is at 5.
Dec 26 21:03:12 pi-docker systemd[1]: Stopped Ufw docker automated.
Dec 26 21:03:12 pi-docker systemd[1]: ufw-docker-automated.service: Start request repeated too quickly.
Dec 26 21:03:12 pi-docker systemd[1]: ufw-docker-automated.service: Failed with result 'exit-code'.
Dec 26 21:03:12 pi-docker systemd[1]: Failed to start Ufw docker automated.

Any hint on this?

Hi. That's expected. Currently ufw-docker-automated is compiled to target only x86_64 architecture. Means it supports traditional computer CPUs, but doesn't support ARM based computers like Raspberry PI or Mac M1 etc. I can add build support for this. Hold on.

Hey I've just cut a new release to support Raspberry Pi systems. It also includes startup sync feature. Give this version a shot and let me know if it works!

@shinebayar-g Yes it works, thank you very much :)


type definitions don't work for tuple types

declare let tuple: [number, string];

const arrified = arrify(tuple);
arrified.push(1);
arrified[0] = 'foo'

Since tuples are arrays, they are returned as is. The type declarations however widen the type to a regular (mutable) array type.  Both mutations above should not be allowed.

This is not correct. Tuples are mutable by default. You can't push to a tuple but you can mutate values inside.

Any suggestions on how to fix this?


[FEATURE] Use the new API for retrieving rules and symptoms

Safer, UIUC and Admin Wednesday 2020/09/16 - 2
Consume the new crules API in the Safer App and the Admin App for changing/viewing the rules.

Done.


Improve AuthProvider chaining for JWT to index providers by issuer

When multiple AuthProviders using the JWT scheme are chained, it is possible to index AuthProviders against the issuer name.
By doing so, it is possible to bypass the auth-chain-validation. This will prevent having to do the full JWT verification unnecessarily, against the AuthProvider for irrelevant "issuer" name.
Main thread: "Authentication fails when more than one AuthProvider engaged to the same endpoint" (ballerina-dev@)

This issue is fixed with the patterns introduced by https://github.com/ballerina-platform/ballerina-lang/pull/15363


Fix lte and gte error expression

ISSUE： https://github.com/apache/incubator-doris/issues/2852

es_query_builder_test also need update?

@kangkaisen  Thanks.


Can't find mimalloc-override.o

Documentation mentions using mimalloc-override.o to statically override malloc but I can't find it anywhere, and cmake lists seem to not mention it. Was it deprecated?

As I understand it, only the visual studio solution generates the -override suffix.  But as long as your cmake options are all set correctly to statically override, then mimalloc.o or whatever resulting filename should work in its place.


Potential incorrect non bug-fix for Lang 63

In the original Version Control diff, line 306 is removed, including the variable update day += 31; and the comment // such overshooting is taken care of later on.

diff --git a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
index f777d489..3a9d9f68 100644
--- a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
+++ b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
@@ -306 +306,7 @@ public class DurationFormatUtils {
-            days += 31; // such overshooting is taken care of later on
+            end.add(Calendar.MONTH, -1);
+            days += end.getActualMaximum(Calendar.DAY_OF_MONTH);

However, in the minimized bug-fixing diff, on line 306, only the variable reassignment day += 31; is removed, indicating that only this component of the line is considered a bug-fix, while the comment component is considered a non-bug-fix.

diff --git a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
index 127b9279..3a9d9f68 100644
--- a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
+++ b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
@@ -303,25 +303,20 @@ public class DurationFormatUtils {
             days -= 1;
         }
         while (days < 0) {
-            days += 31;
+            end.add(Calendar.MONTH, -1);
+            days += end.getActualMaximum(Calendar.DAY_OF_MONTH);

By Defects4J's conventions, is it weird to have a non-bug-fix diff only remove the comment component, then the bug-fix removes the variable reassignment? I discussed this with Mike and we agree that this should not be considered a tangled line case. The reason is since if the bug is in the variable reassignment, then bug-fix diff should remove the whole line - it doesn't really make sense that the comment has to be removed just to fix the bug.
I hope this explanation makes sense. Please share your insights and thoughts on whether this is a reasonable argument. Thank you so much!

Hi @thanhdang2712,
Here is the original bugfix patch:
diff --git a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
index f777d48931a..3a9d9f68a97 100644
--- a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
+++ b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
@@ -303,23 +303,21 @@ public static String formatPeriod(long startMillis, long endMillis, String forma
             days -= 1;
         }
         while (days < 0) {
-            days += 31; // such overshooting is taken care of later on
+            end.add(Calendar.MONTH, -1);
+            days += end.getActualMaximum(Calendar.DAY_OF_MONTH);
+//days += 31; // TODO: Need tests to show this is bad and the new code is good.
+// HEN: It's a tricky subject. Jan 15th to March 10th. If I count days-first it is
+// 1 month and 26 days, but if I count month-first then it is 1 month and 23 days.
+// Also it's contextual - if asked for no M in the format then I should probably
+// be doing no calculating here.
             months -= 1;
+            end.add(Calendar.MONTH, 1);
         }
         while (months < 0) {
             months += 12;
             years -= 1;
         }

-        // take estimates off of end to see if we can equal start, when it overshoots recalculate
-        milliseconds -= reduceAndCorrect(start, end, Calendar.MILLISECOND, milliseconds);
-        seconds -= reduceAndCorrect(start, end, Calendar.SECOND, seconds);
-        minutes -= reduceAndCorrect(start, end, Calendar.MINUTE, minutes);
-        hours -= reduceAndCorrect(start, end, Calendar.HOUR_OF_DAY, hours);
-        days -= reduceAndCorrect(start, end, Calendar.DAY_OF_MONTH, days);
-        months -= reduceAndCorrect(start, end, Calendar.MONTH, months);
-        years -= reduceAndCorrect(start, end, Calendar.YEAR, years);
-
         // This next block of code adds in values that
         // aren't requested. This allows the user to ask for the
         // number of months and get the real count and not just 0->11.
@@ -427,29 +425,6 @@ static String format(Token[] tokens, int years, int months, int days, int hours,
         return buffer.toString();
     }

-    /**
-     * Reduces by difference, then if it overshot, calculates the overshot amount and
-     * fixes and returns the amount to change by.
-     *
-     * @param start Start of period being formatted
-     * @param end End of period being formatted
-     * @param field Field to reduce, as per constants in {@link java.util.Calendar}
-     * @param difference amount to reduce by
-     * @return int reduced value
-     */
-    static int reduceAndCorrect(Calendar start, Calendar end, int field, int difference) {
-        end.add( field, -1 * difference );
-        int endValue = end.get(field);
-        int startValue = start.get(field);
-        if (endValue < startValue) {
-            int newdiff = startValue - endValue;
-            end.add( field, newdiff );
-            return newdiff;
-        } else {
-            return 0;
-        }
-    }
-
     static final Object y = "y";
     static final Object M = "M";
     static final Object d = "d";

Here is the original bug-introducing patch:
diff --git a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
index 3a9d9f68..f777d489 100644
--- a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
+++ b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
@@ -303,21 +303,23 @@ public class DurationFormatUtils {
             days -= 1;
         }
         while (days < 0) {
-            end.add(Calendar.MONTH, -1);
-            days += end.getActualMaximum(Calendar.DAY_OF_MONTH);
-//days += 31; // TODO: Need tests to show this is bad and the new code is good.
-// HEN: It's a tricky subject. Jan 15th to March 10th. If I count days-first it is
-// 1 month and 26 days, but if I count month-first then it is 1 month and 23 days.
-// Also it's contextual - if asked for no M in the format then I should probably
-// be doing no calculating here.
+            days += 31; // such overshooting is taken care of later on
             months -= 1;
-            end.add(Calendar.MONTH, 1);
         }
         while (months < 0) {
             months += 12;
             years -= 1;
         }

+        // take estimates off of end to see if we can equal start, when it overshoots recalculate
+        milliseconds -= reduceAndCorrect(start, end, Calendar.MILLISECOND, milliseconds);
+        seconds -= reduceAndCorrect(start, end, Calendar.SECOND, seconds);
+        minutes -= reduceAndCorrect(start, end, Calendar.MINUTE, minutes);
+        hours -= reduceAndCorrect(start, end, Calendar.HOUR_OF_DAY, hours);
+        days -= reduceAndCorrect(start, end, Calendar.DAY_OF_MONTH, days);
+        months -= reduceAndCorrect(start, end, Calendar.MONTH, months);
+        years -= reduceAndCorrect(start, end, Calendar.YEAR, years);
+
         // This next block of code adds in values that
         // aren't requested. This allows the user to ask for the
         // number of months and get the real count and not just 0->11.
@@ -425,6 +427,29 @@ public class DurationFormatUtils {
         return buffer.toString();
     }

+    /**
+     * Reduces by difference, then if it overshot, calculates the overshot amount and
+     * fixes and returns the amount to change by.
+     *
+     * @param start Start of period being formatted
+     * @param end End of period being formatted
+     * @param field Field to reduce, as per constants in {@link java.util.Calendar}
+     * @param difference amount to reduce by
+     * @return int reduced value
+     */
+    static int reduceAndCorrect(Calendar start, Calendar end, int field, int difference) {
+        end.add( field, -1 * difference );
+        int endValue = end.get(field);
+        int startValue = start.get(field);
+        if (endValue < startValue) {
+            int newdiff = startValue - endValue;
+            end.add( field, newdiff );
+            return newdiff;
+        } else {
+            return 0;
+        }
+    }
+
     static final Object y = "y";
     static final Object M = "M";
     static final Object d = "d";

Here is the minimal bug-introducing patch proposed by Defects4J:
diff --git a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
index 3a9d9f6..127b927 100644
--- a/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
+++ b/src/java/org/apache/commons/lang/time/DurationFormatUtils.java
@@ -303,20 +303,25 @@ public class DurationFormatUtils {
             days -= 1;
         }
         while (days < 0) {
-            end.add(Calendar.MONTH, -1);
-            days += end.getActualMaximum(Calendar.DAY_OF_MONTH);
+            days += 31;
 //days += 31; // TODO: Need tests to show this is bad and the new code is good.
 // HEN: It's a tricky subject. Jan 15th to March 10th. If I count days-first it is
 // 1 month and 26 days, but if I count month-first then it is 1 month and 23 days.
 // Also it's contextual - if asked for no M in the format then I should probably
 // be doing no calculating here.
             months -= 1;
-            end.add(Calendar.MONTH, 1);
         }
         while (months < 0) {
             months += 12;
             years -= 1;
         }
+        milliseconds -= reduceAndCorrect(start, end, Calendar.MILLISECOND, milliseconds);
+        seconds -= reduceAndCorrect(start, end, Calendar.SECOND, seconds);
+        minutes -= reduceAndCorrect(start, end, Calendar.MINUTE, minutes);
+        hours -= reduceAndCorrect(start, end, Calendar.HOUR_OF_DAY, hours);
+        days -= reduceAndCorrect(start, end, Calendar.DAY_OF_MONTH, days);
+        months -= reduceAndCorrect(start, end, Calendar.MONTH, months);
+        years -= reduceAndCorrect(start, end, Calendar.YEAR, years);

         // This next block of code adds in values that
         // aren't requested. This allows the user to ask for the
@@ -424,6 +429,18 @@ public class DurationFormatUtils {
         }
         return buffer.toString();
     }
+    static int reduceAndCorrect(Calendar start, Calendar end, int field, int difference) {
+        end.add( field, -1 * difference );
+        int endValue = end.get(field);
+        int startValue = start.get(field);
+        if (endValue < startValue) {
+            int newdiff = startValue - endValue;
+            end.add( field, newdiff );
+            return newdiff;
+        } else {
+            return 0;
+        }
+    }

     static final Object y = "y";
     static final Object M = "M";

And @thanhdang2712 is reporting that Defects4J's bug-introducing patch for Lang-63 incorrectly introduces in the buggy version
+            days += 31;

when it should introduce
+            days += 31; // such overshooting is taken care of later on

According to our Patch-Minimization-Guide.md

Comments could be considered as part of the bug fix: a developer may want to associate a comment with a bug fix and therefore include it in the pure bug-fixing patch. However, a researcher may want to ignore comments when reasoning about or analyzing a bug-fixing patch. Therefore, we remove all changes to comments or documentation from the patch.

Thus, we, for example, removed from the original bug-introducing patch the following lines (and many other):
//days += 31; // TODO: Need tests to show this is bad and the new code is good.
// HEN: It's a tricky subject. Jan 15th to March 10th. If I count days-first it is
// 1 month and 26 days, but if I count month-first then it is 1 month and 23 days.
// Also it's contextual - if asked for no M in the format then I should probably
// be doing no calculating here.

However, our documentation lacks details on whether comments that were present on the original buggy version should remain in the minimal bug-introducing patch provided by Defects4J.  I am inclined to say they should; others might have a different opinion.
--
Best,
Jose

In summary, I think you are saying:

the patch in Defects4J is consistent with the documentation that says no comments should be present.  This is good for APR tools (they could not be expected to generate the exact comment), though non-optimal for other uses of Defects4J.  This convention makes it look like the programmer made both a bug fix and a non-bug-fix change on the given line, which is not true.  Tools that try to determine that information must work around the Defects4J convention.
the Defects4J documentation should be more explicit about "whether comments that were present on the original buggy version should remain in the minimal bug-introducing patch provided by Defects4J".  I'm a bit confused by this:  if the comments are originally present, then they would only appear in the patch if the patch removed them.  By "remain in the patch" did you mean "textually appear in the patch" or did you mean remain in the fixed version?  (Or something else?)

My points are:

experimenters would have to rewrite their evaluation scripts
different diffs are useful for different purposes, and Defects4J has historically favored APR usage.  We could change this, of course.


potential circuit insert issue

When inserting gates with Circuit.insert(), the gates are (often) added to the previous moment. I assume the fault is in _pick_or_create_inserted_op_moment_index
To replicate the error, the following code shows the problem. I start with a circuit of three CNOTs (one per moment), remove one of the CNOTS (expect three moments with one being empty), insert the same gate back to the Moment index_to_clean, but the gate is added to the previous Moment.
For the following code I get a strange result
import cirq

q = [cirq.NamedQubit("q" + str(i)) for i in range(4)]
circ = cirq.Circuit()
index_to_clean = 1

cnots = [
    cirq.ops.CNOT.on(q[0], q[3]),
    cirq.ops.CNOT.on(q[1], q[2]),
    cirq.ops.CNOT.on(q[1], q[2])
]
circ.append(cnots, strategy=cirq.InsertStrategy.NEW)

print("Fresh circuit", repr(circ))

circ.clear_operations_touching(cnots[index_to_clean].qubits, [index_to_clean])
print("Removed CNOT at {}".format(index_to_clean), repr(circ))

circ.insert(index_to_clean, cnots[index_to_clean], strategy=cirq.InsertStrategy.INLINE)
print("Inserted CNOT at {}".format(index_to_clean), repr(circ))

The output is
Fresh circuit cirq.Circuit([
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q0'), cirq.NamedQubit('q3')),
    ]),
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q1'), cirq.NamedQubit('q2')),
    ]),
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q1'), cirq.NamedQubit('q2')),
    ]),
])
Removed CNOT at 1 cirq.Circuit([
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q0'), cirq.NamedQubit('q3')),
    ]),
    cirq.Moment(),
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q1'), cirq.NamedQubit('q2')),
    ]),
])
Inserted CNOT at 1 cirq.Circuit([
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q0'), cirq.NamedQubit('q3')),
        cirq.CNOT.on(cirq.NamedQubit('q1'), cirq.NamedQubit('q2')),
    ]),
    cirq.Moment(),
    cirq.Moment(operations=[
        cirq.CNOT.on(cirq.NamedQubit('q1'), cirq.NamedQubit('q2')),
    ]),
])

This is the correct, documented behavior.

I was also very surprised when I discovered this behavior #2486

@bryano  The behaviour is documented for Inline, but earliest starts also at index-1? It is also more than confusing.

@alexandrupaler I'm not sure what you mean by "index-1". Could you give an example?

@bryano: if I call insert(index, strategy=Earliest) the insertion is also performed starting with index-1. For example, if I specify index=4, then insertion starts from index 3 and not 4.

That shouldn't be the general behavior for EARLIEST. For example, if
circuit.insert(index, op, strategy=InsertStrategy.EARLIEST)
inserts op at index inserted_index and there are no operations touching op.qubits in later moments (>= index), then
circuit.insert(index + k, op, strategy=InsertStrategy.EARLIEST)
should insert op at the same inserted_index for any k >= 0.

I think this is working as intended with the confusing (but python inspired) insert at index being interpreted as the boundary a la the discussion #2486  If I'm wrong, please reopen.
This does point out as described by #2775 how confusing it is to have insertion strategies in our insertion methods.


VcrPlugin

see #3 ping @jeromegamez any status on this ?

Unfortunately not :/. If someone wants to take over, do it - I don't know when I can get to it… :disappointed:

https://github.com/php-http/vcr-plugin/


Recaptcha broken on live DMPonline site

See https://dmponline.dcc.ac.uk/contact-us

This is likely just an issue with the server configuration in config/initializers/recaptcha.rb. @vyruss you should be able to just copy over what you have out on the live DMPonline instance

Thanks @briri

recaptcha.rb hasn't been touched since Sep 30, 2013. Maybe Google has changed their Recaptcha API.

You just need to set the following in your config/initializers/recaptcha.rb
Recaptcha.configure do |config|
  config.site_key  = 'MY_SITE_KEY'
  config.secret_key = 'MY_SECRET_KEY'
  #config.proxy = 'http://someproxy.com:port'
end

FYI, recaptcha won't appear if you access the contact us page when you're logged in. You need to be logged out to see it.

@briri that's the new syntax and it won't work with the recaptcha v0.4.0 gem on the live service. I wonder whether that got deprecated by Google and stopped working?

Ah. didn't realize this was on the live service. Thought we were talking about your Roadmap test server.
Yes, they may have deprecated it. Might be worth updating the gem

Nah, the keys had expired after all for some reason (google recaptcha admin panel inactivity?). I replaced them with new ones and it works now...


Deprecation auditing is very slow for 10,000 versions

We call SaveAuditRecord for each version being deprecated. As a result, with ten thousand versions, this is extremely slow.

Looked into this more. It seems only deprecating 10,000 packages is affected by this.
Deprecating only 1,000 versions took roughly 5-10 seconds to finish.
Deprecating all 10,000 versions took roughly 3 minutes to finish.
It's unclear to me exactly why it's so substantially worse with 10,000 versions, but I don't think this is a ship-blocker.


Allow R+W Contributors to Add Affiliations [OSF-6649]

Purpose

This PR allows read + write contributors to add their affiliation to a project.
R+W contributors can add and remove their own affiliations.
R+W contributors cannot add or remove admin affiliations.
Admins can remove, but not add, r+w contributor affiliations.
Read only contributors can do nothing.

Changes

API
Changed the /nodes/<node-id>/relationships/institutions/ and /institutions/<inst-id>/relationships/nodes/ routes to allow r+w contributors to appropriately create, edit, and delete node-institution relationships.
Front-end
Changed the project/settings.mako template to display add/remove buttons to r+w contributors for their affiliations.

Side effects

None expected.

Ticket

OSF-6649

Screenshots

Kanye West (admin affiliated with COS and NYU) can add his affiliations, remove his affiliations, and remove, but not add, the affiliations of R+W contributors (VT).

Chance The Rapper (R+W contributor affiliated with VT) can add and remove his affiliation, but cannot add or remove an admin affiliation (COS).

Vic Mensa (read only) can only view the project affiliations.

Looks awesome. Well done. 🎉 🐧 🎉


Fix error message for missing log stream

Closes #3978

Codecov Report

Merging #4043 (1c3395c) into master (a230e2a) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4043   +/-   ##
=======================================
  Coverage   94.97%   94.97%
=======================================
  Files         465      465
  Lines       50431    50431
=======================================
  Hits        47898    47898
  Misses       2533     2533

Flag
Coverage Δ

servertests
55.87% <0.00%> (ø)

unittests
94.85% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/logs/models.py
93.80% <100.00%> (ø)

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 a230e2a...1c3395c. Read the comment docs.


[zingmp3] Update extractor

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[x] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Updating broken zing mp3 extractor. It looks like there's a few dangling PRs; I'm not sure why they haven't been merged.
Addresses #16409.

Bumping; issue still exists on release youtube-dl 2018.08.04.


CNDIT-164 : Schema objects building

Not relevant anymore. We keep it in this branch and might circle back if we work on CSV parser similar to ReportStream.


Regular Expressions: Escape character

Hi, in the regular expressions chapter, I found an inaccuracy related to escaping characters in the incoming input.
Matching the metacharacters
$ echo '\learn\by\example' | awk '{gsub(/\\/, "/")} 1'
/learn/by/example

Using string literal as a regexp
# another example
$ echo '\learn\by\example' | awk '{gsub("\\\\", "/")} 1'
/learn/by/example
$ echo '\learn\by\example' | awk '{gsub(/\\/, "/")} 1'
/learn/by/example

In these examples, we don't escape the incoming text '\learn\\by\\example' with extra slashes and so echo returns the wrong string \learyample on pipe for awk.

Backslashes are not special with default echo (at least on my system).
$ echo '\learn\by\example'
\learn\by\example

Your issue is probably mentioned in this thread: https://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

Okay, thanks for the answer. Btw, I see the same behavior with printf.

Ah, I meant printf '\\learn\\by\\example\n' so that it'll behave the same everywhere, unlike echo that differs in how it handles backslashes based on the implementation.


Fast model stable points calculation

So #899  -- Fast version of Perfect Foresight and ConsIndShock needs stable points calculation. Requires numba know-how.
@alanlujan91 @Mv77

I don't have a lot of time to look into this now but I should be able to make some time in February

I don't have a lot of time to look into this now but I should be able to make some time in February


refac: databricks jobs cli

Description

References

#0000

@johevemi , I'm closing this as I assume you don't need or use it anymore.


OSDE2E addon test tweaks

OSDE2E addon test tweaks

on integration will not install RHODS.
Updated addon deployment to use the new nvidia-gpu-addon.
Added ability to pass addon parameters for install
updated README with new ocm_addon install param ocm_addon_params

@sagidayan does that include the missing email-notification field?
I currently do it this way, although it not 100% clean (parameter is hardcoded, email is hardcoded):

{
  "addon": {
    "id": "{{ ocm_deploy_addon_id }}"
  },
  "parameters": {
    "items": [
      {
        "id": "notification-email",
        "value"<EMAIL_ADDRESS>      }
    ]
  }
}

@kpouget No, this is without the email. You are correct. Ill add a commit to this PR later. It's still WIP.
Thanks for reminding me 🍻.

/retest

/retest

/test nvidia-gpu-operator-e2e


Chinese texts in a theme can not be wraped automatically.

Describe the bug
When there are chinese text with no space character in a theme, the chinese text can not be wrapped automatically.
To Reproduce
Put some chinese text into the description of a game in the gamelist file
Open ES;
Go to the detailed view of that game;
See no wraps for Chinese text.

Expected behavior
The chinese text should be wrapped automatically just like western language.
Additional context
The following snippet could be used for test:
<desc>一款转换街机游戏，1942年是一款垂直卷轴射击游戏，供一到两名玩家使用。这一年是1942年，你是一个勇敢的超级王牌战斗机飞行员。你在一艘航母上获得并完成每一关，然后起飞去争夺陆地和海洋。在摧毁敌机的某些编队后，你可以收集不同的能量来增加你的火力和生存机会。</desc>

Was fixed in a previous commit


SetSpeakMiddleware uses string formatting to create XML

Code in the SetSpeakMiddleware uses raw string formatting to create XML and is therefore exposed to badly formed XML creation, for example, if the values in the data contained characters such as < or > or &;
Code that creates XML should always use System.Xml and System.Xml.Linq classes such as XDocument, XElement etc. to manipulate and construct XML.

investigating


Improve custom protocol detector to work better on safari & edge

https://github.com/larrysalibra/custom-protocol-detection

I've done a bit of research into detecting custom protocols on Safari both on iOS and macOS.
The TL;DR is that Apple seems to have done a bunch of work to make it not possible to detect protocol handlers in Safari.
In safari, on both iOS and macOS, the best it seems we can do is to redirect users to a web page with instructions to follow if the app doesn't open, and then try to open the blockstack: link in an iframe. This usually (but not always on in my testing on iOS) suppresses the unhelpful, unsupported error dialog/page.
The way to detect custom handlers in iOS apps is to use this method: https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl
In iOS safari, the preferred way to handle something by an app would be using universal links instead of a custom protocol handler. https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html


no package "language-mocodo" in Atom Settings

I failed to install the package in Atom (Preferences->Packages).

Yes sorry, it's in the Install section.
I have fix that in the README.


Migration Data Report

We need to identify a couple types of works in current ScholarSphere, that are potentially problematic. For example, how many works do we have that have files with multiple versions. How many works do we have with multiple files. Other potentially difficult migration relationships or properties that may exist, but let's find out if there are "a lot" of these files existing or if there are a few of them then we may be able to migrate them manually.
Parameters

works having many versions of files
works in collections
works with a single file
works with permissions set it a specific group

TODO
Seth will add more potential problematic works for us to look at and add to this ticket.

How many files have permissions set to a specific group? Guessing this feature isn't widely used.

If we can get more context around some of these, for example:
if there are files with versions, is the file a README or is it a data file (a README may not be nearly as important)

Add to report:

files with different permissions than the parent work
multi-file works with different permissions among the files
counts of embargoed and leased works, including dates of expiration
works with read groups other than public or registered

Results are report here: https://docs.google.com/spreadsheets/d/1sWbpvdOKNKG4lCdNuqKDYKOIs9RpKEsJQXRukgfcT8M/edit?usp=sharing


togglePine hotkey not being unregistered

When attempting to change the togglePine hotkey, the previous key is not being unregistered resulting in both the old key and the new key being a toggle button.

This issue was related to the unregisterHotkeys() function in main.ts not being called when the reset button is clicked from the front end. unregisterHotkeys() is only called when stop-record-hotkey event is fired. This event does not get fired when the reset button gets clicked.
To resolve this we unregister and register directly in the put-settings event now. There is code duplication here because unregisterHotkeys will still be called for the normal use case. For now, I am okay with this solution.

This issue was related to the unregisterHotkeys() function in main.ts not being called when the reset button is clicked from the front end. unregisterHotkeys() is only called when stop-record-hotkey event is fired. This event does not get fired when the reset button gets clicked.
To resolve this we unregister and register directly in the put-settings event now. There is code duplication here because unregisterHotkeys will still be called for the normal use case. For now, I am okay with this solution.


FYI: A refind patch which calls apple_set_os

I wrote this last summer to avoid doing chainloading shenanigans with GRUB and refind (or using the EFI executable utility).  I have a 10,1 (not realizing that, apparently, this hack is only needed on 11,x?).
I figured I'd share it with you guys!
https://github.com/orospakr/refind

Hey orospakr ,
thanks for sharing your repository with us.
I added your repo to the list of possible apple_set_ost tricks.
I am not aware that the 10,x model needs the apple_set_os hack. I don't think that this model hides the iGPU if Linux is booted in EFI mode.


Update release-process.md

Combined release triage and release update meetings into one meeting (under T-0)

Merge conflict resolved @jasonblais


feat: implement inline assembly

This PR expands upon the drafted inline assembly functionality, and in the process adds some useful pieces of functionality that are used during code generation. I've inlined the main commit message below which goes into more detail.
There are two motivations for this currently:

The code generator work I'm introducing builds on some of this functionality, e.g. the representation of local variables, the MASM instruction set, and the operand stack data structure.
Some higher-level instructions in the IR require more complex sequences of Miden Assembly - to facilitate that, we will define a baked-in intrinsics module that exposes procedures written using inline assembly that provide the functionality needed for those instructions. This keeps the resulting MASM clean, while still allowing us to keep those instructions as efficient as possible.

@jjcnn You may notice the changes to the textual output of the IR with regard to inline assembly. You can feel free to omit support for inline assembly entirely from the parser for the time being, as I don't think it is essential at all to support it there for now, however I did provide a short example of what you can expect the syntax to look like in practice, below. Adding support for inline assembly to the parser will be more effort than its worth for now though IMO.

This commit fleshes out the implementation of inline assembly that we
had essentially stubbed out prior to this. The following are provided as
part of this implementation:

A representation of the Miden Assembly instruction set, in crate,
with the ops we intend to support in the near term. This is used to
represent the contents of inline assembly, and is also used in the
upcoming codegen backend as the target IR for Miden Assembly, as it
is a flatter representation similar to Miden IR. The intent is to also
implement a tiny evaluator for this subset of Miden Assembly for use
in tests without having to emit MASM files, and run the Miden VM which
is much more expensive. It also allows us to track the subset of Miden
Assembly which we support in the compiler, as well as represent
experimental changes that have not yet been implemented upstream.

MasmBuilder, which is constructed from an InstBuilder via inline_asm,
and plays a similar role to FunctionBuilder+InstBuilder, but in
terms of Miden Assembly, in the context of constructing a single inline
assembly block.

Improved pretty printing of inline assembly. Now, an inline assembly
block is printed like so (this block adds the two inputs, and squares
the result, which is returned as the result of the inline assembly
block):
asm (v1, v2) {
    add
    mul.2
} : felt

A generic data structure for use in representing the operand stack,
and the common operations which are performed on it. This is used to
validate inline assembly, as well as keep track of values during code
generation. It will also likely be used for whatever evaluator we
throw together for use in testing.

Thanks for the quick turnaround! I'm going through your notes now, and should have this turned back around shortly.

@jjcnn For Monday, I've updated the PR with a number of changes in response to your feedback. Aside from splitting up the asm module as requested, the most significant is related to the handling of the exec, syscall, if.true, while.true, and repeat builders. Most of the rest are small tweaks, doc additions/improvements. I've also added a test which demonstrates constructing a function with inline assembly that includes a loop; both to validate the API, and to test that it does what is expected. Each change is split into its own commit to make viewing them atomically easier.
I think it's worth putting a little additional time into polishing the handling of types in the MasmOpBuilder so that certain operations preserve type information in some edge cases (i.e. if you use add_u32 on a Type::Ptr value, it turns it into a Type::U32, that could potentially cause the operand stack consistency check to fail in some situations). I'd also like to ensure that cswap and cdrop operations require their operand types to be the same for a similar reason. I'll probably do that Monday, but that won't really change much in this PR.
Let me know if you have any further questions/feedback!


Why Loop is a static class?

Why Loop interop has been implemented as static class, therefore forcing people implementing this to follow wrong programming patterns? The interop class should be standard, instantiable class allowing proper dependency injection. The static access can be easily added via facades, but no the other way around.

See #14. Passing around the event loop everywhere you need it prone to errors, because it usually leads to lazy injection like $this->eventLoop = $eventLoop ?: new Loop; and thus multiple loops while there should usually only be one. (Note that this lazy injection would even be bound to a specific loop implementation.)
Just have a look at JavaScript. The loop is just there, you don't even notice it until you have a blocking event handler. You can just write setTimeout(...) and it works.

Still, using it as static class breaks encapsulation, is OOP anti-pattern and disallows usage of multiple loops, which might be crucial for applications that works on multiple processing flows depending on application state. Interop interface should never be about forcing developer to apply given architecture, but to create set of methods for libraries to work together, and leave them as much implementation freedom as possible.

@khelle Static classes are not automatically an anti-pattern (very few things are). This has already been discussed extensively, and we as a group decided on a static class as the best solution we could think of.
Here's some of the reasons we decided on the current design:

It is useless to create a design that supports multiple event loop instances being used. By definition only one loop can run in a single thread.
The event loop is intended to be as generic as possible; applications can use the same loop, regardless of their internal state. Application state does not, and should not, leak into the event loop implementation.
The static class is simply a static wrapper to a proper interface. That way we can still allow any application to use whatever loop implementation they desire, and the rest of the code does not need to know what loop implementation they are using.

Some additional thoughts:

[...] disallows usage of multiple loops [...]

Multiple loops are allowed, but only to the extent of running one at a time. Again, it is impossible to run more than one at once, so this design choice makes sense. For example:
Loop::execute(function() {
    // Do some async stuff...

    // Run a specialized or alternate loop in place. Again by def.n, this pauses the current loop and runs a different one.
    Loop::execute(function() {
        // Do something and then stop this loop so the outer one can continue.
        Loop::stop();
    }, new DifferentLoopDriverImpl());
}, new MyLoopDriverImpl());

Interop interface should never be about forcing developer to apply given architecture, [...]

We're just modeling the architecture already imposed. The OS is forcing certain architecture; there's no point in pretending there aren't any real restrictions on how event loops can be used.

I am aware that only one loop can be run at the same time, but please tell me how with current static interface can I create components, that know about different loops? Let's call them normal-state-loop and failed-state-loop. Do you tell me, I have to add to each component custom logic, just to differentatiate if global scope loop points to either one of them?

I'm not sure that I understand what you're trying to do. Components shouldn't know about any event loops at all. Isn't that the point of an interoperable interface? Once a component begins inspecting the loop or loops and tries to test for specific implementations, that component is no longer interoperable, because it expects a specific implementation.
Remember that when any event loop is running, regardless of who sets the implementation, every single piece of async code being used is going to be using the same loop instance to get their async work done. If that was not the case, only the methods tied to the event loop that is running would work and every other async function call would never complete.

Component should not expect specific loop implementation, but specific loop interface, which in this case would mean, it should expect this interop-loop-interface.
You still, don't understand my use case. I have two loops - one for normal app state and one for emergency. These loops have their own , separate listeners. When application boots, it starts with normal state, and their evens are being processed etc. etc., if some error happens, then this loop stops, switches to emergency one, starts and leaves it until supervising system decides problem is solved. These loops do not share resources. How can I add to something like this static and global interface for loop? I don't see a way. On the other hand, if the interface was designed for instantiable loops there won't be problem in case like this, nor it would be a problem for people that want to keep their implementation accessible from global state (facade). In future, when there are more async projects and frameworks for PHP, the technical debt of making it static will deepen further.

@khelle There's no problem running a second loop after an error occurred in the first one, even easier if they don't share any state.
$app = function () { … }
$err = function (Throwable $e) { … }

try {
    Loop::execute($app);
} catch (Throwable $e) {
    Loop::execute($err($e));
}

@kelunik Running loop is not a problem here. The problem is that, by passing loop interface to component, I automatically decide whether it connects to normal or emergency loop. With global reference to loop, this cannot be done, without really dirty hacks.
$component = new AsyncComponent($normalLoop); // this will be run in normal state
$component = new AsyncComponent($errorLoop); // this will be run in emergency state

The components do not have to know anything about the currently running loop. They just use the accessor functions directly as well.

They do not know about the running loop, they know about given interface that provides them Loop API. They do not care what kind of loop this is and when it is invoked. I can create many separate computing flows using multiple loops with something like:
$component = new AsyncComponent($loopA); // A
$component = new AsyncComponent($loopB); // B
$component = new AsyncComponent($loopC); // C

Then, only by switching the control between these loops, I am able to decide which code actually runs and when.

@khelle The Loop class is an accessor on steroids for the Driver. Which is the actual loop implementation. Now you can just happily pass the Driver around, though we recommend you use the Loop as there can only be one loop active at a given time. Components shouldn't even be created when you're not going to use them. Instead creating and invoking them when desired keeps program cleaner then when you create all flows for when you might need them.

@WyriHaximus This does not solve the issue, when you yourself say that it is not recommended to use. There is not point of using interop implemention details instead of actual interfaces, because in practice, it would probably mean that it won't be interoperable.  as the given examples are always simplistic. You don't like the idea of creation all these components, nor do I, but in real world they would be delegated for factory methods registered to DI container on application boot, and then your point would not apply, but the problem would still occur.
From what I have seen from your arguments, the current implementation is designed only for really simplistic architecturally applications. I hope, I do not come around as too much of negative person, as I really, really woudl like to implement interop interfaces in my framework, but as it stands now, I don't see any positives. It's like fixing non-existant problem and introducing many more. I am not convinced.

@khelle yes the examples are always simplified to the point where they don't make sense anymore. There is no need to tell me about DIC's, factory methods, lazy instantiation etc etc. I'm well aware of them and extensively using them. With very simplefied examples it is hard to completely get what you're trying to do and provide a different perspective.

@WyriHaximus I appreciate that, the Driver looks nice and it is exactly what I believe should be the main and only loop interop interface. It allows interoparability and does not force developer to anything on the othe end. The whole global static concept should be dropped as it does not solve anything, just bring more problems. There is nothing I can say more here. Thank you for all of your answers! :)

The whole global static concept should be dropped as it does not solve anything

It solves the there should only be one global loop problem. Otherwise we end up with an accessor for every library which you have to set which is even worse. We had that. It didn't work well.

@kelunik Maybe, but you are trying to solve not interop-related problem here. The same point could be stated about DI container interop, which is hosted on https://github.com/container-interop/container-interop and you don't see them forcing static referencing you.

@khelle

Maybe, but you are trying to solve not interop-related problem here.

It is an interop problem. If every library is either using a different accessor or or creating their own loop instance, you can no longer guarantee a single instance without a huge mess of boilerplate code. Any library wanting to adhere to this standard must have a non-implementation-specific way to access the single event loop instance currently in use, otherwise the interfaces are for naught.

@sagebind But if I want to use a set of loops, I have either way to create instances of them in running application. If I create these instances then it is up to me how and where do I pass them.

Hey folks,
This looks like an interesting discussion, and perhaps worth more thought. It's been 7 hours and 19 comments so far. I suggest we give each other time to think a bit about what's been said here and come back in a day or two with (what I hope will be) clearer ideas about what (if anything) needs to change.
It'll also give others a chance to absorb and chime in if they have something insightful to add.
Thanks!

@khelle And the issue is? You can just simply switch loops like:
Loop::execute(function() {
    /* setup loop tasks for MyLoop */
    Loop::stop();
}, $loop1 = new MyLoop);
Loop::execute(function() use ($loop1) {
    /* start task */

    /* in some task when necessary, just continue the other loop for 1second (or whatever limit) */
    Loop::execute(function() {
        Loop::once(1000, function() {
            Loop::stop();
        });
    }, $loop1);

});

The design is explicitly very explicitly requiring to scope when which loop runs.
Do you have maybe an actual more concrete scenario where it's needed? Then I can better illustrate how the Loop accessor nicely solves this scenario you propose?

I have two loops, I am bootstraping my application, I want to create instances on both of them, then create two services, might be lazy creation, the first one should be attached and work only with the first loop, the second one should be attached to second. I cannot call execute or anything like that in bootstrap, since starting loop is done in other call.

@khelle as shown in the comment, just immediately run Loop::stop() after setup - this prevents the loop from being actually run.

@bwoebi How does it answer my question? Maybe I will show what I mean with code
public function boot(ContainerInterface $container)
{
    $loopA = $container->make('Loop.A');
    $loopB = $container->make('Loop.B');

    $container->factory(ServiceA::class, function() use($loopA) {
        return new ServiceA($loopA); // this service on creation will automatically attach itself to A loop
    });
    $container->factory(ServiceB::class, function() use($loopB) {
        return new ServiceB($loopB); // this service on creation will automatically attach itself to B loop
    });
}

This bootstraps two services, one works in normal state, second one works only in emergency state. How can I do this with one global static reference to loop?

$container->factory(ServiceA::class, function() use($loopA) {
    Loop::execute(function() use (&$service) {
        $service = new ServiceA;
        Loop::stop();
    }, $loopA);
    return $service;
});

?
Do you have an existing case with a real event loop which you can show? I feel like that code needs a redesign then. Please show me if you have one, then I'll either acknowledge the issue or be able to tell you how to solve it with the Loop class.

It would probably work the way you are describing, but compare the code complexity of:
$container->factory(ServiceA::class, function() use($loopA) {
    return new ServiceA($loopA); // this service on creation will automatically attach itself to A loop
});
$container->factory(ServiceB::class, function() use($loopB) {
    return new ServiceB($loopB); // this service on creation will automatically attach itself to B loop
});

vs
$container->factory(ServiceA::class, function() use($loopA) {
    Loop::execute(function() use (&$service) {
        $service = new ServiceA;
        Loop::stop();
    }, $loopA);
    return $service;
});
$container->factory(ServiceB::class, function() use($loopB) {
    Loop::execute(function() use (&$service) {
        $service = new ServiceB;
        Loop::stop();
    }, $loopB);
    return $service;
});

Not to mention the problem of mixing static and variadic referencing. You claim that the static interface is done to avoid problem with creating multiple accessors for each library, yet on the other hand in the example I gave you I still have to implement accessors to set of drivers. Doesn't it contradict itself?
What do you mean by existing case? This example I have given is practical issue of what I am saying. There's nothing that can be shown more, as it already illustrates the problem in my understanding. Do yo want an example of application using this kind of two loop flows?

One can though simply write a wrapper function for that:
function wrapInLoopContext($loop, $cb) {
    return function() use ($loop, $cb) {
        Loop::execute(function() use ($cb) {
            $cb();
            Loop::stop();
        }, $loop);
    });
}

And use it as:
$container->factory(ServiceA::class, wrapInLoopContext($loopA, function() {
    return new ServiceA; // this service on creation will automatically attach itself to A loop
}));
$container->factory(ServiceB::class, wrapInLoopContext($loopB, function() {
    return new ServiceB; // this service on creation will automatically attach itself to A loop
}));

which is of pretty equal simplicity then.
And yes, I meant an example of an application using this kind of two loop flows.

So then, the solution is to wrap this method in another abstraction layer, which would need to be additionaly tested with tests itsef that would not follow proper TDD principles, and results might be obscured by app global state?
Supervising system in my framework uses these two flows. I believe the best way to describe it would be to post a link to documentation on this topic http://kraken-php.com/docs/0.3/supervision

I don't know if this is the right approach, but as a person that create a library using this interface i mainly use the driver and only use the loop as a factory to get the driver in my service constructor (so i'm sure to have the correct instance), then you can use DIC pattern, easily test your code, etc ... :
class ServiceA
{
    public function __construct(Driver $eventLoop = null)
    {
        $this->eventLoop = null === $eventLoop ? Loop::getDriver() : $eventLoop;
    }

    public function doSomething()
    {
        $this->eventLoop->defer(function () {
            echo 'foo';
        });
    }
}

For me the Loop is only used by end user and in a "entrypoint" script to init it and run it (but maybe, i'm wrong not an expert on the subject)

@joelwurtz This makes me think whether we should really have Loop::get and even allow this. Testability isn't harmed by using a global accessor here, as it's clearly scoped using Loop::execute. It's pretty uncommon to mock the driver itself, I have never done that so far.
After all, Loop is your runtime. You don't mock it, just like you don't mock PHP for your tests. Did you ever mock the runtime in JavaScript in your tests?

@kelunik Hmm... it does seem like the point of Loop::getDriver() is misinterpreted. The event loop isn't a dependency by the common interpretation of the word. Like you said, it is a runtime.
We could remove it, but I would be concerned about preventing the possibility of using custom loop features in certain applications. E.g., it would no longer be possible to do
function customLoopFeature()
{
    $driver = Loop::getDriver();
    if ($driver instanceof SomeDriverImpl) {
        ((SomeDriverImpl)$driver)->someFeature();
    } else {
        throw new Exception();
    }
}

I'm not sure that I can come up with a use case for this at the moment, but it isn't inconceivable that someone may need to do this in an application (not a library of course).

@sagebind It's called Loop::get(), we don't have Loop::getDriver(). But I just remembered we need it for the wait implementation, that continues with the old loop. Without wait we could drop it.

Closing, as the original issue "Why Loop is a static class?" has been explained. If anyone wants to discuss anything other discussed within this thread, please open another issue.


⚠ Bofrost.at has degraded performance

In d88c821, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 902 ms

Resolved: Bofrost.at performance has improved in d2cc914 after 6 minutes.


Expose dataVolumesFromService option in "Add Service" page

Server version - v0.21.2
Currently Expose dataVolumesFromService option is not exposed in "Add Service" page.
Add this field to the "Add Service" page.

Dupe of #772.


FETCH_ASSOC on CLOB fields returns Resource id #

Hi,
I don't know if this is a problem with the extension, a configuration problem or known behaviour but I've never encountered it before. So CLOB fields return as "Resource id #" instead of text. Any clue how this could be fixed?

+1


Relicense headers

Pursuant to permission described by Patrick (yy@wch.cn), we plan to relicense our headers to be compatible with permission granted by WCH.
Please note this change only impacts contents of some header files initially distributed by WCH, needed to port to Zephyr, not their entire EVT.
https://github.com/zephyrproject-rtos/zephyr/pull/73761#issuecomment-2188506016


Automatic deploy to itch

Use same as in cat simulator

github workflow added. Renamed on push main branch name to master - check if it works. Need to setup itch butler with correct credentials


Image Discovery

https://nsec.esri.com/arcgis/home/item.html?id=7fdb5ddd53a54766ae8641cb8c4609da

[x] No Access and Use Constraints (If there are none, we're good)
[x] No Credits (If it should say Esri, we're good)

We're good.


Child routes doesn't work with specific controller

Bug Report
when trying to generate a child route with a controller different from the parent route a 404 error is generated
How to reproduce
'router' => [
        'routes' => [
            'home' => [
                'type'    => Literal::class,
                'options' => [
                    'route'    => '/',
                    'defaults' => [
                        'controller' => Controller\IndexController::class,
                        'action'     => 'index',
                    ],
                ],
            ],
            'catalog' => [
                'type'    => Segment::class,
                'options' => [
                    'route'    => '/catalog',
                    'defaults' => [
                        'controller' => Controller\IndexController::class,
                        'action'     => 'catalog',
                    ],
                ],
                'may_terminate' => true,
                'child_routes' => [
                    'subscribe' => [
                        'type' => Segment::class,
                        'options' => [
                            'route' => '/subscribe',
                            'defaults' => [
                                'controller' => SubscribeController::class, // <---- Does not work
                                'action' => 'subscribe',
                            ],
                        ],
                    ],
                ]
            ],
        ],
    ],

SubscribeController
<?php

declare(strict_types=1);

namespace Application\Controller;

use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\ViewModel;

class SubscribeController extends AbstractActionController
{
    public function subscribeAction()
    {

        dd(__CLASS__, __METHOD__);

        return new ViewModel();
    }
}

IndexController
<?php

declare(strict_types=1);

namespace Application\Controller;

use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Model\ViewModel;

class IndexController extends AbstractActionController
{
    public function indexAction()
    {
        return new ViewModel();
    }

    public function catalogAction()
    {
        dd(__CLASS__, __METHOD__);
    }

    public function subscribeAction()
    {

        dd(__CLASS__, __METHOD__);

        return new ViewModel();
    }
}

Commenting out the controller reference in the subscribe child route works normally because it takes the action from the parent controller

Did you register the SubscribeController within the controllers scope of your application?
The error you can see within the first screenshot says "resolves to invalid controller". So it actually is able to understand that there is the SubscribeController configured.
So what is actually missing is the configuration entry for SubscribeController.
return [
    'controllers' => [
        'factories' => [
            SubscribeController::class => InvokableFactory::class,
        ],
    ],
];

@boesing Problem solved, I hadn't registered the new controller.


badfiles gives SyntaxError: Non-ASCII character '\xc3' in file

I did a fresh install with
sudo python2.7 -m pip install -e git+https://github.com/sampsyo/beets#egg=beets

and I get
 ** error loading plugin badfiles: Traceback (most recent call last):   File "/home/jmw/Documents/src/beets/beets/plugins.py", line 254, in load_plugins     namespace = __import__(modname, None, None)   File "/home/jmw/Documents/src/beets/beetsplug/badfiles.py", line 2 SyntaxError: Non-ASCII character '\xc3' in file /home/jmw/Documents/src/beets/beetsplug/badfiles.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Now I know its is the ç in François but  should that happen out of the box?  Is that a problem on my side?

Hi,
i think the problem is the general missing definition for the file encoding. I opened a branch fix_encoding. Would you like to check if the problem is still present with this modification?
@sampsyo: What will be our preferred way to define encoding in files? I would start to refactor all other files if we can decide which way is the best

Yes, we definitely need that encoding declaration! @pkess, feel free to merge that commit into master. I'm not sure how we never noticed this before.
I believe this comment format is the standard way. (Or maybe there's an alternative I'm not aware of?) I don't think we need to put an encoding declaration on every file, but we should probably do it the same way for any file that needs it (because of non-ASCII characters).

@jmwatte: could you try to install with the fixed version again?


fix vSphere client not using the provided custom CA bundle

What this PR does / why we need it:
Fix the vSphere client issue where it doesnt use the provided custom CA bundle. Based on vmware/govmomi#1200.
Which issue(s) this PR fixes (optional, in fixes #<issue number> format, will close the issue(s) when PR gets merged):
Fixes #966
Optional Release Note:

Fixed vSphere client not using the provided custom CA bundle

/retest

/override pull-machine-controller-e2e-azure

/approve

/cherry-pick release/v1.27


[Draft] Removed FlushSettings from StreamLayerClient's ctor

Removed the FlushSettings from StreamLayerClient's ctor and disabled corresponding tests.
Resolves: OLPEDGE-826
Signed-off-by: Bohdan Kurylovych<EMAIL_ADDRESS>

No longer needed. Discussed to be splitted in smaller sub-tasks.


[BUG] Controllers appearing in HoloLens 2 for both hands and hand interaction not working.

Describe the bug
A clear and concise description of what the bug is.
I cloned the project at https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity and I installed Unity 2021.3.21f1 to exactly match the project in details.
To reproduce
Steps to reproduce the behavior:

I cloned the project at https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
I installed Unity 2021.3.21f1 to exactly match the project in details.
Go to build settings add Open XR and Windows MR feature group.
4.Make sure HoloLens remote feature group is also checked.
Make sure Eye Gaze and Microsoft Hand interaction is within profilers.
Open "Hand Interaction Example "scene, then from Mixed reality enable remote play mode and enter Ip address
Confirm controllers appearing in remote player for both hands
Confirm hand interaction not working with no visible poke interactor either, but hand ray is working for both the ray and air tap or

Expected behavior
Hand interactions work with poke interactor and controllers should not be shown.
Screenshots

Your setup (please complete the following information)

Unity Version 2021.3.21f1
MRTK Version v3.0
Last commit in main branch
125e8add28d5837150e0a177483a346a3999a486

Target platform (please complete the following information)

HoloLens 2
remote player last Update <IP_ADDRESS>
OpenXR 1.7.0

Additional context
Here is the video captured through MRC:
https://drive.google.com/file/d/1OwPS9L2_l4vEDNbsVYgoTHucFtKqPn2u/view?usp=sharing

@farhadpiri , you also appear to be using app remoting.  Please try deploying to HoloLens 2 without remoting, does this repro without remoting?   Also, is this 100% reproducible for you?
Can you also please update to Microsoft's Mixed Reality OpenXR 1.9 plugin. and try again.

May be I am facing with some Hardware Failure issues?!

@farhadpiri Thanks for confirming your setup details. I still have not been able to get a consistent repo on this. Are there any errors or warnings logged in the console?
We've observed the controller appearing in the past very inconsistently. We'll use this bug to track progress on resolving the issue.

Hi @farhadpiri ,
Thank you for reporting this issue or requesting this feature. We appreciate your feedback and interest in MRTK3.
We have reviewed your issue or feature request and confirmed that it is valid. We have added it to our backlog and will prioritize it accordingly.
However, if you would like to speed up the process and contribute to the MRTK3 project, you are welcome to submit a Pull Request with your proposed fix or implementation. We would be happy to review your code and merge it into the main branch if it meets our quality standards.
Please let us know if you have any questions or need any assistance. Thank you for your support and collaboration.
Best regards,
The MRTK3 team

@keveleigh Had you ever looked into this issue?

I have this issue as well. Is there a fix for it?


github_actions

Summary
CI/CD 작업
Description
CI/CD 작업
작업된 CI/CD 리스트

pull-request-allow

Types of changes

[ ] Bug fix (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 change)

/canary-publish