Opentelemetry goes berserker mode

I had the taker and maker running locally locally over night. Now I get spammed with these errors.
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full
OpenTelemetry trace error occurred. cannot send span to the batch span processor because the channel is full

2 questions

What does this mean?
Can we use our tracing library to log those errors? Since they are not json we won't be able to parse our logs to json anymore.

cc @klochowicz / @Restioson

This is interesting. How long do the logs continue and does it ever stop? This error seems to be that the number of batches is piling up in the queue.

Can we use our tracing library to log those errors? Since they are not json we won't be able to parse our logs to json anymore.

We can change set_error_handler to make them print as JSON. I think that using tracing to log it could cause a circle of error -> log error -> error from logging error -> error -> ...

as for the error circle - wouldn't this be outside of any tracing span?

wouldn't this be outside of any tracing span

Perhaps, but I don't know if we can rely on knowing from where handle_error is called exactly.

I thought mere usage of tracing for logging doesn't automatically export data to the collector?

I think it will given that the collector is part of the tracing subscriber

https://github.com/open-telemetry/opentelemetry-rust/issues/549

wouldn't this be outside of any tracing span

Perhaps, but I don't know if we can rely on knowing from where handle_error is called exactly.

I thought mere usage of tracing for logging doesn't automatically export data to the collector?

I think it will given that the collector is part of the tracing subscriber

fair enough. let's just ensure the timestamps are encoded in the same way as when we're export other logs.

wouldn't this be outside of any tracing span

Perhaps, but I don't know if we can rely on knowing from where handle_error is called exactly.

I thought mere usage of tracing for logging doesn't automatically export data to the collector?

I think it will given that the collector is part of the tracing subscriber

I have tested this hypothesis locally; even when the collector channel is closed (during the shutdown), tracing logs from such a custom error handler still work as expected. I'll throw a PR in a sec.

I'm seeing these errors again on testnet.

The reason for this is that the agent is not able to keep up with the logs
ts=2022-07-19T00:50:58Z level=info caller=exporterhelper/queued_retry.go:218 msg="Exporting failed. Will retry the request after interval." component=traces traces_config=default kind=exporter name=otlp/0 error="rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 2114523 bytes" interval=8.688087835s
ts=2022-07-19T00:51:02Z level=error caller=exporterhelper/queued_retry_inmemory.go:109 msg="Exporting failed. No more retries left. Dropping data." component=traces traces_config=default kind=exporter name=otlp/0 error="max elapsed time expired rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 2084234 bytes" dropped_items=512
ts=2022-07-19T00:51:09Z level=info caller=exporterhelper/queued_retry.go:218 msg="Exporting failed. Will retry the request after interval." component=traces traces_config=default kind=exporter name=otlp/0 error="rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 2081270 bytes" interval=14.829523867s
ts=2022-07-19T00:51:13Z level=error caller=exporterhelper/queued_retry_inmemory.go:109 msg="Exporting failed. No more retries left. Dropping data." component=traces traces_config=default kind=exporter name=otlp/0 error="max elapsed time expired rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 2114808 bytes" dropped_items=512
ts=2022-07-19T00:51:20Z level=info caller=exporterhelper/queued_retry.go:218 msg="Exporting failed. Will retry the request after interval." component=traces traces_config=default kind=exporter name=otlp/0 error="rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 2558012 bytes" interval=13.571884121s
ts=2022-07-19T00:51:24Z level=error caller=exporterhelper/queued_retry_inmemory.go:109 msg="Exporting failed. No more retries left. Dropping data." component=traces traces_config=default kind=exporter name=otlp/0 error="max elapsed time expired rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 2081270 bytes" dropped_items=512
ts=2022-07-19T00:51:32Z level=info caller=exporterhelper/queued_retry.go:218 msg="Exporting failed. Will retry the request after interval." component=traces traces_config=default kind=exporter name=otlp/0 error="rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 3624990 bytes" interval=16.302738013s
ts=2022-07-19T00:51:49Z level=error caller=exporterhelper/queued_retry_inmemory.go:109 msg="Exporting failed. No more retries left. Dropping data." component=traces traces_config=default kind=exporter name=otlp/0 error="max elapsed time expired rpc error: code = ResourceExhausted desc = RATE_LIMITED: ingestion rate limit (166666 bytes) exceeded while adding 3624990 bytes" dropped_items=506

Can we change opentelementry to a polling mode which automatically drops un-polled spans after a few seconds?

Note: this is not a blocker for 0.5.0. If we can't solve this we just don't enable instrumentation on mainnet.

This is partially a symptom of another problem, which is that at some point logs get really spammy and we get ratelimited... I wonder what the underlying cause of that issue is?

[https://docs.rs/opentelemetry-otlp/latest/opentelemetry_otlp/](The docs of opentelemetry_otlp) says that we can configure the timeout - maybe this could help?

This is partially a symptom of another problem, which is that at some point logs get really spammy and we get ratelimited... I wonder what the underlying cause of that issue is?

How would the application behave if it can't send the trace to the collector?

I'm not sure - opentelemetry-otlp just notes that it is the "timeout to the collector". I asked already on the opentelemetry-rust gitter room about this, so I'll add this question too

I think we can close this.


Add a style file for Cryptol

To satisfy #10.

@AssemblyZig I think you missed the big STOPPED sign that designated where we last stopped when churning the Haskell style guide into Cryptol.

@jpziegler Ready for review!


use consistent (c) for copyright symbol

Looks like vscode also removed some trailing whitespace
Fix https://github.com/PowerShell/PowerShell/issues/4917

https://github.com/PowerShell/PowerShell/pull/5210/files?w=1 can be use to hide the whitespace only changes.

@iSazonov I think I got all of them.

Well, this turned out to be a much bigger set of changes than originally anticipated, but @iSazonov I appreciate your attention to detail.  I think I got them all and reviewed them with https://github.com/PowerShell/PowerShell/pull/5210/files?w=1

@SteveL-MSFT Many thanks that now we have nice copyright strings!
Please clarify (it seems I already asked):

We have Microsoft Copyright in most files and MIT for the Repo - is there a conflict? CoreFX has MIT copyright in all files and Repo. We have both  Microsoft Copyright and MIT in LICENSE.txt and MIT in README.md.
What copyright should we add in new files or shouldn't?

@iSazonov

let me follow-up on that, but I don't think the copyright notice is really necessary
my understanding is that we really don't need to add it to new files


Icon not not loaded on Android App

  "dependencies": {
    "@remobile/react-native-splashscreen": "^1.0.3",
    "alt": "^0.18.4",
    "native-base": "^0.3.1",
    "react": "^0.14.8",
    "react-native": "^0.25.1",
    "react-native-action-button": "^1.1.5",
    "react-native-android-statusbar": "^0.1.2",
    "react-native-icons": "^0.7.1",
    "react-native-material-design": "https://github.com/react-native-material-design/react-native-material-design-styles.git",
    "react-native-material-design-styles": "^0.2.6",
    "react-native-navigation-bar": "^0.1.10",
    "react-native-scrollable-tab-view": "^0.4.3",
    "react-native-vector-icons": "^2.0.3"
  },

you have to rnpm link (that will link all dependencies, including this library)
otherwise if you only want a particular one, you can rnpm link <name>

@281330 Thanks for reply, I am new on React-native. I need to do (Android)[https://github.com/oblador/react-native-vector-icons#android] all setting.

@281330 thanks

I'm having this issue as well.  RN 0.28, and react-native-vector-icons 2.0.1
Workings on iOS.  I ran rnpm link and get the following output but I still get the X like the OP.  Screenshot below.
$ rnpm link react-native-vector-icons
rnpm-link info Android module react-native-vector-icons is already linked
rnpm-link info Linking react-native-vector-icons ios dependency
rnpm-link info iOS module react-native-vector-icons has been successfully linked
rnpm-link info Linking assets to ios project
rnpm-link WARN ERRGROUP Group 'Resources' does not exist in your XCode project. We have created it automatically for you.
rnpm-link info Linking assets to android project
rnpm-link info Assets has been successfully linked to your project

I also tried the troubleshooting instructions below to no avail...

I'm using this library on android through native-base. Initially, icons were displaying properly. Then all of a sudden they stopped displaying properly, perhaps because I renamed one of the font files.
I've attempted to fix this issue by removing the entire android/app/src/main/assets/fonts directory, and uninstalling and re-installing both native-base and this library. But the icons are still not displaying properly.
Please advise. Are there other ways to troubleshoot? Is there an asset cache somewhere that needs to be cleared? Thank you for your time.

Update: I thought the problem only applied to my project's directories, so I created an entirely new react-native application from scratch, created a new Android Virtual Device, and installed native-base and peer dependencies, but the icons are still not displaying properly.
I'm confused by this result. Please advise.

Renaming font files will break stuff (if not done carefully on ios and always on android). Since I'm not a maintainer of rnpm/native-base I cannot support nor debug it, I suggest using the manual integration instead if it's giving you troubles. If you're still unsuccessful, please post a minimal instructions to reproduce it or post a ticket with rnpm/native-base.

Thanks @oblador for information about your experience with renaming font files and your suggestion to try installing the fonts using a different methodology besides rnpm.
I tried the manual strategy and it works. :-)
In case anyone is interested, full reproduction instructions are here.

@s2t2 - I noticed in the link you provide that you did not put apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" in your android/app/build.gradle
I am a complete noob when it comes to Android.... so not sure if that's required or not.  Either way (with our without the apply) it's still not working for me.

@rgoldiez: that's only required when going the gradle script approach. Marked that as the recommended way for android now.

@oblador - I'm a little stuck on the android side (no issue w/ iOS, been using this repo for months w/ iOS)... I've pasted my directory structure, build.gradle, settings.gradle, and MainActivity.java just below.  Does anything stand out?  I'm bringing in the fonts this way: var FontAwesome = require('react-native-vector-icons/FontAwesome');

Somehow, someway, doing react-native run-android made the icons work!?  I had been running from Android Studio.

Even I faced the same issue. I tried restarting whole application and it worked.
Try:
react-native run-android
This will actually download some packages for  react-native-vector-icons while building up, then npm start .

Thanks @oblador

another way:
if you ues android studio, do copy fonts to android/app/assets install of android/app/src/main/assets.
link
post

I am using FontAwesome, but Android still have [X] Icon. I import FontAwesome, { Icons } from 'react-native-fontawesome'; and my code is   <FontAwesome style={{fontSize: 20, color: "white"}}>{Icons.envelope}, but not working. Give me the way to troubleshoot :((

When I upgraded native-base from 2.13.13 to 2.15.2, this issue happened, I follow below steps to resolve it:

edit android/app/build.gradle file, add below content:

project.ext.vectoricons = [
    iconFontNames: [ 'FontAwesome.ttf', 'AntDesign.ttf' ]
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

copy above font files from node_modules/react-native-vector-icon/Fonts to android/app/src/main/assets/fonts/
react-native run-android

When I upgraded native-base from 2.13.13 to 2.15.2, this issue happened, I follow below steps to resolve it:

edit android/app/build.gradle file, add below content:

project.ext.vectoricons = [
    iconFontNames: [ 'FontAwesome.ttf', 'AntDesign.ttf' ]
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

copy above font files from node_modules/react-native-vector-icon/Fonts to android/app/src/main/assets/fonts/
react-native run-android


Support using the target + lib options to resolve d.ts per playground session

I was trying to help someone with a problem using Object.entries but the playground didn't think it existed. The options panel is great, but doesn't offer a way to specify the lib option. This is a fairly troublesome issue when trying to help people with their modern, up-to-date code.

Perhaps a short-term easy fix would be to default to the latest libs?

Eventually, being able to specify libs (or even a full tsconfig.json as suggested in #4) would probably be best.

@orta - The original issue on orta/typescript-play had much more context and other suggestions as well. I didn't think to capture a copy of it, and now the Issues tab is turned off there and I can't get to the old issue anymore. Could you turn them on long enough to copy the entire issue, please?

I've added the extra paragraph from your original post 👍

This got update to ES2015 - so for now I'll close it

I've been using this as the catch-all for grabbing the right lib files for the TS Playground - so we'll keep it here

What about stuff like Array.prototype.includes ?

That's what this issue is about - I shipped a deploy change which makes the nightly builds use the ESNext build last week, so you can test out what it will be like for 4.0 here: https://www.staging-typescript.org/play?ts=next

@orta wow, this looks awesome! thanks a lot!

https://github.com/microsoft/monaco-typescript/pull/64 - will unlock this feature

use Object.fromEntries()
setting: "lib": ["ES2019"]

use Object.fromEntries()
setting: "lib": ["ES2019"]

@orta I don't see the lib option in TSConfig options tab, was this added or what is the resolution for this issue?

You can use twoslash notation to define your own lib: // @lib: ["thing", "other"]  - I'm not sure if I'll ever give it a UI

For anyone arriving here looking for how to enable this like me, I was not able to use the notation mentioned above like:
// @lib: ["thing", "other"]
I tried several variations and other settings changed before bothering to look into some of the other tickets in which this was mentioned.
To potentially save someone a few minutes, the way I was able to get to to work with the following:
/// <reference lib="es2015" />
/// <reference lib="dom" />


refactor: currency model imports

Building Leather at commit 0dd5f99

I made changes in the models pkg that need to be updated here.

I also had to add two resolutions here for security audit failtures ...again with storybook addons.

It appears the failing send btc tests are hitting this...
https://github.com/leather-io/extension/blob/36a84dc5ea72044b918ea2ab20fdd26809580935/src/app/pages/send/send-crypto-asset-form/form/btc/btc-send-form.tsx#L116
When I try to send btc on testnet, I'm getting a wrong insufficient balance error...

cc @alter-eggo

I also had to add two resolutions here for security audit failtures ...again with storybook addons.

Thanks @fbwoolf . I had to add some resolutions for storybook lately too. Maybe we can consider getting rid of storybook in the extension now and just using it in the UI libs?


Remove automatic mapping of version column (optimistic locking)

I think that the mysql driver is not compatible with Go 1.1, which is why Travis is failing.

I would actually be in favor of only supporting the last 2 minor releases, so 1.3.x and 1.4.x.
Maybe we should open an issue for this to poll support?

Sure, sounds good. I'm not sure about the format, so could you create the poll?
Do you think that this PR should just be merged and then we can update .travis.yml when we agree on what versions to support?

Well if we merge this, then all other builds will fail and we'll have to manually inspect what fails.
So I'd rather see the travis config updated first to fix the build. I think we can drop support for 1.1 right now, and I'll open a poll issue about the policy.

I have updated travis to only support the last 2 minor releases. When the poll is finished it should be ready to be merged.

I've changed the .travis.yml already in a different PR to do 1.2 (best effort), 1.3 and 1.4.
I think this PR needs a rebase and squash, it's a bit dirty with all the merge commits.

I think that all should be good now. First time squashing and rebasing though. Please let me know if anything could be done in a better way.

Yes, lets merge it in when build succeeds :smile:
What do you think about adding this functionality as a struct tag option too?
I think it's good to have a consistent user experience to alter dbmapping options such as primary key and autoincrement and version..

That would be a very good idea! I can maybe take a look at it later today or tomorrow :smiley:


In latest commit swaybar does not appear

Distro: arch linux both a 32 and a 64 machine have the same issue (intel gfx on latest software)
Yesterday it worked now does not and i am really confused. Interestingly, this happened after upgrading the kernel. Will try an older version and edit in a few seconds. Compiled and tried both sway and sway-git aur packages to no effect.
sway -V complains about wlc not being able to open x11 display and being unable to terminate swaybar (when i kill sway)
Will try to downgrade wlc

It works for me on an up-to-date Arch Linux x64 (testing) with
wlc-git r910.5deece7-1 (== v0.0.1-9-g5deece7)
sway-git r1441.0d4c31e-1 (== 0.3-13-g0d4c31e)
Do you have some autostart exec commands in your sway config?

Works for me, too. Post sway debug log.

And config file

well sway does not write anything when i issue sway -V -d > txt :/ . Here is my config file
config.txt

The log is printed to stderr. See the FAQ for how to save logs correctly.

will do and sorry, missed that part of the faq

logs:
sway.txt

[config.c:720] Invoking swaybar for bar id 'bar-0'
[layout.c:58] Adding 0x22aeba0 (1, 1024.000000x600.000000) to 0x634440 (0, 0.000000x0.000000)
(snip)
[main.c:43] [wlc] Added output (1)
[main.c:43] [wlc] become active
[main.c:49] Using output 0 of 1
ERROR: Unable to connect to
(snip)
[handlers.c:727] Compositor is ready, executing cmds in queue

I'm guessing the ERROR there is swaybar output. Maybe this would be fixed if we didn't invoke swaybar until after the compositor is ready?

Do you get a wallpaper, @nicman23?

yes

huh there is no SWAYSOCK in my env and find /run/user/1000/ -name 'sway*' has no results

also i3bar -- crashes with invalid pointer.

sorry misclick

sigh made a temporary user and it worked. Then with the original user i run bash (was using zsh) and sway and it worked and of course works with zsh (having changed nothing) ....
Testing now on a second pc with the same problem (what even - i cant)

Well this was a massive waste of time for everyone.... Turns out i had an line in my zshrc that read
export SWAYSOCK=/run/user/1000/ -name 'sway*'
which of course did not do anything if sway was not up
the line was for controlling sway from other ttys / ssh. It appears that sway did not like it.
I was running with this line for some days now without any problems, as to why it appeared now, i do not know.


[BUG] Create output folders if they don't exist

From error FileNotFoundError: [Errno 2] No such file or directory: 'output/2022-10-18-2022-10-18-prompts-standard/gpu_1'

Please paste the entire error chain - I haven't seen this one unless unless interrupting execution with ctrl+c/ctrl+break.

Exception in thread Thread-16:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "dream-factory.py", line 143, in run
    new_files = os.listdir(samples_dir)
FileNotFoundError: [Errno 2] No such file or directory: 'output/2022-10-20-2022-10-18-prompts-standard/gpu_4'

Can you provide more context? It looks like you have at least 5 GPUs running - are you on Windows or Linux? Does this problem always occur, or does it run fine for awhile and then you randomly see this happen?
Can you paste the entirety of your log, from startup to where the error occurs if this always occurs? If it's intermittent, can you paste the your log from the beginning to where the first job starts (including every after "starting job #1:")?
If you watch the output/2022-10-20-2022-10-18-prompts-standard directory while Dream Factory is running and working on a prompt file, do you see gpu_0, gpu_1, gpu_2, etc sub-directories being created as your GPUs works on images?

I had the same error message when my input image was mistakenly saved as a .tif file instead of a .jpg - change to .jpg solved the problem.


[FEATURE] Check if default StorageClass is defined

Is your feature request related to a problem? Please describe.
When no default StorageClass is defined, the deployment fails
Describe the solution you'd like
Specify in the Doc that a default StorageClass must be set.
Annotation:
storageclass.kubernetes.io/is-default-class
And if possible check in the deployment script:
SC_RESOLVE=$(oc get sc 2>&1)

if [[ $SC_RESOLVE =~ (default) ]];
then
  echo "    OK: Default Storage Class defined"
else
  echo "    ERROR: No default Storage Class defined."
  echo "         Define Annotation: storageclass.kubernetes.io/is-default-class=true"
  echo "         Aborting."
  exit 1
fi

This has now been added to the start.sh script in master... closing this issue.


Add face alignment model class for android.

Fixes #441

I merged PR #456, and now this code will be broken if merged to the master branch, sorry( So, now sync with the master required

No problem, it's an easy rebase.


Invalid OAuth2 redirect_uri

Nothing changed from the dashboard.js file, and my config.js looks like this:
protect: "true"
domain: "dull-tern.glitch.me"
My Auth Url https://discordapp.com/oauth2/authorize?response_type=code&redirect_uri=https%3A%2F%2Fdull-term.glitch.me%2Fcallback&scope=identify guilds&client_id=659872929533657108

Closing this issue due to no reply.

Waitttt

If you are still experiencing the issue, and can provide the requested information, I'll help you fix it.


Added files

@nareshcloud Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


Fix: Oracle Inversion

Adds logic to calculate the inverted oracle (i.e. A/B and B/A) separately and a storage migration that seeds it with the inversion of the current price.
Description

Related Issue

Motivation and Context

A simple example illustrating the non-commutability of division and addition/why we don't want to just invert the aggregated oracle price the same way we do with a spot price:
suppose the smoothing factor is 0.5
block 1: spot price is 2, inverse price is 0.5
EMA after block1: EMA = 2,     EMA_inverse = 0.5
block 2: spot price is 4, inverse spot price is 0.25
EMA = 2 * (1- 0.5) + 4 * 0.5 = 3
EMA_inverse = 0.5 (1 - 0.5) + 0.25 0.5 = 0.375
EMA =/= 1/EMA_inverse
How Has This Been Tested?

Checklist:

[x] I have updated the documentation if necessary.
[ ] I have added tests to cover my changes, regression test if fixing an issue.
[x] This is a breaking change.

The troubles induced by having 2 oracles per pair are greater than the issues with the inaccuracy, closing.


WFLY-9408 - get rid of any getMbeanCount() calls when eclipselink does during its getMbeanServer() API

…s its logging on the getMbeanServer() api of the WildflyServerPlatform. this has a huge performance cost.

Can one of the admins verify this patch?

Something seems to have gone wrong with your branch, you have a load of additional commits in here.

I'm closing this as it has conflicts and looks like the commits aren't quite right.


SCM: Active provider change event does not fire

VSCode Version: Code - Insiders 1.11.0-insider (6ae8c1506669fd579da1da92108b7db86d019bc6, 2017-03-29T08:21:59.122Z)
OS Version: Linux x64 3.13.0-108-generic
Extensions: none

Testing #23311
The event doesn't fire when I switch providers:
vscode.scm.onDidChangeActiveProvider(provider => {
    vscode.window.showInformationMessage(`Switched to: ${provider.label}`);
});

Good catch!

Removed this event altogether.


Populate library by importing from Steam

Attempting to get all played games from steam by fet hing them via its api might be worth a shot

This is possible in theory, however the user would have to log into their account.
Logins are not supposed to be present anywhere in this app.
Using an API-Key is also possible, however these are linked to a single Steam-Account and can only request data from that account.
So there is no way for this to scale nicely.


Fixing tests for node 0.10.33 and fixed "Host" request header

more details in commit messages

@keithduncan, @technicalpickles, @technoweenie can anyone comment on this PR? I really need proper Host header support.

This looks good :+1: along with the change to setting the protocol to https: so that the HTTPS module is used correctly, if you fix up the indentations I’ll merge this and do a bugfix release

All done.

@woledzki this is released as v0.10.3


Wrap lock and application and use it when persisting data

Replaces #3927

Great!
A few things:
. I think the lock() method should return a LockedApplication. We don't really ever need the lock on its own. That means LockedApplication should be autocloseable, which is good too (it should also set its own application instance to null when closed).

I don't think the reader methods should be moved to LockedApplication because then we have to lock to read things. I suggest that LockedApplication has a get() which returns the Application inside it instead.

This is quite large and already much better than it were so if you prefer we can merge (after mergestop left) and work more on it later.

@jonmv fyi

You'd have to do something like this:
try (LockedApplication app = controller().applications().lock("id")) {
LockedApplication updated = app.withProjectId(42);
controller().applications().store(updated);
}
but that makes it too easy to incorrectly call store(app) in my opinion.

Good point, I didn't think of that. I'm still not sure it isn't the better tradeoff anyway though.
You example reads much better as just
try (LockedApplication app = controller().applications().lock("id")) {
  controller().applications().store(app.withProjectId(42));
}

That doesn't always work, but using a nested method for more complex cases does.
But now that I think about it I think it may just be totally wrong for LockedApplication to be immutable.
I suggest merging this and then we can try some things later on.

With @bratseth's comments, this is very much what I thought about initially.
I also implemented my suggestions with recursive with-building and keeping track of changes, so store fetches a fresh application and replays the changes on it, and then stores it; this removes the need for explicit locking, as long as you accept concurrent modifications (and still leaves the option to lock, of course). I think it also makes it harder to use the API wrong — however, the recursive with stuff got just a tiny bit esoteric, and I still have to come up with a good solution to prevent applying the same changes several times (if store is called multiple times with the same application), which is a problem unless all modifications are idempotent — hardly a sound assumption to make.
So, while I think the solution is interesting, I don't think we should use it ... even though is makes for less code than what we have now ;)

I think the solution in this here PR is a solid improvement; I also think we should establish a pattern of putting all the required .with-s in LockedApplication, to make it harder to do something wrong (by passing a stale DeploymentJobs, or whatever, to the fresh LockedApplication). It's not just for convencience.


Actually use UTF-8

I've noticed that the code uses narrow character and string literals while the protocol requires UTF-8. This makes this library unusable on z/OS which uses EBCDIC for narrow literals. In order to actually use UTF-8 literals you need to start them with u8. This returns char since C++11 and char8_t since C++20.

ah, right I'd forgotten/ignored non-ascii collating (for the does-this-need-quoting pieces).  I was also making an implicit assumption that the two ends used the same char set (for the message comparison pieces), which I guess wouldn't be true for cross-compiling. I'm unfamiliar with how ebcdic/utf8 interact -- I had thought that ebcdic  happened to also use 7-bits, so the utf8 bit-8 scheme also worked there without changing the underlying char encoding.  IIUC you're saying u8'a' is 0x61, regardless.  Is that right? so UTF8 is both (a) a specific mapping between characters and integers and (b) an encoding of those integers into 8bit octets?

IIUC you're saying u8'a' is 0x61, regardless. Is that right? so UTF8 is both (a) a specific mapping between characters and integers and (b) an encoding of those integers into 8bit octets?

There is a very deep rabbit hole when we start talking about "source character set" and "source character encoding" which is a very hot topic in SG16 right now. So, since I assume that the source code of your library is in ASCII or UTF-8, we can sidestep it and trivialize many things, so let's assume that the source code is written in UTF-8 and consumed by compiler as UTF-8.
Then two things are certain:
auto a = 'a';
std::cout << static_cast<int>(a) << '\n'; // implementation-defined

auto b = u8'a';
std::cout << static_cast<int>(b) << '\n'; // always 97 (0x61)

At least as of right now, there is an understanding that char literals are converted to "execution character set" regardless of what character set/encoding the source file is written in. On z/OS the default execution character set is EBCDIC so in our case the compiler will consume UTF-8 source file as UTF-8 (this may require passing explicit compiler flags in reality), do phases of translation (this includes conversion of the source code to "internal compiler encoding used during translation"), will see literal 'a' and manually convert it from "internal compiler encoding used during translation" to EBCDIC. The literal u8'a' will be treated differently but the integer value will always be 97 in the end.
The standardese will mostly likely change wildly in C++23 but the basic principle will stay the same.

Ah great, thanks for clarifying -- whenever I google this the results say 'you don't have to care about EBCDIC anymore', if they mention it at all!

You are correct, I forgot about that. Yeah, it's a shame that this requires more tricks with literals to get sane code.


Investigate excessive p2p reconnects seen in the wild

Unclear if it was only a problem in that deployment or a general one.

#4250 could be related


Add bundle prepare

Encodes apb.yml in current directory as b64
Writes b64 contents into existing label on Dockerfile
Attempts to write same format as legacy python apb tool (produces no changes in git for APB examples I've tried)

Addresses https://github.com/automationbroker/sbcli/pull/62

@jmrodri pushed updates in response to comments

[dymurray@dymurray foo2]$ sbcli bundle prepare
ERRO Didn't find expected bundle label in container metadata file
ERRO Failed to add [apb.yml] contents to [Dockerfile]

[dymurray@dymurray foo2]$ cat Dockerfile
FROM ansibleplaybookbundle/apb-base

LABEL "com.redhat.bundle.spec"=\

COPY playbooks /opt/apb/actions
COPY roles /opt/ansible/roles
RUN chmod -R g=u /opt/{ansible,apb}
USER apb

[dymurray@dymurray constellations]$ ansible-galaxy init --type apb foo4-apb
- foo4-apb was created successfully
[dymurray@dymurray constellations]$ cd foo4-apb/
[dymurray@dymurray foo4-apb]$ ls
apb.yml   Dockerfile  handlers  meta       README.md  templates  vars
defaults  files       Makefile  playbooks  tasks      tests
[dymurray@dymurray foo4-apb]$ cat Dockerfile
FROM ansibleplaybookbundle/apb-base

LABEL "com.redhat.apb.spec"=\

COPY playbooks /opt/apb/actions
COPY . /opt/ansible/roles/foo4-apb
RUN chmod -R g=u /opt/{ansible,apb}
USER apb[dymurray@dymurray foo4-apb]$ sbcli bundle prepare
ERRO Didn't find expected bundle label in container metadata file
ERRO Failed to add [apb.yml] contents to [Dockerfile]

@dymurray @jmrodri it's worth noting that the Dockerfiles generated by apb init and ansible-galaxy init --type apb are invalid. They have a malformed LABEL line for the b64 apb spec, and trying to run docker build without making modifications will fail. This is why the regex currently fails in these scenarios.
That being said, it still makes sense to me to support the format that currently comes out of these tools for backwards-compatibility sake, but I am thinking of submitting PRs to make the initial Dockerfile from apb and galaxy valid.

@dymurray added a handler for the format provided by apb init and galaxy init

I'm going to look at reworking this a little bit to use a slice insert instead of building new slices when I want to make changes.

[dymurray@dymurray minipos-apb]$ sbcli bundle prepare
Wrote b64 encoded [apb.yml] to [Dockerfile]


Marco Polo Minigame

Based off a traumatic event from my childhood, strap C4 to all players and designate 1-3 players as the seekers and blindfold them, give them a one-shot weapon and whenever they say "MARCO" all players have to say "POLO" or the C4 explodes

It should just say polo automatically wtf

It should just say polo automatically wtf

it's funny if people forget to say polo and they explode


missing condition type '6' (required sphere category) in extra skill parser

https://github.com/Deathmax/bfdb/blob/personal-work/parsers/common/passives.py#L648
it should be elif splits[0] == '5' or splits[0] == '6':
    "21300": {
        "desc": "30% boost to Atk, Def & Rec, max HP when \"Thief's Jewel\" or a \"Drop-Type\" Sphere is equipped, considerably raises normal hit amount & hugely boosts BB gauge each turn",
        "effects": [
            {
                "atk% buff": 30,
                "conditions": [
                    {
                        "item required": [
                            "47211"
                        ]
                    },
                    {
                        "unknown": "6,3"
                    }
                ],

Thanks for the report.


Update dependencies so yofi builds with the latest Rust

Rust 1.80.0 introduced a regression that prevents older versions of the Time package from compiling (https://github.com/rust-lang/rust/issues/127343). I noticed this because yofi wouldn't build after a nixos update so I created this PR that updates dependencies and fixes building.
I would like if you could do a patch release so the package can be updated in nixpkgs.

Thanks!

@FriederHannenheim Thanks for this. Seems like you have updated the whole deps in this, which should be alright if the author is cool with it. Ill update the package in nixpkgs soon.

I did https://github.com/l4l/yofi/pull/173 earlier but was not showing up for some unforseen reason. It is essentially the same but with just the time crate pulled to latest.

Oh indeed, I wonder how have I missed your PR. In general deps update is fine as long as no new crate duplicate.


ManageKeybindings UI not refreshed fix

Fixes #224.
This PR will fix #224, and will also tweak how a double click is displayed. It introduces a PolyGesture class that fully implements INotifyPropertyChanged and gives us complete control over the gesture (so we can extend it with functionality if required).
To do:

[x] Update Hotkey
[x] Update HotkeyInformation
[x] Update MouseActionToVisibilityConverter
[x] Update MouseActionToImageSourceConverter
[x] Update ActionRecorder control
[x] Update tests

[x] HotkeyCommandManager
[x] MouseActionToVisibilityConverter

[x] Add new tests

[x] PolyGesture

[x] Modify the display template for double click
[x] Check if we can just use the InputBindingCollection now we are using PolyGesture
[ ] Fix bug in ActionRecorder control

One more thing I've realised I think I can fix in this PR - which is to use the InputBindingsCollection. As we are using the same InputBinding and Gesture, we should just be able to use that instead of the ``HotkeyCommandManager.HandleCommand`.

Thinking this through, its actually more efficient to use HandleCommand - if we add the binding to the InputBindingsCollection, InputBinding.Gesture.Matches() is firing for every event - MouseWheel, MouseMove, MouseDown, MouseUp, KeyUp, KeyDown, etc etc, whereas before it was only firing for KeyDown/MouseDown.
For that reason, I'll just add some comments that we are specifically not adding the InputBindings to the InputBindingsCollection.


readthedocs

This PR will allow us to have this : http://image.readthedocs.org/en/rtd/index.html .
To make it look nice, I divided the README.md into different files.
It still allows for the docs to be read from github.

I have a comment on the naming. I think it would be good to have a consistent naming in mkdocs.yml across all torch projects. Rather than using their own name, can we use
torch_torch7
torch_nn
torch_image
...
This would avoid conflict with some random package named image or some other geenric name clash with torch/image.

@koraykv Yeah you have a point, but for now their doesn't seem to be any conflicts. Also, I just tried to create another nn.readthedocs project with a dummy account and it tells me that the project already exists. So readthedocs enforces uniqueness of domain names.
Knowing that, I just reserved most of the repo I could think of (by telling readthedocs to build doc for these repos) :

The only one that has a conflict was dok, which I renamed to torch-dok.


Add fix for RHOSAK e2e test case

HTML and value for the AWS region selector have changed, so this PR is fixing our automated test.
Moreover, it adds a wait for the input field to become "enabled" in the stream creation form. It didn't fail in our jenkins runs, but it keeps failing on local.
This also requires a change in the test-variable file
Signed-off-by: bdattoma<EMAIL_ADDRESS>

Jenkins job: Job#969 SUCCESS


Unable to use gem on Alpine Linux

Hi! At work, we've been working hard to migrate most of our applications to Google Cloud Platform, initially running in Docker in Compute Engine, and eventually migrating to Container Engine. Like many other folks who are using Docker, we've landed on Alpine Linux as our preferred base image.
Much of the new infrastructure we're building will be communicating via Pub/Sub, and so pretty much all of these apps will be using the google-cloud-pubsub gem as a dependency.
Unfortunately, that's turned out to pose a problem in our base image of choice, because of a number of issues with dependencies pulled in by google-cloud-pubsub.
Initially, we ran into issues linking against google-protobuf <IP_ADDRESS>. I'd hoped to solve this by building, but ran into the issue I shared here. It was a dependency on glibc, when Alpine uses musl libc. I resolved this by going back to 3.2.0, and @acozzette has since resolved the issue with building. However, he's raised a valid point that it might be worth looking into ways to allow the published, prebuilt gem to work out of the box.
Now, I'm personally just fine with building the gem's native extensions, so I proceeded along, thinking I'd managed to resolve the issue that was dooming our devs to a life of slim images.
And then I found out about grpc.

Gory build failure inside...
  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/local/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in
/opt/app/vendor/bundle-development/gems/grpc-1.2.0 for inspection.
Results logged to
/opt/app/vendor/bundle-development/extensions/x86_64-linux/2.3.0/grpc-1.2.0/gem_make.out

An error occurred while installing grpc (1.2.0), and Bundler cannot continue.
Make sure that `gem install grpc -v '1.2.0'` succeeds before bundling.
Error running command. Aborting.

While the glibc dependencies in google-protobuf ended up being pretty
straightforward to work around, it seems like there are more involved issues with grpc. According to grpc/grpc#8899, at least one reported incompatibility (grpc/grpc#6850) has survived for 9 months without a resolution, and the closest workarounds seem to involve using the prebuilt library, installing libc6-compat, and/or installing other compatibility packages pulled down with wget. All of this to install a dependency of a dependency of a dependency.
And none of this helps us build from source, which we're now forcing to work around the issues with protobuf, and would prefer to do in any case, vs using the precompiled gems.
I'm not really sure what I can offer the devs on my team aside from "just switch to slim" -- but I think, given the traction that Alpine has in the Docker space, and Google's bet on containerization in Google Cloud Platform, this would be relevant to Google's interests. At least, I'd hope it is.
I'd ask if it was possible to eliminate the dependency on grpc for google-cloud-pubsub, but I'm fairly sure I know the answer to that, based on its ubiquity in my Gemfile.lock at this point. Either way, I thought it might be a useful bit of feedback to share.

@ernie If I understand this issue correctly, this issue is that you cannot build grpc on Alpine Linux. I don't think we can eliminate 'google-cloud-pubsub's dependency on grpc. So it seems that we cannot resolve the issue at the client-library level.

@swcloud Well, I said I "would ask" -- as in, yeah, I'm aware. But as it sits, we can't use this gem on our choice of platform without being able to link or (ideally) build grpc. Hence raising the issue. :)

@swcloud can we get a bug against the grpc gem so that it can build on Alpine Linux? It seems like we'll run into this more and more as folks move to containers and GKE.

There is already an issue opened for this: grpc/grpc#8899. But it is labeled as an enhancement and not a bug. I would love to see it reclassified as a bug though!

@blowmage Looks like https://github.com/grpc/grpc/issues/8899 has been fixed and released. Does that resolve this issue?

I am working on verifying the latest releases on Arch. I'll close when we have verification.

@blowmage any update on this?

I never got verification. I'll try to verify this myself this week.

ping @blowmage what's the status of this one?

Still haven’t verified. I will try to get it done this week.

Hi @trackq, thank you for your helpful comment. I tried it with libc6-compat and BUNDLE_FORCE_RUBY_PLATFORM=1, but now the compilation fails with some error related to boringssl. Did you get it running with the latest versions of Alpine/Ruby/grpc? I'm using:

grpc: 1.20.0 (Ruby gem)
Alpine 3.9/Ruby 2.6.2 docker image

I don't have boringssl installed, and don't know which steps to take to either install it so that it can be found by the grpc build script or to use libressl instead.
Here is the log output:
[C]       Compiling third_party/boringssl/crypto/bio/socket_helper.c
cc1: all warnings being treated as errors
make: *** [Makefile:2901:
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/connect.o]
Error 1
make: *** Waiting for unfinished jobs....
mkdir -p `dirname
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/socket.o`
mkdir -p `dirname
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/socket_helper.o`
gcc -Ithird_party/googletest/googletest/include
-Ithird_party/googletest/googlemock/include -Ithird_party/boringssl/include
-Ithird_party/cares -Ithird_party/cares/cares
-Ithird_party/address_sorting/include -DGPR_BACKWARDS_COMPATIBILITY_MODE -g
-Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter
-DOSATOMIC_USE_INLINED=1 -Wno-deprecated-declarations -Ithird_party/nanopb
-DPB_FIELD_32BIT -O2 -Wframe-larger-than=16384 -fPIC -I. -Iinclude
-I/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/gens -DNDEBUG
-DINSTALL_PREFIX=\"/usr/local\"   -Ithird_party/zlib
-Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -std=c99
-Wsign-conversion -Wconversion     -Wno-sign-conversion -Wno-conversion
-Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration
-Wno-unused-variable -Wno-sign-compare -Wno-implicit-fallthrough  -MMD -MF
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/socket.dep
-c -o
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/socket.o
third_party/boringssl/crypto/bio/socket.c
gcc -Ithird_party/googletest/googletest/include
-Ithird_party/googletest/googlemock/include -Ithird_party/boringssl/include
-Ithird_party/cares -Ithird_party/cares/cares
-Ithird_party/address_sorting/include -DGPR_BACKWARDS_COMPATIBILITY_MODE -g
-Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter
-DOSATOMIC_USE_INLINED=1 -Wno-deprecated-declarations -Ithird_party/nanopb
-DPB_FIELD_32BIT -O2 -Wframe-larger-than=16384 -fPIC -I. -Iinclude
-I/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/gens -DNDEBUG
-DINSTALL_PREFIX=\"/usr/local\"   -Ithird_party/zlib
-Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -std=c99
-Wsign-conversion -Wconversion     -Wno-sign-conversion -Wno-conversion
-Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration
-Wno-unused-variable -Wno-sign-compare -Wno-implicit-fallthrough  -MMD -MF
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/socket_helper.dep
-c -o
/usr/local/bundle/gems/grpc-1.20.0/src/ruby/ext/grpc/objs/opt/third_party/boringssl/crypto/bio/socket_helper.o
third_party/boringssl/crypto/bio/socket_helper.c
make: Leaving directory '/usr/local/bundle/gems/grpc-1.20.0'
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Specifically, I seem to be caught in this situation:

grpc
google-protobuf

without BUNDLE_FORCE_RUBY_PLATFORM
✅
❌(install ok, but segfault)

with BUNDLE_FORCE_RUBY_PLATFORM
❌(boringssl compile error)
✅

I think if I could force bundler to use the precompiled version of grpc, while compiling google-protobuf by itself, I'd be settled. But I just can't find a way to convince bundler to do this.

LOL, I think I just found a solution. This seems to work for me:
RUN gem update --system
RUN bundle install
RUN gem uninstall -aIx google-protobuf
RUN gem install --platform ruby google-protobuf
RUN bundle install

I did a bit of digging and found that it was due to alpine gcc not being able to compile boringssl library due to function type cast error.
My temporary solution is as follows.
# platforms :ruby needed to force build native extensions. Else, segfault in alpine
gem 'google-protobuf', platforms: [:ruby]
gem 'grpc', platforms: [:ruby]

Turn [-Wcast-function-type] error to warning during gcc native extension build.
RUN CFLAGS="-Wno-cast-function-type" bundle install

It builds on alpine 3.9 and works fine with the above steps.

It works for me too ! Thank you so much @phonezawphyo

Thanks @phonezawphyo.

This solution worked for me
https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357


Associate permissions with teams.

I would like to provision Ansible letting teams define there own configuration via an playbook. I'm able to create organization, teams, inventories, credentials etc and I'm able to associate user with teams but I'm not able to set permissions giving teams access to inventories, credentials etc.
It seams that the tower gui is using the API when doing it but I can't find API documentation on how its done.
Any Idea of this i possible to implement?
Regards

but I'm not able to set permissions giving teams access to inventories, credentials etc.

The API answer
for the given resource, you need to do a GET to the detail view, like /api/v2/inventories/N/ for inventory. Then inside of summary_fields you should find several roles, one of which is the one you want. Say you wanted to give admin access, then you would look in summary_fields -> object_roles -> admin_role. Then note the id, call it M.
With the role id, travel to /api/v2/roles/M/teams/. POST {"id": T}, where T is the id of the team you want to associate.
The tower-cli answer
tower-cli role grant --type=admin --team="<name of your team>" --inventory="<name of your inventory>"


Passing ignoreAction parameter causes ts(2554) error

Great package!
When passing ignoreAction to setState, typescript shows Expected 1-2 arguments, but got 3. ts(2554). Looks like ignoreAction?: boolean should be added here? I'm on 3.3.10.

Nice catch! Version 3.3.11 should resolve this issue.
Thank you for the heads up!


Teamviewer doesn't work when busybox is installed

Describe the bug
When busybox is installed - teamviewer cannot starts correctly
To Reproduce
Steps to reproduce the behavior:

add "services.teamviewer.enable = true;" to configuration.nix
add busybox to "environment.systemPackages = with pkgs;"
try to launch the teamviewer

Expected behavior
Teamviewer gui starts
Screenshots
If applicable, add screenshots to help explain your problem.

Notify maintainers

@jagajaga
Metadata
these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
/nix/store/d43v6bx7r6fcaq3fbbfd5mwh1f5s7rmg-bash-interactive-4.4-p23-dev
copying path '/nix/store/d43v6bx7r6fcaq3fbbfd5mwh1f5s7rmg-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...

system: "x86_64-linux"
host os: Linux 5.4.61, NixOS, 20.03.2868.ff6a070b4ef (Markhor)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.6
channels(root): "nixos-20.03.2868.ff6a070b4ef"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:teamviewer, busybox
# a list of nixos modules affected by the problem
module:

#129585


security: Lazily create the security directories. Fixes #2755.

May find new instances for #2741

@barakmich Have you tested it? Looks like it will work... I think we really need to improve test coverage around security. :)

lgtm after addressing xiang's concerns.

@barakmich Can we merge this now?

Yep! Merging


Proposed updates to the changelog

Summary
I recommend we make updates to the AMI changelog to provide more details that customers need.
Description
I'm proposing making the following updates to the changelog for each AMI released:

Include the container agent and Docker versions included with each AMI
Add details about any new feature support included in the AMI.  I know feature support is via the agent version but I think it'd help to see this relayed on the AMI changelog as well.

Thanks for sharing this proposal with us. We have updated the changelog with more details, including Docker and containerd update, and start working release notes. Please take a look on the latest release notes here. Thanks.


merge: dev to stage

merge: dev to stage

:tada: This PR is included in version 0.29.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Tracer API uses non-idiomatic means to pass/specify timestamps

Throughout the current API, timestamps are passed as native long micros values.
The idiomatic approach for specifying time values in Java changed in JDK 1.5 with the introduction of TimeUnit.  Once this class was introduced, APIs were encouraged to specify time durations as a long duration, TimeUnit unit tuple.  Examples within the JDK itself:

Future#get(long, TimeUnit)
CyclicBarrier#await(long, TimeUnit)
SynchronousQueue#offer(E, long, TimeUnit)
etc...

Requiring direct provisioning in microseconds requires additional programmatic machinery to be provided by every API consumer irrespective of whether or not microsecond- level precision is required.  This is evidenced in the existing test code where microseconds are manufactured using System.currentTimeMillis() * 1000.  In real world code microsecond-level precision requires the creation of a custom clock which establishes a correlation between the value of System.currentTimeMillis() and System.nanoTime() at a relatively instant period of time, then using this data to manufacture microsecond timing through calculation of a delta in the nanosecond timer.
Provisioning timestamps using the long, TimeUnit tuple allows arbitrary precision to be supplied at the discretion of the consumer while retaining the tracer implementation's ability to consume a specific precision.
It sounds as if this issue has been discussed previously ad nauseam but the details of the original rationale may have been lost.  When discussing this in the opentracing/public Gitter channel, @bhs suggested I raise the visibility of this question to an Issue level and supply a PR to show the API surface area delta.

+1 to switch to API with units.

Nice work @mcumings. It touches a lot of places, but I think the result is much more idiomatic modern java. I also am 👍 for this change.

Thanks for the great writeup. I want to sleep on it, but my first reaction is positive for sure, esp given the context and conventions elsewhere in the JDK.
My main hesitation would normally be API breakage, but we already have bigger pending (breaking) changes. And much of this could be made backwards-compatible with overloading as we see fit.

TimeUnit is used to model durations. All ^^ mentioned methods use time unit to specify units of given timeout. Whereas we have a slightly different use case. We capture only timestamps:
span.finish(timestampMicros)
span.log(timestampMicros, logs)

It would definitely make sense if API had something like:
span.finish(int duration, TimeUnit units)

e.g. force finishing spans with a specified duration.

A timestamp is essentially a duration - it represents the number of a units since a reference point in time (e.g. 1st Jan 1970).
I don't think we want the application passing in a duration on finish as it would require the app to calculate it in reference to the start time - whereas it is easier for it to just provide its view of the current time at the point the finish method is called.

I don't recall seeing TimeUnit used for unix timestamps. The new API in Java 8 also does not use it, instead there are:
Instant.ofEpochMilli(long epochMilli)
Instant.ofEpochSecond(long epochSecond)
Instant.ofEpochSecond(long epochSecond, long nanoAdjustment)
Instant.now(Clock clock)
Instant.from(TemporalAccessor temporal)

@mabn - That's an interesting idea.  I don't think it can be made to work in this case however.  In Spring's case the Java 8 class references were a part of the underlying implementation which used class presence to determine whether or not the Java 8 class could be used.  In our case we would need to expose the class as part of the API itself.

If only folks would stop using old JVMs and just upgrade to Java 8 already.  :shakes_fist:

Some of us are stuck with Android Dalvik/ART language levels. 😬

I am more on -1 for this. I haven't seen using TimeUnit for timestamps in java APIs.
If we want to simplify the timestamp related API, then provide alternative methods which accept ms.System.currentTimeMillis() is the most common way how to get a timestamp in Java.

Raised https://github.com/opentracing/opentracing-java/pull/200 to target this change for v0.31.0 (and to remove some of the minor code cleanup stuff that was in the previous PR).

@pavolloffay @mcumings @tylerbenson bringing this issue up again as v0.31 is coming to a close and I'd like to get this resolved in the current iteration if agreement can be reached.

Is there an estimated timeframe for the Java 8 language level?  Given the contention maybe it's just best to wait.  Java 6 is ancient.  Java 7 is EOL unless you pay.  Maybe Java 8 isn't that far off...

Thanks Mike. Given that the current API is usable, and Java 8 provides a less contentious solution, I think we should hold off if it's all right with you.
Java 8 semantics come up often enough that a "Java 8+" API could be a considerable improvement. IMHO, we should wait for the current API to settle on a 1.0 before attempting that. But we could experiment with a new API via a Java 8 wrapper.

Yeah, I think that's reasonable.  Better to make changes that are more obviously supported when the time is right than to force a less optimal solution.  If there's agreement to this approach from the other supporters of this issue then let's go ahead and close it out.

just to clarify, so the proposal is to pass the timestamps as Instant and duration as TimeUnit? sgtm.

Thanks @mcumings.


conflict with colored-lights

I'd like to refer you to the issue on colored-lights's side so I don't have to retype everything: https://github.com/Gegy/colored-lights/issues/13

We're trying to fix it on the other side


[6.x] Fix issue with Illuminate\Mail\Markdown parser

My attempt to fix #31065 in a backward compatible manner. The recent change to CommonMark (9308a4e150e43c33eaf42ce4f631fb42d9ce8643) breaks different Blade mail components without this fix. See issue for details.

This definitely isn't the fix. I will look into it.


Delete unnecessary spaces

Delete unnecessary spaces: When copying from the web page, there is an unnecessary space after the code.
Fix indent: Indentation is misaligned.

@changeworld : Thanks for your contribution! The author, @yzheng-msft, has been notified to review your proposed change.

@changeworld : Thanks for your contribution! The author, @yzheng-msft, has been notified to review your proposed change.


Update zio-streams, zio-test, zio-test-sbt to 2.1.11

About this PR
📦 Updates

dev.zio:zio-streams
dev.zio:zio-test
dev.zio:zio-test-sbt

from 2.1.5 to 2.1.11
📜 GitHub Release Notes - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "dev.zio" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #486.


Error: Chapter Name is causing error in file naming due to usage of restricted symbols

This will create an issue where the chapter names may create an error if the --out argument is used.
This is what happened in downloading dungeons and artifacts
The chapter name is What's a Goblin's Favorite Type of Fish?

Originally posted by @Code-Blender-7 in https://github.com/Zehina/Webtoon-Downloader/issues/3#issuecomment-2084200518

The folder naming is a useful tool. I recommend replacing string characters with whitespace to solve this issue and maintain the functionality with minor limitations.

https://github.com/Zehina/Webtoon-Downloader/issues/57

The issue is located in the chapter_directory variable on line 78 of webtoon_downloader\core\webtoon\downloaders\chapter.py. We need to replace any illegal characters in the chapter_directory, which represents the chapter directory name.


fix: [UPC-4460] Audio volume being played on iOS is lowered when WebRTC viewing is enabled

Ticket

OK.
Should we add API to change this from app ?
When we will want to use Talkback over media streams ?

Yes, we have to add api for app to change the AudioUnit subtype.
Currently, not sure when the app will start supporting using MS on talkback, but I'll start working on that on my side.

not sure when the app will start supporting using MS on talkback
when it will be implemented, then it will start supporting it :)
I have created tickets for those tasks for ios and android apps

https://ubiquiti.atlassian.net/browse/UPM-1564
https://ubiquiti.atlassian.net/browse/UPM-1577
so, it depends on prioritization


Bad Z3 encoding from partially-applied recursive function in pattern

This code causes Z3 to raise an error, seemingly from the existsL p pattern.
let rec existsL (p l : int) = True

let lem p : Lemma True [SMTPat (existsL p)] = ()

(* This is just to trigger a query *)
assume val phi : prop
assume Phi : phi
let _ = assert phi

(edited to reduce polymorphism)
Bug.fst(13,0-13,18): (Error 276) Unexpected output from Z3: (error "line 92471 column 67: Wrong number of arguments (1) passed to function (declare-fun Bug.existsL.fuel_instrumented (Fuel Term Term Term) Term)")

Verified module: Bug (341 milliseconds)
1 error was reported (see above)

Seems to have been fixed.

The issue still exists, for example, the following modified version (where the postcondition of lem is non-trivial) fails with the same error:
let rec existsL (p l : int) = True

assume val q : prop

let lem p : Lemma q [SMTPat (existsL p)] = admit ()

(* This is just to trigger a query *)
assume val phi : prop
assume Phi : phi
let _ = assert phi

Another example from @VincentCheval:
module Sem.Term2

(****** Interface *******)

type funsymbol = int

type variable =
  {
    v_name: string
  }

type name = int

type term =
  | Var : v:variable -> term
  | Name : n:name -> term
  | Func : s:funsymbol -> l:list term -> term

(** Occurrence function **)

val occurs: variable -> term -> bool
val occurs_list: variable -> list term -> bool
let rec occurs x t= match t with
  | Var v -> v = x
  | Name _ -> false
  | Func _ args -> occurs_list x args
and occurs_list x l = match l with
  | [] -> false
  | t::q -> occurs x t || occurs_list x q

assume val spec_occurs_list_exists: x:variable -> l:list term -> Lemma
  (ensures (occurs_list x l <==> FStar.List.Tot.existsb (occurs x) l))
  [SMTPat (occurs_list x l)]

assume val get_vars_list: l:list term -> list variable -> list variable

val spec_get_vars_list: l:list term -> acc:list variable -> Lemma
  (forall (x:variable). (FStar.List.Tot.mem x (get_vars_list l acc) <==> (FStar.List.Tot.mem x acc \/ occurs_list x l)))

If we eta-expand the partially applied occurrence of occur in spec_occurs_list_exists to fun t -> occurs x t, then it works.
In this example, if we add type variable = int then it works. Because, it looks like, with that spec_gar_vars_list does not require an smt query. As soon as we add let _ = assert (hasEq nat) after that, we get the same error.


build: minor fixes to build on windows with make

This patch contains the following fixes

Fix to build without PIC flag.

Add PIC flag only if NEED_PIC is defined as 1

Define LAPACK_COMPLEX_STRUCTURE for windows.

CMake defines this for windows (system.cmake, line 576) but Makefile seems to skip it. Without this flag following error is observed
lapacke_make_complex_float.c(49,16): error: invalid operands to binary expression ('float' and '_Fcomplex'
      (aka 'struct _C_float_complex'))
    z = re + im*I;

The changes have been tested on Windows(Arm64) target.

I might be wrong here. Doesn't (modern) MinGW-w64 have support for C99 _Complex? Should LAPACK_COMPLEX_STRUCTURE be set only for MSVC (and not always on Windows)?
The cmake rules could also be changed probably to reflect that.

Interesting find, thanks. This inconsistency between gmake and cmake build settings appears to have been present for years,(probably not least because the Reference-LAPACK sources rely primarily on cmake and there is no provision for this setting in their make.inc. While the LAPACKE default is C99, the original LAPACKE CMakelists.txt does set LAPACKE_COMPLEX_STRUCTURE for any "WIN32 and not UNIX" situation. I guess this is simpler and safer than trying to detect the C99 capabilities of the individual toolchain at build time.


No ParFile converter in YakuzaCommon

When adding an asset that is contained inside a PAR to a script, the TF3.YarhlPlugin.YakuzaCommon.Converters.Sllz.Compress Writer is needed. Otherwise, the BinaryFormat won't be converted to ParFile, and the Par writer will throw an unhandled exception when trying to use the file.
There is currently no way of converting a BinaryFormat to ParFile without compressing.
Suggestion
Add a ParFile converter from BinaryFormat, or allow passing CompressionType = 0 to the CompressorParameters, which would skip compression and return the ParFile format.

Likewise, TF3.YarhlPlugin.YakuzaCommon.Converters.Sllz.Decompress cannot be used as a reader for an asset if the asset does not have SLLZ compression. This is expected, but it causes issues when assets do not consistently have/lack compression, which requires manually checking each asset file to see if it has compression (inside the PAR) or not.
Suggestion:
Add a ReaderParameters class to be used with Converters.Par.Reader with an option to automatically decompress files if the ParFileInfo has the compression flag.
If these suggestions are accepted, I can make a PR for them.

Of course, fell free to open a PR. All collaboration and improvements are welcomed! 😄

Great, I'll start working on it soon.


operator project-quay (3.9.0-nightly.20230220)

Add 3.9.0-nightly.20230220 to community operators

/merge possible

/merge possible


Fix numerical Instabilities in the generation of critical regions

This is a placeholder PR for fixing how critical regions are generated with numerically near zero coeff constraints that cause problems in problem generation.

This fixes some cases where when generating the boundaries of a critical region constraints are generated in the theta space that analytically should be zero but are numerically not zero and these numerical problems propagate out into the rest of the solve. Should speed up the cr generation in the case where there are many cases of numerically zero rows.


Fixing when delete a recordes that has two or more file fields in the Model

This bug was fixed and now you can to delete yours recordes with two or more file fields.

Can you revert all your spacing changes?

Needs a test as well.

I will merge this when you add test coverage.

@silviolleite will you be providing a testcase for this?

@silviolleite bump

Ohh yes... im sorry i was busy with my job... i will do it soon

No problem :)

@jorisvaesen thoughts on this?

@silviolleite bump


ABI version mismatches are not shown as a table if non-ABI3 symbols are present

Hi,
First of all, thank you for making abi3audit. I found it very useful, especially that the process of creating ABI3-compatible wheels is not very well-documented.
As I was experimenting with abi3audit-0.0.19, I deliberately introduced two ABI3 errors into my C extension by adding this code:
// not in stable ABI
PySignal_SetWakeupFd(-1);
// not in stable ABI 3.7 - added in 3.10
PyErr_SetInterruptEx(1);

(None of these calls make sense for my code, the intention was to only trigger auditing errors.)
Then I built a wheel targeted for cp37, and ran abi3audit on it. JSON output lists both errors:
$ abi3audit ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -R | jq
[21:38:53] 💁 ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: 1 extensions scanned; 1 ABI version mismatches and 1 ABI violations found
{
  "specs": {
    "ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl": {
      "kind": "wheel",
      "wheel": [
        {
          "name": "_audio.abi3.so",
          "result": {
            "is_abi3": false,
            "is_abi3_baseline_compatible": false,
            "baseline": "3.7",
            "computed": "3.10",
            "non_abi3_symbols": [
              "PySignal_SetWakeupFd"
            ],
            "future_abi3_objects": {
              "PyErr_SetInterruptEx": "3.10"
            }
          }
        }
      ]
    }
  }
}

i.e. there are non_abi3_symbols and future_abi3_objects listed, as expected. But verbose mode does not show both types of errors in the tabular form:
$ abi3audit -v ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
[21:33:26] 👎 ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: _audio.abi3.so has non-ABI3 symbol
           ┏━━━━━━━━━━━━━━━━━━━━━━┓
           ┃ Symbol               ┃
           ┡━━━━━━━━━━━━━━━━━━━━━━┩
           │ PySignal_SetWakeupFd │
           └──────────────────────┘
           💁 ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: 1 extensions scanned; 1 ABI version mismatches and 1 ABI violations found

It does list both errors in the summary, but only prints a table with non-ABI3 symbols. A table with ABI version mismatches is not shown.
To experiment further I built another wheel with ABI version mismatch only. This time the table was shown in verbose mode, as expected:
$ abi3audit -v ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
[21:53:13] 👎 ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: _audio.abi3.so uses the Python 3.10 ABI, but is tagged for the Python 3.7 ABI
           ┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
           ┃ Symbol               ┃ Version ┃
           ┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
           │ PyErr_SetInterruptEx │ 3.10    │
           └──────────────────────┴─────────┘
           💁 ARver-1.4.0.dev3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: 1 extensions scanned; 1 ABI version mismatches and 0 ABI violations found

I expected an auditing tool to show every problem it detects when used in its verbose mode. But currently it appears that ABI version mismatches are not shown as a table if non-ABI3 symbols are present.
Is this behavior intended? Or am I using abi3audit wrong?

Thanks for the detailed report @arcctgx! I greatly appreciate it.
That looks like a bug to me -- if there's an ABI3 version mismatch and --summary is enabled, we should always emit a table entry for it. I can try and root-cause that in the coming days.

Ah yeah, this looks like a silly early design choice: AuditResult.__rich_console__ only renders or one the other with ABI3 violations having higher precedence, and not both.
The thinking behind this was that ABI3 violations are more serious than version violations, and that the --summary output was mostly for visual inspection anyways. However, that's more confusing than necessary, so I'll look at fixing it.

Relevant function: https://github.com/pypa/abi3audit/blob/27428b7100e50b93e80e1c66bf412069ac6fc7e6/abi3audit/_audit.py#L63-L89

Now that was a quick RCA. :slightly_smiling_face:
I forgot to mention that I also tested with older versions back to 0.0.13 and also saw the same thing. So it matches your observation about an early design choice.

Now that was a quick RCA. 🙂

Detailed issues get quick triage 😄
And thanks for checking the older versions! That makes sense; this should be pretty simple to fix and I can try some things tonight or tomorrow most likely.


Enabling analytics cause supabase functions deploy to fail

Bug report

[x] I confirm this is a bug with Supabase, not with my own application.
[x] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug
Deploying supabase functions fail with following error, when [analytics] section in config.toml enabled.
failed to start docker container: Error response from daemon: failed to create task for container: failed to initialize logging driver: dial tcp <IP_ADDRESS>:54328: connect: connection refused
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:

Add the following lines to config.toml and try to deploy a function.

[analytics]
enabled = true
port = 54327
vector_port = 54328
backend = "postgres"

Then set enabled to false, and try again. This time it should work.

Expected behavior
It must work with analytics enabled, because we need analytics in local supabase runtime for logging to work.
System information

OS: Windows 11
Version of supabase-cli: 1.178.2
Version of Node.js: v20.15.0

Could you try the latest cli release 1.183.5? We changed logging driver in from syslog to native docker logs to avoid this issue.

For some reason, scoop does not update since 1.178.2, as you can see in the attachment.

Thanks for confirming!


Upgrade rspec, rspec-rails 3.1.0

Coverage remained the same at 100.0% when pulling 4a11211d95659b50d371816b55a618573deb66b5 on fix/upgrade-rspec-3.1.0 into 16a174decc8bdbb9ec6f764c705b5c014f8eefc7 on master.


ci: amending scripts to use signing key correctly

Description
fixes to the original script to correctly use the gpg signing key for signed commits when performing semantic releases
If you have not checked any of the lists below explain why here.
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Technical Enhancements

Checklist:
If any of these are not completed, please explain why in the notes.
Definition of Done
Code and merges

[x] Code to be commented on where applicable
[x] Documentation updated where required
[x] Have considered non-functional requirements such as Security, Performance, Scalability, and Fault Tolerance
[x] I have linted the code

Testing

[x] All levels of acceptance test are passing (automated, integration, manual, accessibility, etc.)
[x] I have run the behave command to check the selenium behaviour tests pass locally
[x] Acceptance criteria met

Other Checks

[x] I have performed a self-review of my own code
[x] I have checked for spelling errors
[x] I have commented on my code, particularly in hard-to-understand areas
[x] My changes don't break anything unexpected
[x] I have checked and updated the security.txt file where required
[x] Up to date with the main branch

DEPLOY_URL=https://dvjnliafff2hr.cloudfront.net/
cloudfront_id=E3DHDCR2QWIIWV


Random reboots when launching apps/games

Describe the bug
Occasionally, I get random reboots when launching apps/games, watching ads or browsing safari.
To Reproduce
Steps to reproduce the behavior:

Go to 'beatstar' game.
Click on 'watch ads'
Scroll down ‘lock screen' or scroll up ‘home bar’
See error on analytics & improvements.

Screenshots
https://i.imgur.com/VFTH1yt.jpg
Device (please complete the following information):

iOS Version: 14.4.2
iOS Device: iPhone XS Max
unc0ver Version: 7.0.0 up to 8.0

Place an "x" between the brackets if true:

[x] this is a bug others will be able to reproduce
[x] this issue is present with all tweaks uninstalled(except for default packages) or disabled
[x] this issue is present after a rootfs restore
[x] this issue is present on the latest version of unc0ver

Logs
(https://up4files.net/d18c4640skph/JetsamEvent-2022-07-26-230011.ips.html)

I got this same annoying issue, crashing while playing games, browsing safari and open binance. Seems like everything which includes some internet usage, reboots the phone. I am commenting in case someone would find a fix to take me updated.

@Hineedhelpp Subscribe to issue #2293 for this kernel panic


convertFromLightning() should include a Date object

Use luxon to create a new Date object from the outputted time and include that Date in the return object

Update: it does include a Date object, I just forgot to add it to the docs 😶

Closing in favor of #12


users logged out and mqs not listening

See screenshot.

Think we should do two things, look into why it's logging users out, but also make the auto-logout optional. Some users are trying to withdraw from exchanges and it takes a long time they have to keep refreshing and monitoring.

Auto logout currently is 30 minutes and changeable at config file only. Probably we should have a settings for that.
For settings seems like we will need another page, what we have is crowded.
@condensed-io ,  I will add a button 'More' that will open next setting page.
What do you think about that?  Do you have better alternative?

@cgilliard , about the mwc mqs.  wmc713 should reconnect even if it lost connection. Since keybase is listening,  MQS should be trying to reconnect.  Another possibility that user turn off MQS.

@cgilliard , I just accidentally hit listener issue.
mwc713 returns the error on start and never try to reconnect.
07.12.2019 14:09:13.916 mwc713>> ERROR: Failed to start mwcmqs subscriber. Error connecting to mqs.mwc.mw:443
I think we should fix 'never try to reconnect' problem.  I will take a look into it
Occasional connection failures are expected, so I don't think it is a problem.

The  mqs listener  not started and never try again is fixed.
Now it is not stated and try forever every 5 seconds until 'Stop' will be pressed at "Listening"

For settings issue created:   https://github.com/mwcproject/mwc-qt-wallet/issues/158
This one is closing because listening is fixed.


Context menu crashes app on exit when rendering auxiliary preview

Expected Behavior:
App would not crash when exiting context menu with an auxiliary preview
Actual Behavior:
App crashes when exiting context menu with an auxiliary preview
Platform:

[x] iOS

With Auxiliary Preview:
https://github.com/dominicstop/react-native-ios-context-menu/assets/55955275/8c16be06-48c5-4048-800f-badf3f701c2d
Without Auxiliary Preview:
https://github.com/dominicstop/react-native-ios-context-menu/assets/55955275/c6f3142e-3e6d-4444-ab26-62e9fa3f47fa
Versions:
"react-native": "0.72.6",
"expo": "49.0.18",
"react-native-ios-context-menu": "2.3.0",
"react-native-ios-utilities": "4.2.3",

Minimal reproducible example:
import React from 'react'
import { StyleSheet, View } from 'react-native'
import { ContextMenuView } from 'react-native-ios-context-menu'

const ContextMenuTest = () => (
  <View style={styles.root}>
    <ContextMenuView
      menuConfig={{
        menuTitle: '',
        menuItems: [
          {
            actionKey: 'cancel',
            actionTitle: 'Cancel',
          },
        ],
      }}
      renderAuxiliaryPreview={() => <View style={styles.auxiliaryElement} />}
    >
      <View style={styles.box} />
    </ContextMenuView>
  </View>
)

const styles = StyleSheet.create({
  root: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  box: {
    height: 50,
    width: 50,
    backgroundColor: 'blue',
  },
  auxiliaryElement: {
    backgroundColor: 'green',
    height: 50,
    width: 200,
  },
})

export default ContextMenuTest

Maybe try the lazy render prop? I also think this is only a dev mode issue

Maybe try the lazy render prop? I also think this is only a dev mode issue

Setting lazyPreview to false fixed the issue for me. Thanks 🙏


Unmatched file source glob patterns prevent further compilation

If I interpret it correctly, the convention in grunt tasks is to skip unmatched glob patterns given as file sources unless nonull is passed.
In grunt-6to5, an unmatched glob pattern causes processing to stop.  This could be trivially fixed by just checking src for undefined before processing it, if nonull is unset.  This could prevent unexpected task failures when setting up new projects where the target files don't exist yet, and make it simpler to share configs.

Sounds like that should be fixed in grunt instead.


Adding edge case fix

I had a report where using:
nx = np.array(1)
mapdl.nsel("s","loc","x", nx)

will trigger the following error:
TypeError: len() of unsized object

And it due to the fact that numpy arrays made of single scalar don't support len() function.
This is a veeeery weird edge case, but yeah. Let's fix it.

I still need to double check with Ansys lab team

LGTM.


RFC: Enhance compatibility with different schema versions

Currently, there are several limitations that forces libovsdb to be very strict with the db schema version it uses. These limitations mainly come from the fact that:

mapper.Info structs are created all over the codebase solely based on the schema (ignoring the provided model)
Although there are many internal structs where we keep a reference to a model.DatabaseModel and the ovsdb.Schema, we lack a struct that centralizes both and can make decisions based on their compatibility. This has an additional challenge because the schema and the model are obtained at two different points in time.

This PR performs two mayor code refactorings on top of which a schema compatibility version is implemented.
Refactor 1: Rename current DatabaseModel to DatabaseModelRequest and introduce an internal DatabaseModel type
All over the codebase we keep references to both the ovsdb.Schema and the model.DatabaseModel. In fact, server.go did one step further and defined:
https://github.com/ovn-org/libovsdb/blob/f2b3ce238b4e521ebf0e3221f0fbfc9c81c5e6b4/server/server.go#L31-L34
The first code refactoring proposed is to rename the client-provided DatabaseModel to DatabaseModelRequest. The naming could very well be discussed, my rationale is that the client would be "requesting" that model. Such request might not be 100% fulfilled depending on the schema. After such rename, a DatabaseModel is introduced that combines both central objects that are core for the library and that supports 2-step initialization to allow the schema to be provided afterwards.
Refactor 2: mapper.Mapper to use mapper.Info
All over the codebase we create mapper.Info structs and then call mapper.Mapper functions which create mapper.Info structs again. Unify this into a more compact API by having mapper.Mapper functions accept a mapper.Info reference.
Functional enhancements
With these two refactorings in place, this PR optimizes the mapper.Info creation process by having the newly introduced DatabaseModel do it. Since this struct now has both the schema and the model, it has more control over what fields will actually be readable/writable. Besides, we can cache the Info's metadata and speed up creation (I don't expect a huge performance improvement in unit tests since they use small models).
Finally, this PR introduces a Compatibility mode by adding a flag into the DatabaseModelRequest. That way the client can request the Model to be more flexible wrt the schema that is supported. On this mode, columns with conflicting types, missing columns (not present in the schema) are omitted and so are missing tables.
Fixes: #235

Thanks @amorenoz

Refactor 1: Rename current DatabaseModel to DatabaseModelRequest and introduce an internal DatabaseModel type
The first code refactoring proposed is to rename the client-provided DatabaseModel to DatabaseModelRequest. The naming could very well be discussed, my rationale is that the client would be "requesting" that model. Such request might not be 100% fulfilled depending on the schema. After such rename, a DatabaseModel is introduced that combines both central objects that are core for the library and that supports 2-step initialization to allow the schema to be provided afterwards.

So firstly, combining the Model/Schema to a single struct makes a lot of sense. I'm struggling with the 2-step initialization though.

Well, 2-step initialization is happening now since the  shema Validation happens at Connect()

Currently we ensure that what we're connecting to maps 1:1 with what the server offers. This is important because the datatypes that comprise a DatabaseModel are used directly. Put differently, I can always ovs.Create(&Bridge{}) if I've created a model for Bridge. While Connect() could fail at runtime, once I'm connected there are no surprises.

The 2-step initialization of the DatabaseModel is perfectly compatible with the current validation criteria. It's just a way to add the schema to the struct after it has been created. We can make Connect fail as it does (in fact, without the last patch, it is what this PR does). In fact, it's even more strict since it centralizes the creation of Info structures avoiding crashes on cache updates (e.g. running cmd/stress against examples/ovsdb-server crashes whith panic: FieldByColumn: column dpdk_initialized not found in orm info)

If we move to a 2-step approach, where what's passed to NewOVSDBClient is now a DatabaseModelRequest, the API now acts differently. ovs.Connect() will succeed, but ovs.Create(&Bridge{}):
* Can succeed

* Can fail at runtime if the server doesn't support that table.

* It can partially succeed but may omit columns that I've mapped because either the server doesn't support the column OR the server does support the column but the types are different

My issue with this is that it weakens the guarantees we had before cry and also leads to some rather confusing runtime behaviours. I was also very fond of the fact that the DatabaseModel abstraction eliminated the need to know about tables names, columns etc... You just work with structs. In order to ease the rough edges of dealing with different runtime behaviours we will have to expose HasColumn, HasTable, IsSameTypeAsSchema APIs for users to conditionally build version support logic in to their applications which will end up very messy in the long term. If we head down this road I feel we'd be better off not using Model at all and reverting to the old behaviour of using a map[string]interface{}.

I agree, it weakens a guarantee that was very useful. However, if the application is not able to guarantee it will be updated before the server, it will have to code around the possibility of different schema versions anyhow (even if it's by using another &Bridge type) but guess it's still more robust that having to query for each column to know if it's really empty or not supported...

Finally, this PR introduces a Compatibility mode by adding a flag into the DatabaseModelRequest. That way the client can request the Model to be more flexible wrt the schema that is supported. On this mode, columns with conflicting types, missing columns (not present in the schema) are omitted and so are missing tables.

The concern I have here is that if you enable the bool you have to be prepared to deal with the cases explained above. I worry that flipping a bool is "too easy" and can lead to unexpected runtime behaviour as mentioned earlier.

I agree. The flag was just to enable the OVN feature testing.

Ultimately my position is:
1. Upgrade ovsdb-server before you upgrade your clients

2. Use `modelgen` and application versioning to ensure that your app (using libovsdb) is compatible with your target server version

If we really really need to have a version of libovsdb that can speak different versions of the same schema, then I think the correct approach is to make it easy to register/maintain a model per version but I've not had to the time to design how this might work.

Just throwing another idea: maybe a minimum and maximum DatabaseModel? The client tires the maximum, if it fails to validate, tries the minimum, it it also fails Connect() fails. The client then returns which model was selected.
Anyhow, as I said above, the refactoring has nothing to do with the validation strictness, and I think it makes the code cleaner (and fixes a crash :)). So if you think it's worth it, let me know and I'll create another PR without the last commit.


Language changing interaction with query parameters

Library or service name
hmrc-frontend
Library version (where applicable)
3.11.0-play-28
Description of the issue
The language changing routes that come from the hmrc-frontend library have some interesting behaviour with how they seem to be interacting with URLs - we’ve encountered an issue where query parameters with strange or unusual characters can get mutated or cause errors in when switching between languages -
Steps to reproduce the issue
An example is listed below. The first image is showing the query parameter as a pound sign “query=£“, but switching the language then changes this to “query=%A3”. Switching this then back causes an error below on the “hmrc-frontend/language/en” route. This was performed on the ATED_LOOKUP_ALL service profile

Actual vs expected behaviour
Expected behaviour: Changing the language should probably not interfere with the query parameters provided if possible
Actual behaviour: Changing the language malforms the query parameters and can eventually produce an error.
Environment (where applicable)

Operating system: Mac OS
Browser: Firefox
Browser version: 99

Raised Jira ticket PLATUI-1722 to fix.


Warnings when using PHP 8.3 on self-hosted runners

Describe the bug
Currently some of my self-hosted runners that have PHP 8.3 installed seem to output several warnigns about installed extensions failing to load in due to additionally missing linked libraries.
Some runners also seem to have slightly different PHP versions installed, with some having 8.3.0 and others having 8.3.6.
Version

[ ] I have checked releases, and the bug exists in the latest patch version of v1 or v2.
[x] v2
[ ] v1

Runners

[ ] GitHub Hosted
[x] Self Hosted

Operating systems

Ubuntu 22.04.4 LTS
PHP versions

PHP 8.3
To Reproduce

Using PHP 8.3 on a self-hosted runner, unsure how this triggered in the first place for these runners.
Expected behavior

All required packages would be installed for these extensions
Screenshots/Logs

Output from running a PHP process on a server producing the error:
PHP Warning:  PHP Startup: Unable to load dynamic library 'amqp.so' (tried: /usr/lib/php/20230831/amqp.so (librabbitmq.so.4: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/amqp.so.so (/usr/lib/php/20230831/amqp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'dba.so' (tried: /usr/lib/php/20230831/dba.so (liblmdb.so.0: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/dba.so.so (/usr/lib/php/20230831/dba.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'enchant.so' (tried: /usr/lib/php/20230831/enchant.so (libenchant-2.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/enchant.so.so (/usr/lib/php/20230831/enchant.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20230831/imagick.so (libMagickWand-6.Q16.so.6: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/imagick.so.so (/usr/lib/php/20230831/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'imap.so' (tried: /usr/lib/php/20230831/imap.so (libc-client.so.2007e: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/imap.so.so (/usr/lib/php/20230831/imap.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_dblib.so' (tried: /usr/lib/php/20230831/pdo_dblib.so (libsybdb.so.5: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pdo_dblib.so.so (/usr/lib/php/20230831/pdo_dblib.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_firebird.so' (tried: /usr/lib/php/20230831/pdo_firebird.so (libfbclient.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pdo_firebird.so.so (/usr/lib/php/20230831/pdo_firebird.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib/php/20230831/pdo_sqlsrv.so (libodbcinst.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pdo_sqlsrv.so.so (/usr/lib/php/20230831/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pspell.so' (tried: /usr/lib/php/20230831/pspell.so (libaspell.so.15: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/pspell.so.so (/usr/lib/php/20230831/pspell.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'snmp.so' (tried: /usr/lib/php/20230831/snmp.so (libnetsnmp.so.40: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/snmp.so.so (/usr/lib/php/20230831/snmp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'sqlsrv.so' (tried: /usr/lib/php/20230831/sqlsrv.so (libodbcinst.so.2: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/sqlsrv.so.so (/usr/lib/php/20230831/sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'tidy.so' (tried: /usr/lib/php/20230831/tidy.so (libtidy.so.5deb1: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/tidy.so.so (/usr/lib/php/20230831/tidy.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zmq.so' (tried: /usr/lib/php/20230831/zmq.so (libzmq.so.5: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/zmq.so.so (/usr/lib/php/20230831/zmq.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/lib/php/20230831/memcached.so (libmemcached.so.11: cannot open shared object file: No such file or directory), /usr/lib/php/20230831/memcached.so.so (/usr/lib/php/20230831/memcached.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.3.6 (cli) (built: Apr 11 2024 00:27:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.6, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies
    with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

The above output pretty much appears any time any PHP action occurs, from composer install, to starting our test runs.
Additional context

This only seems to affect two of my self-hosted runners for whatever reason and not the others, I'm imagining this is just an issue that occurred when these were installed.
I am also aware for PHP 8.3 it was switched to use a custom build of PHP rather than using ondrej's PHP builds, so that would be why it only affects PHP 8.3 in this case.
All runners would have started using PHP 8.3 around the same time as well, as only a single project began using it and it would have triggered on all of them probably within a week or so of that occurring.
These servers should have the same base set of packages installed as well, as we provisioned them all from a basic Ubuntu 22.04 LTS server image and use a bash script to install all the packages and setup the GitHub Runner service.
Are you willing to submit a PR?

If it's something I can fix then I would happy to take a further look.

@Sn0wCrack
Please provide the workflow you are using.
Also please ensure that you are specifying runner env as self-hosted.
https://github.com/shivammathur/setup-php?tab=readme-ov-file#self-hosted-setup

It looks like I had some workflows that didn't have the self-hosted env, which is probably why this occurred.
I'll make this change and see if this resolves the issue by itself.

@Sn0wCrack
Following up on this, were you able to fix it on your end.

Sorry for not updating, I've tested it again now after adding the runner environment variable and I still receive these warnings on those servers.
I'm assuming this fix won't be retroactive and I might have to manually remove the installed PHP 8.3 to have the action pull down the correct files again?

Yes, it will require manually removing the previously installed version.