OpenAPIParser validation allows path params to be non-required

As the spec states, path params are always required:
We encountered, that this validation is not performed in Open API V3 parser.
A small example defining a path with two path params - one is required=true and one is required=false. This appears valid when reading with new OpenAPIV3Parser().readLocation(String url, List auth, ParseOptions options);
openapi: 3.0.0
servers:
  - url: /subscribed_products/v1.0.1
info:
  description: >-
    API to get information on services currently subscribed by a specific user
    or phone number.
  version: 1.0.1
  title: Products API definition for the 4th Platform
  termsOfService: 'https://www.telefonica.es/es/'
  contact:
    name: 4th Platform Team
    email<EMAIL_ADDRESS>x-fp-apiPrefix: /subscribed_products
tags:
  - name: subscribed_products
    description: Operations available with products subscribed by a user
paths:
  '/users/{user_id}/description':
    get:
      operationId: description
      parameters:
        - $ref: '#/components/parameters/UserId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescriptionUrl'
components:
  parameters:
    UserId:
      name: user_id
      description: Unique identifier of a user
      in: path
      required: false
      schema:
        type: string
  schemas:
    Description:
      type: object
      description: Information about de product
      properties:
        text:
          type: string
    DescriptionUrl:
      allOf:
        - type: object
          required:
            - url
          properties:
            url:
              type: string
              description: Url with information or picture of the product
        - $ref: '#/components/schemas/Description'

This sounds like a tooling/library/implementation issue.  This repository is just for the specification.  Please raise an issue with the repository for the library which you are using.


Change model from_dict from staticmethod to classmethod

Fixes https://github.com/triaxtec/openapi-python-client/issues/215.
This allows from_dict to be inherited and overridden by subclasses. I couldn't think of any scenarios where this would be a breaking change, unless someone was relying on incorrect subclass inheritance.
The only relevant changes are in model.pyi. The rest of the files are from regenerating the e2e tests.

CC @dbanty

CC @dbanty

LGTM assuming the checks pass - I or @dbanty need to fix the CI actions so that they run on PRs

LGTM assuming the checks pass - I or @dbanty need to fix the CI actions so that they run on PRs

Hi @dbanty, should I add you as a reviewer? For some reason it looks like the Reviewers section is disabled for me, not sure if I'm missing something:

Hi @dbanty, should I add you as a reviewer? For some reason it looks like the Reviewers section is disabled for me, not sure if I'm missing something:

@forest-benchling no need, I've got this on my list to review soon. Thanks for checking in though 🙂

@forest-benchling no need, I've got this on my list to review soon. Thanks for checking in though 🙂


add ability to reuse cookie from another session

The Ingestion code currently calls Login on every task. We saw frequent failures
[20022] Additional login not permitted
We mitigated this before by reusing the cookie for search requests. Its unknown if this will completely solve this issue as we still call the Login url, but presumably this does not create additional sessions on their end because the cookie is preserved throughout the session.

@kaloramik Did you consider caching the login in the client itself (perhaps with a timeout)? If we create a client less frequently than the login rate limit, it could be a lot less headache on the caller of the client.

Ah disregard, I see the actual client is higher-level and each instance already caches the login.

Can we verify that this works first? Its easy enough to log in, in one process and then use that cookie in another

it works, but the problem only manifests itself with a large number of logins. I could try to do a loop and compare. Actually I'll do that

Actually for loop didn't work, I had to use multi threading to repro an issue
def login(limit):
    client = RetsClient(
    login_url=login_url,
    username=username,
    password=password,
    #cookie_str='ASP.NET_SessionId=coqlhnnrq21c0xlyyqvekbtf'
    )
    listing = client.get_resource('Property').get_class('Listing')
    r = listing.search(query='(Matrix_Unique_ID=0+)', limit=limit)
    return len(r.data)

with ThreadPoolExecutor(max_workers=2) as executor:
    a = executor.submit(login, 1000)
    b = executor.submit(login, 2000)
    c = executor.submit(login, 3000)
    print(a.result())
    print(b.result())
    print(c.result())

This codes throws Too many outstanding queries (not the error I was expecting, but still an error)
While this code
def login(limit):
    client = RetsClient(
    login_url=login_url,
    username=username,
    password=password,
    cookie_str='ASP.NET_SessionId=coqlhnnrq21c0xlyyqvekbtf'
    )
    listing = client.get_resource('Property').get_class('Listing')
    r = listing.search(query='(Matrix_Unique_ID=0+)', limit=limit)
    return len(r.data)

performs as expected


Fixing includedHeaders problem with spaces

Signed-off-by: Benjamin J Kotvis<EMAIL_ADDRESS>Description
Fix for spaces in includedHeaders in OPA middleware.
Issue reference
Please reference the issue this PR will close: #1557
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

Is there something more that needs to be done on my end?

Should I change this? It doesn't look like a regression but the linter isn't happy?

Please fix the linter issue: https://github.com/dapr/components-contrib/runs/5607915514?check_suite_focus=true


Re-enable CI on pushes to all branches

I think @XAMPPRocky disabled this recently, but generally we want CI to be enabled on all branches (we have in all of our other repos) so one can iterate on branches without having PRs for them and get CI coverage.
Does cause some redundant building, but that is fine.

This runs CI twice on PRs, though, and is a really unpleasant user experience (I think I requested the change)

Ah right it does, for our local branch pushes at least, does show up twice in the GitHub PR interface, though does not for PRs on forks.
We do use this for all of our other repos AFAIK, and at least I sometimes use the workflow to be able to push a branch in the background and get CI coverage (which likely will extra useful here when we have larger test suite), but can be fine to just do a draft PR also to get coverage.
We can skip this for now and see how it works, it is not too much of an issue I think, and cleaner GitHub interface is nice also.
Doesn't seem to be a way in GitHub to solve that issue, as the builds are technically building from different git ref. Though wish the build status UI at least would be better.

GitHub does allow patterns in what branches are enabled, so we could have a naming scheme like feature-* to indicate that it's a branch that you want to run CI when you're working on it.


Cannot read property 'isGrouped' of undefined

Describe the bug (required)
I am using all those hooks in react-table :

useRowSelect
useExpanded
useRowSelect

After I group by a column and select a row, the below error will occur :
TypeError
Cannot read property 'isGrouped' of undefined
handleRowById
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:3571:18
eval
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:3581:20
handleRowById
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:3580:34
eval
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:3581:20
handleRowById
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:3580:34
reducer$8
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:3586:7
eval
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:1055:16
eval
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:1054:126
updateReducer
https://2u2zj.csb.app/node_modules/react-dom/cjs/react-dom.development.js:10083:26
Object.useReducer
https://2u2zj.csb.app/node_modules/react-dom/cjs/react-dom.development.js:10723:20
Object.useReducer
https://2u2zj.csb.app/node_modules/react/cjs/react.development.js:918:25
useTable
https://2u2zj.csb.app/node_modules/react-table/dist/react-table.development.js:1059:35
Table
/src/App.js:85:4
82 |   selectedFlatRows,
83 |   state: { pageIndex, pageSize, selectedRowIds }
84 | } = useTable(

85 |   {
|  ^
86 |     columns,
87 |     data
88 |   },

Codesandbox :
https://codesandbox.io/s/react-table-userowselect-useexpanded-userowselect-issue-2u2zj
Steps To Reproduce (required)

Go to https://codesandbox.io/s/react-table-userowselect-useexpanded-userowselect-issue-2u2zj
Click on column "First Name"
Select first row by clicking on the check box at the beginning of the line
See error

Expected behavior (Recommended)
No error is happening.
A first guess analysis is that subRows has been set manually with makeData.
When grouping the data, the ids has not been generated for those rows.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: iOs but reproduced to on Windows 10
Browser Chrome and Safari
Version [e.g. 22]

Additional context
Add any other context about the problem here.

I had another bit of analysis today.
The ids are generated correctly.
However the rowByIds is not populated with underlying elements.
As per screenshot. Row with id 0.0 is at depth 1 of Row with id 0 as expected.
However rowByIds does not contains the reference to row with id 0.0.

Hello @tannerlinsley,
I was going more on debugging.
I might be wrong but there is something that I find confusing.
When the table is initially build (ie with no groupingBy yet), the rowsById is containing rows from all levels.
When a groupBy is activated, the rowsById will only contain the top level rows.
Attached the screenshot of the debugger when the grouping is done :

rowsById is representing the state just before grouping where all rows from all level are present.
groupedRowById is the state that would override the rowsById after the reducer is completed. It only contains top level nodes.

Is this is expecting behaviour ? It seems that other hooks are looking up in rowsById as the full list of rows, not only the top levels.

I'm affected by this too, Had no time to debug everything yet, but ID are correctly set in my data too.
Any news?

I'm affected by this too, Had no time to debug everything yet, but ID are correctly set in my data too.
Any news?

hi, any updates here?

This PR should fix this

Merged!

@tannerlinsley @jschen2 thanks, what version of npm react-table I need to install to get this fix? I see latest version looks on v8, but we still use v7

Still working on a release


Crash on multipart/form-data decoding with empty mime type.

Describe the bug
Server crashes on a multipart/form-data request with an empty mimeType.
To Reproduce
Steps to reproduce the behavior:

Send a multipart/form-data request from a client with an empty mime type.
Try decoding the request in a Content conform struct on the server.
Server crashes with a fatalError, no error messages provided.

Expected behavior
The request throw a decoding error avoiding server crashes and providing a readable error message.
Environment

Vapor Framework version: 4.38.0
OS version: Ubuntu 20.04, macOS 10.15.7

Additional context
This is how the AlamoFire request is sent (See MultipartFormData):
multipart.append(file, withName: "file", fileName: "my_file.zip", mimeType: "")

and this is how I decode it :

func upload(_ req: Request) throws {
      let file = try req.content.decode(Upload.self)
      // doing some other stuff
}

struct Upload: Content {
     let file : File
}

Using Backtrace I found the line where the fatalError is raised :
Fatal error: file Vapor/MultipartParser.swift, line 186

The error is raised on the handleHeadersComplete function.
Me and the iOS developer spent some hours digging into the MultipartParser decoding strategy and we found the headers decoding is made using three different functions:

handleHeaderField (Vapor/MultipartParser.swift, line 158)
handleHeaderValue (Vapor/MultipartParser.swift, line 170)
handleHeadersComplete (Vapor/MultipartParser.swift, line 186) where we got the fatal error.

Simplifying a lot the handleHeaderField function read the header name, handleHeaderValue the value for that header and handleHeadersComplete declares the header is complete.
Passing an empty mime type, the parser fail to decode the "Content-Type" header raising a fatalError, stopping the execution and causing a server crash.

Moving to here to track it

@sderiu Could you please check again with the latest version? (4.0.1)


suggestion: custom settings doc improvement

Hi,
The documentation example reads as follows:

HomieSetting<long> percentageSetting("percentage", "A simple percentage");  // id, description

void setup() {
  percentageSetting.setDefaultValue(50).setValidator([] (long candidate) {
    return (candidate >= 0) && (candidate <= 100);
  });

  Homie.setup();
}

However, I noticed CLion will complain about this syntax:

I figure others may run into this, and it may be a good idea to address it.
By casting to a std::function object, we can eliminate the warning:
percentageSetting.setDefaultValue(50)
  .setValidator(std::function<bool (long)>([] (long candidate) {
    return (candidate >= 0) && (candidate <= 100);
  }));

Related question:
Having never used std::function before (knowingly), and not having touched C++ templates for over 15 years, I don't know a better way to eliminate the warning.  Is there any way to do this other than the above, given the definition of setValidator()?

Well, I am not a C++ expert either, but std::function<bool(T)> and bool (*)(long) are compatible, otherwise it would not even compile. So I guess it's a CLion issue (again, I may be wrong).
I learned C++ while creating this project, so I am afraid I cannot help more than that.

Closing as this seems to be a CLion bug


Push modify "Delay verify compaction output table" to official

https://github.com/Terark/rocksdb/commit/f102374127b7325607d7b37341b31729d4f3dbb8

https://github.com/facebook/rocksdb/pull/3979

done


Socket connection pending without timeout

My bottle application (an API service)  is randomly hanging (about every ~10 to 20 days, calls to it are done every minute) and I finally connected gdb to a hung session yesterday. py-list shows
(gdb) py-list
 366            self._checkReadable()
 367            if self._timeout_occurred:
 368                raise OSError("cannot read from timed out object")
 369            while True:
 370                try:
>371                    return self._sock.recv_into(b)
 372                except timeout:
 373                    self._timeout_occurred = True
 374                    raise
 375                except InterruptedError:
 376                    continue

The script is hung here (cont and Ctrl-C brings it back to the same place).
The traceback:
(gdb) py-bt
Traceback (most recent call first):
  File "/usr/lib/python3.4/socket.py", line 371, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.4/wsgiref/simple_server.py", line 118, in handle
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/lib/python3.4/socketserver.py", line 669, in __init__
    self.handle()
  File "/usr/lib/python3.4/socketserver.py", line 344, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.4/socketserver.py", line 331, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.4/socketserver.py", line 305, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.4/socketserver.py", line 238, in serve_forever
    self._handle_request_noblock()
  File "/usr/lib/python3/dist-packages/bottle.py", line 2769, in run
    srv.serve_forever()
  File "/usr/lib/python3/dist-packages/bottle.py", line 3114, in run
    server.run(app)
  File "webserver.py", line 510, in __init__
  File "webserver.py", line 547, in <module>

I initially thought that the problem was with request but it is not. I am not sure that it is even with bottle but I do not have enough experience to statute on that. Feel free to close the issue if it is not related.

The development server (wsgiref from python stdlib) is not suitable for production. It serves requests sequentially from a single thread, which makes debugging easier, but also causes issues if a client stops responding because of network issues. As long as the connection hangs, no other request can be served. The timeout is quite long by default.
Solution: Choose a different server backend.
http://bottlepy.org/docs/dev/deployment.html#server-options


chore(deps): downgrade dep from...

What does this PR do?
chore(deps): downgrade dep from plugins/topology/package.json to plugins/topology-common/package.json 0.1.0; add empty changelog file
Signed-off-by: Nick Boldt<EMAIL_ADDRESS>Screenshot/screencast of this PR
N/A
What issues does this PR fix or reference?
N/A (or see commit message above for issue number)
How to test this PR?
N/A
PR Checklist
As the author of this Pull Request I made sure that:

[x] The Eclipse Contributor Agreement is valid
[x] Code produced is complete
[x] Code builds without errors
[ ] Tests are covering the bugfix
[x] The repository devfile is up to date and works, if one exists
[x] Sections What issues does this PR fix or reference and How to test this PR completed
[x] Relevant user documentation updated
[x] Relevant contributing documentation updated
[x] CI/CD changes implemented, documented and communicated

Reviewers
Reviewers, please comment how you tested the PR when approving it.

Merged as part of #1745, thanks Nick. :)


Refactor get_speech_option_birth_day util

Currently pulls vars from flow and causes bug:
Steps to Reproduce:

Register as a currently pregnant mom.
Choose May as the birth month. May is confirmed correctly.
Choose any day as the birth date. The date "x of April" is confirmed, instead of May as expected.

Note: This may be happening with moms who have already had their babies, too, but didn't check that path.

[ ] Rename state_r08_birth_day_5.mp3 to state_r08_birth_day_4.mp3
[ ] Upload state_r08_birth_day_5.mp3 when received from Sheetal.


Improve test coverage

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

Project coverage is 70.76%. Comparing base (9f35808) to head (85a1c37).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   64.35%   70.76%   +6.40%
==========================================
  Files          14       14
  Lines         578      578
==========================================
+ Hits          372      409      +37
+ Misses        206      169      -37

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


Make the input boxes for secret and secret value sticky

Resolves issue:

https://github.com/github/vscode-github-actions/issues/35

Demo GIF:

LGTM!
We should probably do the same for the variable inputs

That's a really great callout, let me go ahead and add it to this PR since its a quick change and very similar so we have a consistent experience


User popup card

when you hover the mouse over a username, there is a a pop up showing a quick view of their profile, the avatar inside that popup is still round (screenshot), I think the corresponding class is ProfileCard-avatarImage but I'm not sure

Fixed it and created a PR

@pumpkinlink Your changes are now live as v1.0.3! Your extension should auto-update, or you can force the update. Thanks a bunch for the contribution!


Update Omega submodule

This update brings in a fix for gnugpu on Frontier, see https://github.com/E3SM-Project/Omega/issues/52

Checklist

[ ] Testing comment in the PR documents testing used to verify the changes

Testing
Omega CTests pass on Frontier with gnugpu and this version of Omega, whereas they failed to build with the version of Omega previously pointed to by the submodule.


Editor changes screen upon update restart

On mac (10.12.4 (16E195) ) when you restart Atom because of plug-in update it does not restore the window into the last position. My editor window is running on a large attached monitor and when I restart it, it opens up a smaller editor window on the laptop screen.
Atom version: 1.16.0

Thanks for the report!  Looks like a dupe of https://github.com/atom/atom/issues/12956 though https://github.com/atom/atom/issues/7555 also seems relevant (that issue was closed but a couple of people reported that they could still reproduce).
Also, we require the issue template to be filled out with new issues so if you can fill out the template for future issues, that would be very helpful for us when triaging issues.

Thanks for taking the time to contribute!
We noticed that this is a duplicate of https://github.com/atom/atom/issues/12956. You may want to subscribe there for updates.
Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.
For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.


Not working on build.gradle when using applicationIdSuffix

When I read from Config on my JS code, all the properties are undefined.
On my build.gradle I have (just copied the important stuff):
project.ext.envConfigFiles = [
        debug: ".env",
        release: ".env.prd"
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

buildTypes {
        debug {
            applicationIdSuffix ".dev"
            resValue "string", "app_name", "Arena.im.DEV"
        }
        release {
            resValue "string", "app_name", "Arena.im"
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }

When I run react-native run-android --variant=release it works fine. When I run react-native run-android , the problem occurs.
I put some println on dotenv.gradle and I see that the file and the key/values are being picked up correctly.. do you guys have any idea what I'm missing?

I did some further testing and it looks like when I remove:
applicationIdSuffix ".dev"
It works fine.. so the problem is when I use applicationIdSuffix
I use this so I can have both versions installed on the devide: the DEV app and the PRD app..

This is also happening to me.
@rodrigoreis22 , were you able to implement a workaround?

@rodrigoreis22 @danielbm You will need to add this to your app/build.gradle file in order to support different application IDs or suffixes:
defaultConfig {
    ...
    resValue "string", "build_config_package", "YOUR_PACKAGE_NAME_IN_ANDROIDMANIFEST.XML"
}

@armanatz Thanks! It works now.

I tried using the above solution but I still get undefined. Let say my app's package is com.example so I am adding
defaultConfig {
    ...
    resValue "string", "build_config_package", "com.example.xml"
}

under android/app/build.gradle file. is it right? I have also tried COM.EXAMPLE.XML as well, but no luck.


Add integration test where creation endpoint query throws an error

If I can think of one?

Moving into #158


Scrollable elements break popout from auto restoring

When simpla-img is inside an element that scrolls (i.e. not the window), then the scroll won't cause the img to pop back in if it's out.

Fixed in https://github.com/SimplaElements/simpla-img/releases/tag/v1.0.0


Marjaneh updates

Update:
Create a resize_3d function and use it in the  "dataset_nominal.py".
Just to mention that expand_image is a comment now in the dataset_nominal.py.

Good idea:)
Two functions are merged together and we have deform= true/false to expand or deform. Is that what you mean?


Remove references to bcm2708_wdog kernel module where wdog is compiled into the kernel

Since the watchdog functionality on some boards (Pi3, for example) is baked into the kernel and no longer loaded as a module, we should remove references to the bcm2708_wdog kernel module to avoid confusion.
 Front conversations

I wasn't sure if there were other boards that might also be affected by this, but I will happily move it! Closing this issue + migrating.

Thanks @xginn8


Custom Button for developers

Custom button with callback
Added a new callbacks, which helps you create an executable asynchronous function
Follow the instructions in the comments given above the file callback, only Pull Requests to development branch allowed
It's a simple procedure

Create an asynchronous function with name callback_<your_id>
Inside it, you can use the interaction to do anything, like send ephemeral message, send message, etc.
All of this will be reviewed by the developer and your PR will be accepted to the main default branch

Fixes for variable names
Unfortunately, I redefined 'code prefix command as the main slash command, which rendered the entire "code" prefix command to be deleted. It is fixed and tested, and it seems to work

Yes it is


Add flutter add-platform command (plugin only)

This command should:

Determine if the correct directory is a plugin directory, throw if not
If the current plugin is using the old pubspec format, throw an error and guide users to the new pubspec format migration instruction on flutter.dev
Add platform specific folder and pubspec entries based on the platforms specified in --platforms flag.

Determine if the correct directory is a plugin directory, throw if not

Is there a reason for this restriction? It would be helpful for apps as well. (Currently adding a desktop platform to an existing project often creates unwanted changes in ios/ and android/)

@stuartmorgan I think the plan is to make it work for both. We want at least make it support plugin before 1.20
What were the unwanted changes in ios/ and android/ when adding desktop platform?

Well, currently the only way to add a platform is flutter create ., which adds all missing files. So as an example I've seen in the wild a number of times when looking at open-source projects that have added desktop, the original project uses ObjC and Java, which were the defaults when the project was created, but because flutter create . now defaults to Swift and Kotlin their project ends up with unused (and thus potentially confusing) Swift and Kotlin files unless they specifically revert them (or know to pass flags to specify the language used originally).

I see. It would also applies to any platforms. I think it is rather a problem of calling flutter create . on projects that contains old java/objc implementation.


Set default Yup validation context to form values

🚀 Feature request
Current Behavior
validateYupSchema makes the default context an empty object.
Desired Behavior
validateYupSchema sets the default context to the current values of the form.
Suggested Solution
Remove default parameter value {}  for context, pass context || values as any to Yup validation.
Who does this impact? Who is this for?
Allows conditional Yup validation on fields to use other fields anywhere in the form via $foo notation.
Describe alternatives you've considered
#506 describes how to override validate with a custom function that can invoke Yup validation with values or any other object.  This proposal makes it the default without requiring special overrides everywhere needed, and without breaking any existing code already supplying a context parameter.

This would be extremely useful since context seems to be the only reasonable way to use the yup.when condition. Most common use case is a "set password" form where the password and confirm-password fields need to be equal.
Using .when seems to be the recommended approach from https://github.com/jquense/yup/issues/74 but this seems to not really be easy to do with Formik.
If either yup.when could check other values in the value (as opposed to the context) or there were a way to pass the Formik values as the context then it would make this common use care a lot simpler. 👍

Thanks for the snippet @rally25rs, it was really helpful

I'll add my use case in favor of this feature request :
I sometimes have to do conditional validation based on my component state, and I'd love to keep the expressiveness of Yup to manage my form validation.
I could keep this state in form state to be able to use yup's mixed.when('key') but I think it makes more sense to be able to pass some of my components state to yup to yup.validate context option ([https://github.com/jquense/yup#mixedvalidatevalue-any-options-object-promiseany-validationerror](from yup's doc)).
That way I could reference this context with mixed.when('$key') without keeping it in form state.
Being able to pass a context prop to Form or something like this would be great.
Is this something you would consider?

This example shows how to use context dynamically with formik
https://codesandbox.io/s/oqvp75vxxz?from-embed

This example shows how to use context dynamically with formik
https://codesandbox.io/s/oqvp75vxxz?from-embed

Provided example is not working in formik v2 due to braking change in validate (see https://github.com/formium/formik/issues/2167)
So for anyone who is trying to make it work in v2, you could do it by updating validate part as follows:
validate: (values, props) => {
    const context = props.context || {};

    const schema = yup.object({
      email: yup
        .string()
        .when(
          "$emailRequired",
          (isRequired, schema) => (isRequired ? schema.required() : schema)
        )
    });

    return schema
      .validate(values, { abortEarly: false, context })
      .then(() => ({}))
      .catch(err => {
        return yupToFormErrors(err);
      });
  },

Upvoting this feature request or rather up-commenting))). It would be really helpful to be able to pass context.


[Bug?]: createAsync() or query() not working properly when using reactive params?

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
(see Stackblitz example in repro section)

import { createAsync, query } from '@solidjs/router';
import { createSignal, For, Suspense } from 'solid-js';

export function Users() {
  const [isActive, setIsActive] = createSignal(true);
  const users = createAsync(() => getUsers(isActive()));

  const handleClick = () => {
    setIsActive((prev) => !prev);
  };

  return (

Filter Users:

        <button
          onClick={handleClick}
          class="px-2 border-2 border-solid border-black bg-white"
        >
          {isActive() ? 'inactive' : 'active'}
        </button>

      <Suspense fallback={
 loading ...
}>
        <For each={users()}>{(user) =>
{user}
}</For>
      </Suspense>

  );
}

const getUsers = query(async (isActive: boolean) => {
  'use server';

  console.log("Warning: Should not be called once it's cached?");

  // Simulate a slow response
  await new Promise((resolve) => setTimeout(resolve, 500));

  return isActive
    ? ['activeUser1', 'activeUser2']
    : ['inactiveUser1', 'inactiveUser2'];
}, 'users');

update the active/inactive filter by clicking the button multiple times with 5+ seconds breaks between clicks
Server function gets called multiple times. (see terminal logs)
(Server function is not called when clicking faster => Cache seems to be working)

Expected behavior 🤔
(see Stackblitz example in repro section)

Server function is called exactly 2 times regardless of the clicking speed?
Server function call is cached properly.

Steps to reproduce 🕹
Stackblitz Demo
Context 🔦
(I'm new to Solidjs and Solid-Start.)
I was following the data loading example from the latest (Beta) docs, which works fine:
https://docs.solidjs.com/solid-start/building-your-application/data-loading#data-loading-always-on-the-server
I tried adding some reactive parameters to the server function. Unfortunately the caching of the query() function isn't working as expected. Please find the Stackblitz example in the reproduction section!
(I was also able to reproduce this on my local machine in another project using the latest solid-start package 1.0.10)
Am I doing something wrong?
It would be great if you could also add a data loading with reactive params example to the docs?
Notes:
I think this issue caused by using a combination of createAsync+query+signals?
As far as I can tell this code is causing the issue:
https://github.com/solidjs/solid-router/blob/main/src/data/query.ts#L100-L112
(For some reason the function inside onCleanup(() => cached[4].count--); is called causing count to be zero and Date.now() - cached[0] < PRELOAD_TIMEOUT is causing this weird 5 second working caching behaviour)
PS:
@ryansolid and team: Thanks for creating this framework. Keep up the great work! I'll keep watching your streams on youtube.
Your environment 🌎
System:
  OS: macOS Ventura Version 13.5
  CPU: Apple M2 Pro
Binaries:
  Node: v20.11.0
  npm: 10.2.4
npmPackages:
  solid-start: 1.0.10

@brenelz Thank you for the explanation!
As a new user of the solid-router/solid-start framework I read the solid-router query docs page and I figured that the main purpose of the query function is caching (=deduping?) requests. (As explained in the first paragraph on the docs page)

When this newly created function is called for the first time with a specific set of arguments, the original function is run, and its return value is stored in a cache and returned to the caller of the created function. The next time the created function is called with the same arguments (as long as the cache is still valid), it will return the cached value instead of re-executing the original function.

The key thing seems to be the "as long as the cache is still valid" part.  IMHO The docs are not clear on how long this is.

The return value is a CachedFunction, a function that has the same signature as the function you passed to cache. This cached function stores the return value using the cache key. Under most circumstances, this temporarily prevents the passed function from running with the same arguments, even if the created function is called repeatedly.

I assumed the solid query function behaves similar to other frameworks/libraries. e.g. react query which seems to have a 5 minute cacheTime by default. (see: Important defaults)

From what I'm understanding providing an option argument for the cacheTime would be very useful for use cases like this?
e.g.:
query(fn: (...args: any) => any, name: string, options: { cacheTime?: number } = {})

From what I'm understanding providing an option argument for the cacheTime would be very useful for use cases like this?
e.g.:
function query<T extends (...args: any) => any>(
  fn: T,
  name: string,
  { cacheTime = 5000 }: { cacheTime?: number } = {}
)

Implementation could look like this? michaelhaar/solid-router@39ec5b4

This seems to be a common confusion between the way Tanstack Query works with queries and cache.
In SolidStart they are very very different.
I believe the cache you're wanting to is a "stale-while-revalidate" cache, which you can accomplish by adding that header to your resource response. The cache that we have within SolidStart (provided by the query() helper) is first and foremost a deduplication cache. It won't prevent the request from re-firing between your client and the server. It will, though, prevent the ServerFunction from re-executing if called multiple times (during the same roundtrip).
As your tests showed, that roundtrip cache is valid for 5 seconds. So, subsequent calls within that timeframe will not re-execute the function (this means for both outbound requests or resource serialization/responses). Unless somewhere in your code you used reload() or revalidate() (you can also revalidate other queries with your response object, e.g.: if you call a logout() server function, you can revalidate the getUser() query.
So, if I understood your issue corrected, your code is working as you should expect. SolidStart doesn't provide any cache primitive for the client, we recommend our users to leverage the platform for that.

@atilafassina

So, if I understood your issue corrected, your code is working as you should expect. SolidStart doesn't provide any cache primitive for the client ...

That's unfortunate! Thank you for the clarification! 🙏 📈

Regarding this option:

I believe the cache you're wanting to is a "stale-while-revalidate" cache, which you can accomplish by adding that header to your resource response

I tried something like this, but unfortunately the browser isn't caching the request/response at all
const getUsers = query(async (isActive: boolean) => {
  'use server';

  console.log("Warning: Should not be called once it's cached?");

  // Simulate a slow response
  await new Promise((resolve) => setTimeout(resolve, 500));

  const data = isActive
    ? ['activeUser1', 'activeUser2']
    : ['inactiveUser1', 'inactiveUser2'];

  return json(data, {
    headers: {
      'cache-Control': 'public, max-age=3600',
    },
  });
}, 'users');

I used the json function and tried various cache-control headers but I couldn't  get this working with server functions. Modified Stackblitz Example.
I assume it's because of the query params which are automatically set by the server function or maybe because of Content-Type: text/javascript 🤔


Switch ovn-k8s-overlay to golang

Switch ovn-k8s-overlay to golang
NOTE: Testing on redhat and windows has not yet completed.
@shettyg @feiskyer

There are some works have not completed. eg. RedHat and win32 os enviroment and advanced config values etc. And i am working on it. so I change the  PR to WIP.
@shettyg

While at it, can you also please look at the linter failures. Just some styling issues.

Can you please add the govendor commands that you used for vendoring to the commit log. It will help with rebasing in the future.
I did not test this, and just went through the file to see the general structure. So few review comments.

@shettyg  Updated

Looks like in RunOVNNbctl, we are getting config.NbctlPrivateKey which will fail if you don't have a config file. Also, in gateway_init, you will don't seem to be calling config.FetchConfig. Can you run these once without the config file in the system?

@shettyg Update, we can simplify config init when using two executables eventually.


pipeline injector

Hi @gi0baro
Something changed in version 1.3 that broke all the injectors (in 1.2.11 it works fine)

File "/my_path/venv36/lib/python3.6/site-packages/weppy/pipeline.py", line 131, in init
for attr in set(dir(self)) - self.pipeline_methods:
AttributeError: 'MyIjector' object has no attribute 'pipeline_methods'

@josejachuf should be fixed with ce11697, can you try latest master?

@gi0baro works fine
Thanks


How to update event?

Can I update the event?
because I want to change the start & end times of the event.

Hello @HarshilVaghasiya  for now you can simply remove existing event and then add same event with updated time using controller.
But we are planning to add a method to update event directly.

#215


Pet owner name is fetched on renderer thread, freezing the client when hovering a new pet

https://github.com/PotatoPresident/PetOwner/blob/7df6d2e9cdf0abfbdd196fdeb688fe071df8fdb9/src/main/java/us/potatoboy/petowner/mixin/OwnerNameTagRendering.java#L50
Takes however long it takes to fetch a profile from Mojang, usually 0.5-1 seconds. That's an unacceptably long freeze.
Please offload fetching the profile to another thread and show a "please wait" message, or nothing at all, until that's done.

Yeah I know... Its just annoying using yggdrasil because there isn't a way that I've found to check if the name is in the cache. I suppose I'll have to cache the cache or something. I'll work on this.


Unwanted button borders from 2.37.26

Bug description
The latest release has introduced a border bug that was not there previously. In older version, there are no borders around buttons on the watch page which is the expected and correct behavior. Now, it overrides any custom CSS which should not be the case.
Steps to reproduce the behavior

Update the extension to 2.37.26
Watch any video
Observe the buttons

Refer to screenshots for the issue:
How it looks now:

How it used to look:

Browser
Microsoft Edge
Operating system
Windows
Extension version
2.37.26
The bug still happens in these conditions

[X] The bug still persist when I disable all other extensions (ex. in incognito mode with only this extension enabled)
[ ] When I logged out of my YouTube account (ex. in incognito mode)
[X] In incognito mode

Additional context and/or screenshots
No response

Thanks for your report. I didn't know that YouTube still displays those button in the old style for some users.
The buttons look like this on my account, which is the new YouTube style:

[ ] I'll make sure to remove the borders from the buttons with the old style in the next version

Is the rest of the old layout still styled correctly? (The related tags, playlists, transcripts, etc)

Thanks for your report. I didn't know that YouTube still displays those button in the old style for some users.
The buttons look like this on my account, which is the new YouTube style (ignore my custom dislike/like ratio bar):

[ ]  I'll make sure to remove the borders from the buttons with the old style in the next version

Is the rest of the old layout still styled correctly and working? (The related tags, playlists, transcripts, video description, comments, etc)

Thanks for the quick reply, the rest of the old layout still works correctly

@ice051128 I can't reproduce your bug when I turn off all YouTube's experiment flags:

Could you share the YouTube's experiment flags that are enabled in your account?
To do so:

Press F12 to open a DevTools window
Open the Console tab (if not already opened)
Type or paste this text and press enter: ytcfg.get('EXPERIMENT_FLAGS')
Right click on the text output and click on Copy object

I found 3 experiment flags that change the style of the buttons, but none of them resulted in squared buttons with borders:
ytcfg.set('EXPERIMENT_FLAGS', {
    ...ytcfg.get('EXPERIMENT_FLAGS'),
    web_button_rework: false,
    web_modern_buttons: false,
    web_segmented_like_dislike_button: false
})

Could you maybe also list the other extensions that you are using? Maybe you are using an extension / custom stylesheet that styles some of the buttons back to the old layout?

I found 3 experiment flags that change the style of the buttons, but none of them resulted in squared buttons with borders:
ytcfg.set('EXPERIMENT_FLAGS', {
    ...ytcfg.get('EXPERIMENT_FLAGS'),
    web_button_rework: false,
    web_modern_buttons: false,
    web_segmented_like_dislike_button: false
})

Could you maybe also list the other extensions that you are using? Maybe you are using an extension / custom stylesheet that styles some of the buttons back to the old layout? In that case it might be difficult to remove the borders on the old buttons, because YouTube removed the attribute modern-metapanel that made it possible for me to distinct between the old an new buttons with the css selector ytd-watch-metadata[modern-metapanel]

I'm using a custom CSS with stylus that brings back the old layout and it has worked up to 2.37.25 perfectly, turning this extension off fixes the border issue immediately.
I put the code in console but nothing shows up

Aha, that explains a lot. The problem is that if I revert the stylesheet back to version 2.37.24 it brings back this bug in YouTube's new style:
https://github.com/WesselKroos/youtube-ambilight/issues/169
PS: Even if I remove the borders from the buttons you'll still be left with the modern style semi-transparent background on those buttons.

I had some time to think about the available options.
With the philosophy of overriding YouTube's style as minimal as possible, I'm going to reduce the custom stylesheet so that the additional button borders are removed. This will still give you the semi-transparent background colors on buttons by default, but you can remove those by changing the "Buttons & boxes background color" setting to 0%:

This way the default modern style will also stay intact for others:

@ice051128 Version 2.37.27 has just been released to the Edge Add-ons store.


STORM-3381: Exclude spotbugs-annotations from Zookeeper, regen DEPEND…

…ENCY-LICENSES
https://issues.apache.org/jira/browse/STORM-3381

+1


update circleci docker image

The configuration of resource_class is large in circleci caused build fail, change to medium.


Localization

Good afternoon. Will a file for localization be added? I would like to translate the program into my language for convenience.

Not planning to do that, sorry.


Fix exit codes on failures.

Chain through correct exit codes on failures in build.py and TestRunner.java.

Here is one example where the builds were failing but build.py was ignoring it. https://travis-ci.org/EVelez79/CodeU-ProjectGroup6/jobs/241061629

Amended the commit.

Waiting for Aaron's final approval.


Attributes, inter-communicators, and spawning

This isn't super full-featured, but I think the interface is convenient enough. Process spawning with Open MPI is a bit more expensive than launching using mpiexec.

This looks great. I tried the three examples locally.
Is this assuming that inter communicators are created outside of rsmpi right now? I didn't see any MPI_Intercomm_* functions.

MPI_Comm_spawn creates intercommunicators. I didn't bind MPI_Intercomm_create because I'm interested in spawning, but it could be done later.


Issue with stored producers

id value remains same if I'm using stored procedures.
Sample o/p:
[
  {
    "id":<PHONE_NUMBER>8913544,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>  },
  {
    "id":<PHONE_NUMBER>8913544,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test1",
    "email"<EMAIL_ADDRESS>  }
]

Hi @sasidhar678 we'd be happy to help, but there doesn't seem to be enough information to do anything. If you're not sure what else to provide, you can start with the following, of course:

The version of Node.js you are using
The version of this module you are using
Complete Node.js code you are running that produces the output you showed above
Complete DDL for the tables needed to run your query
The stored procedure code
Complete instructions for how to run your code to see the issue

Thanks!

Node v7.4.0
MySQL module v2.13.0
Node JS Code

const mysql = require('mysql');
const pool = mysql.createPool({
    host: 'localhost',
    user: 'root',
    password: 'root',
    database: 'sample',
    multipleStatements: true
});

pool.getConnection(function (err, connection) {
           if (err) {
                console.log(err);
                res.status(500).json(JSON.stringify(err));
            } else {

                 connection.query("CALL SP_InsertUserInfo(?, ?,  ?, ?, @uid); SELECT @uid AS uid",
                        [mobile_number, password, name, email],
                        function (err, result, fields) {
                            connection.release();
                            if (err) {
                                res.status(500).json(JSON.stringify(err));
                            } else {
                                let resData = {
                                    "message": "success",
                                    "uid": result[2][0].uid
                                };
                                res.status(200).json(resData);
                            }
                        });
            }

DDL

CREATE TABLE `user_details` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `account_id` bigint(20) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`),

  CONSTRAINT `admin_details_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `accounts` (
  `id` bigint(20) NOT NULL,
  `mobile_number` bigint(20) NOT NULL,
  `password` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_mobile_role` (`mobile_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Stored Procedure

DELIMITER ;;
CREATE PROCEDURE `SP_InsertUserInfo`(IN p_mobile_number BIGINT(20), IN p_password VARCHAR(100), IN p_name VARCHAR(100), IN p_email VARCHAR(100), OUT p_uid BIGINT(20))
    SQL SECURITY INVOKER
BEGIN

DECLARE uid BIGINT UNSIGNED;
  SET uid = UUID_SHORT();
insert Into accounts
(
  id,
  mobile_number,
  password
)
VALUES
(
  uid,
  p_mobile_number,
  p_password
);

insert into user_details
(
  account_id,
  name,
  email
)
VALUES
(
  uid,
  p_name,
  p_email
);

SET p_uid =  uid;

END ;;
DELIMITER ;

Try to insert more than 1 record and then retrieve all as well as single record using WHERE clause. All record id holds the same value.

CREATE TABLE accounts (
id bigint(20) NOT NULL,

Just a guess, but is the behavior corrected if you define your id fields as UNSIGNED?
CREATE TABLE `accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,

Please let me check once.

That's not an issue. ids are inserting properly in database. But in the Node js  the ids are not updating with latest/actual values.
DB Values

NODE JS Values

[
  {
    "id":<PHONE_NUMBER>2449410,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>    "role":<PHONE_NUMBER>2083870,
    "permissions":<PHONE_NUMBER>2083876
  },
  {
    "id":<PHONE_NUMBER>2449410,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>    "role":<PHONE_NUMBER>2083870,
    "permissions":<PHONE_NUMBER>2083876
  },
  {
    "id":<PHONE_NUMBER>2449412,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>    "role":<PHONE_NUMBER>2083870,
    "permissions":<PHONE_NUMBER>2083876
  },
  {
    "id":<PHONE_NUMBER>2449412,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>    "role":<PHONE_NUMBER>2083870,
    "permissions":<PHONE_NUMBER>2083876
  },
  {
    "id":<PHONE_NUMBER>2449416,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>    "role":<PHONE_NUMBER>2083870,
    "permissions":<PHONE_NUMBER>2083876
  },
  {
    "id":<PHONE_NUMBER>2449416,
    "mobile_number":<PHONE_NUMBER>,
    "name": "Test",
    "email"<EMAIL_ADDRESS>    "role":<PHONE_NUMBER>2083870,
    "permissions":<PHONE_NUMBER>2083876
  }
]

Ah, if those are big numbers, this is a limitation of JavaScript / Node.js itself. Have you tried to enable any of the big number options this module provides? The easiest one is to have this module give your big numbers as strings, avoiding the JavaScript limitation.

@dougwilson thanks it's working after enabling the supportBigNumbers and bigNumberStrings.
Thanks a lot !!

Hi @sasidhar678 glad that was the answer :) I didn't realize that's what was happening from the initial post


Provide a mill wrapper to be included into repositories (./mill)

The wrapper should be:

cross-platform
small
easy to inspect
avoid containing bytecode (if needed, it could ad-hoc compile source code)

Use cases:

Easy checkout and build without need to install mill
Provide always the correct version of mill
Easy to use mill in CI environments

I'd be happy to just call it ./mill. The leading ./ ensures there'll be no ambiguity with the PATH mill anyway.
I don't see any reason why the mill wrapper would need to be written in anything but Bash; it just needs to poke at some files and maybe download something.

yeah bash works, and a mill.bat works too

I created project https://github.com/lefou/millw
But a Windows Batch version is still missing.


Unable to get 'sign in with Google' to work using 'dj_rest_auth'

I'm trying to implement Google sign in using DRF and dj_rest_auth.
I've set up 'django-allauth' with Google as provider and the sign in process works in the web browser.
I need to connect an android app with my backend. I've created API endpoints which will require authentication.
According to the docs, code is required in order to complete authentication and receive the token.
After doing some research, I found that code required by dj_rest_auth can be obtained by visiting:
https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=<YOUR CALLBACK URL>&prompt=consent&response_type=code&client_id=<YOUR CLIENT ID>&scope=openid%20email&access_type=offline

However, even after passing code returned in the query param (after decoding from URL format), the following error is shown:
Error retrieving access token: b'{\n  "error": "invalid_grant",\n  "error_description": "Bad Request"\n}'

To see if I can log in with a recent access token, I signed in with my Google account from the homepage , copied the access token from the admin section and submitted it to the endpoint http://localhost:8000/dj-rest-auth/google/. I was able to receive the auth token generated by dj_rest_auth.
I need help in getting the auth token by providing code in the post request.
My code:
# urls.py
...
path('dj-rest-auth/', include('dj_rest_auth.urls')),
path('dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')),
path('dj-rest-auth/google/', home.GoogleLogin.as_view(), name='google_login'),
...

# views.py

from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter
from allauth.socialaccount.providers.oauth2.client import OAuth2Client
from dj_rest_auth.registration.views import SocialLoginView

class GoogleLogin(SocialLoginView):
    adapter_class = GoogleOAuth2Adapter
    callback_url = 'http://localhost:8000/accounts/google/login/callback/'
    client_class = OAuth2Client
...

References:
Google Social Authentication with dj-rest-auth #220
Minimal example for SPA implementation of social login #147
Please help me.

Hello.
I've tested Google Login with the same environment you pasted.
I found that the error occurs in the situation as follows.

When the code is expired. (expiration is a few minutes)
When callback_url does not match <YOUR CALLBACK URL> and OAuth setting in GoogleCloudConsole.

In addition, callback_url should be set as the front-end's callback URL, not a Django's URL. So if you host front-end in localhost:3000 and endpoint is /callback, the callback_url should be callback_url = "localhost:3000/callback"
Can you check and try this? Thank you.

Thank you @YZ775 for explaining. I've tried and it works. :)


Fix debugger evaluation test failure in windows

Description:
Debugger integration test suite is failing on windows due to a evaluation test failure (https://scans.gradle.com/s/bqd45tgqj54r6/tests/:jballerina-debugger-integration-test:test/org.ballerinalang.debugger.test.adapter.evaluation.PackageEvaluationTest/functionCallEvaluationTest?top-execution=1).
Describe your task(s)
Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

We are closing this issue due to inactivity. If you need further assistance or have additional input, feel free to reopen it. Thank you for helping us maintain a relevant and focused issue list!


Update olHelpers.js

Hi,
an use case example is the following:
{
name: 'jsonp',
active: true,
source: {
type: 'JSONP',
url: 'http://localhost:8090/geoserver/REWARD/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=REWARD:capevents',
cache: false
}
}
Please help me to test it.
Bye,
Matteo.

Great patch @kratosmat, merged. Thanks


add docker support

Looks good, can you add some instructions how to use it?

Hi @durkmurder
thanks for your feedback. I just added instructions to the README.md and fixed a few small things. I'd like to mention here that we could make usage of https://hub.docker.com/ to store the the builds built by travis. At the moment the given Dockerfile is meant to be for a local build. We could also provide a second Dockerfile which just copies the build provided by travis inside the image so we don't need to build twice ( since travis is already triggering a build ). The image we could easily persist to https://hub.docker.com/. wdyt?

It would be great to have a current.tar (or similar) that always reference to the newest tag / sourcecodversion ... if this would be available .. u could directly reference to it from inside ur build scripts that run inside the docker instance ... and the need to download the current version to /tmp would be eleminated ....

@LeeeNux yeah, or as mentioned just use the build provided by travis.

@durkmurder any further questions here?

@durkmurder @John-Draper @bwang22 could any of you ensure that the xsnd behind docker works as expected please? From my side, the PR looks good to me.

@AlexITC btw, we are running our node behind docker, so i can confirm it runs as expected

Agree, locally it seems to work too but I would prefer that one of the guys involved with the actual development of this project validates it.


WIP: Draft for the new GraphQL schema for review

This is a temporary draft for team review only (not to be merged).

What is the naming convention we use for mutations?


Warning in home Assistant log

2023-09-03 10:05:34.170 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for chint_pm doing blocking calls at custom_components/chint_pm/init.py, line 410: header = client.read_holding_registers(address=0x0, count=12, slave=unit_id)
This warning occurs multiple times per second.
Therefore, the as card is full after 2 days

I'm working this issue in "async-modbus" branch, but i currently havn't had enought time to testing


Navigate between categories

BREAKING CHANGES for SearchViewModel

Cleaned up SearchViewModel to reduce the interface size and number  of helper methods
Added category navigation to FiltersFragment

Using JDK 11+ seams to resolve many issues with the build process. I will update the README in another branch.


Does this work with Serum v3?

Does Pyserum work with Serum v3?
After following the test code for market.place_order() I am getting the error on the Solana Block Explorer:

Program returned error: invalid program argument
Runtime error: invalid program argument

Does Pyserum work with Serum v3?

Yes, it does.

I am having this error when trying to place a limit order on the SOL/USDC order book and am wondering why?
The transaction goes through, (the quote wallet is created) however the order on the Solana explorer it fails with: invalid program argument
I am wondering how I can fix this?
from pyserum.connection import conn
from pyserum.enums import OrderType, Side
from pyserum.market import Market
from solana.account import Account
from solana.publickey import PublicKey
from solana.rpc.types import TxOpts
from spl.token.client import Token
from spl.token.constants import TOKEN_PROGRAM_ID

cc = conn("https://solana-api.projectserum.com")
payer = keypair

quote_token = Token(
    cc,
    pubkey=PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"), # mint address of token USDC
    program_id=TOKEN_PROGRAM_ID,
    payer=payer,
)

quote_wallet = quote_token.create_account(
  payer.public_key,
  skip_confirmation=True)  # Make sure you send tokens to this address
print("quote wallet: ", str(quote_wallet))

market_address = PublicKey("9wFFyRfZBsuAha4YcuxcXLKwMxJR43S7fPfQLusDBzvT") # Address for SOL/USDC
market = Market.load(cc, market_address)

tx_sig = market.place_order(
    payer=quote_wallet,
    owner=payer,
    side=Side.BUY,
    order_type=OrderType.LIMIT,
    limit_price=179,
    max_quantity=0.01,
    opts = TxOpts(skip_preflight=True)
)
print(tx_sig)

I also encountered this problem, could you give me a sample code？thanks

For my this was because my max_quantity was zero.


feat(uibc): support total outflows in outflows query

Description

Change OutflowsResponse to return a single dec, rather than a list of coins
when denom is not specified, total outflows is returned.

Codecov Report

Merging #1896 (f7c28b4) into main (634380a) will decrease coverage by 0.29%.
The diff coverage is 16.39%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1896      +/-   ##
==========================================
- Coverage   56.08%   55.80%   -0.29%
==========================================
  Files          93       93
  Lines        8935     8989      +54
==========================================
+ Hits         5011     5016       +5
- Misses       3553     3602      +49
  Partials      371      371

Impacted Files
Coverage Δ

x/uibc/query.pb.gw.go
0.00% <0.00%> (ø)

x/uibc/quota/keeper/grpc_query.go
76.92% <83.33%> (+5.49%)
:arrow_up:


rfxtrx switch converts name/entity_id to lowercase?

Home Assistant release (hass --version):
0.39.3
Python release (python3 --version):
3.6.0
Component/platform:
Windows 10
Description of problem:
When button_pressed i can only match it if i provide a lowercase entity_id
Expected:
Currently it only works if i provide the Entity_Id in lowercase, if i change to the expected remote1Button1 it does not work at all.
Problem-relevant configuration.yaml entries and steps to reproduce:
rfxtrx:
  device: COM4

switch:
  platform: rfxtrx
  automatic_add: True
  devices:
    0b110000015b026601010f80:
      name: remote1Button1
      fire_event: True

automation:
  - alias: Use remote to enable scene
    trigger:
      platform: event
      event_type: button_pressed
      event_data:
        state: 'on'
        entity_id: switch.remote1button1
    action:
      service: scene.turn_on
      entity_id: scene.LivingroomAllOn

Additional info:
Log:
17-03-08 17:43:37 DEBUG (Thread-3) [homeassistant.components.rfxtrx] Device_id: 15b02662 device_update. Command: Off
17-03-08 17:43:37 INFO (MainThread) [homeassistant.core] Bus:Handling <Event button_pressed[L]: entity_id=switch.remote1button1, state=off>
17-03-08 17:43:37 INFO (Thread-3) [homeassistant.components.rfxtrx] Rfxtrx fired event: (event_type: button_pressed, entity_id: switch.remote1button1, state: off)

entity_id is always lowercase. That's a rule in home assistant. You can see the ids of your entities in the state panel under developer tools.

@MartinHjelmare Thanks, but in my platform: state trigger it worked with a mixed case entity_id how come it didn't work with the button_pressed it does not seem like the same rules apply?
Example that worked when the state changed (and as you can see the entity_id is not lower case):
trigger:
      platform: state
      entity_id: switch.remote1Button1
      to: 'on'

The difference is due to what kind of config validation that is performed before evaluating the config.
For the state trigger we can validate the format of the value of the required key entity_id. This means home assistant will try to convert the passed string into the correct format of an entity_id.
In the case of the event trigger, home assistant only validates that the key event_data contains a dictionary, which is a python data structure for holding key value pairs. After loading YAML into python, a new line and indentation after a colon, will be converted to a python dictionary.
Home assistant can't perform stricter validation for the event data since the event data is not more specifically defined than that. So you have to make sure yourself that you match the data correctly. It might be possible to make the matching rules for this case more broader, but I'm not sure of that.

@MartinHjelmare Thanks then i understand ill rename id's with _case instead!

@MartinHjelmare is it possible to validate the switch.devices.#####.name and log some sort of warning if its not entirely lower case?
This way it might save some time for other users who try to use CamelCase.

You mean in the cases where we do validate entity_id key values in the config? Yes it's possible. It would probably mean adding a regex matching any uppercase letter and a warning logged in the validator that validates entity_id.
You can add a feature request in the forums and link to this issue.

No i mean where you define your devices (switches, lights, ect..) im new to home assistant but they have a name just validate that?
Or name and entity_id aint the same thing?

Ah, I see what you mean now. Yes that is also possible. But usually the name will be used also as friendly_name which is allowed to be uppercase and what you see in the frontend. So the name might not only be used to generate the entity_id.
I'd say a warning logged in this case is a bit counter intuitive. We should probably be more clear in the documentation though.


Remote PR Currently Fails

This is a known issue with how github actions works, have to investigate to see if there is a fix we can do:
# GITHUB_TOKEN in forked repositories is read-only
# https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}

The above can be used to skip in the meantime if its a remote PR so that the checks do not always fail

Note: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

We are also facing the same problem. May I ask why does the action need write permissions? Is it to delete the previous comment?

Creating checks, annotations, issues, deleting the previous issue so it doesn't spam are all write actions.
The github token by default has read/write to the repo only and nothing else unless its a remote fork.  #11 goes over my plan to allow remote forks to work without breaking the security.

I don't know about checks and annotations but have you thought about editing the previous comment instead of deleting/adding a new one? That's what other actions do, like for example https://github.com/iam4x/now-deploy-preview-comment. I guess you don't need write access for that, as it belongs to the same GitHub user, although I'm not 100% sure.

You would need write access for editing.  The reason I am not editing is just because I had wanted it to update on the timeline, but edit may be a better path.

My solution using the scheduled job will always run on the master branch so its secure in that sense and will have access to the secrets and such

That's a really interesting workaround. Can it access the artifacts of another branch or do you need an external service to store them?

Not when using github packages, they restrict them on the client but the api itself doesn’t restrict it so they can be accessed.
So the plan will be whenever it runs it will query artifacts for the repository, scan through them since the last run and run the updates and remove the artifacts once successful.
I‘ve confirmed the solution now so should be ready soon.

I've confirmed the solution now so should be ready soon.

That is awesome. To be honest, I've been searching for solutions to this problem since my early days using GH actions and never found anyone using/proposing a workaround, not even the official answers from the GH team. This approach seems like it could be that missing piece 👏

Hoping to generalize the solution so other GitHub actions can take advantage.

Like a library that could be used to make a GH action "schedulable"?

BAM https://github.com/bradennapier/eslint-plus-action/pull/13/checks?check_run_id=843960041

Testing it out in https://github.com/frontity/frontity/pull/515. Everything seems great so far 👍


Blade include inheritance issue

Laravel Version: 5.3
PHP Version: 7
Database Driver & Version: n/a

Description:
I noticed when using inheritance for a card module, that variables are not being correctly assigned.
For example, if you have
extend.blade.php
<h1>{{ $title }}</h1>
@yield('content')

include.blade.php
@extends('extend')

@section('content')
    {{ $content }}
@endsection

page.blade.php
@foreach([['title' => 'foo', 'content' => 'foocontent'], ['title' => 'bar', 'content' => 'barcontent']] as $item)
    @include('include', $item)
@endforeach

You'd expect:
foo

foocontent
bar

barcontent

You actually get:
foo

foocontent
bar

foocontent

I'll have a look tonight an see if I can come up with a fix.

Use @overwrite
@section('content')
    {{ $content }}
@overwrite


cmd/compile: invalid type assertion in switch case fails to panic

What version of Go are you using (go version)?

$ go version
go version go1.11.4 darwin/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/a.sulaev/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/a.sulaev/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.4/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wb/q3d56j697hs6zfvjgt3n88bc0000gp/T/go-build625061947=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
Here is the code + play.golang.org link on it :
package main

import (
	"errors"
)

type SomeType struct{}

func (SomeType) Error() string {
	return ""
}

func main() {
	var x error
	x = errors.New("aa")
	switch x {
	case x.(*SomeType):
		println("*SomeType")
	case x:
		println("x")
	}

	// println(x.(*SomeType))
}

What did you expect to see?
I was expecting to see panic at the line case x.(*SomeType): because of the bad type casting.
For example if i uncomment the line // println(x.(*SomeType)) (which casts x the same way as in case) i get the panic
What did you see instead?
This code successfully compiles and prints "x" when running.

UPD:
package main

import (
	"errors"
)

type SomeType struct{}

func (SomeType) Error() string {
	return ""
}

func main() {
	var x error
	x = errors.New("aa")
	switch x {
	case x.(SomeType):
		println("SomeType")
	case x:
		println("x")
	}
}

if i cast to x.(SomeType) in place of x.(*SomeType) i get the panic

Definitely weird. That should panic.
I suspect something in the compiler is getting mixed up between expression switches (which this is) and type switches.
Is this derived from some real code?  It looks bizarre to me. The reason I ask is because it affects priority - if this happens in the real world we should probably get a fix in for 1.13; if not it can wait for 1.14.
Go gets this right up to and including 1.4. The bug starts in 1.5.
gccgo gets this right.

Definitely weird. That should panic.
I suspect something in the compiler is getting mixed up between expression switches (which this is) and type switches.
Is this derived from some real code? It looks bizarre to me. The reason I ask is because it affects priority - if this happens in the real world we should probably get a fix in for 1.13; if not it can wait for 1.14.
Go gets this right up to and including 1.4. The bug starts in 1.5.
gccgo gets this right.

I got something similar while reviewing a pull request where the code works fine.
And i started wondering why this doesn't panic. I dont think we are going to use this "trick" in production, but it might happen to someone else.

It just seems weird to compare an interface against a concrete type that's type-casted from an interface. You might as well compare them directly. In other words, if x and y are interfaces, then x == y.(T) is the same as x == y, except that the former would panic if y was not a T.

Simpler repros:
package main

func main() {
    var x interface{}
    println(x == x.(*int)) // should panic, but prints false

    var p *int
    println(x == *p)  // should panic, but prints false

    var s []string
    println(x == s[10])  // should panic, but prints false
}

The problem is for interface-to-concrete comparisons, we're short circuiting on the interface value's dynamic type before evaluating the concrete expression for side effects.
The problem doesn't happen for x.(SomeType) because order.go calls copyExpr on non-direct interface types (i.e., non-pointer types):
https://github.com/golang/go/blob/b84e0bc61a1742309f57deace17e5b8748c33fd7/src/cmd/compile/internal/gc/order.go#L1206-L1213


Following list

Hey, I hop you don't mind, but I made some minor changes to your code.
User's contributions now are fetched in parallel and cached for 15 minutes.
I also sorted the users by the streak size and number of commits today.
I last I changed the pieces of code where the state was mutate directly, which should be avoided.
If you mind having a look the code is on the johnknaack-following-list branch

Looks great to me. I've been working in isolation at a private company for the last few years. It's actually nice to get some feedback on what I can improve on. I look forward to making make some of these adjustments on some of our production apps.

Yeah, I've been there, to me that's certainly the best part of Github!
If you want an opinion on any code feel free to ping me... :)


Add CompositedTransformFollower.{followerAnchor, leaderAnchor} for custom anchoring

Description
Added followerAnchor and leaderAnchor to CompositedTransformFollower to allow positioning the follower using other anchor points other than origin-to-origin. This should make positioning the autocomplete dropdown in #62927 a lot easier.
Related Issues
Fixes https://github.com/flutter/flutter/issues/57604
Tests
I added the following tests:
Added variants for each existing test case.
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[x] I signed the [CLA].
[x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
[x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] All existing and new tests are passing.
[ ] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Did any tests fail when you ran them? Please read [Handling breaking changes].

[ ] No, no existing tests failed, so this is not a breaking change.

Gold has detected about 16 untriaged digest(s) on patchset 4.
View them at https://flutter-gold.skia.org/cl/github/64930

@justinmc oh no I think I overlooked that you need the target's width as well. The leaderSize in LayerLink is not reliable in the layout phase unfortunately (but you may get away with using it for AutocompleteCore since the field always does layout before the results dropdown I thinkk?). Never mind the PR description then.

Waiting for the release to be cut.


TS root() isn't compatible with solidity root()

Solidity version returns 0 for an empty tree root but ts code will throw an exception:
https://github.com/privacy-scaling-explorations/zk-kit/blob/950dc5bd5f8f53069c12b56581ed63faa5382515/packages/imt.sol/contracts/internal/InternalLeanIMT.sol#L342-L343
https://github.com/privacy-scaling-explorations/zk-kit/blob/950dc5bd5f8f53069c12b56581ed63faa5382515/packages/imt/src/lean-imt/lean-imt.ts#L54-L55
To compensate for this difference, Semaphore has to do this check:
https://github.com/semaphore-protocol/semaphore/blob/a522fff4483e0409afbeb7ae85de24f4506c9ec0/packages/group/src/index.ts#L33-L35
Would be good to have this check in zk-kit instead of in semaphore.

@cedoor I'd like to have a shot at this too.
What looks as a trivial change at first, raises a few questions regarding the implementation of a solution.
Unlike in semaphore, zk-kit uses generics. While it provides flexibility, it means we can't make any assumption about N or what a possible 0 value is.
The only solution compatible with generic I could think about:

somehow "provide" the zero as a parameter  (value, getZero function etc...) to the constructor...
constructor(hash, leaves, zero: N) {
   this._zero = zero
}
get root() {
   return this._nodes[this.depth][0] ?? this._zero
}

Discarded ideas (won't work at all)

Type guarding/checking  root() {
      if (this._nodes[this.depth][0] !== undefined) {
         return this._nodes[this.depth][0];
     }
    if (typeof this._nodes[this.depth][0] === "bigint") {
         return BigInt(0) as N;
     }
     if (typeof this._nodes[this.depth][0] === "number") {
         return 0 as N;
     }
     // and then??
     // return undefined again if tree empty?!
   }

restrict the generic type instead. This impacts all the places where we use N generic param in the package. Probably not what we want.class LeanIMT<N extends bigint> {

root() {
  return this._nodes[this.depth][0] ?? BigInt(0)
}
}

Returning undefined sounds consistent with generics to me, and the simplest solution. Also, it sounds logically true: if there are no members in the three there's no root. In Solidity there's no undefined type ofc, so 0 looks like the best value.

I agree, let's close this issue. however, then does it make sense to return 0 in semaphore ts?

I agree, let's close this issue. however, then does it make sense to return 0 in semaphore ts?

Mmh although it looks inconsistent there are no generics there, and it's easier to know what type to use as 1 type only (bigints) is used. So it could make more sense there.

yup, makes sense.


disable free-nonheap-object check for TommyDS

debug: In file included from target-utils/third-party/tommyds/tommyds/tommyarray.h:43,
debug: from target-utils/third-party/tommyds/tommyds/tommyarray.c:28:
debug: target-utils/third-party/tommyds/tommyds/tommyarray.c: In function ‘tommy_array_done’:
debug: target-utils/third-party/tommyds/tommyds/tommytypes.h:102:20: error: ‘free’ called on pointer ‘*(void ***)((char *)array+ ivtmp*8)’ with nonzero offset [512,<PHONE_NUMBER>4] [-Werror=free-nonheap-object]
debug: 102 | #define tommy_free free
debug: /sde/pkgsrc/target-utils/third-party/tommyds/tommyds/tommyarray.c:54:17: note: in expansion of macro ‘tommy_free’
debug: 54 | tommy_free(&segment[((tommy_ptrdiff_t)1) << i]);
debug: | ^~~~~~~~~~


Add support for RV64E and LP64E

__riscv_64e is defined analogously to __riscv_32e.
Changing the meaning of __riscv_32e should not cause any problems since if we are just testing for existence of the E extension, there is __riscv_e preprocessor macro.

Current status is:

GCC exposes __riscv_32e if RVE is enabled (regardless which XLEN is in use). Afaik RVE is limited to rv32 in GCC at the moment, so this change won't break anything.
LLVM exposes __riscv_abi_rve if ABIName == "ilp32e" (see clang/lib/Basic/Targets/RISCV.cpp).

The referenced GCC patch looks good.
We probably want to have a equal behavior in GCC and LLVM (we could define __riscv_abi macros in GCC and define __riscv_*e macros in LLVM).
In general, I am fine with the change.

Additional changes:
Added LP64E ABI references to the definitions of __riscv_abi_rve and __riscv_float_abi_soft.

@cmuellner
Seems GCC also defines __riscv{,_float}_abi macros (cf. riscv_cpu_cpp_builtins function in gcc/config/riscv/riscv-c.cc).

The LLVM implementation (https://reviews.llvm.org/D70401) is the same as the proposal, so I will give a LGTM. Thanks! :-)

Are there patches for GCC available?

@cmuellner
My RFC PATCH submission:
https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633846.html
and corresponding commit:
https://github.com/a4lg/gcc/commit/72be4bc48fb0a1cdd15a99220fc951ab7aa00d30
I'll rebase against the latest master and make a ping, removing "RFC" status.

@kito-cheng: any objections to merging this?
The change here is straight-forward and we have patches.
The ABI side (https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/299) is not finalized, but I think this won't have an influence on this PR.

Since this proposal and my GCC patch set (with a bit of modification from RFC PATCH) are approved, GCC's RV64E/LP64E support is merged into its master/trunk.

The official GCC repository
https://github.com/a4lg/gcc/commit/006e90e13441c3716b40616282b200a0ef689376


Steam VR camera is Vibrating When moving camera in forward direction for too long distance.

Hi,
My environment is just straight road. FPS is good. Issue is -
When moving Camera Rig around 100000m in forward direction. Camera is vibrating bit even my headset is not moving.
Using Steam VR 1.16. version. Could you please help me on this.

This is a floating point precision error and not related to SteamVR.
You may want to consider using a Floating Origin or other approach in your engine to address these precision issues.


Handling JSON Module Compatibility in Transcrypt

Hi,
I've recently started working with Transcrypt, and I'd like to transpile my Python modules to JavaScript using this tool. However, I have some concerns that I'd like to address. I would greatly appreciate your assistance.
Firstly, as far as I've observed, it seems that the json module is not supported by Transcrypt. One solution that comes to mind is creating my own json module and adding it to the source modules, but this appears to be quite laborious. My Python code contains a json file, but since the open command is also not supported by Transcrypt, I've assigned the content of this file directly to a data_json variable.
However, I'm unsure about the approach I should take. For example, how can I convert it to a dictionary data type and access its key-value pairs? I've noticed that JSON.parse command is supported by Transcrypt, but it's not a valid command in Python. I want both my Python and JavaScript code to function correctly. What should I do in this regard? Could you provide some guidance?

You are correct in that the Python json library has not been ported to Transcrypt. However, for basic encoding and decoding, the built-in JavaScript JSON object can be used instead. So json.dumps() gets replaced by JSON.stringify() and json.loads() becomes JSON.parse()
I'll also usually add a stub class to my code that keeps Python linters from complaining when using the JavaScript version, similar to this:
# __pragma__ ('skip')
class JSON:
    parse = None
    stringify = None
# __pragma__ ('noskip')

The skip/noskip compiler directives tells the Transcrypt compiler to ignore the stub code since it is not needed once it gets converted to JavaScript.
To treat the json object as a Python dictionary, I pass it into the python dict() constructor, which adds the Python dictionary methods to the JavaScript object.
If you need your code to run both as Python and as JavaScript, it gets a little bit trickier. You can use the skip/noskip and ecom/noecom  directives to control individual parts of code execution in the different environments when necessary. Another possibility in this case, is that you can try mapping the JavaScript JSON methods to the corresponding Python json methods similar to that of the stub code above:
# __pragma__ ('skip')
import json

class JSON:
    @staticmethod
    def parse(json_string):
        return json.loads(json_string)

    @staticmethod
    def stringify(json_data):
        return json.dumps(json_data)

# __pragma__ ('noskip')

With this, you can use the JavaScript syntax in your Python code. If running in Python, it will use the mapped methods, and when running in JavaScript it will use the built-in JavaScript methods. (Note: I haven't actually used this particular mapping myself, but I think it should work)

I would like to thank you for your help and support, this information has been very beneficial


Map to list processor

Is your feature request related to a problem? Please describe.
As a user, I would like to have the ability to transform a map to a list, or flatten a list of maps to a list.
Example input:
{
  "mylist": [
    { "a": "b" },
    { "a": "c" },
    { "x": "y" },
  ]
}

Example output:
{
  "a": ["b", "c"],
  "x": ["y"]
}

Describe the solution you'd like
A new processor created to implement the above described functionality

@engechas , I'm a bit unsure how we have the first example to begin with.
"a": "b",
"a": "c",

There should be only one a in the incoming Event. How do we have multiple a keys?

You're right, the first one would not be possible. I've removed it

I have another use case for "map to list":
From:
{
  "my-map": {
    "key1": "value1",
    "key2": "value2",
    "key3": "value3"
  }
}

to:
{
  "my-list": [
    {
      "key": "key1",
      "value": "value1"
    },
    {
      "key": "key2",
      "value": "value2"
    },
    {
      "key": "key3",
      "value": "value3"
    }
  ]
}

This can be used when my-map contains a large number of fields to avoid mapping explosion in OpenSearch while keeping it easy to search.

If I can simplify the request a bit so that the objects in mylist all have same keys:
input:
{
  "mylist": [
    { "a": "b" },
    { "a": "c" },
    { "a": "y" },
  ]
}

output:
{
  "a": ["b", "c", "y"]
}

this could already help with the original user request (from an internal ticket) as well as #3963 and #3964
We can achieve this with a small change to the list_to_map processor:

Make key an optional config. When key is not specified, use value_key literally as the key in the result map.

The processor config for the above example would look like this:
  processor:
    - list_to_map:
        value_key: "a"
        source: "mylist"

@oeyh , The original ask in this issue is to get the key from the inner map and then combine the values together.
I do think this can be achieved by using the existing list_to_map processor. But, it seems we are looking for more of a dynamic target key. Maybe a boolean would be most appropriate?
- list_to_map:
    source: mylist
    use_source_key: true

@dlvenable My only concern with the above approach is that the behavior for value_key would change. value_key specifies the key to extract value; if not specified, we take the entire object as value (see #2410). We would get results like this:
{
  "a": [{ "a": "b" }, { "a": "c" }]
  "x": [{ "x": "y" }]
}

But we can probably add another boolean flag extract_value to go with use_source_key?
- list_to_map:
    source: mylist
    use_source_key: true
    extract_value: true


Feature: Weighted/ranked risk analysis

While the risk analysis dashboard is hugely useful, it takes an already knowledgeable person to be able to assess it. What I'd love to see is a each category (state validation, data availability, upgradeability, sequencer failure, validator failure) be given a weighted score for risk importance and then provide an overall score for each L2. This way users can interpret/compare the level of risk for an L2 without needing to be knowledgeable on all the technical details.
For example (values not meant to be accurate):

category
weight

state validation
5

data availability
2

upgradeability
3

sequencer failure
3

validator failure
5

state validation
weight

in development
0

fraud proofs.
0.5

zkproofs (sn)
0.9

zkproofs (st)
1

data availability
weight

external
0

onchain
1

upgradeability
weight

yes
0

<14 day delay
0.6

>= 14 day delay
0.8

no
1

sequencer failure
weight

no mechanism
0

forced exit
0.3

force trade/exit to 1
0.3

transact using L1
0.8

propose blocks
1

validator failure
weight

no mechanism
0

propose blocks
0.8

escape hatch
1

Calculations for Optimism

category
status
weighted value

state validation
in development
5 x 0 = 0

data availability
onchain
2 x 1 = 2

upgradeability
yes
3 x 0 = 0

sequencer failure
transact using L1
3 x 0.8 = 2.4

validator failure
no mechanism
5 x 0 = 0

total

4.4

Results
Max Score = (5 x 1) + (2 x 1) + (3 x 1) + (3 x 1) + (5 x 1) = 18
Optimism Score = 4.4
As a percentage this would be a risk score of 24.4%. This can be inverted to be more intuitive (higher score = higher risk), which would be a risk score of 75.6%.

I think you're gonna like what we are cooking here: https://gov.l2beat.com/t/rollup-maturity-ranking-proposal-call-for-final-feedback/119?u=krzkaczor

we evaluated a weighted risk as you proposed but we ultimately decided to support Stages as initially proposed by Vitalik. Check it out: https://medium.com/l2beat/introducing-stages-a-framework-to-evaluate-rollups-maturity-d290bb22befe


dismiss(id) BUG

Describe the bug
Hey, there seems to be a bug with the dismiss(toastId) method, I always get this error:

Reproduction
const toastId = toast('Success!');
toast.dismiss(toastId);
Logs
No response
System Info
-

Severity
blocking all usage of vuetify-sonner

Can you update to latest version and see if it fixes this?

Hi, there is an issue with the vue-sonner library. I have created a Pull Request with a solution, and it is awaiting review. Once a new version of the library is released, @wobsoriano will need to update it


[NCL-6346] Integrate PNC System version to UI

Good catch @DnsZhou, what would be the right approach to notify such remote parts of the app about the change?


syntree:0.1.0

I am submitting

[x] a new package
[ ] an update for a package

I have read and followed the submission guidelines and, in particular, I

[x] selected a name in conformance with the guidelines
[x] added a typst.toml file with all required keys
[x] added a README.md with documentation for my package
[x] have chosen a license and added a LICENSE file or linked one in my README.md
[x] ensured that my submission does not infringe upon the rights of a third party
[x] tested my package locally on my system and it worked
[x] named this PR as name:version of the submitted package
[x] agree that my package will not be removed without good reason

Description: this package can lay out textual trees, such as syntax/parse trees used by linguists. It also provides a wrapper to generate such trees from a concise DSL.
#tree("NP", tree("Det")[a], tree([N$'$], roof: true)[simple example])
#syntree("[NP [Det a] [^N$'$ simple example]]")

Thank you!


Enumeration-typed properties fail to roundtrip through NSCoding

In several places, we’re encoding enumeration-typed properties as integers but decoding them as their description strings (the same representation as in the JSON-formatted API response):
https://github.com/mapbox/MapboxDirections.swift/blob/6ec91148cced2b53d11505963f26c037ba6af054/MapboxDirections/MBVisualInstruction.swift#L115-L116
https://github.com/mapbox/MapboxDirections.swift/blob/6ec91148cced2b53d11505963f26c037ba6af054/MapboxDirections/MBVisualInstruction.swift#L95-L103
For consistency, so that roundtripping actually works, we need to encode the description of each of those properties:
https://github.com/mapbox/MapboxDirections.swift/blob/6ec91148cced2b53d11505963f26c037ba6af054/MapboxDirections/MBRouteStep.swift#L723-L725
We didn’t catch this issue in tests because the test fixtures are years out of date. The bug is in classes that were introduced more recently.
/ref #331
/cc @mapbox/navigation-ios

Adopting the Coding protocol instead of NSCoding would eliminate this entire class of issues, as well as the issues that were fixed in #331, and would relieve us of quite a bit of boilerplate code.


Unquoted paths and variables

In most places, flatpak2appdir uses unquoted paths and variables, e.g.,
cp -rf $locale/share/*  ${1}.AppDir/usr/share/locale

instead of
cp -rf "${locale}/share/"*  "${1}.AppDir/usr/share/locale"

Are missing quotes are causing e.g., XPS Office to fail?
Build log:
https://travis-ci.org/github/sudo-give-me-coffee/flatpak2appdir/jobs/664973306

I will add this

But these paths generally has no spaces, i will try WPS manually

WPS Office over Flatpak is outdated...

OK, then let's remove WPS Office for now from our tests. Still I think quoting is a good idea in bash. Do you know https://www.shellcheck.net/?

Related question, do you plan to keep this as a shell script forever or do you plan to go to a compiled language at some point, e.g., Golang?

No, i'm thinking to rewrite using lua

Done in https://github.com/sudo-give-me-coffee/flatpak2appdir/commit/66eed778232d68f894fa351b32a4c16a29f75f75


Fix outdated docs in sb stack cache

Since Item is bitpacked now, the full Item is stored in the cache.

LGTM but I will defer to @saethlin here.
@bors delegate=saethlin

:v: @saethlin can now approve this pull request

Now that the Miri docs are public, I think it's worth trying to conform to rustdoc a bit more. The current docs you're adjusting are a bit goofy when rendered: https://doc.rust-lang.org/nightly/nightly-rustc/miri/stacked_borrows/stack/index.html because there isn't a single sentence on its own at the top of the doc comment.
How about something like
/// A very small cache of searches of a borrow stack, mapping `Item`s to their position in said stack.
///

I dislike the of searches of but I can't come up with a better suggestion.

That does sound better, but I can't come up with anything better either.

@bors r+

:pushpin: Commit 8b643809ccd3f9e124ee0dcd2fd5cc10d4ec969a has been approved by saethlin
It is now in the queue for this repository.

:hourglass: Testing commit 8b643809ccd3f9e124ee0dcd2fd5cc10d4ec969a with merge 62efc6201bcf6d5fd665ce19747b3f06c0514883...

:sunny: Test successful - checks-actions
Approved by: saethlin
Pushing 62efc6201bcf6d5fd665ce19747b3f06c0514883 to master...


Are Investment costs of EV taken into account?

Including @ChaelKruip

Now that we have a slider in the ETM for the extra costs of EVs, this extra cost should be included in ETMoses as well. The 'investment_cost' attribute can be used for this.

This sounds like an additional imported attribute that needs to be taken into account in the business case calculation?

This sounds like an additional imported attribute that needs to be taken into account in the business case calculation?

Yes. You can use this gquery

What is the status of this @grdw?

@antw What would be a nice way to approach this? I'm thinking of creating a separate class called ElectricVehicleBuilder where build looks something like:
def build
  TechnologyBuilder.build('transport_car_using_electricity', {}).merge(investment_cost: gquery)
end

def gquery
  # do gquery
end

I'm thinking of creating a separate class called ElectricVehicleBuilder where the build-method looks something like:

I guess so, but does that imply that gquery is making an API call to ETEngine to get the data? It might become a problem when importing a new scenario if several technologies have to do this.
An alternative would be to have some sort of "manager" class which takes an array of "builders", determines what data the builders need to create their technologies, and then sends as few requests as possible to ETEngine. If there several technologies need to perform a Gquery, all the Gqueries can be made with one request. Something like:
class Import::Manager
  def initialize(builders, gquery_requestor)
    @builders = builders

    # gquery_requestor is some sort of class which knows the
    # ETEngine host and scenario ID, and how to get the Gqueries.
    @gquery_requestor = gquery_requestor
  end

  def technologies
    @builders.map do |builder|
      builder.build(data, gqueries)
    end
  end

  private

  def gqueries
    gquery_keys = @builders.flat_map(&:gqueries)
    # => ['gquery_one', 'gquery_two', 'gquery_three', ...]

    # Request all gqueries at the same time...
    @gquery_requestor.perform(gquery_keys)
  end
end

class ElectricVehicleBuilder < TechnologyBuilder
  def gqueries
    %w( electric_cars_additional_costs )
  end
end

I'm a bit alergic to the idea of defining these sorts of keys in code (in this case, references to Gqueries). It seems like they belong with the technology data, alongside the importable_attributes.
Instead of adding a separate EV builder class, maybe we can define the necessary Gqueries in the new technology YAML and make the feature more generic, and easier to reuse? importable_gqueries? I'm curious if you think that approach is viable.

I'm curious if you think that approach is viable.

Yes. However, there are already a few loose technology builders that do requests through gqueries. I'm looking at Buldings and Households. Maybe we can make the manager as such that it also moves those gquery calls into the Import::Manager.

@grdw what is the status of this?

Pending

@grdw what is the status of this?

I think @grdw has finished this.

Yes I did 😅


Populate target entries with scores from app scoresheets

Probably on a trigger, take all scoresheets for unlocked entries, and convert them to the tallied version that goes into an entry today, and add that to that entry and save. Skip locked entries

fixed in 2c1b65af29e813d1c32aa8840f8d77e6e28d60e6


Nested secrets in json format do not pass manifest test

I threw this quickly together to showcase an issue I encountered with json unmarshalling (that happens throughout the process of staging/decrypting secrets data); https://go.dev/play/p/PQG4LcePXbA
The demo shows that a straightforward json object structure of
{
  "container": {
    "key": "value"
  }
}

Is not properly parsed by the recurseSecretKey method when the target is a nested value ("container/key" in this case). The thrown error during build of sops-nix manifest derivation is of this form
manifest is not valid: secret test_container/test_secret in <XXX> is not valid: key 'test_container' does not refer to a dictionary

It looks like map[interface{}]interface{} specifically is the issue, where my intuitive expectation would be to test for map[**string**]interface{} like the type of 'currentData' just below.
The YAML format doesn't have this issue and passes the different type validations.

Seems like #454 is en route to fix this issue

nested secrets render to /run/secrets for me, but when used in a template the file that's made in /run/secrets-rendered the placeholder doesn't resolve to the value. if i rework my yaml to be a flat dictionary it works.