[$500] Profile - Cannot enter address in personal details, address disappears after entering

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

Action Performed:

Click on Settings -> Profile
Click on Personal details and select Home address
At address line 1, enter any address (usually in Korea and Japan),
Select the corresponding address on the popup
Observe as the address disappears after selection and the message "This field is required."

Expected Result:
The address does not disappear after entering, and the message "This field is required."
Actual Result:
The address disappears after entering, and the message "This field is required."
Workaround:
Unknown
Platforms:

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

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

Version Number: 1.3.73-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/cb64b321-e7de-409b-8684-98fd4ee0bb37
https://github.com/Expensify/App/assets/93399543/e22201a8-d4b2-40a7-9e4e-d650f8cf09a8
https://github.com/Expensify/App/assets/93399543/d84f05f5-39de-4dc9-809a-c0b16bc79db2
https://github.com/Expensify/App/assets/93399543/6093cfc4-026a-4726-bfd3-c51bebd2533a
screen-capture (2).webm
https://github.com/Expensify/App/assets/93399543/158afbdc-4cc1-48a4-9c3c-8a985379a2ae
https://github.com/Expensify/App/assets/93399543/bc365fb5-dee3-4d4c-bd30-970853213720
https://github.com/Expensify/App/assets/93399543/1d43df7f-7ec1-41b9-9b01-ae970dadb52e
Expensify/Expensify Issue URL:
Issue reported by: @thuyle04
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695454796208109
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01d58a9fe0eac5ad60
Upwork Job ID:<PHONE_NUMBER>849535488
Last Price Increase: 2023-10-20

@Krishna2323 Thanks for your proposal! Please could you refrain from posting such long code snippets and focus only on smaller snippets that show your changes (with explanations).

Proposal
Please re-state the problem that we are trying to solve in this issue.
For South Korea and Japan, Address line 1 is not getting updated when selecting corresponding address from popup
What is the root cause of that problem?
The root cause is that in AddressSearch component saveLocationDetails() streetNumber and streetName are undefined, therefore the address line 1 becomes empty which then triggers validation error that the address line 1 field is required.
What changes do you think we should make in order to solve the problem?
StreetName can be fetched by including another variable streetAutocompleteFallback
const {
    country: countryFallbackLongName = '',
    state: stateAutoCompleteFallback = '',
    city: cityAutocompleteFallback = '',
    street: streetAutocompleteFallback = '',
} = GooglePlacesUtils.getPlaceAutocompleteTerms(autocompleteData.terms);

StreetNumber can be fetched using premise if streetNumber is undefined
street:${streetNumber || premise} ${streetName || streetAutocompleteFallback}.trim(),
What alternative solutions did you explore? (Optional)

@jjcoffee any thoughts on the latest proposal? :)

@sourcecodedeveloper When you are referring to lines of code please can you link them like this, so that it's easier to read through your proposal.
I think you're both implying - but not clearly stating in your RCA - that there's missing data from the Autocomplete API? Presumably there's no street_number and/or route. Could you clarify that? cc @Krishna2323

@Krishna2323 Thanks! It would be great if you add that detail to your proposal.
Regarding no alternative for route, does that mean if route is missing your proposal would only have the street number inserted? (e.g. for 121 Sajik-daero)

we can get street from GooglePlacesUtils.getPlaceAutocompleteTerms

@Krishna2323 Can you provide more details on this in your proposal, thanks!

@sourcecodedeveloper When you are referring to lines of code please can you link them like this, so that it's easier to read through your proposal.
I think you're both implying - but not clearly stating in your RCA - that there's missing data from the Autocomplete API? Presumably there's no street_number and/or route. Could you clarify that? cc @Krishna2323

@jjcoffee The street data is not missing from the Autocomplete API. I stated in the proposal  that the street data is already being returned by Autocomplete Api but not being stored in a variable for use, for reference please open
https://github.com/Expensify/App/blob/5fd69da1cf05fef1a39fb64937ef15b0e8f163e2/src/components/AddressSearch/index.js#L199
To be clear, the const is holding three values country, state and city but not street. The autocomplete API is returning street data but it is not being stored in a variable e.g. street: streetAutocompleteFallback = '',

@jjcoffee, we can get street from GooglePlacesUtils.getPlaceAutocompleteTerms, but we need to also update city value, like I stated in my proposal because the city sometimes can be the same as street.
city: locality || postalTown || sublocality || cityAutocompleteFallback
We should place cityAutocompleteFallback before sublocality check because sublocality can be the street name sometimes.

@jjcoffee I had already mentioned that in the proposal that street data is being returned from

we can get street from GooglePlacesUtils.getPlaceAutocompleteTerms

@Krishna2323 Can you provide more details on this in your proposal, thanks!

@jjcoffee I had mentioned that first in the proposal

we can get street from GooglePlacesUtils.getPlaceAutocompleteTerms

@Krishna2323 Can you provide more details on this in your proposal, thanks!

@jjcoffee I had mentioned that first in the https://github.com/Expensify/App/issues/28474#issuecomment-1741377291

@sourcecodedeveloper When you are referring to lines of code please can you link them like this, so that it's easier to read through your proposal.
I think you're both implying - but not clearly stating in your RCA - that there's missing data from the Autocomplete API? Presumably there's no street_number and/or route. Could you clarify that? cc @Krishna2323

@jjcoffee to clarify again, there is no missing data.

StreetName and/or route can be obtained from the call to getPlaceAutocompleteTerms. For your reference
https://github.com/Expensify/App/blob/5fd69da1cf05fef1a39fb64937ef15b0e8f163e2/src/components/AddressSearch/index.js#L199
The streetName and/or route is being returned by autocomplete api but not being stored in the variable. The streetName and/or route would need to be stored something like

const {
    country: countryFallbackLongName = '',
    state: stateAutoCompleteFallback = '',
    city: cityAutocompleteFallback = '',
    street: streetAutocompleteFallback = '',
} = GooglePlacesUtils.getPlaceAutocompleteTerms(autocompleteData.terms);

The streetNumber is also not missing and premise is holding street data. For your reference
https://github.com/Expensify/App/blob/5fd69da1cf05fef1a39fb64937ef15b0e8f163e2/src/components/AddressSearch/index.js#L175
Need to introduce premise variable something like
    const {
        street_number: streetNumber,
        route: streetName,
        premise,
        subpremise,
        locality,
        sublocality,
        postal_town: postalTown,
        postal_code: zipCode,
        administrative_area_level_1: state,
        administrative_area_level_2: stateFallback,
        country: countryPrimary,
    } = GooglePlacesUtils.getAddressComponents(addressComponents, {
        street_number: 'long_name',
        route: 'long_name',
        premise: 'long_name',
        subpremise: 'long_name',
        locality: 'long_name',
        sublocality: 'long_name',
        postal_town: 'long_name',
        postal_code: 'long_name',
        administrative_area_level_1: 'short_name',
        administrative_area_level_2: 'long_name',
        country: 'short_name',
    });

@sourcecodedeveloper, we are talking about the streetName (route) fetched from GooglePlacesUtils.getAddressComponents and that is not being returned.
I agree that you mentioned GooglePlacesUtils.getPlaceAutocompleteTerms first but your solution was not fully correct, I have mentioned it in my proposal.

Sometimes city can be the same as street (fetched from getPlaceAutocompleteTerms) because if locality & postalTown is absent then it will use sublocality which can be the name of the street, so we should consider cityAutocompleteFallback before sublocality

@jjcoffee to clarify, no change is required on the city side. the city functionality is loading the city as expected after clicking on the address shown in the popup. It is the address line 1 that is the missing and required field.

@jjcoffee updated proposal regarding city, I suggest no change be made to city selection.
For example when selecting "10 Duryunam-gil, Dalseo-gu, Daegu, South Korea"
The sublocality is "Duryunam 9-gil" and city is "Dalseo-gu".  The sublocality is city subdivision of the city and if present should not take precedence over city. Therefore the existing functionality for city is correct
city: locality || postalTown || sublocality || cityAutocompleteFallback,

Still reviewing proposals, not overdue

@jjcoffee Please provide feedback on proposal and what is unclear to you regarding that utility function getPlaceAutocompleteTerms that needs to be added in the proposal.

@sourcecodedeveloper My feedback is in the comment above.

@jjcoffee No What I meant by that is your comment is generic and not specific to proposal. Can you please provide feedback specific to proposal as it relates to your comment.

@sourcecodedeveloper Your proposal uses getPlaceAutocompleteTerms which I have raised concerns about in this comment, I'm not sure how much more specific it can get than that :sweat_smile: You're welcome to respond to those concerns, especially if you have thoughts on how much we can rely on the order of the terms returned by the API. Or maybe you have an idea on something else we can use that's more reliable. Remember that this is a collaborative, not a combative process.

Bumping on Slack.

Bumped

Proposal
Please re-state the problem that we are trying to solve in this issue.
Profile - Cannot enter address in personal details, address disappears after entering
What is the root cause of that problem?
This is happening because some addresses don't return 'route' which we are assigning to streetName and instead they return 'sublocality_level_4', at the same time they don't return 'street_number' that we assign to streetNumber but instead they return 'premise', we are then taking streetNumber and streetName and assigning them to values.street and since for these addresses both will be empty we end up with values.street being an empty string
What changes do you think we should make in order to solve the problem?
We need to add a fallback for these addresses by adding a streetNumber fallback and streetName fallback
const {
    street_number: streetNumber,
    premise: streetNumberFallback,
    route: streetName,
    sublocality_level_4: streetNameFallback,
    ...
} = GooglePlacesUtils.getAddressComponents(addressComponents, {
    street_number: 'long_name',
    premise: 'long_name',
    route: 'long_name',
    sublocality_level_4: 'long_name',
    ...
});

We can then use that as a fallback when assigning the values.street
const values = {
    street: `${streetNumber} ${streetName}`.trim() || `${streetNumberFallback} ${streetNameFallback}`.trim(),

Result
https://github.com/Expensify/App/assets/74202751/258277d8-92c8-4686-80ab-6be80119da04

@AmjedNazzal Thanks for the proposal! My concern would be that by using sublocality_level_4 as a fallback we'd accidentally include some random address part as the first line of address (since sublocality_level_4 is not guaranteed to be the first line of address). There may be addresses where route is also not returned, but not sublocality_level_4, so I wonder if there's some general solution here that means we won't have to continue adding fallbacks all the way down.
Also have you run through all of the addresses used in the issue videos to ensure they all return sublocality_level_4 and premise?

@jjcoffee I did run tests and confirmed that the addresses used in the issue video do return sublocality_level_4 and premise instead of street_number and route which is why in these cases values.street will be empty because there is neither street_number nor route meanwhile for most addresses there is at least one of those available to be used, if you are worried about addresses that do have route or street_number being assigned one of the falbacks we can introduce a simple logic that values.street will only be assigned sublocality_level_4 and premise if neither street_number nor route exist.
And yes I do agree that using fallbacks over and over is not ideal but the issue is that I tried looking into the api documentation is there really isn't much info on what returns street_number or route and what returns sublocality_level_4 or premise

I still have concerns about the approach of cherry picking fallbacks. @miljakljajic what do you think about increasing the bounty to see if someone can come up with a more solid solution here?

@jjcoffee I understand your concerns fully and agree that cherry picking like that is very much not ideal, I did more research and sadly it doesn't seem like the api documentation provides very useful information for this issue, so with that being said I will suggest a different approach.
So lets establish that if we don't have a values.street then its a guarantee that the addressStreet1 field will be left empty and cause an issue for the user since it's required, so what we can do is use a last resort kind of approach which will be implemented when, and only when, there is no values.street, what we can do is remove the types that we wouldn't want to be included in addressStreet1 field such as country, zipcode and types of that sort and then concatenate whatever left into a general addressStreet1 fallback since it's a required field
if(!values.street){
    let streetFallback = '';
    const excludedTypes = ['country', 'administrative_area_level_1', 'administrative_area_level_2', 'postal_code'];

    addressComponents.forEach((addressComponent) => {

        if (excludedTypes.some(excludedType => addressComponent.types.includes(excludedType))) {
            return;
        }

        const value = addressComponent['long_name'] ? addressComponent['long_name'] : '';
        streetFallback += value + ' ';

    });

    values.street = streetFallback.trim();
}

The resulting behaviour would look something like this:
https://github.com/Expensify/App/assets/74202751/13edba70-417e-49a1-9ecf-3354901e16ff

Reviewing tomorrow!

@AmjedNazzal I like the general idea in your comment and agree that we should as far as possible guarantee an entry in the first line of address. One thing I'm wondering is if we can't just parse out Google's idea of the street address from adr_address which is at the bottom here:

This could look a bit hacky, but I think all the solutions here aren't going to look that elegant and this one seems pretty much guaranteed to give the correct result. I think it's highly likely that just grabbing the first two address_components will also usually give the correct result, so I'm not completely against your idea. Any thoughts?
As for the other proposals, they involve mixing and matching between the autocomplete terms and the actual Places API result (once you choose an address), which seems like a bad idea. Also getPlaceAutocompleteTerms seems like it's not really designed to guarantee actually getting a street, as it doesn't account for having more than five terms (it assumes the fourth term will always be the street).
https://github.com/Expensify/App/blob/a8482e20e92916af993bf3198036dbd0f412f9dd/src/libs/GooglePlacesUtils.ts#L43-L49

@jjcoffee I'm not sure directly parsing adr_address would be a good idea here because what if one day google changes something about that like the class name or really anything in that html, don't you think that's a little bit risky? also in case of a future bug with that, debugging would require going deep into the API response, which could be time consuming.
About grabbing specifically just the two first items in address_components, I think that would also works, however I have a feeling that leaving it up to chance grabbing random two items or parsing from html adr_address both might leave a bit too much up for chance because again what if the google api starts returning results in a different order, then grabbing the first two items might end up being for example zipcode and city or something like that so I feel like the safest option is to filter out what we know we don't want in there and use whatever is left. what do you think?

@jjcoffee In case you decide to go with proposal that takes the first two items as street_address as an entry in first line of address, I can refactor getPlaceAutocompleteTerms() to return the two items as street_address.

@jjcoffee Thanks for the clarification, in this case what we can do is use a simple regex to capture a lazy group to grab the street-address from adr_address, optionally we can also keep the other code as an extra cushion just in case but again that's optional
if(!values.street){
    const adr_address = details.adr_address;
    const streetAddressRegex = /<span\s+class\s*=\s*"street-address"[^>]*>(.*?)<\/span>/;
    const streetFallback = adr_address.match(streetAddressRegex);

    if (streetFallback && streetFallback[1]) {
        values.street = streetFallback[1];
    }
    // Optional
    else {

        let streetFallback = '';
        const excludedTypes = ['country', 'administrative_area_level_1', 'administrative_area_level_2', 'postal_code'];

        addressComponents.forEach((addressComponent) => {

            if (excludedTypes.some(excludedType => addressComponent.types.includes(excludedType))) {
                return;
            }

            const value = addressComponent['long_name'] ? addressComponent['long_name'] : '';
            streetFallback += value + ' ';

        });
        values.street = streetFallback.trim();
    }
}

Hmm yeah whatever we try does feel a bit hacky here, but if we want to fix this it seems like the only way! I think one improvement could be to parse the HTML instead, but I don't feel particularly strongly about it.
Happy to go with @AmjedNazzal's proposal  with this tweak.
:ribbon::eyes::ribbon: C+ reviewed

yeah, not the ideal solution indeed, but it improves the current implementation!

Thank you, PR will be ready in a few hours

@jjcoffee PR is ready for review

Contracts extended to @jjcoffee @AmjedNazzal and @thuyle04 - please accept so I can get you paid :)

Accepted, thanks!

@miljakljajic Thanks, accepted!

Thank you all for your work!


Add strict fields in BftWithEBBsSelectView

fixes #4006
Description
Remove thunks from BftWithEBBsSelectView by making its fields strict.
Checklist

Branch

[ ] Commit sequence broadly makes sense
[ ] Commits have useful messages
[ ] New tests are added if needed and existing tests are updated
[ ] If this branch changes Consensus and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
[ ] If this branch changes Network and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
[ ] If serialization changes, user-facing consequences (e.g. replay from genesis) are confirmed to be intentional.

Pull Request

[ ] Self-reviewed the diff
[ ] Useful pull request description at least containing the following information:

What does this PR change?
Why these changes were needed?
How does this affect downstream repositories and/or end-users?
Which ticket does this PR close (if any)? If it does, is it linked?

[ ] Reviewer requested

bors r+


chore(test): format test failure output more aligned

Built in JSON.toStringify() does not serialize error object, so test output was not able to format exception correctly. This PR overrides default behavior while running tests.
before

after

Merged with d40d73b... thanks @kwonoj


First pass docs review

while you're here, do you think we should split the examples/ directory into tutorials/ and deepdives/?


Spanner - Allow set/get of com.google.cloud.spanner.Value

Is it possible to add methods to respective interfaces and classes to get/set instances of com.google.cloud.spanner.Value in addition to the distinct types that are currently supported?
For example - ResultSet.getValue() and ValueBinder.to(Value v)

@sai-pullabhotla Can you please describe you use case. Why do you need these methods?

@vkedia - the purpose is to have a generic way to set/get data using an interface or generic type. I'm in the process of developing a ORM framework similar to the one I did for Cloud Datastore (Catatumbo), and having these methods would help with mapping types defined in the domain model to Spanner and vice versa. See Mapper  for more info on how the mapping was done in Catatumbo, hoping to do the same for Spanner and having these methods would help. I also see another issue, #1805, which appears to be similar to what I'm asking for.
Moreover, the API already does this internally to convert the distinct types to Value objects, so just need to expose a public method. Snippet from ValueBinder is below:
  public R to(@Nullable String value) {
    return handle(Value.string(value));
  }

@sai-pullabhotla Thanks. This sounds interesting. So if we had a to(Value) you would still need to figure out what type of Value to create, right? So it is not complete generic?


Chore: Expose new color variable

Motivation
Expose new color variable as set in Figma: https://www.figma.com/file/P4JbeFs6oGt2WmKeB4PHFc/Updated-NNS-Styles-%26-Components?type=design&node-id=514-220550&mode=design&t=I8mRm6HgwcW02Ef7-0
This is used in the Tokens page.
Changes

Add --popup-background-tint to CSS variables.

Screenshots
No changes.

@dskloetd @peterpeterparker please review

We're going to expose other variables. I'll do it in another PR.


[CP][beta channel] Roll pub to fix issue when IDEs debug 'pub run test'

commit(s) to merge: 4e175b2d1ab99674b0db204ac9acc89f74d4dd3b
What is the issue: IDEs running a debugger on pub run test had problems with us using exceptions to communicate exit codes internally.
What is the fix: We don't use exceptions to communicate exit code, instead we just set a property.
Why cherrypick: This affects Dart-Code when user is running a debugger on a test case from the IDE.
Risk: Small, the roll of pub only includes one commit.
Link to original  issue(s): https://github.com/dart-lang/pub/issues/2753
/cc @kevmoo @mit-mit @whesse @athomas @vsmenon @franklinyow

@pcsosinski FYI

This is a regression in the test execution user experience.

Approved but hold

No patch release before the next beta, closing


mariadb-connector-c: 3.1.8 -> 3.1.12

Motivation for this change
Update mariadb-connector-c to 3.1.12
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Update PR.

@ofborg eval


fix: quick fix for new curve factory type

To be clear, this is a quick fix that works to get the exporter running again. The full fix is incoming in a later PR.


Add docker release to the full release process for final releases

Problem
Publishing a Docker release is currently a manual process which can be forgotten.
Solution
Add the Docker release to the release pipeline.
Checklist

[x] I have read the contributing guide and understand what's expected of me
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[x] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

Converting to draft until the broken test is resolved

Test release against this branch:
https://github.com/dbt-labs/dbt-spark/actions/runs/8944037096


workaday improvements

favoring a new, typed paramsMap over a map[string]interface{} for clarity/thin abstraction
favoring a template.FuncMap type over a map[string]interface{}
favoring a switch/case block over if / else if blocks
broke out simple “do we already have a certificate?” logic into a convenience function for clarity, and as a reminder to make it more useful in the future
added unit test for novel acsengine.certAlreadyPresent() function

What this PR does / why we need it: simple fixes for a Friday afternoon
Special notes for your reviewer: This does not introduce any new functionality. If successful, this PR should introduce some minor clarifying improvements in pkg/acsengine/engine.go and pkg/acsengine/defaults.go.
Release note:

This change is

Excellent, LGTM. @jchauncey please give a look.


Applied fixes from StyleCI

This pull request applies code style fixes from an analysis carried out by StyleCI.

For more information, click here.

lol


Migrate away from PyCrypto

Issue type
[X] Feature request
[X] Bug report
[ ] Documentation
PyCrypto is dead.
Last change to PyCrypto was made three years ago.
Please see: https://github.com/dlitz/pycrypto/issues/238
Note that my installation broke by upgrading to 2.2.6, gunicorn crashed with a name sys not found in .../Crypto/Signature/PKCS1_PSS.py so i added it manually, and it works now. but read the above linked issue.

Oh wow disregard this, just checked requirements.txt saw it gone, so i removed it, didn't work, removed and reinstalled pycryptodome, works now.
My bad.


Cant connect Raspberry pi and dekstop computer

I am trying to connect my raspberry pi and computer that are on the same network. I have on both OS Ubuntu 20.04 and ROS Noetic installed. i followed  pdf (https://digital.csic.es/bitstream/10261/133333/1/ROS-systems.pdf) with instruction but this two masters cant see each other. I can ping machines and when i start nodes master_discovery and master_sync on both machines there is no error but they don't detect each other.

I have set on both machines this instructions:
sudo sh -c "echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts"
sudo sh -c "echo 1 >/proc/sys/net/ipv4/ip_forward"
And i had configure with correct IP addresses file /etc/hosts on both of the machines.

Please, try to run the master_discovery with
rosrun fkie_master_discovery master_discovery _mcast_group:=<IP_ADDRESS> _robot_hosts:=[ubuntu,ros]
If they can discover each other the multicast doesn't work properly.
It looks like you've set the interface variable too. Therefore the master_discovery binds to the interface with the IP <IP_ADDRESS>. You have to make sure that the multicast messages are also forwarded on this interface.
If that was not the intention, it would be best to delete all variables from the ROS parameter server or restart roscore.

I restarted roscore on both machines and after that run master discovery the why you asked. On computer he gave me this message:

And on the raspberry it gave me this message:

After i had restarted roscore on both machines and run command you gave me it worked and connection have been established. Problem that I have now is temporary failure in name resolution:

sorry, my fault! Use _robot_hosts:=[ubuntu,pc] instead of _robot_hosts:=[ubuntu,ros]
But you should try to get it runs without _robot_hosts, since for each entry a unicast message is send to discover the remote host.

Thank you for the help now everthing is working. After you told to try with unicast I figure it out that problem was on raspberry Pi. It didn't had package python-is-python3 so node master_discovery on raspberry actually didn't worked and didn't show any error on start.


Required with Ellipsis may not work

Privileged issue

[ ] I'm @tiangolo or he asked me directly to create an issue here.

Issue Content
https://fastapi.tiangolo.com/tutorial/query-params-str-validations/#required-parameters

python interpreter:3.12.4
fastapi version:0.115.0
my codes:
from __future__ import annotations
from typing import Annotated
import uvicorn
from fastapi import FastAPI, Query
app = FastAPI()
@app.get("/items/")
async def read_items(q: Annotated[str, Query(min_length = 3)] = ...):
    """
    curl -X 'GET' 'http://<IP_ADDRESS>:18081/items/' -H 'accept: application/json'
    ValueError: [TypeError("'ellipsis' object is not iterable"), TypeError('vars() argument must have __dict__ attribute')]
    """
    results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    if q:
        results.update({"q": q})
    return results

if __name__ == '__main__':
    uvicorn.run(app, host = '<IP_ADDRESS>', port = 18081)

swagger docs:

ValueError: [TypeError("'ellipsis' object is not iterable"), TypeError('vars() argument must have dict attribute')]

on MacBook Pro M2 Max
PyCharm 2024.2.3 (Professional Edition)

Yeah, it seems that's wrong.
That also doesn't seem to be type hint compliant.
I think the wanted would have been:
from typing import Annotated

from fastapi import FastAPI, Query

app = FastAPI()

@app.get("/items/")
async def read_items(q: Annotated[str, Query(default=..., min_length=3)]):
    results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
    if q:
        results.update({"q": q})
    return results

I think that part of the docs is automatically generated from a script.

yeah, it worked!

Please don't close it. This is a documentation issue. 😅

ok!!!

hi,Marcelo, I would like to confirm one more question about best practices:
Is it a recommended practice to make a parameter required by setting Query(default=...)? I noticed that using this method triggers another warning:
PydanticJsonSchemaWarning: Default value Ellipsis is not JSON serializable; excluding default from JSON schema [non-serializable-default].
So, I understand that the best practice to make a parameter required is to simply not assign a default value to it, for example:
@app.get("/validation")
async def async_root(str_param: Annotated[str, Query(min_length=3,
                                                     max_length=20,
                                                     pattern='^[a-zA-Z0-9]+$',
                                                     description='This is a string parameter')])

So, I understand that the best practice to make a parameter required is to simply not assign a default value to it, for example:

Oh yeah, you are right. You don't need the ... in that case.
I couldn't reproduce the PydanticJsonSchemaWarning. Can you provide a full MRE?

Okay, here it is.
Let's try the following code:
from __future__ import annotations

from typing import Annotated

import fastapi
import uvicorn
from fastapi import FastAPI, Query

app = FastAPI()
print(fastapi.__version__)

@app.get("/prepare")
async def prepare(str_param: Annotated[str, Query()] = ...):
    return {'str_param': str_param}

@app.get("/test")
async def full_mre(str_param: Annotated[str, Query(default = ...)]):
    return {'str_param': str_param}

if __name__ == '__main__':
    uvicorn.run(app, host = '<IP_ADDRESS>', port = 18081)

After running this code as a server, visit http://<IP_ADDRESS>:18081/docs#/default/prepare_prepare_get or http://<IP_ADDRESS>:18081/docs#/default/full_mre_test_get in your browser.
You will see that the warning appears only once when you first refresh the docs:

To be honest, reproducing this warning message is indeed a bit complex,
I tried several combinations before I was able to reproduce it, and it doesn't appear consistently.
it only triggers when the documentation is refreshed for the first time.

This is the part that reproduces the warning:
from typing import Annotated

import uvicorn
from fastapi import FastAPI, Query

app = FastAPI()

@app.get("/prepare")
async def prepare(str_param: Annotated[str, Query()] = ...):
    return {"str_param": str_param}

if __name__ == "__main__":
    uvicorn.run(app, host="<IP_ADDRESS>", port=18081)

It makes sense, but we already said that this is not needed. You can just do:
@app.get("/prepare")
async def prepare(str_param: Annotated[str, Query()]):
    return {"str_param": str_param}

You only see the issue on the first time you call /docs because that's when the OpenAPI is generated. After that, the OpenAPI object is cached.

OK! I see bro, thx!

Note that in Pydantic, we recently moved away from using the ellipsis, and we now recommend against using it: pydantic/pydantic#10661.

The problem here is what is in the documentation.

I started looking into it, by discouraging using the ellipsis in docs. But I realized FastAPI still supports Pydantic V1, where f: Optional[<type>] is different from f: Optional[<type>] = ... (because in V1 Optional[...] added a default value of None, so the ellipsis was a way to still make it required). Maybe it's best to wait for FastAPI to drop support for V1 so that the documentation can easily be updated.

Given https://github.com/fastapi/fastapi/issues/10360, I don't think it makes sense for FastAPI to support V1 anymore.


Remove unused variable.

I saw this about 10 times while making other changes and never circled back to remove it. Thanks


[lit-next] Consider making controller directives easier to implement

Description
Currently the ReactiveController and Directive APIs collide slightly and this makes using a Directive as a controller slightly cumbersome as a separate object must be the controller. This collision is on disconnected and update.

API
ReactiveController
AsyncDirective

connected
✅

disconnected
✅
✅

reconnected

✅

willUpdate
✅

update
✅
✅

updated
✅

render

✅

setValue

✅

Some possibilities:

one of the objects could use the Callback suffix
Directive could use activate/deactivate instead of disconnected/reconnected and commit instead of update.

Acceptance criteria
Decide on new names and implement changes.

It would be really great, IMO, if the current name collisions weren't disambiguated, but made compatible instead.
For disconnected there shouldn't be a case where ReactiveController.disconnected is called but AsyncDirective.disconnected isn't, so AsyncDirective.disconnected is a superset with more specific timing. Could we make it so that disconnected is just only called once when a host disconnects? Similarly for update.
I haven't thought much how this might be done, or if it's feasible. disconnected might work out already if AsyncDirective.disconnected calls removeController. update() is hard because we don't know for sure that a directive update will be called (say if it's in a guard).

It would be really great, IMO, if the current name collisions weren't disambiguated, but made compatible instead.
For disconnected there shouldn't be a case where ReactiveController.disconnected is called but AsyncDirective.disconnected isn't, so AsyncDirective.disconnected is a superset with more specific timing. Could we make it so that disconnected is just only called once when a host disconnects? Similarly for update.
I haven't thought much how this might be done, or if it's feasible. disconnected might work out already if AsyncDirective.disconnected calls removeController. update() is hard because we don't know for sure that a directive update will be called (say if it's in a guard).

It would be really great, IMO, if the current name collisions weren't disambiguated, but made compatible instead.

I don't think that makes sense for update. The Controller.update and Directive.update are just conceptually different.

It would be really great, IMO, if the current name collisions weren't disambiguated, but made compatible instead.

I don't think that makes sense for update. The Controller.update and Directive.update are just conceptually different.

After an offline chat, we've decided to add a host prefix to the callbacks in ReactiveControllers.

hostConnected
hostDisconnected
hostWillUpdate
hostUpdate
hostUpdated

After an offline chat, we've decided to add a host prefix to the callbacks in ReactiveControllers.

hostConnected
hostDisconnected
hostWillUpdate
hostUpdate
hostUpdated

Fixed via #1553.

Fixed via #1553.


add deis domains:transfer support

I'm trying to do blue-green deployment with Deis. So I have two Deis apps (app-green and app-blue). At any time either app-green OR app-blue should be live (e.g. serve traffic for app.domain.com). Everything good so far except for one thing: is there any way to atomically change app-green and app-blue's DNS configs so that I can redirect traffic to one app or the other for my domain name atomically?
e.g:
deis domains:remove app.domain.com --app app-green && deis domains:add app.domain.com --app app-blue

Any way to make this atomically so there is no downtime? Other suggestions?

Hmm... It might be easier to cut it over with a domain record outside of Deis. Try this: start with a CNAME record for app.domain.com pointing to app-green.domain.com. Then, change the CNAME to app-blue.domain.com when it is time to cut over. That might be the easiest way to make sure there's no downtime.

Oh right... should have thought about this -_-

How would that work? As dat as  understand this is on the same deis
cluster. So the routers would work on hostname to route to the correct
application.... In fact I never setup cnames with app-name.deishost.example
but just to deis.deishost. example...
To answer the original question do you actually observe downtime? As far as
I would guess by the time the routers refresh their Config the new domain
should already be there (as the ttl is around 10s afaik) so unless you are
really unlucky to hit the small refresh window you should be fine.
Nathan
Op 9 aug. 2015 20:05 schreef "Olivier Lalonde"<EMAIL_ADDRESS>
Oh right... should have thought about this -_-
—
Reply to this email directly or view it on GitHub
https://github.com/deis/deis/issues/4237#issuecomment-129222521.

Oh yeah @nathansamson is correct, I can't just change the CNAME.

To answer the original question do you actually observe downtime?

I haven't tried yet. Oh I see what you mean... if I change the domains quickly, the router might only restart once right?

That is what I expect...
Obviously there is still a small window where things can fail, and this window can be bigger if your client has slow / bad internet connection (even worse if the command fails, and you manually need to restart it)
I guess a real atomic replace of domains in the cotroller isn't a bad idea, but I think the current situation is probably good enough....
What is your actual reasoning for doing cutovers like this? I can understand if they are different deis clusters (eg upgrade of your cluster), but for application restarts I don't really see the need

@olalonde Deis already does blue/green in a manner of speaking.  During any release (deployment or config change), the controller waits for the new containers to be alive before re-routing incoming traffic to them and killing the old ones.  With the 1.9.0 release, @bacongobbler improved upon that substantially by allowing for you to insert your own custom application health check into that process.
The above might be good enough for most scenarios.  Where it breaks down is if you have more extensive verification testing that you want to do post-deploy, before flipping the switch.
@nathansamson is correct that the CNAME magic won't work.  If you request myapp.example.com, it doesn't matter if that's a CNAME for myapp-blue.my-deis.example.com or myapp-green.my-deis.example.com.  In either scenario, when the request hits a router, the host header will still say myapp.example.com, and that router will send it wherever the configuration says to at the moment.  Whether it routes to blue or green will depend entirely on which of those is configured at that time to answer requests for myapp.example.com.
You can quickly alter the configuration as @nathansamson has suggested.  To dispel one bit of confusion, however, that does not require the routers to restart.  Routers are dynamically re-configured periodically with a service called confd-- without any downtime.
The thing that will dictate whether you have any downtime or not is how fast you can update the configuration.  There could be a very narrow window where you've removed the domain from "blue," for instance, but haven't added it to "green" yet.  This being the case, there might be a strong case for a feature request here.  As a workaround in the meantime, you could probably minimize that window by scripting those config changes.

@krancour thanks for the clarifications. @nathansamson the reason I'm doing this style of deployment is that once in a while, I need to completely wipe out my app's database and rebuild it from scratch but this process takes a few hours (syncing the Bitcoin blockchain). In the meanwhile, I want the old version of the app/db to keep running. I suppose I could just rebuild the database and use deis config to tell my running app to start using the new database when it's ready. But if the database structure changed in a significant way, my old app code will fail. There are other ways to get around the problem (e.g. do proper database migrations) but it would involve more work for me and I'd rather go with a simple process. I could also have two clusters and do the switch over at DNS level but I have a limited budget.
I can accept some downtime but it would be nice to have this feature :) If we can agree on a deis command syntax or process to do this, I could attempt to do it though I don't guarantee I will figure it out all by myself. Maybe one solution would be to have deis domains:add some.domain.com --force which would remove some.domain.com from other apps as well.

Maybe one solution would be to have deis domains:add some.domain.com --force which would remove some.domain.com from other apps that use it

That's a useful thought.  Ping @Joshua-Anderson.  Thoughts?

:+1: It wouldn't be too difficult to do, but I probably don't have time this week, as I have a lot I need to finish. I may have time to tackle this in the next month or so.

To add my thoughts to this, I would like a native command rather than a flag. Something like deis domains:update mycustomdomain.com (with --app as a flag for non-interactive shells) would allow a user to modify and transfer a domain from one app to another. Of course, the user must have permission to both applications, but essentially that would allow us to update the db records without any deletions, which in turn will ensure that the router will re-template the domain route without any downtime. That way we can use this for more than just app transfers in the future.
Does that sound like something you'd want to tackle, @olalonde?

@bacongobbler Yep, I'd be happy to try.

@olalonde first, thanks for the willingness to take a crack at it.  Before you get going, it's worth mentioning that our intention is to shortly transition off of the python-based deis CLI and onto a new one written in go.  The latter is functionally equivalent (save for a few minor bugs) and is being put through its paces now.  I'm mentioning this so you'll know to apply your efforts toward the go-based client and not the old python-based one.

@krancour thanks for pointing out,
So far, I managed to install everything locally and looked around the code. If I understand correctly, I would need to add a method around here (https://github.com/deis/deis/blob/v1.9.0/controller/api/models.py#L1002) that only gets executed when a POST parameter is present (e.g. force or update) which would remove the old domain before carrying on with adding the new one (current behaviour is to refuse adding the domain if it is not unique). I suppose I would also need to make sure that the user has permission to the app that currently owns the domain. I think the etcd code _etcd_publish_domains will work as is and will just overwrite the previous app name with the new one (https://github.com/deis/deis/blob/v1.9.0/controller/api/models.py#L1190)

@olalonde That seems to imply you don't have a SSL library installed. Have you installed openssl where python can find it(via homebrew, etc)?

brew install postgresql followed by make setup-venv fixed that problem.

This issue was moved to deis/controller#1218


set file ownership and permission for aodh as per security guide

Setup the ownership and permissions for aodh as per the security checklist.

retest

retest

retest


Change default protocol

Resolves #2937

When HUB_PROTOCOL or hub.protocol are not specified, default to https instead of git, which has been deprecated by GitHub.
$ hub clone github/hub
Cloning into 'hub'...
fatal: remote error:
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Explicitly setting hub.protocol to git or using HUB_PROTOCOL=git still uses the git protocol.
Note that I have not updated any documentation because the default does not appear to be documented anywhere, only overriding to use git config --global hub.protocol ssh or git config --global hub.protocol https. Now to use the (deprecated) default, one should use git config --global hub.protocol git.

I am adding additional commits to fix the features, but note that the following feature is failing on master when run with script/docker (I am getting an install error from the ffi gem on my M1 MBP):
❯ script/docker features/fork.feature
[+] Building 0.3s (14/14) FINISHED
 => [internal] load build definition from Dockerfile                                                             0.0s
 => => transferring dockerfile: 37B                                                                              0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 34B                                                                                0.0s
 => [internal] load metadata for docker.io/library/ruby:2.6                                                      0.3s
 => [1/9] FROM docker.io/library/ruby:2.6@sha256:264b256e8d4a0b18964c0c1797cf8f2ec09c420238b52daeef3ea7c12dd84d  0.0s
 => [internal] load build context                                                                                0.0s
 => => transferring context: 60B                                                                                0.0s
 => CACHED [2/9] RUN apt-get update  && apt-get install -y sudo golang --no-install-recommends                   0.0s
 => CACHED [3/9] RUN apt-get purge --auto-remove -y curl  && rm -rf /var/lib/apt/lists/*                         0.0s
 => CACHED [4/9] RUN groupadd -r app && useradd -r -g app -G sudo app  && mkdir -p /home/app && chown -R app:ap  0.0s
 => CACHED [5/9] RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers                                         0.0s
 => CACHED [6/9] RUN bundle config --global frozen 1                                                             0.0s
 => CACHED [7/9] WORKDIR /home/app/workdir                                                                       0.0s
 => CACHED [8/9] COPY Gemfile Gemfile.lock ./                                                                    0.0s
 => CACHED [9/9] RUN bundle install                                                                              0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:533bd46d397bc7c9e25d6f90458a5768cdecffcb5cab46a603faef8f8b6e81f7                     0.0s
 => => naming to docker.io/library/hub-test                                                                      0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
go: downloading github.com/russross/blackfriday v0.0.0-20180526075726-670777b536d3
go: downloading github.com/google/go-cmp v0.4.0
go: downloading github.com/mattn/go-isatty v0.0.3
go: downloading github.com/mattn/go-colorable v0.0.9
go: downloading github.com/kballard/go-shellquote v0.0.0-20170619183022-cd60e84ee657
go: downloading github.com/mitchellh/go-homedir v0.0.0-20161203194507-b8bc1bf76747
go: downloading golang.org/x/net v0.0.0-20191002035440-2ec189313ef0
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: downloading github.com/BurntSushi/toml v0.3.0
go: downloading github.com/atotto/clipboard v0.0.0-20171229224153-bc5958e1c833
go: downloading gopkg.in/yaml.v2 v2.0.0-20190319135612-7b8349ac747c
go: downloading github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95
go: downloading golang.org/x/text v0.3.0
go: downloading golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2
?   	github.com/github/hub/v2	[no test files]
ok  	github.com/github/hub/v2/cmd	0.012s
ok  	github.com/github/hub/v2/commands	0.042s
?   	github.com/github/hub/v2/coverage	[no test files]
?   	github.com/github/hub/v2/fixtures	[no test files]
ok  	github.com/github/hub/v2/git	0.356s
ok  	github.com/github/hub/v2/github	0.388s
?   	github.com/github/hub/v2/internal/assert	[no test files]
?   	github.com/github/hub/v2/md2roff	[no test files]
?   	github.com/github/hub/v2/md2roff-bin	[no test files]
ok  	github.com/github/hub/v2/ui	0.002s
ok  	github.com/github/hub/v2/utils	0.002s
?   	github.com/github/hub/v2/version	[no test files]
Using the default profile...
.................................................................................F--.................................................................................

(::) failed steps (::)

expected that command "hub fork" has exit status of "128", but has "3". (RSpec::Expectations::ExpectationNotMetError)
features/fork.feature:174:in `Then the exit status should be 128'

Failing Scenarios:
cucumber features/fork.feature:162 # Scenario: Unrelated remote already exists

20 scenarios (1 failed, 19 passed)
165 steps (1 failed, 2 skipped, 162 passed)
0m0.892s

I am getting the same error on local runs of this branch, so I am not changing this feature.

Thank you! I've fixed CI and pushed additional changes to fully finalize the switch to HTTPS as default, including the documentation.


Start server without shell

Under debian stable with vim v7.4, the java server process is never killed when vim exit.
During editing java files, 2 process are unning:
user 23774  0.0  0.0   4356   812 pts/3    S+   14:57   0:00          _ /bin/sh -c java  -Ddaemon.port=50255  kg.ash.javavi.Javavi -sources "sourcesDir/" -base "baseDir/" -compiler "javac" -D 50255
user 23776 40.7  1.7 4977920 140976 pts/3  Sl+  14:57   0:02              _ java -Ddaemon.port=50255 kg.ash.javavi.Javavi -sources sourcesDir/ -base baseDir/ -compiler javac -D 50255
And after vim exit, the java process remain:
user 23776  4.3  1.7 4977920 140976 pts/3  Sl   14:57   0:02 java -Ddaemon.port=50255 kg.ash.javavi.Javavi -sources sourcesDir -base baseDir -compiler javac -D 50255
It looks like issue #234  but with vim.
When launching the java server process without shell, no shell is spawned and the java process is killed when vim exit.

Thank you for cleanup, seems work.


Creating Kotlin library with gradle init makes it seem like the Kotlin plugin is not applied

When generating a Kotlin library:
gradle init --no-comments --use-defaults --type kotlin-library

The plugins block in the build script does not help understanding that a Kotlin plugin is applied:
plugins {
    alias(libs.plugins.jvm)
    `java-library`
}

However, the actual libs.plugins.jvm alias does point to the Kotlin plugin:
[plugins]
jvm = { id = "org.jetbrains.kotlin.jvm", version = "1.9.22" }

I think the generated alias should be adjusted for better clarity.

@alllex I want to take up this task. Can you please explain me what i need to do?

@Aditya13s, thank you for your interest in contributing!
My idea would be to make sure there is a kotlin word somewhere in the plugins declaration block to make it clear we are applying a Kotlin plugin. Something like that:
plugins {
    alias(libs.plugins.kotlin.jvm)
}

It means that the generated version catalog should be updated to have an entry like this:
[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "1.9.22" }

I am not very familiar with that part of gradle init implementation, but this seems like a reasonable starting point:
https://github.com/gradle/gradle/blob/2b69bdf29d558dbc55ee60f65153cad83053e54e/platforms/software/build-init/src/main/java/org/gradle/buildinit/plugins/internal/VersionCatalogGenerator.java#L78

Hello 👋🏻, it’s my first time for trying to contribute i know java pretty good and i understand that it fully interoperable with java, you think i can help?

@alllex
This is the second time I have contributed to gradle project 🚀
I check and see that gradle create alias from pluginId, as we cannot change the pluginId, so I think we can manualy create alias for kotlin plugin.
Please check my pr, if you have any idea, please advice 🙇


JBEHAVE-1152 Allow to Filter on Example Scenario when using Gherkin

Closing since it has been merged.


Codify workarounds for AMD iGPU

This codifies workarounds for some AMD iGPUs to reduce the burden on users to get them working.
Alternative approach to #5426
Fixes #3189 for linux

Is there any relevant binary file that I can help test

Hey i think it'd be great to add radeon 680m(and hence other rdna2 igpus), it is gfx1035 and override to gfx 1030 manually works, would to great to have this enabled by default too!

I got hold of a Ryzen 9 6900HX with 680M iGPU and I noticed that if I run the stock ubuntu amdgpu driver from upstream, and try to set the override to 10.3.0, it crashes with an error in hipMemGetInfo but if I install the AMD driver, then it starts working.  @harshb20 was that the same behavior you saw?  I'm wondering if it needs an extra safeguard added to not do the auto-override if you're not running the AMD specific driver.
I've also been experimenting with an AMD Zen 2 Ryzen 5 4600G with Vega 8 iGPU, and it seems to have the same behavior (override with 9.0.0)  It crashes with the error on the upstream driver, but works correctly with the AMD specific driver.


Not working

hi,
@scmfaria , @BilalAsif25 I am testing on android 10 and its not working. I have downloaded this repository, run and checked. I have given storage permission then i run command
Error : /lib/arm64/lib..ffmpeg..so": error=2, No such file or directory
`String inputPath="/storage/emulated/0/Download/test.mp4";
String outPath="/storage/emulated/0/Download/output.mov";
String[] command = {"-i", inputPath, outPath};
    final FFtask task = FFmpeg.getInstance(this).execute(command, new ExecuteBinaryResponseHandler() {
        @Override
        public void onStart() {
            Timber.d( "on start");
        }

        @Override
        public void onFinish() {
            Timber.d("===on finish");
            Log.d("===","ffmpegTestTaskQuit onFinish ::: ");
        }

        @Override
        public void onSuccess(String message) {
            Timber.d(message);
            Log.d("===","ffmpegTestTaskQuit onSuccess ::: "+message);
        }

        @Override
        public void onProgress(String message) {
            Timber.d(message);
        }

        @Override
        public void onFailure(String message) {
            Timber.d(message);
            Log.d("===","ffmpegTestTaskQuit onFailure ::: "+message);
            ffprobeTestTaskQuit();
        }
    });`

Error :  /storage/emulated/0/Download/test.mp4: Permission denied
But version command is working.
I am using bug_fix branch code : https://github.com/scmfaria/FFmpeg-Android/tree/bug_fix
please help me! Thank you!

Hi @pratik-tech4
Please, check if you add in build.gradle module app this code:
defaultConfig {
 ...
      ndk {
           abiFilters "armeabi-v7a", "x86"
      }
}

And in AndroidManifest, add this line:
android:extractNativeLibs="true"
Please, check it and any questions call me :)

hi @scmfaria Thank you for your response,
i have added abiFilters and android:extractNativeLibs="true". But still it is not working. I am testing on android 10.
Error :
java.io.IOException: Cannot run program "/data/user/0/compressaudio.margeaudio.fortiktok.tiktokaudiomaker/files/ffmpeg": error=2, No such file or directory
Library i used :
implementation 'nl.bravobit:android-ffmpeg:1.1.7'

I'm having the same issue @pratik-tech4
Your problem is probably related to the issue #168

bravobit/FFmpeg-Android-- this library support only build verstion upto 28 , this will be working fine when your sdk version is 28. try below answer
https://stackoverflow.com/a/59683008/8416317


[Feature][mysql] Mysql-cdc source adapts mariadb.

Search before asking

[X] I searched in the issues and found nothing similar.

Motivation
Currently, MySQL-CDC Source will have the following problems when reading MariaDB:

Can not receive mariadb gtidSet event from mariadb server
Can not compare mariadb gtidSet when restart from specific binlog offset/

Solution

overrride BinaryLogClient.requestBinaryLogStreamMaria method to get mariadb gtidSet event
Identify gtidSet type in BinlogOffset.compareTo method.

Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?

[X] I'm willing to submit a PR!

Closing this issue as it has been migrated to Apache Jira.


Not able to connect with Vcenter

HI ,
I have installed webcommader walnut .
But somehow i am not able to connect with vcenter using webcommander ui .
Need help.
Durgesh

Hi Jerry ,
Please help on below point .
If the git reposiory is private , then how scripts will accessible. I mean what will be changes in source.json .
??
How the remote scripts kept on private repo can be accessed from webcommander

I don't have this type of configuration on my side. But a reasonable guess is that you need to setup an access token for your private repository and add that token into webcommander code.


Upgrade to latest webpack (5.75.0)

When using Node 17+, the webpack commands fail with the error
ERR_OSSL_EVP_UNSUPPORTED. The solution given by miken32 on StackOverflow
does not work with VS Code since Electron allows only a subset of NODE_OPTIONS.
We should instead upgrade to the latest webpack which works properly with
OpenSSL 3.
The webpack upgrade requires a few other package changes so that everything
still builds and runs.

I tested your PR locally and things are still working for me. Feel free to merge


[Design] Design for preview api-version and stable api-version

Service may have multiple preview api-versions and stable api-versions, and according to the Azure SDK Guideline, GAed/released SDK only contains stable api-versions https://azure.github.io/azure-sdk/general_design.html#service-api-versions
Now when we support versioning, .NET and Java need to generate ServiceVersion in client. It may not be same as the list of api-versions in main.tsp, in released SDK, the ServiceVersion only contains stable api-versions.
we need to design preview api-version and stable api-version

How can we specify an api-version is preview version or GA version?
option1: we may need to define a decorator (such as @stable) to indicate the api-version is stable one, otherwise, it is preview version

Shall we separate preview versions and stable versions to different tsp files?
Option 1: mix preview and stable api-versions in one tsp files
we may need handle some complex scenarios which may make tsp complex.
e.g. when there are api-versions (2023-01-01-preview, 2023-03-01, 2024-01-01-preview, 2024-03-01, 2024-05-01-preview) (ordered list). There is a parameter which is add in 2024-01-01-preview (@added("2024-01-01-preview")), but in 2024-03-01 api-version it should not add this parameter, it will remove it (@removed("2024-03-01")), but the coming preview version 2024-05-01-preview is based on previous preview version, it still need this parameter, then we may need to add it back (@added("2024-05-01-preview "))
Option 2: sperate preview versions and stable versions
Define preview and stable versions in sperate tsp files, it is more clear, but it may need extra effort to migrate preview version to a stable version

Related to: https://github.com/Azure/typespec-azure-pr/issues/3576

@markcowl link to Michael's issue

@chunyu3 Discussed this with DPG folks today, we think the Azure case is fairly straightforward, but that the unbranded case may require some definition.  Will link this issue to that one once it is filed.

There is sometimes exception to "last api-version is stable, then only include stable api-versions".
OpenAI now having last api-version stable
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/OpenAI.Inference/main.tsp#L72
But their SDK is still preview, and want to include all preview api-versions to ServiceVersion.
There is a few options

emitter option like service-version-include-preview to avoid filter preview api-version
@@serviceVersion(ServiceApiVersions.v2023_06_01_Preview) to make it explicit which api-version service want to include in the SDK
@@scope(ServiceApiVersions.v2023_06_01_Preview, scope) to either include or exclude some api-version, as a modification to default logic


Correct the track Spelling

[x] Have you tested your code?

trying to edit the admin details...... any help would be appreciated

ok


Rest parameters error

TL;DR: ng-annotate appears to choke on any code, even bits that don't need annotation, with rest params.
Consider this function then:
function foo(bar, ...more) {
  //Do whatever
}

As far as I can tell, stuff this somewhere in your code (make sure it doesn't get optimized away in some manner) and pull ng-annotate over it. It doesn't matter that this function has nothing to do with Angular, ng-annotate will error either way.
Error: StringMap expected string key
    at stringmap.set (D:\Klanten\qsdashboard\node_modules\stringmap\stringmap.js:100:19)
    at Scope.add (D:\Klanten\qsdashboard\node_modules\ng-annotate\build\es5\scope.js:102:17)
    at D:\Klanten\qsdashboard\node_modules\ng-annotate\build\es5\scopetools.js:65:25
    at Array.forEach (native)
    at createScopes (D:\Klanten\qsdashboard\node_modules\ng-annotate\build\es5\scopetools.js:64:21)
    at visit (D:\Klanten\qsdashboard\node_modules\ordered-ast-traverse\ordered-ast-traverse.js:25:19)
    at visit (D:\Klanten\qsdashboard\node_modules\ordered-ast-traverse\ordered-ast-traverse.js:46:21)
    at visit (D:\Klanten\qsdashboard\node_modules\ordered-ast-traverse\ordered-ast-traverse.js:43:25)
    at visit (D:\Klanten\qsdashboard\node_modules\ordered-ast-traverse\ordered-ast-traverse.js:43:25)
    at visit (D:\Klanten\qsdashboard\node_modules\ordered-ast-traverse\ordered-ast-traverse.js:46:21)

StringMap is not to blame, it seems. It's just trying to insert an key/value pair into a stringmap, for which key=undefined, and value is this object:
{ kind: 'param',
  node:
   Node {
     type: 'RestElement',
     start: 589009,
     end: 589019,
     loc: SourceLocation { start: [Object], end: [Object] },
     range: [ 589009, 589019 ],
     argument:
      Node {
        type: 'Identifier',
        start: 589012,
        end: 589019,
        loc: [Object],
        range: [Object],
        name: 'sources' } } }

This tells me, it is at least aware of rest params. It's just not supporting them correctly.
Please note: I'm not using any type of transpiler/cispiler of any kind. I'm using ES6 straight in the browser.

#245

So this project is abandoned?

It's just about to be deprecated in favor of https://github.com/schmod/babel-plugin-angularjs-annotate/tree/next so there will be no new feature-releases. Thanks for using it and I hope you'll like its successor.

That's a sad thing to happen. Why would you let yourself be defeated? All you need is ES6 support, and node.js provides it beautifully.
There no reason to deprecate one package just because another similar one happens to exist. Besides, the one you referred is a Babel plugin, and I imagine setting up Babel (which I have absolutely no need for by itself) is a lot more pain than including ngAnnotate.


refactor networking, postgresql tls support

added support of tls connections between app and database. now acraserver in such case works like mitm and work for clients like tls server and for postgresql like tls client
move connection logic into network package that allow to wrap raw go lang net.Conn connections with other implementations like secure sesson/tls, added ability to connect via unix socket that remove problems with testing and TCP_WAIT between tests
added tls implementation of connection wrapper
add circleci v2.0 config and drop old
run integrations tests in ci
start to use github.com/sirupsen/logrus package for logging that provide good structured and controlled logs
some fixes in tests
use keystore in secure session callbacks instead hardcoded lookup of keys

LGTM


"not opened for reading" error raised when trying to report errors coming from a Rack application

Here is an excerpt from the stack trace:
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger: Error message: not opened for reading
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger: Stack trace:
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/integrations/rack.rb:89:in `read'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/integrations/rack.rb:89:in `read_data_from'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/integrations/rack.rb:75:in `from_rack'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/uxfactory-server-8.3.0/src/server/lib/sentry/sentry.rb:29:in `block (2 levels) in capture_exception'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/interface.rb:8:in `initialize'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/interfaces/http.rb:11:in `initialize'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/event.rb:230:in `new'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/event.rb:230:in `interface'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/uxfactory-server-8.3.0/src/server/lib/sentry/sentry.rb:28:in `block in capture_exception'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/sentry-raven-2.6.0/lib/raven/instance.rb:115:in `capture_type'
Jul 27 05:51:57 microservice-ruby24-appfactory-applications time-backend: ERROR ConsoleLogger:         /dist/uxfactoryserver/ecraft.uxfactory.time.dist/releases/44/vendor/bundle/ruby/2.4.0/gems/uxfactory-server-8.3.0/src/server/lib/sentry/sentry.rb:27:in `capture_exception'

Any ideas what could be causing this, or ideas about how I could debug it further?

Interesting. What application server? Puma, Unicorn, etc?

Puma 3.9 in this case, with our own Sinatra-based application server on top of it.

If the request body isn't opened for reading, it's probably something in your middleware stack or application server config. I can't think of anything in particular off the top of my head.

Linking #366.

@perlun I guess you're doing
config.async = lambda { |event|
    Thread.new { Raven.send_event(event) }
  }

then?

FWIW this has pretty much always been a problem, I just sort of ignored it in #366 but there's no workaround/downgrade option here. I think it may only be a problem if you're using config.async with Thread.new { }, but I'm not sure.

I've decided to swallow IOErrors here for now.
I was wrong about this being related to threading - the error above happens before the async callback is called.
You have a middleware somewhere in your application which is reading the request body but not rewinding it. I don't have a lot of guidance here on how to find that particular middleware. I guess you could wrap some kind of listener around the Rack body and log whenever it's read. Might be easier to just remove middlewares until you find the one that causes the problem.


Fix import with relative path for server side code

Thanks for the great repo!

Seems not working after a piping reload...

Okay. Seems to be an issue of<EMAIL_ADDRESS>Changing to<EMAIL_ADDRESS>fixes this.

Thanks for your research on this, @tomchentw.


Address component - Add Google Maps support

The address component only supports OpenStreetMaps right now.
Adding support for Google Maps would probably be nice.

[ ] Come up with a way for a developer to choose OSM vs. Google Maps & specify their Maps API key on the config
[ ] Communicate the config to the form builder
[ ] Make it work!

Hello, Any update on when this will be implemented?

Hi @napte1! We don't have an immediate need for this feature internally, so there's no plan to work on it yet.
PRs are welcome though!


Issue with year of search start and end DUPLICATE 425?

The end of the year is cut off in some views.
Possible solutions (for discussion)
a/ make it a text entry box
b/ reduce the padding
c/ reduce the font size

Duplicate, closing


Add CI Routines

Reference Issues/PRs

Fixes the setup of an initial CI/CD routine as outlined in issue #5.
What does this implement/fix? Explain your changes.

Adds configuration files and workflows necessary for continuous integration and continuous deployment, including:

Continuous integration

Add pre-commit config file so that linting can be performed automatically
Add config files for linters
Add Github Actions to automatically run all of the package's unit tests

Does your contribution introduce a new dependency? If yes, which one?

No new dependencies are added.
What should a reviewer concentrate their feedback on?

In several cases, I've expanded on the routine used by sktime (for example, I've added additional pre-commit hooks). I'll update this to note where that is the case.

@fkiraly I think I've got the CI portion underway. I'm tryign to remember from when I set this up before on my own repos, is there a way to turn the CI on so that it runs on the pull request that commits it? (The things I read online suggest that it runs after commit)

I'd also like to move from using the pre-commit action<EMAIL_ADDRESS>to pre-commit.ci. The pre-commit action is in maintenance only mode. I've used pre-commit.ci and can attest to it being faster. It also automatically commits the linting errors that it can fix for you!
The downside is that I haven't yet figured out how to have a failur of the pre-commit.ci run of the pre-commit hooks cancel the test workflows.
Even if we don't get that figured out in the short-run, my thoughts on it are that this might matter more on a package like sktime where the tests can run for a while. With BaseObject, we'd expect our tests to run very quickly, so the amount of github action time we waste is probably pretty small. Also, outside of our initial refactoring, I'm guessing that we won't have heavy development on this (it being general base class functionality, you'd want it to change slowly).

@fkiraly the unit tests are failing because the actual package (baseobject._base.py) is importing functionality from sktime locations. That means from baseobject import BaseObject generates and error.
We need to figure out a few of those things so we can get the unit tests up and running.

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@1349886). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage        ?   50.00%
=======================================
  Files           ?        6
  Lines           ?      538
  Branches        ?        0
=======================================
  Hits            ?      269
  Misses          ?      269
  Partials        ?        0

Flag
Coverage Δ

unittests
50.00% <0.00%> (?)

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

Continue to review full report at Codecov.

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


allow self-hosted (arbitrary) convex hostname (not just `*.convex.clo…

Thanks. If I've missed something, please feel free to overtake this PR with your own.

We had a question in Discord today where someone was passing a Clerk URL here, this is why we're moving slowly here — we'd like to keep the good debugging experience.
We'll get to this eventually regardless because we want to support "vanity" domain names for Convex urls soon, but we may be able to incorporate this change sooner. We may move these checks to health checks that actually talk to the server.

Update @nolanholden, we want this and it's a good idea, we're waiting for someone to work on vanity domains to take it. If it's blocking you let us know and we can get the simple version of this in.

Thanks for the contribution, we did something similar in https://github.com/get-convex/convex-js/commit/676b5d4e79a1f34731e6529f52f822984c970b96 released in 1.12. Look for more action here as vanity domains become supported.

@nolanholden this has not been implemented in 13.1, see https://github.com/get-convex/convex-js/blob/main/CHANGELOG.md#1131
There's no more need for the skipConvexDeploymentUrlCheck option to talk to self-hosted (arbitrary) convex hostnames.


Walk into top level pattern binding decls to resolve conditions

Solves a regression @slavapestov identified where ConditionResolution would fail to walk into top-level PatternBindingDecls in -parse-as-library mode.

@swift-ci please smoke test and merge.

@swift-ci please smoke test.

@swift-ci please smoke test Linux platform.

In this case though the PBD was inside a method. Same bug?

Should be.  Sounds like the pattern bindings in the body got delayed and we came around to re-parse them and evaluate the condition later which would have entered walkToDeclPre in the same way.

⛵

@slavapestov Can you confirm if this gets AlamoFire building again?

@CodaFi Yep it did. Thanks! Do you mind adding a changelog entry for this feature also?

Absolutely, that was next on the list after squashing the nits leftover from this.


Inconsistent Angular 2 Names

There are currently inconsistencies in case naming of ng2 properties. For example, there is UiView and there is:

UIRouter in https://github.com/angular-ui/ui-router/blob/3a1160d30cad275af9eb5c9e5142714b974123e6/src/router.ts#L21
UIRouterConfig in https://github.com/angular-ui/ui-router/blob/e9f26f8f70b0e40ceac2e8ac438f426c914d18e8/src/ng2/uiRouterConfig.ts#L68

Shouldn't it be UiView, UiRouter and UiRouterConfig globally?

yeah sure


Adjust a Schematron XSLT version warning test

This pull request just makes trivial edits in one of the Schematron tests in xspec.bats (a test script for *nix):

251e845a481b4d09790b24934ed271b92b4b470f: Use demo-03.xspec instead of demo-01.xspec (to prepare for an upcoming pull request). This change doesn't modify the test in essence.
67a9e03781d9b7b9b86e51a67e531add349ac09d: Remove a redundant echo line.

No code change in XSpec core.

This pull request derives from #255. So needs to be handled after that.

This pull request just adjusts the test scripts. It doesn't touch the XSpec code. None of the existing tests are removed.
The test modified by this pull request still does work and prints the output log on test failure.(demonstrated on Travis and AppVeyor)
This pull request makes it easy to handle some pending pull requests (towards #235 in particular).

So I think this pull request can be merged (after #255) safely without reviewing details, or I'd like to merge this by myself in a few days.

@cirulls
Merged this.


Add support for motion controller models at runtime in WMR/XRSDK

Overview
Refactors out a WindowsMixedRealityControllerModelProvider to call into the WinRT API and load the corresponding glTF model across both legacy XR and XR SDK.


feat: runtime error overlay

Description
Fixes #2076
To add support for runtime error overlays using vites built in overlay.
it is currently possible to use create-react-app's react-error-overlay in vite but this experience is subpar to how server errors are currently handled
Additional context
This works as a base impetration but i would love to get some feedback on potential addition features and unknowns.

Collapsing React's error stack

potentially the same for vue. i've never worked with vue before so I'm unfamiliar to how errors are handled
Should we provide a api for plugins to extend this so we don't have to handle errors for every possible framework ie import.meta.error

How should multiple errors be handled

Should we show multiple overlays at the same time an require multiple clicks from the user
Should be collect multiple errors and provide a button to toggle between them

Should the user be able to follow the stack trace down with sources
Should users be able to view the error in source and compiled

https://user-images.githubusercontent.com/32745766/147496218-491de50c-46ea-413f-a8a0-1ed5d833395d.mp4

What is the purpose of this pull request?

[ ] Bug fix
[X] New Feature
[ ] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[X] Read the Contributing Guidelines.
[X] Read the Pull Request Guidelines and follow the Commit Convention.
[X] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[X] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[x] Ideally, include relevant tests that fail without this PR but pass with it.

I'm expecting tests to break :)

updated demo showing off promise rejection and more test cases
https://user-images.githubusercontent.com/32745766/147716191-1044eb2e-38a7-4b89-810a-d386e133bd17.mp4

@patak-dev thanks for getting back to me on the questions.
I'm hoping I will have some more time to work on this feature when work dies down.. but if anyone feels like they want to pick it up before I get a chance feel free.

We should move the logic to the server so we keep the client code size small, as proposed by @gluck here: https://github.com/vitejs/vite/pull/6274#discussion_r780148069. We now have a new API in case it is useful https://vitejs.dev/guide/api-plugin.html#client-server-communication, but I think this may be done as an implementation detail.

when I saw the work starting on this I figured its better to wait until its done as its basically what was suggested.

Another idea, since we have a good client server API maybe we should first check if an external plugin is possible (maybe with some smaller changes or APIs in core). Having it in core could still be the way to go.

I think this is the right way to go. at the very least it should allow faster prototyping

There were some worries that people will confuse a runtime error with a Vite error. To avoid this, we should tweak the UI enough to avoid this. I think a different color theme may be enough.

do we have a preference on what colour. I'm not super keen on yellow (warning) or green (everything is good). maybe something thats not used to often like purple/violet

Another idea, since we have a good client server API maybe we should first check if an external plugin is possible (maybe with some smaller changes or APIs in core). Having it in core could still be the way to go.

I think this is the right way to go. at the very least it should allow faster prototyping

Nice, yes, modifying core is a lot more involved. If this could be an external plugin for some time, we may be able to move quicker, get users and feedback, and then at one point we could add it built in if that makes sense.

There were some worries that people will confuse a runtime error with a Vite error. To avoid this, we should tweak the UI enough to avoid this. I think a different color theme may be enough.

do we have a preference on what colour. I'm not super keen on yellow (warning) or green (everything is good). maybe something thats not used to often like purple/violet

Yes, I was also thinking about that tones. We could also add a label to make it more clear. IMO, we also don't need to be constrained by the current overlay design here. Maybe for runtime errors, it makes more sense to have something less intrusive? For a Vite error, we normally want to cover the screen, but for runtime errors, maybe the UI is functional? And we could use temporal toasts that don't block the UI?

Just an idea, but we could play with a DX that is more fit to each error type.

+1 for toasts too, otherwise we may get similar request like https://github.com/vercel/next.js/discussions/13387

This is very good work! Any idea when this gets merged?

Is there a way to use it without maintaining forked vite?

I think this is more important than most people realise. This is a screenshot of the Error overlay in NextJS.

I think we can all agree the DX is >>>>!
Any reason this is not being merged? Can it be made into an external plugin?
cc @arbassett @arbassett @Shinigami92 @arbassett @arbassett @arbassett @arbassett @patak-dev @arbassett @arbassett @arbassett @arbassett @arbassett @arbassett @arbassett @gluck @gluck @gluck @Niputi @gluck @arbassett @TechAkayy @patak-dev @arbassett @patak-dev @sapphi-red @bluwy @mattrunyon @hichemfantar @Inviz @patak-dev @hi-ogawa @patak-dev @hi-ogaw

+1 to having this be implemented plz. Just recently migrated from webpack to vite and was stunned to see the error overlay was not as developed or easily customizable.


refactor: change the calculation of receipts root to EIP-2718

What this PR does / why we need it?
This PR modifies receipt root calculation procedure based on eip-2718.
In the previous implementation. A receipt is inserted into receipt trie in the following steps:

call encode_receipt() to get rlp_receipt(Bytes)
call digest(rlp_receipt) to get hash_rlp_receipt(H256)
call encode() of H256 to get final val
insert val into the trie.

however, according to eip2718, step 2-3 is unnecessary.
we need to decide whether to in consistence with Ethereum standards or not.
What is the impact of this PR?
This will change the receipt root kept in block.

CI Settings

CI Usage
Tip: Check the CI you want to run below, and then comment /run-ci.
CI Switch

[x] Web3 Compatible Tests
[x] OCT 1-5 And 12-15
[x] OCT 6-10
[x] OCT 11
[x] OCT 16-19
[x] v3 Core Tests

CI Description

CI Name
Description

Web3 Compatible Test
Test the Web3 compatibility of Axon

v3 Core Test
Run the compatibility tests provided by Uniswap V3

OCT 1-5 | 6-10 | 11 | 12-15 | 16-19
Run the compatibility tests provided by OpenZeppelin

/run-ci


Algorithm

Added Circos plot and Sankey plot functions, made some other minor changes

It has merged to branch work.


Down state token updates

Description

Replaced component-size-difference-down token to a dimension token with a value of -2px. To do this, I created a new dimension token and deleted the old token under sizing category in TS. I also referenced the same UUID in the new token since they are the same just reordered to a difference section. It didn't seem like there was a way for me to drag the token to a different category.

Updated component-size-width-ratio-down value from 3px to 0.3333 number token.

These updates were made to both desktop and mobile.

Motivation and context
Inaccuracies in token values of a previous branch needed to be addressed.

Related issue

Added 3 non-color tokens for S2 component down states https://github.com/adobe/spectrum-tokens-studio-data/pull/27
Types of changes

[ ] Patch (bug fixes, typos, mistakes; non-breaking change which fixes an issue)
[X] Minor (add a new token, changing a value; non-breaking change which adds functionality)
[ ] Major (deleting a token, changing token value type; fix or feature that would cause existing functionality to change)

Checklist:

[X] I have signed the Adobe Open Source CLA.
[X] I updated the token in all applicable sets. This applies if updating, adding, or deleting a token that has data across different sets (for example, if the value differs across color themes.)

TESTING spectrum2-non-colors
READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING   tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-non-colors/
TOKENS STUDIO DATA IS NON-COLOR ONLY
SPECTRUM SYNC SUMMARY
NEW TOKENS: (6) component-size-width-ratio-down/desktop, component-size-minimum-perspective-down/desktop, component-size-difference-down/desktop, component-size-width-ratio-down/mobile, component-size-minimum-perspective-down/mobile, component-size-difference-down/mobile
CHANGED VALUES: (26) workflow-icon-size-100/desktop, workflow-icon-size-200/desktop, workflow-icon-size-300/desktop, workflow-icon-size-100/mobile, workflow-icon-size-200/mobile, workflow-icon-size-300/mobile, workflow-icon-size-50/mobile, workflow-icon-size-75/mobile, component-top-to-workflow-icon-100/desktop, component-top-to-workflow-icon-200/desktop, component-top-to-workflow-icon-300/desktop, text-to-visual-100/desktop, text-to-visual-200/desktop, text-to-visual-300/desktop, text-to-visual-50/desktop, text-to-visual-75/desktop, component-top-to-workflow-icon-100/mobile, component-top-to-workflow-icon-200/mobile, component-top-to-workflow-icon-300/mobile, component-top-to-workflow-icon-50/mobile, component-top-to-workflow-icon-75/mobile, text-to-visual-100/mobile, text-to-visual-200/mobile, text-to-visual-300/mobile, text-to-visual-50/mobile, text-to-visual-75/mobile impacting 15 tokens

TEST COMPLETE

Merging this because it is just a change from a previously merged pr that has already been approved and merged.

SYNCING spectrum2-non-colors
READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING   tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-non-colors/
TOKENS STUDIO DATA IS NON-COLOR ONLY
SPECTRUM SYNC SUMMARY
NEW TOKENS: (6) component-size-width-ratio-down/desktop, component-size-minimum-perspective-down/desktop, component-size-difference-down/desktop, component-size-width-ratio-down/mobile, component-size-minimum-perspective-down/mobile, component-size-difference-down/mobile
CHANGED VALUES: (26) workflow-icon-size-100/desktop, workflow-icon-size-200/desktop, workflow-icon-size-300/desktop, workflow-icon-size-100/mobile, workflow-icon-size-200/mobile, workflow-icon-size-300/mobile, workflow-icon-size-50/mobile, workflow-icon-size-75/mobile, component-top-to-workflow-icon-100/desktop, component-top-to-workflow-icon-200/desktop, component-top-to-workflow-icon-300/desktop, text-to-visual-100/desktop, text-to-visual-200/desktop, text-to-visual-300/desktop, text-to-visual-50/desktop, text-to-visual-75/desktop, component-top-to-workflow-icon-100/mobile, component-top-to-workflow-icon-200/mobile, component-top-to-workflow-icon-300/mobile, component-top-to-workflow-icon-50/mobile, component-top-to-workflow-icon-75/mobile, text-to-visual-100/mobile, text-to-visual-200/mobile, text-to-visual-300/mobile, text-to-visual-50/mobile, text-to-visual-75/mobile impacting 15 tokens

WROTE: /spectrum-tokens/packages/tokens/src/layout.json
SYNC COMPLETE
Spectrum Tokens Pull Request


Consider depending on the native libsodium nuget package

https://www.nuget.org/packages/libsodium/ - Comes with the native libsodium library, not a wrapper!
Pros:

Users won't have to install libsodium themselves.

Cons:

Discore might need to update whenever libsodium updates (need to check how nuget handles version constraints).

Decided against this. It would be better to let users upgrade libsodium separately for security patches without needing to wait for Discore to update.


Reverse Endianness

Based on feedback, we are reversing the endianness of ket displays from the QDK along with associated code. This includes reversing the display for state dumps from within Q#, in the debugger, and in Jupyter output. Included in this change is the revert of updates to kata content that tried to accomodate the different ordering between exercise text and the state display. The change also includes update to the new dump_operation in Python so that it is consistent with the endianness and outputs matrices that match the same conventions.

@swernli Shouldn't we reverse the order of the formatted tables as well so they still go from 00001 => 11111?

@swernli Shouldn't we reverse the order of the formatted tables as well so they still go from 00001 => 11111?

Yes I think that is what I'm seeing here as well.

@swernli Shouldn't we reverse the order of the formatted tables as well so they still go from 00001 => 11111?

No, because that is the correct order for what those entries are. |10⟩ is the first entry in the state vector, |01⟩ is the second entry, etc.
If there were 4 qubits in equal superposition, it would go:
|1000⟩
|0100⟩
|1100⟩
|0010⟩
|1010⟩
|0110⟩
|1110⟩
|0001⟩
|1001⟩
|0101⟩
|1101⟩
|0011⟩
|1011⟩
|0111⟩
|1111⟩

The order of the printed entries is the second part of our discussion today, do we interpret bit strings as integers using little endian (least significant bit first) or big endian (most significant bit first)? For the CNOT matrix to have the right ("textbook") shape, we need to use big endian, so it makes sense to have the same for ordering the entries. (|0000⟩ then |0001⟩ then |0010⟩ etc.)

@swernli Shouldn't we reverse the order of the formatted tables as well so they still go from 00001 => 11111?

No, because that is the correct order for what those entries are. |10⟩ is the first entry in the state vector, |01⟩ is the second entry, etc.
If there were 4 qubits in equal superposition, it would go:
|0000⟩
|1000⟩
|0100⟩
|1100⟩
|0010⟩
|1010⟩
|0110⟩
|1110⟩
|0001⟩
|1001⟩
|0101⟩
|1101⟩
|0011⟩
|1011⟩
|0111⟩
|1111⟩

Is there something imposing a particular order other than what we want to display? Displaying the kets in that order seems confusing.

Given the feedback and sticking with the theme of trying to make things less confusing, I'll make sure the state display is sorted according to the display format rather than the original state vector ordering.

No, because that is the correct order for what those entries are. |10⟩ is the first entry in the state vector, |01⟩ is the second entry, etc.

Is this correct? If |01> is the tensor product of |0> and |1>, then it is [1, 0]T x [0, 1]T which is [0, 1, 0, 0]T. In other words, the kets should be ordered from |00>, |01>, |10>, |11> to map to the way state vectors are typically laid out horizontally, i.e. mapping to top-to-bottm entries of [1, 0, 0, 0]T, [0, 1, 0, 0]T, [0, 0, 1, 0]T, and [0, 0, 0, 1]T.

Now all the endianness matches and the ordering of the state entries are also sequential:

The state display in the debugger also matches this too.


use add_imports everywhere

Replace use of get_imports with the new API add_imports.
Also tried to unify the typing for the message by using ImportDict type everywhere, but more change are probably needed.

Mostly looks right, i have yet to check it out and test it out locally though

Addressed your two comment, I also added unit tests for the new parse_imports function


Expose APP_SERVICE_SKU build variable to allow enablement of App Gateway WAF

What is being addressed
Exposes a new APP_GATEWAY_SKU variable in config.yaml / CICD to allow the App Gateway SKU to be configured allowing the App Gateway WAF to be enabled.  (The Azure TRE currently deploys the Application Gateway with a Standard_v2 SKU which does not enable the WAF.)

When the APP_GATEWAY_SKU variable:

is not present, or is present and it's value is null/blank, or is equal to Standard_v2 then a Standard_v2 SKU App Gateway is provisioned (the same as before the change)
is equal to WAF_v2 then a WAF_v2 SKU App Gateway is provisioned along with a WAF Policy with default settings -  'Prevention' mode and the 'OWASP 3.2' ruleset

Notes about the change:

I've added a lifecycle { ignore_changes = [ policy_settings, managed_rules] } statement so that the policy and rules are not managed in terraform after being set up to allow config of the rulesets to happen independently of this build
There was an issue causing terraform to continually show changes in the azurerm_application_gateway around the probe.match field.  I've added this field explicitly as it was being readded on every run despite not being defined.
The azurerm_web_application_firewall_policy resource requires a destruction provisioner as terraform does not properly unhook the WAF policy from the App Gateway before trying to destroy the WAF Policy.  This is needed if changing config from WAF_v2 > Standard_v2.

Great work, haven't had chance to test, but providing it works as designed I'm good with it. 👍

Thanks.
I've run the following deployments manually to test the various permutations:

Local deployments (using make all/deploy-core)
a. APP_GATEWAY_SKU variable not present
b. APP_GATEWAY_SKU variable = Standard_v2
c. APP_GATEWAY_SKU variable = WAF_v2
d. APP_GATEWAY_SKU variable = Standard_v2 (to test destruction of WAF policy)

GitHub Actions deployments
a. APP_GATEWAY_SKU variable not present
b. APP_GATEWAY_SKU variable = Standard_v2
c. APP_GATEWAY_SKU variable = WAF_v2
d. APP_GATEWAY_SKU variable = Standard_v2 (to test destruction of WAF policy)

Fixed lint issue (updated core version)

/test-extended

/test-extended 03c88dc


Histogram viz bin width control momentarily displays zero in between changes.

The behaviour is different compared to the subsetting histogram.
There, the binWidth slider props are calculated client-side. default bin width comes from study metadata and the min/max and step are calculated from it.
Here, we get everything apart from the default binWidth from the back end response.  The empty plot shown in a new histogram viz also shows the slider with zero (range is 0 to 100).
New bug: If you adjust the slider while the request is pending, you can set the bin width to 100, which may be outside the expected range.

all good!


[stdlib] Revise documentation comments

Clarify RawValue requirement for OptionSet
Make Bool counterexample more clearly an error
Add clarifying note about unsafe arithmetic methods
Add/refine complexity docs for sequence/collection

@swift-ci Please smoke test

@swift-ci Please smoke test macOS platform