error parsing Swagger with external parameter references

Hi,
First, a general question: are parameter references in external Swagger files currently supported?
For example:
swagger.json:
"parameters"[
{
"$ref":"types.json#/parameters/ResourceGroupNameParameter"
}
]
...
types.json:
...
"ResourceGroupNameParameter": {
"name":"resourceGroupName",
"in":"path",
"required":true,
"type":"string"
...
}
I am using SwaggerDocument in a tool, which I'm trying to run on all the specifications in https://github.com/Azure/azure-rest-api-specs, and unfortunately about half of them use the above reference pattern.  I can attach a full example if needed, where SwaggerDocument.FromFileAsync() fails for an external reference to the above parameter because it has a "required" property, which does not match the expected schema.  Any help on getting this scenario to work would be greatly appreciated.
Thank you,
Marina

Last time i checked there were various issues with these azure specs (non conformant, edge casey refs etc) and it would take some time to fix this (must be fixed in NJsonSchema).

Thanks for the quick reply! I will do a bit more testing to see how many issues there are.  So far I've only run into two issues (the above issue and circular external references, the former I have no idea how to fix and the latter I was able to work around building on your change in https://github.com/RSuter/NJsonSchema/pull/761/commits/2fe19b35da2732668cb80df1879102119dbca144 - will post further questions in that repo).


Update command_line.py with scan_interval

Description:
At the moment, the scan interval of a command line sensor is a hardcoded 60 seconds, increased with the scan_interval value from the user's sensor configuration if the user defined it. This PR should just use the user defined scan_interval, if present.
Please take note that this is my very first PR so any feedback is welcome. I used this commit as a reference. I may also need some assistance to finalize this PR.
Known issue: the scan interval is limited to 60 seconds when the user defined scan_interval exceeds 60, see related issue #2499 => separate PR?
Related pull request in home-assistant.io with documentation (if applicable): fixes PR #2994
Example entry for configuration.yaml (if applicable):
- platform: command_line
  name: "Hombot Status"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'"
  scan_interval: 10
  value_template: "{{ value | capitalize() }}"

- platform: command_line
  name: "Hombot Battery"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'"
  unit_of_measurement: '%'
  scan_interval: 30

- platform: command_line
  name: "Hombot Last Clean"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'CLREC_LAST_CLEAN'"
#  scan_interval: 30
  value_template: >-
    {%- if value == "n/a" -%}
      n/a
    {%- else -%}
      {{ value.split('/')[2] }}/{{ value.split('/')[1] }}/{{ value.split('/')[0] }} {{ value.split('/')[3] }}:{{ value.split('/')[4] }}
    {%- endif -%}

- platform: command_line
  name: "Hombot finished ZZ"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_statistic.py 'NUM FINISH ZZ'"
  scan_interval: 120

- platform: command_line
  name: "Hombot finished SB"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_statistic.py 'NUM FINISH SB'"
  scan_interval: 60

- platform: command_line
  name: "Hombot finished SPOT"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_statistic.py 'NUM FINISH SPOT'"
  scan_interval: 60

Checklist:
If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Scan interval is already a supported option out of the box for every platform that is polled. See the documentation: https://home-assistant.io/topics/platform_options/#scan-interval

@balloob See PR #2994 for why this one was opened. In short: scan_interval doesn't seem to work correctly, when the user defines one the actual interval is whatever the user defined + 60 seconds.


Add custom error message when django_get_or_create is missing an input.

Ok, I couldn't figure out how to squash it, so just recreated the change after rewinding and resyncing with upstream.

Continuation of #290
LGTM, though I'm going ot hold off merging until @rbarrois looks at it as he's the Django point person.

Sure.  The underlying problem is trying to populate the Django get_or_create args, but when an initial value isn't provided, it just throws a KeyError -- so I just throw a more informative error message instead pointing to the root cause.

@rbarrois , alternatively key_fields[field] = kwargs.pop(field) could be changed to              key_fields[field] = kwargs.pop(field, None)
That's definitely more of a design decision there... because None could be a valid value in the Model.

@rrauenza This looks good :)
I'm merging it, but it would be great if you could add a small test checking that this works as expected: the amount of meta-programming inherent to factory_boy is known to cause unexpected behaviour :/

See https://github.com/rbarrois/factory_boy/issues/297


Floating vl3 fix

Main changes:

Fix link for the cmd-nse-vl3-vpp image
Add missed patch-vl3-ipam.yaml
Dynamic NSM_PREFIXSERVERURL
Use refs

Issue: https://github.com/networkservicemesh/deployments-k8s/issues/6345

I think we also should include this test in https://github.com/networkservicemesh/deployments-k8s/tree/main/examples/floating_interdomain#includes


mouse click document in IE then cursor position move to document start

mouse click document in IE then cursor position move to document start.
version is the newest version.
IE version is 11 in windows 8.

I can't reproduce this in the Demo.html file included with the project. Please provide further reproduction steps.


Error creating Application Customizer named 'Application customizer' using generator v1.3.4

Category

[ ] Question
[ ] Typo
[x] Bug
[ ] Additional article idea

Expected or Desired Behavior
Be able to create a project with Application Customizer.
Observed Behavior
When trying to bundle project with an Application Customizer named Application customizer created using generator v1.3.4 the following error occurs:
Error - Unknown
 JSON validation failed:
/Users/clippy/tmp/spfx_134_2/config/serve.json

Error: #/serveConfigurations (Specify a set of configurations that ...)
       Additional properties not allowed:

Steps to Reproduce

create new project for Online only
add Application Customizer
Use Application customizer as the name
gulp bundle
💥

@waldekmastykarz , thank you for reporting the issue. We are able to repro it and are trying to get it fixed quickly.


Rapid decline in bandwidth can cause retry loop when using range request timeout

Found in branch: master
Repro steps:

Configure player with a relatively short range request timeout, e.g. player.setRangeRequestTimeout(5000), to set a 5 second timeout
Start playback and wait until you are on a high, HD bitrate
Use a bandwidth throttling tool to simulate a low bandwidth, that is too slow to download the HD segments within the 5s timeout. We found dropping to a 1Mb connection was enough to cause this
This will cause every fragment request to timeout, which is retried by both shaka.util.AjaxRequest (3 times), and then continually in shaka.media.Stream, without the bitrate changing (as it is simply retrying the same URL). This will eventually exhaust the buffer, and you will enter a permanent buffer stall

So the core issue is that a timeout is treated in the same way as an error, but thinking about it, perhaps it should be treated slightly differently, as it's a signal that the selected bitrate could be too high for the users available bandwidth (it also could be an actual error, e.g. the users internet connection is dead). Whilst we could increase the timeout, having a reasonably short timeout is an advantage in avoiding a single, transient slow request from causing a buffer stall.
Do you think it would be feasible to drop the current bitrate in either AjaxRequest (probably not the right place for this) or Stream, when there is a timeout, so that each retry gets to download a smaller fragment, which will eventually be downloaded quickly enough to complete before the timeout?

That is interesting.  Architecturally, our intent is for all bitrate decisions to be made by the implementation of IAbrManager.  I don't see an obvious path for IAbrManager to get information about timeouts, though, and I don't think I want to add complexity to the basic built-in implementation (SimpleAbrManager).
But just to make sure we're operating from a good starting place, are you certain that the settings which trigger this scenario are sound?  Does your range-request timeout does not account for how long a segment is?  For example, if each segment is 10s of content, and you are maxing out the user's bandwidth with that representation, you can easily expect it to take close to 10s to download that segment.
What's worse, depending on how your content is encoded, in certain scenarios the player would download a range of multiple segments in one HTTP request.  So even with 5s segments, a 30s minBufferTime would require 6 to be downloaded at once on switch.  (FWIW, we're changing this in ongoing work on #51 right now.  Soon, there will be no more multi-segment requests.)
If you're sure your parameters make sense, I would recommend two things.  First, wait for the next patch to come through on #51, then retest and see how the system behaves.  Second, if the behavior is still poor, let's find a reasonable way to get timeout information to IAbrManager.  That way, your custom IAbrManager implementation could use timeouts as a signal to down-shift.

We selected a timeout value that is basically a fail-safe, more to catch out slow requests caused by CDN issues (so they can be retried quickly), rather than trying to match it too closely with the expected download times of our clients. Our segments are 2s long, our timeout 8 seconds, our top bitrate around 4.5mbps, so this means a user who is on the top bitrate will experience timeouts if their bandwidth drops to around 1.2mbps. So thinking about it, maybe we should make this a little longer, perhaps 10 seconds.
One alternative idea, if you want to avoid exposing IAbrManager to network issues - perhaps allow ABR manager to determine the buffer size, so that the buffer stops growing, and it's starting to get low (perhaps X% of the buffering goal), the ABR manager could drop down a bitrate(s) as a fail-safe to try avoid a rebuffer. I haven't thought this through completely, so there could very well be a reason why this is a bad idea.
One last thing, how hard do you think it would be to cancel XHR retries when the bitrate changes? Currently, even if ABR manager does switch bitrates, utill.AjaxRequest is still going to keep retrying, it will only be when those are exhausted and the retries in Stream.onUpdate fire, will the new bitrate be picked up. It's not necessarily a major problem, but might be nice to exist those retries earlier (should further reduce the chance of a rebuffer).
Thanks for your help on this, I'll wait until your #51 changes come up to see if all of this is still an issue, and we'll look at raising our timeout a little bit.

I definitely want IAbrManager to be able to select bitrates based on buffer fullness.  This could easily be done with a manager which holds a reference to the video element.
It could (conceivably) even ignore bandwidth estimates completely and only poll how far ahead of video.currentTime has been buffered according to video.buffered.  The fact that we don't clear the buffer (by default) or overwrite anything (at all after the next patch) means that AbrManager could change bitrates as often as it wants without impacting streaming much.
Frequent visual quality changes are arguably a bad user experience, but the point is that if your preferred ABR algorithm wants to make bitrate decisions all the time, we should enable you to try that and not interact badly with such an algorithm at the Stream level.
As for canceling XHR, that's no problem.  See shaka.util.AjaxRequest.prototype.abort() and shaka.media.SourceBufferManager.prototype.abort().  I believe calling this.sbm_.abort() in Stream.switch() would have the effect you want.

That sounds great, if we were able to implement a custom ABR manager that had access to the videoElement/SourceBuffers, we could implement a fix for the original issue by dropping to the lowest bitrate when the buffer is about to run dry. For us, dropping quality is better than rebuffering (well, less bad), but def agree that frequent bitrate changes are a bad user experience. And thanks for the tip about sbm.abort(), we'll take a look at that

In v1.4, the application would inject an IAbrManager as the fourth argument to new DashVideoSource().  At that point, you should have a video element available, so you could give the video element to the ABR manager in the manager's constructor.  If you want, you could also contribute the buffer-based AbrManager implementation to live along-side SimpleAbrManager (which may not be the best name once there's something to contrast it with).

v1.4.0 is out now.  Please let us know whether or not the new APIs resolve this issue for you.

@jonoward This issue has been stale for some time, so I'm going to assume that everything is copacetic with the new APIs we introduced in v1.4.x.  Please feel free to reopen this issue or start a new one if you need more than what what we discussed in this bug.


add logging to all MIAs

I added logging for the other attacks, you can test them in the notebooks by adding an import loging and than in a new call logging.basicConfig(level = logging.DEBUG)

I added logging for the other attacks, you can test them in the notebooks by adding an import loging and than in a new call logging.basicConfig(level = logging.DEBUG)

I think we can add these two things to the notebooks. I will do it tomorrow morning and add it to this PR, if noone else gets around to do it before.

Okay I removed the "@team1sprint5" after the "!pip3 install git+https://github.com/privML/privacy-evaluator", as a preparation for the final state of the software/notebooks. All of team1 should be aware by now how to run certain branches instead of the main one here.
I added two cells (one md, one code) right above the setup, because I coincidentally noticed, that the setup already returns some logging, if it is enabled beforehand.


Problems in compiling

Hi, when I try to compile linux kernel 5.10 with clang-15 and wllvm, an error occurs:
/tmp/vgettimeofday-0dc7a1.s: Assembler messages:
/tmp/vgettimeofday-0dc7a1.s:15: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:15: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:16: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:17: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:18: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:19: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:25: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:25: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:50: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:151: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:191: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:236: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:277: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:382: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:382: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:746: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:747: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:748: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:749: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:750: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:757: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:757: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1063: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1063: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1155: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:1162: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1162: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1295: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1295: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1324: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1324: Error: junk at end of line, first unrecognized character is `2'
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)

I want to know whether wllvm supports the compilation of linux kernel 5.10?
best wishes

If clang by itself compiles it, you have a chance. If clang doesn't compile it, no chance. I think clang's ability to compile the kernel was fleeting. But I'm not  that up to date. Try googling it.

you might also take a look at gllvm. We used that to build the kernel with the appropriate clang.
there is some information there I think.

same issue while compiling android kernel.

First find a version  of clang for which it compiles. Then I will offer advice.

First find a version  of clang for which it compiles. Then I will offer advice.


Adding repositories to settings.xml for maven build pods

This seems to be quite old. I am going to close it. Thanks!


Is there a prettier.eslintIntegration config

I would like my prettier to read all configs from my eslint. Is there a support for this issue. I haven't found in the doc.

Hi @wellyal,
Thanks for raising this question, vim-prettier is a wrapper for prettier and will support all prettier API.
The way we currently handle configuration is by passing to prettier itself the configuration file or where to find it, we do not read the config file.
For vim-prettier to start supporting .eslintintegration config files prettier itself will need to have support for it


openshift/v4_10_exp: re-enable file compression

https://github.com/openshift/machine-config-operator/pull/2820 adds file compression support to the MCO.  Allow it to be enabled in a config, either explicitly or automatically.
This reverts 023fdd41adbb and part of e29e373b4645 for 4.10.0-exp.

https://github.com/openshift/machine-config-operator/pull/2820 landed; moving out of draft.


Add guide for the data driven testing-hello service

Description:
Write a simple hello service and write tests based on data driven approach.

PR:
https://github.com/wso2/ballerina-integrator/pull/33


Bug/update api sync checks

Issue
https://gravitee.atlassian.net/browse/APIM-XXX
Description
A small description of what you did in that PR.
Additional context

📚  View the storybook of this branch here

closed and superseeded by https://github.com/gravitee-io/gravitee-api-management/pull/4726


Forgotten code in state.py

Hey, I saw your paper at ITSC. First of all, thank you for being transparent and making your code public. Not many GLOSA studies have posted their code online, so this is definitely very valuable. To me, it helps to understand the assumptions of simulation environments for GLOSA to further assess your approach's practicality for our real-world application (https://github.com/priobike)
Anyway, I found this dead/forgotten code that you may want to fix:
https://github.com/urbanAIthi/GLOSA_RL/blob/7e3cab7c21d60f7afa2251d9334a8a5fbe615efd/GLOSA_gym/state.py#L196

Hi,
thank you for your interest in our research.
Also thanks for pointing out the issue, we fixed the issue.
BR,
Jeremias


Add Cleartext.app v1.3.1

Adding a new cask

[x] Checked there aren’t open pull requests for the same cask.
[x] Checked there aren’t closed issues where that cask was already refused.
[x] When naming the cask, followed the token reference.
[x] Commit message includes cask’s name.
[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] brew cask install {{cask_file}} worked successfully.
[x] brew cask uninstall {{cask_file}} worked successfully.

Thank you for the contribution. It needed some fixes, so they were made in 1cabcbbf6ac6b2c1ea23920cbc388d108b11c0e3. Your contribution is still included (and still credited to you), with the appropriate modifications. Please feel free to ask about any of the changes.

@vitorgalvao your updates to the PR broke this. It the version should have been 1.31 instead of 1.3.1, changing the url to interpolate the version causes an error.

Will fix shortly.


Check the Reddit-example

https://code.tutsplus.com/tutorials/create-bookmarklets-the-right-way--net-18154

Also, check this one: https://gist.github.com/brunohq/52d73063540ffbf79a50d71601467870

Got it working, but need to figure out how the users can add the bookmarklet easily


Can't setup with my API KEY

When I try to setup the tool, I receive that error: Command 'GPT Coder: Setup GPT Coder' resulted in an error (Unknown cypher)

Hello Felipe, thank you for creating this issue.
Please confirm to me What's the version of the extension and your current OS.

I'm using the v1.0.8

Hey Felipe, I just released a new version 1.0.9 that should fix this issue for you.
Please let me know if it doesn't.
By the way, thank you for the review!


Roka - ImageGlass theme

Roka.zip

Uploaded to https://imageglass.org/theme/roka-39!
Thanks @WOOB4T


[improve][client] Remove JsonIgnore on ProducerConfigurationData.encryptionKeys

Motivation
encryptionKeys is public data (the name of the keys to use, not the keys themselves) so there's no reason to hide it.
And it's a Set<String> so it serializes/deserializes fine with Jackson.
Verifying this change

[ ] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes

[ ] Dependencies (add or upgrade a dependency)
[ ] The public API
[ ] The schema
[ ] The default values of configurations
[ ] The threading model
[ ] The binary protocol
[ ] The REST endpoints
[ ] The admin CLI options
[ ] Anything that affects deployment

Documentation

[ ] doc
[ ] doc-required
[x] doc-not-needed
[ ] doc-complete

Matching PR in forked repository
PR in forked repository: https://github.com/cbornet/pulsar/pull/8

Codecov Report

Merging #18351 (f9802e3) into master (a2c1534) will decrease coverage by 15.05%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master   #18351       +/-   ##
=============================================
- Coverage     51.47%   36.41%   -15.06%
+ Complexity     7410     1929     -5481
=============================================
  Files           405      208      -197
  Lines         44012    14380    -29632
  Branches       4517     1571     -2946
=============================================
- Hits          22656     5237    -17419
+ Misses        18935     8566    -10369
+ Partials       2421      577     -1844

Flag
Coverage Δ

unittests
36.41% <ø> (-15.06%)
:arrow_down:

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

Impacted Files
Coverage Δ

...ar/client/impl/conf/ProducerConfigurationData.java
84.70% <ø> (ø)

...service/schema/BookkeeperSchemaStorageFactory.java

.../org/apache/pulsar/client/impl/RawMessageImpl.java

...oker/loadbalance/LoadResourceQuotaUpdaterTask.java

...broker/service/persistent/DispatchRateLimiter.java

.../pulsar/broker/service/persistent/SystemTopic.java

...he/pulsar/proxy/util/CmdGenerateDocumentation.java

...ava/org/apache/pulsar/broker/admin/v2/Brokers.java

...a/org/apache/pulsar/broker/admin/v1/Functions.java

...va/org/apache/pulsar/broker/admin/v3/Packages.java

... and 604 more


"Uncaught Error: Unable to register extension "" as it is already registered." when bundled by webpack

See https://github.com/ericmorand/twing/issues/314 for explanation.
A test has to be added to ensure that a webpack bundle with "production" mode works out-of-the-box.

We won't fix that. Remove constructor.name usage is the right thing to do and it will be part of Twing 3. But fixing this won't be enough for webpack bundle to be usable because variable mangling prevents the usage of named arguments - and they are part of Twig specifications.
I'm more convinced than ever that mangling is a bad idea and should not be used at all, in any case.

hey @ericmorand
maybe we should ask the authors of terser (https://github.com/ericmorand/twing/issues/314#issuecomment-488594262) to support some magic comments to prevent variable name mangling for Twing defined functions?
I think I have seen such an feature-request somewhere in the last days but I can't find it again.

I think this won't be necessary.
I'm evaluating changing the API of filter and functions declaration for Twing@3 to force explicit declaration of the name of the parameters instead of relying on reflection. That would solve the issue with variable mangling and would also improve runtime performances at the cost of a more explicit filter and functions declaration - which is not a bad thing.
I'll test this in the next few days and if it works fine then we'll be able to say goodbye to mangling issues for good.

Just to clarify, that would not change twig syntax, obviously. Developers that want to provide custom filters and functions would be forced to also declare the name of the accepted parameters and their position. That's it. The more I think about it, the more I love this idea.


Expose functionality to estimate available fast-path liquidity in SDK

Right now, the UI and integrators have to estimate fast-path liquidity simply by querying the total router liquidity on each chain.
This doesn't actually work because that liquidity may be actively locked up in transfers and forcing users into a slow path flow when they expect a 4 minute transfer is very bad UX. This is currently a problem in the bridge UI as well.
We need to add support for figuring out how much fast-path liquidty is actually available for a given route.

Even if we start with largest router for now it's a good stopgap

80% solution: look at n largest routers and see if there's avail liq

I think what we should do here is create a new SDK function called checkRouterLiquidity(domain: string, asset: string)
This function should query all the routers through the routers_with_balances endpoint and apply our splitting logic (which can be updated as we optimize this).
The current logic is to have routers send sigs for amount, amount / 2 and amount / 4. So this function will have logic to see if at least 4 routers have 1/4 of the amount.

Also return time estimate of fast/slow path.

Keep open for calculateAmountReceived


macos fix: flip h-scroll to conventional direction

horizontal scroll in abstreet moves content in the opposite direction vs other apps on macos.
I'm not sure if the change is really this simple. It fixes things for me on macos, which has ubiquitous [natural scrolling], but maybe it breaks it for others.
Does this break things for you @dabreegster?
[1] Some terms:

[Reverse Scrolling]: Swipe fingers up on trackpad, magic mouse, scroll-wheel, content goes down, scrollbar goes up.
[Natural Scrolling]: Swipe fingers up on trackpad, magic mouse, scroll-wheel, content goes up, scrollbar goes down.

This makes things inconsistent on Linux. By default, reverse for vertical and natural for horizontal. If I flip the invert_scroll bit in settings, the opposite. Maybe we could detect Mac in event.rs and flip the bit there.
(Also, the description at https://docs.rs/winit/0.22.2/winit/event/enum.MouseScrollDelta.html is confusing to me)

Maybe we could detect Mac in event.rs and flip the bit there.

We could - but it seems like we shouldn't have to. I'm assuming there's either a bug in winit or a bug in how we're mapping their events.
@dabreegster - out of curiosity, are you using the x11 or the wayland backend for winit?
One thing I've noticed is that mac communicates scroll offset with a PixelDelta, while X11 always uses a LineDelta - wayland might use one or the other depending on some context I don't know enough about.

I'm using X11.
The PixelDelta thing has some good info here: https://github.com/dabreegster/abstreet/issues/95

Maybe we could detect Mac in event.rs and flip the bit there

Ok, this is ready for review. PTAL @dabreegster

Maybe we could detect Mac in event.rs and flip the bit there

Your instincts were correct - but this was a bug in winit, so I upstreamed it here: https://github.com/rust-windowing/winit/commit/e2cf2a5754f6ee51a37fbe6e1f8b5ff8bd98da49

Thanks for finding the root problem at https://github.com/rust-windowing/winit/pull/1696!


[otbn] Where should software targeting OTBN live?

Up to now, we do have two (and a half) software hierarchies: host, device, and boot_rom. With the introduction of OTBN, we have a third target with its own toolchain and software: the "otbn device".
We currently don't have production software, but we have started collecting example assembly code for OTBN (partial algorithms, see https://github.com/lowRISC/opentitan/commit/1047ba2fb548d120c82ac653c588218f505de39e), and we have produced a toolchain (assembler, disassembler, objdump) for it.
The question is: where should this software live? Maybe sw/otbn (with example code as we have it today in sw/otbn/examples, etc. mirroring the hierarchy in sw/device?
@gkelly @lenary

I'm happy with sw/otbn, with subdirectories lib, examples and tests for the moment.

Will boot_rom then have a dependency such as sw_otbn_lib_rsa_3072_verify_bin?
I think sw/otbn is ok, with the understanding that device targets will have otbn dependencies.

Yes, I agree cross-device dependencies will be needed, but I don't think that's a problem with this approach. #2936 covers more of the build system concerns.

SGTM

Seems like we do have agreement on where OTBN device code should live. Next: move it there.


drivers: mcux: fix compilation error for board without otrig

#57049 introduced channel chaining support for LPC55S69 which added new dt properties & made the dma driver dependant on those properties unconditionally, however, existing board that uses the same dma aren't updated accordingly and therefore building these board with the dma will lead to compilation errors.
This PR fixes the compilation error by checking if the dts of the target board has the required prop to declare and init those config structs, tested with:

west build -b mimxrt595_evk_cm33  tests/drivers/dma/loop_transfer
west build -b mimxrt595_evk_cm33  tests/drivers/dma/chan_blen_transfer
west build -b mimxrt685_evk_cm33  tests/drivers/dma/loop_transfer
west build -b mimxrt685_evk_cm33  tests/drivers/dma/chan_blen_transfer

⚠ However I'm not sure about the runtime.
See also https://github.com/zephyrproject-rtos/zephyr/issues/58376#issuecomment-1567706640
Fixes #58376

Closed in favor of #58431

Hello @ycsin, thank you for the pull request, however I have an alternate fix at #58431 that involves less code changes. Let me know if I am missing something

At some point I did try DT_INST_PROP_OR at L754 but I got compilation error and I thought that probably array cant have a size of 0, turns out 0 sized array actually works 🤯, I just needed to change L733 as well.
Closed in favor of #58431, it's a much cleaner fix

Yes, and this driver initializes that whole array to -1's anyways so that = {0} could be removed


Cannot have a property on a request called validate

Get a runtime failure because when we try to call the validate function on the Concerto object we are actually accessing the field.

Replicate with the following script ...
const ModelManager = require('@accordproject/concerto-core').ModelManager;
const Factory = require('@accordproject/concerto-core').Factory;
const Serializer = require('@accordproject/concerto-core').Serializer;

const modelManager = new ModelManager();
const concertoModel = `
namespace issue121

concept TestConcept {
  o String validate
}
`;

modelManager.addModelFile( concertoModel, 'file.cto');

const factory = new Factory(modelManager);
const resource = factory.newConcept('issue121', 'TestConcept');
// resource.validate = 'foo';

const serializer = new Serializer(factory, modelManager);
const plainJsObject = serializer.toJSON(resource);

console.log(JSON.stringify(plainJsObject, null, 2));

This produces the output:
/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:433
        throw new ValidationException(formatter({
        ^

ValidationException: Model violation in instance undefined field validate has value undefined (function) expected type String
    at Function.reportFieldTypeViolation (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:433:15)
    at ResourceValidator.checkItem (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:321:35)
    at ResourceValidator.visitField (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:223:22)
    at ResourceValidator.visit (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:79:25)
    at Field.accept (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/introspect/decorated.js:65:24)
    at ResourceValidator.visitClassDeclaration (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:176:26)
    at ResourceValidator.visit (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:75:25)
    at ConceptDeclaration.accept (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/introspect/decorated.js:65:24)
    at Serializer.toJSON (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer.js:109:30)
    at Object.<anonymous> (/Users/matt/dev/sbx/concerto-issue121/index.js:24:34)

Compare this to the output another required field with a missing value
/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:482
        throw new ValidationException(formatter({
        ^

ValidationException: Instance undefined missing required field foo
    at Function.reportMissingRequiredProperty (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:482:15)
    at ResourceValidator.visitClassDeclaration (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:180:39)
    at ResourceValidator.visit (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer/resourcevalidator.js:75:25)
    at ConceptDeclaration.accept (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/introspect/decorated.js:65:24)
    at Serializer.toJSON (/Users/matt/dev/sbx/concerto-issue121/node_modules/@accordproject/concerto-core/lib/serializer.js:109:30)
    at Object.<anonymous> (/Users/matt/dev/sbx/concerto-issue121/index.js:23:34)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

It appears that this is down to instances of the Typed class storing properties on the native object, https://github.com/accordproject/concerto/blob/f2d9942d1bda59797216468404d21e545d4d1e07/packages/concerto-core/lib/model/typed.js#L109
This means that all internal API methods for this class and its subtypes are reserved property names, e.g. accept, instanceOf, setPropertyValue, etc.
One solution would be to push field properties into a $values object on the resource. However, this means that we would need to change all client code that reads or writes resource properties programatically. For example,
resource.foo = "bar";
// becomes either
resource.$values.foo = "bar";
resource.setPropertyValue(foo, "bar");

Alternatively, we could add prefixes to all internal method names to reduce the likelihood of collisions. For example, ValidatedConcept.validate becomes ValidatedConcept._validate.
Any other ideas @dselman @jeromesimeon ?

Alternatively, we could add prefixes to all internal method names to reduce the likelihood of collisions. For example, ValidatedConcept.validate becomes ValidatedConcept._validate.

@mttrbrts Thanks for the reproducibility + analysis!
I think the easiest would be the last option with a twist: use a prefix which is not allowed in the Concerto syntax (I think $validate or '000validate' would do the trick).

This is now supported via the new Concerto API, merged into the release-1.0 branch.


Array documentation fix

May I ask a question? Why didn't you fix https://github.com/UPS-API/api-documentation/issues/3 with this PR too?

Hi, thanks for the question. We just linked the PR back to the associated issue but will leave the issue open for a few days to gather any feedback.


Update lv_btn.c

Allow NULL as parameter to lv_btn_set_styles for any style which is not to be changed.

Thank you!