BadAccess (X_GrabKey) on openSUSE

Hotkey register causes the app to crash with the following output:
ventsi@localhost:/media/sf_prosper> go run app.go
X Error of failed request:  BadAccess (attempt to access private resource denied)
  Major opcode of failed request:  33 (X_GrabKey)
  Serial number of failed request:  10
  Current serial number in output stream:  11
exit status 1

Commenting out the code to register hotkey fixes the issue:

This is openSUSE Leap 15.3 running in VirtualBox.

I think this is a known issue which not been easy to fix for quite a long time. The problem is the registering combination was obtained by other applications and cause GrabKey's BadAccess.
A previous investigation seems to suggest a better error handling, but there are very rare resources really document this, becomes the last thing I remember

Looking at the code of entrall, the approach there seems to solve the issue.
Here is a patch which after applied fixes the startup of the app:
From aef3451685d49b918f57f99a9683a9f615807bfa Mon Sep 17 00:00:00 2001
From: ventsislav-georgiev<EMAIL_ADDRESS>Date: Wed, 5 Jan 2022 00:51:26 +0200
Subject: [PATCH] feat(linux): grabkey bad access err handler

---
 hotkey_linux.c | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/hotkey_linux.c b/hotkey_linux.c
index 0cb8b1c..b83b4cc 100644
--- a/hotkey_linux.c
+++ b/hotkey_linux.c
@@ -27,27 +27,21 @@ int displayTest() {
 	return 0;
 }

-// FIXME: handle bad access properly.
-// int handleErrors( Display* dpy, XErrorEvent* pErr )
-// {
-//     printf("X Error Handler called, values: %d/%lu/%d/%d/%d\n",
-//         pErr->type,
-//         pErr->serial,
-//         pErr->error_code,
-//         pErr->request_code,
-//         pErr->minor_code );
-//     if( pErr->request_code == 33 ){  // 33 (X_GrabKey)
-//         if( pErr->error_code == BadAccess ){
-//             printf("ERROR: key combination already grabbed by another client.\n");
-//             return 0;
-//         }
-//     }
-//     return 0;
-// }
+static int keygrab_err;
+
+static int xerr_keygrab(Display* d, XErrorEvent* xev)
+{
+	if (!keygrab_err)
+		keygrab_err = xev->error_code;
+	return 0;
+}
+

 // waitHotkey blocks until the hotkey is triggered.
 // this function crashes the program if the hotkey already grabbed by others.
 int waitHotkey(uintptr_t hkhandle, unsigned int mod, int key) {
+	int (*prev_errhandler)(Display*, XErrorEvent*);
+
 	Display* d = NULL;
 	for (int i = 0; i < 42; i++) {
 		d = XOpenDisplay(0);
@@ -57,8 +51,17 @@ int waitHotkey(uintptr_t hkhandle, unsigned int mod, int key) {
 	if (d == NULL) {
 		return -1;
 	}
+
+	// ref: https://github.com/zevweiss/enthrall/blob/d24c5a376fa91efc38901d94adfd4b4c1ee9c85b/x11.c#L162
+	keygrab_err = 0;
+	prev_errhandler = XSetErrorHandler(xerr_keygrab);
+
 	int keycode = XKeysymToKeycode(d, key);
 	XGrabKey(d, keycode, mod, DefaultRootWindow(d), False, GrabModeAsync, GrabModeAsync);
+
+	if (keygrab_err)
+		goto out;
+
 	XSelectInput(d, DefaultRootWindow(d), KeyPressMask);
 	XEvent ev;
 	while(1) {
@@ -74,4 +77,7 @@ int waitHotkey(uintptr_t hkhandle, unsigned int mod, int key) {
 			return 0;
 		}
 	}
-}
\ No newline at end of file
+
+out:
+	XSetErrorHandler(prev_errhandler);
+}
--
2.32.0 (Apple Git-132)

If we also add a way to return that the register failed and it will work perfectly.

This reminds me the key issue.
Note that the mentioned approach must use a static global error code. Meaning that we need a proper way to deal with concurrent registration to make sure the error code is properly assessed from Go side.

That would be easy to ensure from the client of the package and can be just a documentation for Linux in hotkey for now.

That would be easy to ensure from the client of the package and can be just documentation for Linux in hotkey for now.

Documenting a proper use seems to be less desired as we should have a better way to make the behavior consistent across platforms. mainthread.Init is already a thing that breaks the design goal whereas we don't have any other choices. Similar to darwin/windows that removes the awareness of concurrent registration towards an easy-to-use principle for the user.

On another thought, making concurrent registrations is not really a valuable feature. It doesn't hurt UX for a GUI app and also there won't be that many hotkey registrations in general to bare any performance difference. So we can make that concurrent -> force sequential registrations in the hotkey_linux.go.

making concurrent registrations is not really a valuable feature

Note that a goroutine may be scheduled into different goroutines. It is impossible to consistently call the registration from the same thread unless all registration calls are issued in the same goroutine and runtime.LockOSThread is activated.
An early attempt suggests that even serialized event handler may not capture corresponding grab key error, the reason is not clear.

It is impossible to consistently call the registration from the same thread

That is not necessary. In my understanding of the code, it doesn't matter which thread calls into the cgo register method. Correct me if I am wrong, but isn't the static error code the the actual issue? We just need to make sure that no other call to the cgo register method is invoked in parallel before a previous one has completed.

A PR that makes the multiple example work and returns the error properly would be interesting and welcome.

It can't be done the way I thought. The XSetErrorHandler sets global handler, then XGrabKey sends a message for the window to get the key combination events. However, there is no way to know when the X11 server will actually handle the message and send us the error. There also isn't any way to get which key grab failed from the provided error.
I think we just need to handle the GrabKey error and return it to the user in some global error handler (optional to use, not for specific hotkey).
One more thing about the Linux implementation. I think the code should be refactored to have a single wait event loop, not one per hotkey. This seems like a waste of OS threads. We can have a single loop and extract the key and modifiers from the event.

Thanks for trying out. Yes, and as noted, the key issue is that the event handler is a global handler and we cannot do it per goroutines unless we centralize everything in the same Display loop. As documented in the existing code (same as windows), a unified event loop is ideal but surely needs more work.


Remove unnecessary unstable features

Most unstable features listed are not used and this PR remove them.
We currently only requires untagged_unions.
It is possible to be removed by using [u64; 2] for SBValue with some transmutes, and I'm happy to do it. Then the whole rust crate can be compiled by current stable rustc. But I'm not sure if it is worth it.

Can't seem to resolve this merge...   I'll just pick up these changes manually.    Thanks!


Suggestion link of items

Sugestion:
I have a suggestion to add the items of the tables as links, so when clicked go to edit them.

We welcome PRs for all suggestions.  I wouldn't make the text links, however, but instead just have JS link the whole


palette conversion not needed

https://github.com/nicolov/segmentation_keras/blob/master/convert_masks.py isn't necessary.
Just use Pillow and you can load the classes separately from the color palette, which means it will already be in the format you want!
from https://github.com/aurora95/Keras-FCN/blob/master/utils/SegDataGenerator.py#L203
                from PIL import Image
                label = Image.open(label_filepath)
                if self.save_to_dir and self.palette is None:
                    self.palette = label.palette

cool right?

Thanks, I did not know about this. pngs for the win!

The convert_masks.py produced a set of completely black PNGs for me. Is it still required?

if it is black that most likely means there isn't a palette and you are seeing the raw values as grayscale

I downloaded the Augmented Pascal VOC dataset and ran the convert_masks.py script. Doesn't that define the palette, and mean that I should see colored mask images? I just followed the steps in the conversion directory.

 Try opening them in numpy or a photo editor to make sure.

Yes indeed - thanks.


Use decode option for get_payload

This seems simpler and fixes the bug of not decoding non-multipart messages.

@hugeox awesome, thanks for this. Just to confirm, this is a fix for issue #4 ?

No, this is just something I discovered.


debug function

Is your feature request related to a problem? Please describe.
how to debug in sublime text？
Describe the solution you'd like
addon？
Describe alternatives you've considered
No response
Additional context
No response

I forgot too, you can search it on Google


Add types for exported component styles

I am having the same issue described in https://github.com/mui-org/material-ui/issues/15218 but this request is for a TypeScript project.
My team is creating a Material UI-based library where some of the components are just wrappers with extra styles applied.
Here's a simplified example of what we're doing:

If a user wants to modify the gutters class in the classes prop for the ListItem component, but we only used root and selected in our custom styling, then it will not be exposed to the user and the following error will print from mergeClasses:

Material-UI: the key gutters provided to the classes prop is not implemented in ListItem.
You can only override one of the following: root,selected.

I could get around this by importing the styles from the MUI component directly and dynamically add the keys to our custom styles. The issue is, according to the TS2614 error I'm getting, there are no defined types for these exported styles objects so I can't cleanly import them through my TypeScript project.

[x] I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡
With types added for the components' styles objects, I should be able to cleanly import them in a TypeScript project.
Examples 🌈
In the case of ListItem, if there were types available for the styles named export, I'd be golden. 👍
https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/ListItem/ListItem.js#L12
Then I could import the styles and do something like the following:

Motivation 🔦
I want to make it easier to implement a wrapper MUI library that matches the behavior of the wrapped component. I don't want to manually add empty keys for every one we don't utilize through our own styling since that'd become a maintenance nightmare as time goes on, so the dynamic approach it seems to me would be to import the styles from each component and grab the keys from there. Even though there would be a performance hit.
If there is a better way to solve my issue then I'm definitely all ears! It may not hurt to add types to these styles objects either way.

We solve this by adding another prop for classes of a specific component e.g. ListItemClasses in your case. This has the benefit of making it clear which styles belong to which component and makes sure that you don't create colliding classNames.
If this doesn't work for you, you could add the classes explicitly and leave them empty e.g. gutters: {}. This also aids documenting your component if you later add new classes.
You can already get the component styles via ListItemProps['classes'].

Thanks for opening this detailed issue!

Thanks for getting back to me so quickly!

We solve this by adding another prop for classes of a specific component e.g. ListItemClasses in your case. This has the benefit of making it clear which styles belong to which component and makes sure that you don't create colliding classNames.

There isn't really an "inner" component for our basic wrappers since some of them are simply withStyles(ourStyles)(ListItem), so I think combining the classes prop is the best route for us vs something like adding a MuiClasses prop. Plus our styles are for overriding the MUI component styles. But perhaps I'm not 100% understanding.

If this doesn't work for you, you could add the classes explicitly and leave them empty e.g. gutters: {}. This also aids documenting your component if you later add new classes.

I've definitely tried this, but I'm concerned with the maintenance down the road with any added, removed, or renamed keys in Material UI. A more dynamic approach, even if there'd be a slight performance hit, would be preferable.

You can already get the component styles via ListItemProps['classes'].

You mean the type? But I can't extract a value from it, correct?

I've definitely tried this, but I'm concerned with the maintenance down the road with any added, removed, or renamed keys in Material UI.

Removed and changed class keys are a breaking change. This only happens on major version bumps. For added classes you can catch it via
import { createStyles, StyleRules } from '@material-ui/core/styles';
import { ButtonClassKey } from '@material-ui/core/Button';

// error: Type * is missing the following properties from *: label, text, textPrimary, textSecondary, and 24 other
const buttonStyles: StyleRules<ButtonClassKey> = createStyles({
  root: {},
});

This should help. This seems justified to me since you only writing this once for a component. Otherwise it's a dev-only warning. We can't disable it because we the default use case is building own styles.
If this issue gets more traction we can implement dedicated methods for this but it's pretty trivial code that could be auto-generated.

Awesome, I'll do that for the time being. Thanks!

Does it mean we can close?

Does it mean we can close?

Yep, I'm all set! Feel free to close. 😄


METRON-1890 disable audio in vm so it does not grab the mic and trigger security …

…software like microsnitch
Run the vagrant ups, should be normal, but you won't get audio alert from micro snitch or Oversight.
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[x] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[x] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[x] Have you included steps or a guide to how the change may be verified and tested manually?

[-] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh

[-] Have you written or updated unit tests and or integration tests to verify your changes?

[-] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[-] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

For documentation related changes:

[-] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:
cd site-book
mvn site

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

+1 by inspection.  Nice QoL change for people with those sort of tools.

+1 by inspection


0.6.2+ versions nestjs run with esm mode failed

$ yarn env:esm nest start
$ cross-env NODE_OPTIONS=--experimental-specifier-resolution=node nest start
(node:17318) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
node_modules/@anthropic-ai/sdk/src/streaming.ts:4:49 - error TS2307: Cannot find module './pic-ai/sdk/core' or its corresponding type declarations.

4 import { safeJSON, createResponseHeaders } from "./pic-ai/sdk/core";
                                                  ~~~~~~~~~~~~~~~~~~~
node_modules/@anthropic-ai/sdk/src/streaming.ts:5:26 - error TS2307: Cannot find module './pic-ai/sdk/error' or its corresponding type declarations.

5 import { APIError } from "./pic-ai/sdk/error";
                           ~~~~~~~~~~~~~~~~~~~~
node_modules/@anthropic-ai/sdk/src/uploads.ts:236:29 - error TS2339: Property 'map' does not exist on type 'never'.

236     await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry)));
                                ~~~

Found 3 error(s).

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can you share your tsconfig, package.json, and anything else that may be remapping paths?

Can you share your tsconfig, package.json, and anything else that may be remapping paths?

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "Node",
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "removeComments": true,
    "allowJs": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./src",
    "incremental": true,
    "importHelpers": true,
    "skipLibCheck": true,
    "strictNullChecks": true,
    "paths": {
      "@/*": [
        "*"
      ]
    }
  }
}

Thank you for reporting, we have a fix that will be out in the next release.
Note that you should not be importing from '@anthropic-ai/sdk/src', but from '@anthropic-ai/sdk'. Correcting that will fix this issue, and likely others.


Access WSS interface directly from within HA

So that we don't need to forward an additional port in the router for making it work outside of the local network. This should also greatly simplify scenarios with Cloudflare.
This basically means that the sipjs-card would not communicate with Asterisk through the port 8089, but instead with the HA's https port. This also means that certificates do not need to be configured or added to Asterisk (most likely), as the Ingress should be configured to use port 8088 (non-TLS).
Some references:
https://warlord0blog.wordpress.com/2020/04/16/asterisk-webrtc/
https://developers.home-assistant.io/docs/add-ons/presentation#ingress
https://github.com/hassio-addons/addon-traccar/commit/f3b00f4e10b9f5911304d5d48ce7f111d1542bee
https://github.com/hassio-addons/addon-ssh/blob/main/ssh/rootfs/etc/services.d/ttyd/run#L22-L23
Related:
https://github.com/TECH7Fox/Asterisk-integration/issues/31 (@ErnestStaug as you are using Cloudflare)

Initial support for ingress has been released in version 1.2.0. But some work will be required from the Integration as mentioned in https://github.com/TECH7Fox/Asterisk-add-on/pull/57#issuecomment-1043285096.

Actually, no work is required from the addon side, and Ingress was actually not needed. All the work needed is from the integration, which needs to proxy the WSS interface (8089) of the addon to be accessed by the card directly from HA.
@TECH7Fox can you transfer this issue to the integration repo instead?


Integration update

Partial fix for #320
Partial fix for #316

Codecov Report

Merging #321 (90f8b19) into main (a2579d9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #321   +/-   ##
=======================================
  Coverage   50.26%   50.26%
=======================================
  Files         118      118
  Lines        3408     3408
=======================================
  Hits         1713     1713
  Misses       1695     1695

Continue to review full report at Codecov.

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


Join node incorrectly finishes when creating a merged object

When using a 'join' node to manually 'combine each complete object' to create a 'merged object', the output is sent unreliably. At the end of this ticket, I explain what I think is causing this.
What are the steps to reproduce?

Copy the flow at the end of this ticket. (Pasted at end for skimability)
Press the top inject node - Injects a:b:c
Press the bottom inject node - Injects b:c:e:i:z
Press the top inject node - Injects a:b:c again

This should send a message to the debug node with the following flags set depending on the injected string:

has_vowel: "true": If the string has a vowel (true for top and bottom injector)
has_e_or_i: "true": If the string has an e or i (true for the bottom injector)

What happens?
After step 2:

3 output messages are printed, instead of just 1

After step 3:

2 output messages are printed, instead of just 1

After step 4:

0 output messages are printed, instead of 1

What do you expect to happen?
After Step 2, the output should be a single message with has_vowel set to true.
After Step 3, the output should be a single message with has_vowel set to true, as well as has_e_or_i set to true.
After Step 4, the output should be identical to that from Step 2.
Please tell us about your environment:

[x] Node-RED version: v0.18.7-git
[x] node.js version: v8.9.4
[x] npm version: 5.6.0
[x] Platform/OS: Linux/Ubuntu 16.04
[x] Browser: Firefix 60.0.2

[{"id":"ebf50582.2f74c","type":"inject","z":"e13b2c1d.899d2","name":"Test String With Vowel","topic":"","payload":"a:b:c","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":140,"wires":[["318775da.d29c8a"]]},{"id":"9585a45f.9a9b28","type":"inject","z":"e13b2c1d.899d2","name":"Test String Without Vowel","topic":"","payload":"b:c:d:f","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":180,"wires":[["318775da.d29c8a"]]},{"id":"318775da.d29c8a","type":"split","z":"e13b2c1d.899d2","name":"","splt":":","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":500,"y":160,"wires":[["40ffe89b.d066b"]]},{"id":"40ffe89b.d066b","type":"switch","z":"e13b2c1d.899d2","name":"Check Vowel","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"a","vt":"str"},{"t":"eq","v":"e","vt":"str"},{"t":"eq","v":"i","vt":"str"},{"t":"eq","v":"o","vt":"str"},{"t":"eq","v":"u","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":6,"x":670,"y":160,"wires":[["ea15f264.3b63f8"],["c988f143.71fdf"],["c988f143.71fdf"],["ea15f264.3b63f8"],["ea15f264.3b63f8"],["37420488.5aa77c"]]},{"id":"ea15f264.3b63f8","type":"change","z":"e13b2c1d.899d2","name":"Set has_vowel","rules":[{"t":"set","p":"has_vowel","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":140,"wires":[["37420488.5aa77c"]]},{"id":"37420488.5aa77c","type":"join","z":"e13b2c1d.899d2","name":"","mode":"custom","build":"merged","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1150,"y":180,"wires":[["c7f9c2cb.d4f228"]]},{"id":"c7f9c2cb.d4f228","type":"debug","z":"e13b2c1d.899d2","name":"Result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1290,"y":160,"wires":[]},{"id":"c988f143.71fdf","type":"change","z":"e13b2c1d.899d2","name":"Has E or I","rules":[{"t":"set","p":"has_e_or_i","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":80,"wires":[["ea15f264.3b63f8"]]},{"id":"56bfe531.8027c4","type":"inject","z":"e13b2c1d.899d2","name":"Test String With ei","topic":"","payload":"b:c:e:i:z","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":220,"wires":[["318775da.d29c8a"]]}]

Potential Cause
I think the issue comes from these lines: (nodes/core/logic/17-split.js lines 616-617)
    group.currentCount = Object.keys(group.payload).length;
    //group.currentCount++;

This is in JoinNode:on("input") and is used to determine when enough segments have been joined. As far as I can tell, the commented out version is correct. The following fixes the issue:
    group.currentCount++;

However, it looks extremely intentional, so I'm hesitant to create a pull request.

Yeah - it breaks in other ways when there... when joining a full msg object (fails test) - so needs proper investigation

think it may be down the mix of split and join.... it's splitting a string into 3 or 5 parts - then the join is now trying to create an object - but is using that previous knowledge to say how many parts it needs... so it says 3 properties of msg is ok... etc... so basically every message has more than taht number of properties so it fires on every message...
Need to think what is the sensible way to handle - or if indeed it can be.

I think we probably need to ignore any incoming parts count if the join is of a different type than the split. (as is the case here) - but allow it if it's the same or similar type.
However - as well as that... I think the other deficiency is that maybe the node ought to have worked in automatic mode - and just rejoined the strings back together - that way the parts would have worked and all would be good.... but for the fact the extra properties you added to msg get dropped...  so in fact that may be the real problem.

Have added a post to the forum to discuss fix
https://discourse.nodered.org/t/proposed-change-to-join-node-default-behaviour/1265

I will be offline for the next week or so, and I have only had time to skim this. Thank you for looking into this, and I'll try to see if I have time to contribute late next week.


feat(auth): display error from strategy on activation form FR-2704

Uploading Screen Recording 2021-05-31 at 13.32.56.mov…

Uploading Screen Recording 2021-05-31 at 13.32.56.mov…

https://user-images.githubusercontent.com/49310486/120181712-1c9c3380-c216-11eb-805a-f67138645acf.mov


update packages

:white_check_mark: Build TheIdServer 2.0.1-maintain-1-0-01-0017 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/94a86c1646 by @)


Update container-service-docker-swarm.md

Added more clarification on setting the host as the comments indicate many people miss this step.

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@JeremyLikness : Thanks for your contribution to the Azure documentation! The author, @rgardler, has been notified to review your proposed change.

@squillace as ACS docs guy

@JeremyLikness apologies for the delay here. Looks like this was quite old, with no response, and unfortunately now a merge conflict. If you can fix the conflict, and ping me, I will have this merged in.

@JeremyLikness @neilpeterson - This article has moved to https://docs.microsoft.com/en-us/azure/container-service/dcos-swarm/container-service-docker-swarm, so it's at articles/container-service/dcos-swarm/container-service-docker-swarm.md in the repo. From a Git perspective, that means basically the file was deleted, so this is sort of a hard one to resolve. Jeremy, if you would like to be listed as a contributor, you could redo the commit for the new location of the article. Or, since we're all MSFT here, Neil, you could also just implement the suggestion. I'm going to close this one.


Update api.md

Correct summary of APIs: should not advocate the historian, and usage data now only shows data transferred

Hello Ben,
I accepted these changes.
This topic is currently being revised as per RTC work task and discussions with Alex Krits:
https://jazza06.hursley.ibm.com:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/140571
I have also applied your edits to the latest version that is on our staging server here:
https://console.stage1.ng.bluemix.net/docs/services/IoT/applications/api.html
The edits on our staging server will be visible after the next build runs (Roughly 2+ hours from now).
Thanks
Michelle


Fixes RN master branch build

Summary
Mattermost-mobile is failing to build in release mode cause of the way mm-redux is built, by updating dependencies and setting @babel/preset-env to 7.2.0 the mobile app builds successfully.
We should definitely need to find a way to not have to build the library before it is used by any of the clients.

@crspeller webapp is working fine, just tested it. lets hold the merge until I test it all with core-js@3

core-js@3 does not crash the app but it does not work.. it does not render anything.
Anyway ticket is here https://mattermost.atlassian.net/browse/MM-15424 I really don't know what team should own it and I included a recommendation about having the clients building the ES6 code of this library.
Closing and re-opening to re-trigger the build so I can merge it


Hyphenate long titles in featured works.

The titles for feature works that have long works, or are long filenames, do not break or hyphenate. See middle example below:

Quick answer: don't feature works with long titles. Set this aside for a UI designer to use css to add ellipses.


Render Strategy Replacement

Currently updates to the in-browser database (IndexDB) result in re-rendering the corresponding HTML table (view) even if the table is on a hidden tab.   Further, updates awkwardly may interrupt users clicking on rows in the table to select them.    We need to only re-render the currently visible table and perhaps only when initially navigated to.   Instead of async re-draws, perhaps show a stale data indicator when updates occur and allow users to refresh on their own time?  Or perhaps show an auto-refresh timer count-down so users know when the whole table of is about to change under them (resetting the selection and otherwise making it difficult to interact).  This is especially problematic with activations as they are currently updating the table once a second, making it difficult to interact with.  To be fair, these are nuisance alarms and the goal with the alarm system is notifications at a frequency that an operator can reasonably perform a corrective action on (which is likely a handful an hour, not one a second).  Needs some thought.

Fixed in v4.0.1


[oc-cluster-up job] use parent job node

i.e. fedora-32 instead of fedora-30
Docker v20.10 with cgroups v2 support has been released so we no longer have to stay with fedora-30.

nope, doesn't work with oc cluster up:
6752 run_self_hosted.go:571] API server error: Get "https://<IP_ADDRESS>:8443/healthz?timeout=32s": dial tcp <IP_ADDRESS>:8443: connect: connection refused ()


Prepare for 7.6.3

@bot-gradle test and merge

WARN: The milestone of this PR is 7.6.3, but the base branch version is 7.6.2

I've triggered a build for you. Click here to see all failures if there's any.


No Documentation on how to put clock into 12 hour mode

I've searched through all your documentation and forum posts and all I know is that this feature was added in version 1.7.

@Jadens-arc , Sorry, it was deprecated since v1.10.0 when changing widget style all (clock,date,weather).

@poucotm, Thanks I've been going crazy trying to find a solution

@Jadens-arc , I've recovered "sidebar_widget_clock_mode": "24h" setting (v1.11.5). But it doesn't display 'AM/PM' like before.


Is there an alternative to PowerShell.AddScript() that preserves file position information?

The parameter to .AddScript() is a string, not a scriptblock, so any file position information that might have been present in the ScriptBlock object never makes it into that method.  Is there some other way to get a PowerShell object to invoke a ScriptBlock without losing file position information?
Steps to reproduce
try {
    [powershell]::Create().AddScript({
        throw 'message'
    }).Invoke()
}
catch {
    $_.Exception.InnerException.ErrorRecord.ScriptStackTrace
}

Expected behavior
at <ScriptBlock>, <C:\Users\UserName\Desktop\test.ps1>: line 3

Actual behavior
at <ScriptBlock>, <No file>: line 2

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.4
PSEdition                      Core
GitCommitId                    6.1.0-preview.4
OS                             Microsoft Windows 6.3.9600
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}

If you don't want to use Invoke-Command, you could use AddScript('. $args[0]')

Thanks @lzybkr.  I think that will get me there.  For posterity, here's what it seems to take to accomplish all of the following:

invoke a scriptblock in another runspace
pass positional arguments
pass input
pass named arguments
preserve scriptblock position info on error

$inputObject = 'input1','input2'
$argumentList = 'arg1','arg2'
$namedParameters = @{
    Named1 = 'named 1'
    Named2 = 'named 2'
}
$scriptblock = {
    param($Named1,$Named2)
    begin {
        function f { throw 'something' }
    }
    process
    {
        $_
        $PSBoundParameters
        $args
        f
    }
}

$output = [System.Management.Automation.PSDataCollection[psobject]]::new()
try {

    [powershell]::Create().
        AddScript({
            process {
                $argumentList = $args[1]
                $namedParameters = $args[2]
                ,$_ | . $args[0] @argumentList @namedParameters
            }
        }).
        AddArgument($scriptblock).
        AddArgument($argumentList).
        AddArgument($namedParameters).
        Invoke((,$inputObject),$output)
    $output
}
catch {
    $output
    $_.Exception.InnerException.ErrorRecord.ScriptStackTrace
}

That outputs
input1
input2

Key    Value
---    -----
Named2 named 2
Named1 named 1
arg1
arg2
at f, C:\Users\un1\Desktop\test.ps1: line 10
at <ScriptBlock><Process>, C:\Users\un1\Desktop\test.ps1: line 17
at <ScriptBlock><Process>, <No file>: line 5

@lzybkr I'm seeing crashes and "InvalidOperationException: Stack Empty" using this technique combined with concurrent calls to .BeginInvoke().
Repro
$scriptblock = {
    function fibonacci {
        param([int]$n)
        [bigint]$a=0
        [bigint]$b=1
        foreach ($x in 0..$n)
        {
            $a,$b = $b,($a+$b)
        }
        $b
    }
    fibonacci 100000 | % {'complete'}
}

$invocations = 1..2 |
    % {
        $powershell = [powershell]::Create().
            AddScript({. $args[0]}).
            AddArgument($scriptblock)
        @{
            PowerShell = $powershell
            Invocation = $powershell.BeginInvoke()
        }
    }
$invocations |
    %{ $_.PowerShell.EndInvoke($_.Invocation)}

Expected
complete
complete

Actual
This is the most verbose output I have witnessed.  The run completed in a "PowerShell Core 6 has stopped working" message box.
complete
% : Stack empty.
At C:\users\un1\Desktop\test.ps1:26 char:5
+     %{ $_.PowerShell.EndInvoke($_.Invocation)}
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [ForEach-Object], InvalidOperationEx
ception
+ FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.
Commands.ForEachObjectCommand

An error has occurred that was not properly handled. Additional information is s
hown below. The PowerShell process will exit.

Unhandled Exception: System.InvalidOperationException: Stack empty.
   at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
   at System.Collections.Generic.Stack`1.Pop()
   at System.Management.Automation.DlrScriptCommandProcessor.OnRestorePreviousSc
ope()
   at System.Management.Automation.CommandProcessorBase.DoComplete()
   at System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Com
mandProcessorBase commandRequestingUpstreamCommandsToStop)
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecute
Enumerate(Object input)
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
   at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
   at System.Management.Automation.Runspaces.PipelineThread.WorkerProc()
   at System.Threading.Thread.ThreadMain_ThreadStart()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionCo
ntext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

That looks like a potentially serious bug, maybe open a new issue?
This looks like the stack to save and restore variables like $_ when dot sourcing.  If the stack was empty, then the wrong stack may have been used, probably from another runspace.

@alx9r Might be due to PowerShell attempting to send the scriptblock back to it's origin runspace.  Try AddArgument($scriptBlock.Ast.GetScriptBlock())

@SeeminglyScience - $scriptBlock.Clone() should work as well and should be faster - it would avoid recompiling the script block.
Also - if that workaround works, I still think this issue should not be ignored - if my assumption is correct, it might also manifest silently and do something unexpected.

@lzybkr It's internal unfortunately :/

I don't see any immediate downsides to making it public.
Maybe try calling it via reflection in some experiments where you were using $scriptBlock.Ast.GetScriptBlock() to see if there are any problems or if I'm mistaken about the performance impact.

Thanks for the help @lzybkr and @SeeminglyScience.
It seems like the peformance of .Clone() and .Ast.GetScriptBlock() are similar:
function Clone {
    param($scriptblock)
    [scriptblock].GetMethod(
        'Clone',
        [System.Reflection.BindingFlags]'Instance,NonPublic'
    ).
        Invoke($scriptblock,$null)
}

function GetFromAst {
    param($scriptblock)
    $scriptblock.Ast.GetScriptBlock()
}

$scriptblock = {
    function fibonacci {
        param([int]$n)
        [bigint]$a=0
        [bigint]$b=1
        foreach ($x in 0..$n)
        {
            $a,$b = $b,($a+$b)
        }
        $b
    }
    fibonacci 100000 | % {'complete'}
}

'GetFromAst','Clone' |
    % {
        $commandName = $_
        [pscustomobject]@{
            CommandName = $commandName
            'Time(s)   ' = Measure-Command {
                1..10000 | % {& $commandName $scriptblock}
            } |
                % { [System.Math]::Round($_.TotalSeconds,2) }
        }
    }

One typical result of this run on my computer is:
CommandName Time(s)
----------- ----------
GetFromAst        1.25
Clone             1.36

FWIW I have settled (for now) on the following for creating scriptblock clone from C#:
static class Extensions
{
    public static ScriptBlock Clone(this ScriptBlock scriptBlock)
    {
        return ((ScriptBlockAst)scriptBlock.Ast).GetScriptBlock();
    }
}

This is interesting! Any non reported progress since 2018? Thanks

@animasc I just checked.  It looks like I settled on the following for my general-purpose runspace invoker:
            var powershell = PowerShell.Create();
            powershell
                .AddScript(@"
                    process {
                        $argumentList = $args[1]
                        $namedArgs    = $args[2]
                        Set-Variable __PSStreams $args[3] -Option Constant,AllScope
                        Set-Variable __PSOutput  $args[4] -Option Constant,AllScope
                        ,$_ | . $args[0] @argumentList @namedArgs
                    }
                ")
                .AddArgument(input.ScriptBlock.Clone())
                .AddArgument(input.ArgumentList)
                .AddArgument(input.NamedArgs)
                .AddArgument(powershell.Streams)
                .AddArgument(output);

and
    static class ScriptBlockExtensions
    {
        internal static ScriptBlock Clone(this ScriptBlock scriptBlock)
        {
            // see also PowerShell/PowerShell#7530
            return ((ScriptBlockAst)scriptBlock.Ast).GetScriptBlock();
        }
    }


Flash Rewrite

Use the flash service, instead of manually flashing.

Mostly done. but being pushed aside momentarily for work on other features.


I tried the string_concat function. Looks like it only works with comma.

I tried to call this function with "-" delimeter, but it looks like comma is still used as part of the separators somehow. I didn't make any change to the udf sample code.
create aggregate function string_concat(string, string) returns string
location '/user/history/libudasample.so'
init_fn='StringConcatInit'
update_fn='StringConcatUpdate'
merge_fn='StringConcatMerge'
finalize_fn='StringConcatFinalize';
My data is as follows:
+----+----------+-----+-----------+--------+
| id | name     | age | address   | salary |
+----+----------+-----+-----------+--------+
| 7  | Hardik   | 22  | MP        | 32000  |
| 8  | Komal    | 22  | Bhopal    | 32000  |
| 9  | Khilan   | 25  | Kota      | 15000  |
| 12 | Khilan4  | 25  | Kota      | 15000  |
| 14 | Khilan6  | 25  | Kota      | 15000  |
| 11 | Khilan3  | 25  | Kota      | 15000  |
| 15 | Khilan7  | 25  | Kota      | 15000  |
| 2  | Khilan   | 25  | Delhi     | 15000  |
| 13 | Khilan5  | 25  | Kota      | 15000  |
| 4  | Chaitali | 25  | Mumbai    | 35000  |
| 1  | Ramesh   | 32  | Ahmedabad | 20000  |
| 6  | Komal    | 22  | MP        | 32000  |
| 3  | kaushik  | 23  | Kota      | 30000  |
| 10 | Khilan2  | 25  | Kota      | 15000  |
| 5  | Hardik   | 27  | Bhopal    | 40000  |
+----+----------+-----+-----------+--------+
select string_concat(name, "-") from employee_kudu group by address;
+----------------------------------------------------------------+
| db_kudu.string_concat(name, '-')                                           |
+----------------------------------------------------------------+
| Chaitali                                                                                |
| Khilan                                                                                |
| Khilan5,Khilan,kaushik-Khilan2,Khilan4-Khilan6-Khilan3-Khilan7 |
| Hardik,Komal                                                                         |
| Ramesh                                                                                |
| Komal,Hardik                                                                         |
+----------------------------------------------------------------+

@d22shen yes it looks like the bug is in StringConcatMerge() like you mentioned. I think to fix it the UDA would need to be modified to store the separator in the intermediate value.


Incorrect targetPort for Schema Registry service

charts/kafka-connect/templates/schema-registry-service.yaml line 12
The Confluent Schema Registry server is configured to listen on port 8081 (its default setting).
The src-kafka-kafka-connect-schema-registry service is mapped to targetPort 8083.
Consequence : Clients are not able to reach the Schema Registry server via hostname src-kafka-kafka-connect-schema-registry.
NB: The Schema Registry service (port 8081) is distinct from the Kafka Connect service (port 8083).
Suggestion : Set spec.ports.targetPort to 8081

/fixed in kafka-connect-1.6.1


Add serde to MontgomeryBackendPrimeField

Description
This PR adds serialization and deserialization to MontgomeryBackendPrimeField so that it can be dumped to JSON and can reconstructed into MontgomeryBackendPrimeField.
This is the first step of adding a JSON serializer for STARK proofs.
Type of change

[x] New feature

Checklist

[x] Unit tests added

Codecov Report

Merging #509 (58fb440) into main (a3edf1e) will increase coverage by 0.01%.
The diff coverage is 96.72%.

@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
+ Coverage   94.36%   94.38%   +0.01%
==========================================
  Files          62       62
  Lines        8714     8775      +61
==========================================
+ Hits         8223     8282      +59
- Misses        491      493       +2

Impacted Files
Coverage Δ

math/src/field/element.rs
95.56% <96.00%> (+0.06%)
:arrow_up:

...src/field/fields/montgomery_backed_prime_fields.rs
93.55% <100.00%> (+0.09%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


docs/SETUP.md: should be moved to exercises/TRACK_HINTS.md

For the purpose of #10, SETUP.md in the root of this repo was moved to docs/SETUP.md.
Exercism does not assign special meaning to docs/SETUP.md (it will not be shown anywhere on http://exercism.io/languages/r) but it does assign special meaning to SETUP.md - it gets included in the README for each problem delivered to the student.
In addition, because of https://github.com/exercism/exercism.io/issues/3240, SETUP.md should get moved to exercises/TRACK_HINTS.md.
So, the two steps

allowing the instructions to be shown to the student again (docs/SETUP.md -> SETUP.md)
moving to the new location (SETUP.md -> exercises/TRACK_HINTS.md)

the file should be moved to exercises/TRACK_HINTS.md

Thanks!


Throw better error when workspace member doesn't exist

If you have a path in Anchor.toml workspace.members that doesn't exist, it throws:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cli/src/config.rs:191:22

A better error should be thrown here

@armaniferrante I would like to take this as my first issue.

closed by #1524


Refreshing on mobile redirects to discover page on PWA

Steps to reproduce (redirect issue)

Install PWA and open it
Open Notifications tab
Refresh page (this is only possible in Android for now)
It'll redirect you to Discover page

Steps to reproduce (not allowing to open Notifications issue)

Make sure you're not subscribed to any dApp (from the desktop maybe)
Install PWA and open it
Open Notifications tab
It won't allow you to open Notifications, immediately will redirect you to discover page

Probably the issue because of the same logic
https://github.com/WalletConnect/web3inbox/assets/116099/41718141-88f1-417e-8776-513c35629533

I think this issue is fine to live with.
Going to remove from the launch milestone


Naming Guidelines for fields does not match

Microsoft Docs
specifically static fields with s_ and thread static fields with t_. A few other minor things as well

This is a guideline of MS that we want to ignore. Even in the latest versions of the .NET libraries this standard is not followed.
In many cases this also doesn't matter as the guidance is to use auto properties rather than fields so the prevalence of fields is significantly reduced.

We explicitly don't want to follow Microsoft's guidelines here, as they don't even follow them themselves.  We also want to stay congruent with the Essential C# book.


Fixed pan de muertos filename #1

Fixed issue #1 by updating the file extension.

Verified the file extension is fixed in haikus.json


consider using wl_display_dispatch() instead of wl_diplsay_roundtrip()

https://github.com/kdchambers/vkwayland/blob/344eec73536db45c409c2bda8c4225911324a5b0/src/main.zig#L660
I think that you may want to call wl_display_dispatch or wl_display_dispatch_pending instead of wl_diplsay_roundtrip in the main loop of your app.

Thanks for the comment! That does seem correct but it appears like I would have to implement reading events from the compositor manually.  If you just swap out roundtrip as-is, none of the listeners get invoked (E.g The screen gets stuck at it's initial size).
I'll look into it this week if I have time and see can I write a better loop implementation using more primitive wayland functionality. Fair to leave this issue open until then as something more fine grained than roundtrip should be used in the loop.


Question: Is there a recommended formatter?

Is there a recommended formatter for use with Big.js idealy it would be able to take an arbitrary format string and do different number representation. It doesn't have to be part of big.js if someone has discovered a formatter that works well with strings that's fine with me.
Main issue is most formatters unfortunately are using the number type which can negate the benefits of working in big and getting the higher precision then not being able to display it.

There is toFormat, but it doesn't deal with format strings.

@vortex-5, parseFloat [1] is pretty flexible in terms of the formats it'll make sense of. You may need to process the string beforehand (to remove commas, for example), depending on your input. I'd also recommend looking into Number.prototype.toLocaleString() [2] for producing different representations of a given number.
I wrote a bit on this topic, and it includes some sample code (for dealing with different currencies, in particular): https://brucelefebvre.com/blog/2019/01/31/dealing-with-monetary-values-react-native/#handling-different-currencies
In the above example I only call .toFixed() when the value is about to be displayed. Otherwise it remains a Big value.
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseFloat
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString

We already currently use the JS formatting methods the reason for wanting to avoid them is the point of using Big.js is to gain more precision than is available in a double. Using native Number methods requires you cast first to a javascript number losing precision in the process hence why my original question was asking for how to format the number in Big.js while trying to keep it's internal representation and thus preserving the precision.


net/rpc: HandleHTTP should be idempotent.

Our team wrote a library to expose health metrics of a process. We wanted an anonymous import of our library to be enough to expose metrics. Our init method would handle setting up the RPC handlers including calling rpc.HandleHTTP().
Unfortunately, we discovered that this approach was hostile toward any other code that happens to call rpc.HandleHTTP(). rpc.HandleHTTP() panics if called twice. Alas, we had to move the rpc.HandleHTTP() call out of our library and leave it up to clients to remember to explicitly call it in their main. If the client forgets to do this, our library won't expose their health metrics. Worse than that, the client won't see any error letting them know that our library is not working.
It would be nice if rpc.HandleHTTP() could be idempotent. That is, calling it multiple times should be the same as calling it once. Then our API could call it on behalf of clients without fear of breaking other code the client uses.

rpc.HandleHTTP associates rpc.DefaultServer with http.DefaultServeMux on regular/debug rpc paths. Calling rpc.HandleHTTP more than once fails because http.ServeMux.Handle is not idempotent on the path parameter.
I agree that rpc.HandleHTTP should be idempotent. Just like like the pprof library sets paths on the default http mux so too should other libraries be able to register rpc receivers on the default rpc server AND associate the default rpc server with the default http mux. In both cases, client code should just be able to tell the default http mux what to listen on.
Of course any new code in net/rpc must be fixing something (no new feature) due to the freeze on net/rpc. IMO this should qualify as a fix. My notes below is a way for the OP (and other) to alleviate their situation assuming changing this is blocked by the freeze.
The use case in this issue:

We wanted an anonymous import of our library to be enough to expose metrics.

@keep94, are you saying that the importer of your library has to add literally no code to expose metrics?
import _ "github.com/foo/bar"
func main(){}

A. Importer doesn't need to add any code
That would mean that your library's init must have logic which tells the http.DefaultServeMux which address to listen on - like http.ListenAndServe(":1234", nil). I don't think it's recommended to dictate to your user which port to use. Note the pattern that pprof uses: "If your application is not already running an http server, you need to start one." The pprof package requires that you set what the http.DefaultServeMux listens on.
B. Importer must add listener
If the importer must add listener logic, why can't you tell them to add one more line - rpc.HandleHTTP?

given that net/rpc is frozen, and it works similarly to the package level http.Handle* funcs, I think this is a won't do.


[Idea] Simplify dispatcher - Make callee responsible it's actions

Hello,
This idea might be really hard to implement: what if IDispatcher were simpler?
There are basically 4 flavours for the dispatcher to dispatch a ICommand:

Simple ICommand
Simple IDomainCommand
ICommand with Events
IDomainCommand with Events

In this case, the person who is executing the action has to know exactly what to use regarding the actual actual implementation of the command.
We could make HandlerResolver, CommandSender, etc, smarter about this, so that it knows what to call based on the command's interfaces?
More over: should the caller dedice if the Events are published or not?
So SendAndPublishAsync should be a thing? or should it be based on wether the the handler implementation task returns events?
I will try to create a "demo" of this, to get the feel for it in my fork. Will post link if idea seems duable/reasonable.
PS: Feel free to close this issue if it goes beyond the scope of this project.
Cheers.

Here it is:
https://github.com/andreujuanc/OpenCQRS/blob/simplifyDispatcher/src/OpenCqrs/Commands/CommandSender.cs#L41

I like the idea of making commands responsible of the aggregate root definition and I would like to do the same for queries/results.
I'm not so sure about the implementation in the command sender tough, I'll give it a try in the next few days.

Based on your suggestion I'm adding a new global option and a property to the IEvent interface in order to decide if publish the event or not. You can follow the progress in the dev branch: https://github.com/OpenCQRS/OpenCQRS/tree/Dev

Great! will take a look a it!

Thanks @andreujuanc

Breaking changes here: https://github.com/OpenCQRS/OpenCQRS/releases


Allow empty placeholder

Using code:
app.Flag("endpoint", "Server endpoint.").PlaceHolder("").Default("http://www.example.com:8080/v1").URLVar(&c.endpoint)
This still prints the default as the placeholder.
--endpoint=http://www.example.com:8080/v1
Server endpoint.
The effect I'm trying to get is for no placeholder to be printed. Because it's long and ugly I want to hide the value from the user.

Perhaps use "URL" as the placeholder?

I'm going to close this, because this is intentional behaviour. A word for the placeholder is the correct usage.

That'll work, thanks.


EditHandlers (and Panels) with request-object from wagtailadmin views

Having the request object available in editHandler object would provide some benefits like accessing the user object and it's permissions (to check) etc.
(Which could also be passed throught the EditHandler template)
AFAIK this could be easily implemented in several functions in wagtailadmin/views/pages.py, which already get the request (object) as function argument and instantiate such an EditHandler object. For example the edit function.
So in the wagtailadmin/views/pages.py on instantiation of an EditHandler:
def edit(request, page_id):
   ...
   edit_handler = edit_handler_class(instance=page, form=form, request=request)
   ...

I'll send a PR for this later.

Already fixed by #4382 that’s in 2.1.

Hmm it's still edit_handler = page_class.get_edit_handler()
https://github.com/wagtail/wagtail/blob/master/wagtail/admin/views/pages.py#L202
Should this PR make it possible to dynamically render a form with edit_handlers based on the instance (or request) ?

If you're interested, this is my question on SO:
https://stackoverflow.com/questions/50934921/is-it-possible-to-set-edit-handlers-in-wagtail-dynamically


Crash on apple watch is not reported

Discussed in https://github.com/firebase/firebase-ios-sdk/discussions/9195

Originally posted by davidengler January 11, 2022
I have this code on my watch app:
func applicationDidFinishLaunching() {         FirebaseApp.configure()         DispatchQueue.main.asyncAfter(deadline: .now() + 2) {             let x = [0]             let y = x[1]         }     }
And on the crashlytics dashboard it's not showing anything.
I'm using Firebase crashlytics version 8.8.0

Also I should mention that I did send a test, which does show correctly on the dashboard:
Crashlytics.crashlytics().record(error: NSError(domain: "Test crash 2", code: 00, userInfo: nil))

Closing - issue already exist https://github.com/firebase/firebase-ios-sdk/issues/6843


fix of StreamInfo

This pull request contains a fix on StreamInfo.
The API is sending an object on payload, not a string. In order to make the things easier I created an enumerator to be used on comparisons.

Can StreamType be used directly as an enum in the method signatures rather than as a wrapper class?

Can StreamType be used directly as an enum in the method signatures rather than as a wrapper class?

Can you give me an example?
It's is a model to parse the return of api https://rest-api.symphony.com/v1.53.1/reference#stream-info-v2 that returns an object of StreamType, them I put an enum to help us on future comparisons avoiding mistakes with String.

You created StreamType as a wrapper class to contain a single field of the new enum type StreamTypes, so I'm wondering what the considerations were behind this. As opposed to using the new enum directly in StreamInfo. This will be a breaking change, so it should be as clean as possible.
For example, remove StreamType, rename StreamTypes as StreamType, leave StreamInfo to reference the new StreamType.
`package model;
public enum StreamTypes {
IM, ROOMS
}`

@ystan- Here an example of the API response:
 "streamType": {     "type": "IM"   },
Core team exposed the StreamType as an object, so we need to create one of our side to parse the json tree to java object, this is why I didn't use the enum directly in StreamInfo.

my bad. this can go.


etcd CNAMEs not stable

If nodes come up out of order (i.e. master-2 comes up before master-1), it is currently possible that the etcd-1 CNAME might point at master-2 until master-1 is available. Once master-1 comes up the CNAMEs will be mapped as expected, but it seems like this inconsistency could be a problem. One address might end up sending traffic to two different nodes depending on when the name is queried.
The reason for this is that the loop index is used to name the etcd-X CNAME instead of the actual number in the master-X name. We should probably change that so this works in a more intuitive way.

What about adding an extra _workstation service with the cname on the masters /etc/avahi/services

That could work. The only issue is we'd need to have logic on the host to figure out which address to bind it to. Apparently AVAHI doesn't support aliases, so you have to provide a full name->IP mapping to add extra names to a node.

Fixed by #19


PLEASE HELP Angular + leaflet incorrectly displayed tiles

Bug Report
I try just to show map, but i have problem, tiles incorrectly displayed in the map. When i compile the project(ng serve) all good, no problem. I tried to launch on Mac OS and it worked correctly, on Windows and Ubuntu incorrectly. May be problem with webpack or
Versions.
leaflet(v1.2), @types/leaflet(v1.2), angular/cli(v.1.3.2), @angular/core: (v4.3.6)typescript(v2.5.2), npm(v5.3, v5.4), OS: Ubuntu 16.04 x64

Sounds like you are missing Leaflet css.

Did you insert leaflet style and script files on your app section at .angular-cli.json?

I'm using Mapbox GL JS, but process should be quite similar with Leaflet. In .angular-cli.json I have mapbox-gl.js in "scripts" section and in my main scss file I have import for mapbox css. Hope this helps.

How...  I`m shocked. It is work. Thank you very much. 2 weeks tried to fix, i inserted style in component "styleUrls", because in angular-cli.json ("../node_modules/leaflet/dist/leaflet.css") get me error. I written just "leaflet.css" from ./src. Do you know how use "../node_modules/leaflet/dist/leaflet.css" in angular-cli.json?

In .angular-cli.json I have the following:
"styles": [         "styles.scss"       ],
and in styles.scss I have
 @import '../node_modules/mapbox-gl/dist/mapbox-gl.css';
Just replace the mapbox css with leaflet css and you should be good. Nothing else is needed, at least with scss.

thanks


crypto/ssh/terminal: MakeRaw() does not unset the OPOST flag

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?
go1.6.2

What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/fahmed/src/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

The stty utility can set a serial device to raw mode as such.
# Set to raw
$ sudo stty -F /dev/ttyS0 raw

# Inspect settings.   Notice the presence of the -opost flag.
$ sudo stty -F /dev/ttyS0
speed 9600 baud; line = 0;
min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost
-isig -icanon -echo

The -opost flag suppresses post processing used by terminals to send/interpret exit codes (color, carriage returns, etc.).
Using the MakeRaw method in the ssh/terminal package should give us the same results.  Example code can be found here.

What did you expect to see?

Running the above snippet should add the -opost flag (e.g. unseting the syscall.OPOST bit), but it does not.

What did you see instead?

Instead of seeing -opost in the output of stty after running the above snippet, we see the following
# Before issuing
$ sudo stty -F /dev/ttyS0
speed 9600 baud; line = 0;
-imaxbel
-echo

fahmed@hasselhoff: ~/src/crypto/src/github.com/fdawg4l/setraw$ sudo ./setraw
setting terminal to raw mode
s = &terminal.State{termios:syscall.Termios{Iflag:0x526, Oflag:0x5, Cflag:0xcbd, Lflag:0x8a33, Line:0x0, Cc:[32]uint8{0x3, 0x1c, 0x7f, 0x15, 0x4, 0x0, 0x1, 0x0, 0x11, 0x13, 0x1a, 0x0, 0x12, 0xf, 0x17, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, Pad_cgo_0:[3]uint8{0x0, 0x0, 0x0}, Ispeed:0x0, Ospeed:0x0}}f

# Check what was set.  Notice the lack of -opost as in (3) above.
$ sudo stty -F /dev/ttyS0
speed 9600 baud; line = 0;
min = 1; time = 0;
-icrnl -imaxbel
-isig -icanon -echo

Gah...  wrong repo.  Apologies.

Actually it looks like the supplemental packages don't have issue trackers.  I'm reopening this in case a member of golang knows where this should go.

The issue is newstate.Oflag isn't being modified from oldstate in MakeRaw().  PR to follow.

FYI: This is the correct issue tracker for all the golang.org/x/* subrepos.

Fix here

Hi!  Is there anything this change needs?  This changeset has been open for a few weeks and want to make sure there isn't anything I need to do to make progress.  Thanks!

Ping @bradfitz (as you are the last person approved a change that affected MakeRaw - https://github.com/golang/crypto/commit/3fbbcd23f1cb824e69491a5930cfeff09b12f4d2 )!
Do you need anything else for this to go in or have any objections?

I'll let @hanwen or @ianlancetaylor continue the review. Looks like @ianlancetaylor left you comments.


Create connection to Cloud Automate from Desktop Flow

If our computer does not join any domain, please advise how to create a connection to Cloud Power Automate from Desktop Flow？
No guide on this topic in this page.
[在此处输入反馈]

文档详细信息
⚠ 请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。

ID: 50a1a74f-75df-ccf6-207d-c82ec5d204e8
Version Independent ID: 2214022c-fa62-210c-0f81-30ec75c8ffe9
Content: 从云端流触发桌面流 - Power Automate
Content Source: articles/desktop-flows/link-pad-flow-portal.md
Service: power-automate
Sub-service: desktop-flow
GitHub Login: @georgiostrantzas
Microsoft Alias: v-gtrantzas

Hello @masonj-tech, thank you for using Power Automate and helping us improve the documentation page. If your machine hasn't joined a domain, just populate the name of the device and your account name. For example, if the device name is 'MS006' and the account name 'ADMINISTRATOR', enter 'MS006\ADMINISTRATOR'.
We are currently working on adding the appropriate information to the documentation page and you will be able to see the changes soon.


build_docker_node failure

https://source.cloud.google.com/results/invocations/87aaac90-6141-41b0-944c-d3dd296b30af/targets/github%2Fgrpc%2Finterop_docker_build/tests
Failed to recurse into submodule path 'packages/grpc-native-core/deps/grpc/third_party/protobuf'
Failed to recurse into submodule path 'packages/grpc-native-core/deps/grpc'
Stopping at 'packages/grpc-native-core/deps/grpc'; script returned non-zero status.

build_docker_node has been healthy for the past 14+ days.
There has been failures in toprod https://fusion.corp.google.com/projectanalysis/summary/KOKORO/prod%3Agrpc%2Fcore%2Fmaster%2Flinux%2Fgrpc_interop_toprod
as well as tocloud
https://fusion.corp.google.com/projectanalysis/summary/KOKORO/prod%3Agrpc%2Fcore%2Fmaster%2Flinux%2Fgrpc_interop_tocloud
But it has not been due to Node


First Release

Web

[ ] #29

Desktop

[ ] Windows
[ ] Linux
macOS：没设备。
Windows UWP：和 Windows 重复了。

Mobile

[ ] Android
iOS：也没设备。

https://flutter.cn/docs/deployment/android

https://shields.io/category/version

https://github.com/marketplace/actions/flutter-action

https://docs.sentry.io/product/releases/setup/

https://blog.sentry.io/2019/12/17/using-github-actions-to-create-sentry-releases

https://github.com/marketplace/actions/automatic-releases

https://github.com/marketplace/actions/sentry-release

https://github.com/marketplace/actions/sign-android-release

https://github.com/marketplace/actions/gh-release

https://github.com/marketplace/actions/upload-files-to-a-github-release


Fixing ios10 issue with webpack-uglify plugin

Fixing this issue: https://github.com/webpack-contrib/uglifyjs-webpack-plugin/issues/92

@timneutkens looks like it's missing in latest canary branch ( after webpack 4 update ). So ios10 breaks again. Is it possible to re-add it?

We use webpack's default, you can set up your own minimizer config I guess.


Uncaught SyntaxError: Octal literals are not allowed in strict mode.

If i add $scope.options to my Controller (controller attached to calendar view) i get the following error:
Uncaught SyntaxError: Octal literals are not allowed in strict mode.
I know its because i'm using 'use strict';  at the top of my .js file but i was wondering is this due to folowing var's :
defaultDate: new Date(2015, 06, 26),
minDate: new Date(2015, 06, 12),
maxDate: new Date(2015, 12, 31),
Is it possible to somehow rewrite this so it will work within 'use strict' rules?
Thank you for the great job with flex-calendar.

Hi,
You can now use strict mode with flex-calendar.
Checkout the new source code (last commit) and use the ISO Format to passed your dates in your controller. (see README.md)


Next.js app build fails when using Prisma with DB driver in Server Action

Bug description
When building a Next.js application using Prisma on the edge runtime with the Database driver, the build fails with the following error. This problem seems to occur when using Prisma client on the server action imported by the client component. Also, this problem did not occur with Prisma v5.10.2 (in Early Access), and occurred with v5.11.0.
Failed to compile.

app/page.js from Terser
  x await isn't allowed in non-async function
       ,-[26410:1]
 26410 | /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 26411 | /* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
 26412 | /* harmony export */ });
 26413 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 9737, 23))).default);
       :                                                                         ^^^^^^^
 26414 |
 26415 | /***/ }),
       `----

Caused by:
    0: failed to parse input file
    1: Syntax Error
Error:
  x await isn't allowed in non-async function
       ,-[26410:1]
 26410 | /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 26411 | /* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
 26412 | /* harmony export */ });
 26413 | /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 9737, 23))).default);
       :                                                                         ^^^^^^^
 26414 |
 26415 | /***/ }),
       `----

Caused by:
    0: failed to parse input file
    1: Syntax Error

> Build failed because of webpack errors

How to reproduce

git clone https://github.com/nzws/prisma-with-nextjs-edge-import-problem-repro
cd prisma-with-nextjs-edge-import-problem-repro
yarn install
yarn build
See error

Expected behavior
The build passes normally and the application can run.
Prisma information
I created a repository that can reproduce this issue: https://github.com/nzws/prisma-with-nextjs-edge-import-problem-repro (https://github.com/nzws/prisma-with-nextjs-edge-import-problem-repro/commit/cc513a74a2fc5235409db82e46c51ddf84be4b07)

generator client {
  provider = "prisma-client-js"
  previewFeatures = ["driverAdapters"]
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
}

// ./app/lib/prisma.ts

import { Pool } from "@neondatabase/serverless";
import { PrismaNeon } from "@prisma/adapter-neon";
import { PrismaClient } from "@prisma/client";

export function createPrismaClient() {
  const neon = new Pool({ connectionString: process.env.DATABASE_URL });
  const adapter = new PrismaNeon(neon);
  const prisma = new PrismaClient({ adapter: adapter });

  return prisma;
}

// ./app/actions.ts

"use server";

import { createPrismaClient } from "./lib/prisma";

export async function onCreate() {
  const prisma = createPrismaClient();

  await prisma.user.create({
    data: {
      email<EMAIL_ADDRESS>      name: "John Doe",
    },
  });
}

// ./app/client-component.tsx: imported by page.tsx

"use client";

import { onCreate } from "./actions";

export function ClientComponent() {
  return (

Hello, World!

      <button onClick={onCreate}>Create User</button>

  );
}

Environment & setup

OS: macOS
Database: PostgreSQL
Node.js version: v20.10.0

Prisma Version
prisma                  : 5.11.0
@prisma/client          : 5.11.0
Computed binaryTarget   : darwin-arm64
Operating System        : darwin
Architecture            : arm64
Node.js                 : v20.10.0
Query Engine (Node-API) : libquery-engine efd2449663b3d73d637ea1fd226bafbcf45b3102 (at<EMAIL_ADDRESS>Schema Engine           : schema-engine-cli efd2449663b3d73d637ea1fd226bafbcf45b3102 (at node_modules/@prisma/engines/schema-engine-darwin-arm64)
Schema Wasm             : @prisma/prisma-schema-wasm 5.11.0-15.efd2449663b3d73d637ea1fd226bafbcf45b3102
Default Engines Hash    : efd2449663b3d73d637ea1fd226bafbcf45b3102
Studio                  : 0.499.0
Preview Features        : driverAdapters

The top-level-await used by the wasm-worker-loader seems to be causing problems. https://github.com/prisma/prisma/blob/0c29ecf2e5f2543bc72d3bbee38d32e130d7727c/packages/client/src/generation/generateClient.ts#L190-L191
I have not submitted a pull request because I cannot evaluate the impact of this fix, but the following patch to the Prisma client generator builds successfully.
diff --git a/generator-build/index.js b/generator-build/index.js
index c66a69ee7783e69352da18aa5f0ac2ee28bc76cd..68b6c11fd61a9c663bdf9aad5359d7a2a4c6a83c 100644
--- a/generator-build/index.js
+++ b/generator-build/index.js
@@ -16644,7 +16644,7 @@ function buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs) {
     return `config.engineWasm = {
   getRuntime: () => require('./query_engine_bg.js'),
   getQueryEngineWasmModule: async () => {
-    return (await import('#wasm-engine-loader')).default
+    return (await (await import('#wasm-engine-loader')).default).default
   }
 }`;
   }
@@ -18320,8 +18320,8 @@ async function buildClient({
   if (generator.previewFeatures.includes("driverAdapters")) {
     fileMap["default.js"] = await JS(trampolineTsClient);
     fileMap["default.d.ts"] = await TS(trampolineTsClient);
-    fileMap["wasm-worker-loader.js"] = `export default (await import('./query_engine_bg.wasm')).default`;
-    fileMap["wasm-edge-light-loader.js"] = `export default (await import('./query_engine_bg.wasm?module')).default`;
+    fileMap["wasm-worker-loader.js"] = `export default import('./query_engine_bg.wasm')`;
+    fileMap["wasm-edge-light-loader.js"] = `export default import('./query_engine_bg.wasm?module')`;
     pkgJson["browser"] = "default.js";
     pkgJson["imports"] = {
       // when `import('#wasm-engine-loader')` is called, it will be resolved to the correct file

I believe I'm having the same issue when trying to run Prisma + Neon Serverless Driver from the edge runtime, I'm receiving the error:
SyntaxError: Unexpected identifier 'Promise'
    at (action-browser)/./node_modules/.prisma/client/wasm-edge-light-loader.js
    at __webpack_require__

And I think this post on Stackoverflow describes the same issue as well: https://stackoverflow.com/questions/78192413/next-js-application-with-prisma-orm-and-neon-datasource/78213174#78213174

Same issue here.

I've been receiving this as well, but only when the Edge runtime is enabled in Next.
The fact that this works in the Nodejs runtime (for me), and that other "top level awaits" (unrelated to Prisma) also throw an error when used in the Edge runtime suggests that this is a Next.js issue, rather than a Prisma one?
(although if the patch works, it'd be great to get it in in the meantime)

We are having the same issue.

Hello, I'm also having this problem since I updated from Next 14.1.4 to 14.2.1. My setup is pretty similar to @DannyNemer .  The problem only appears in Edge runtime.

There's a PR to fix this: https://github.com/prisma/prisma/pull/23754
You can resolve it for now by patching @prisma/client. I used pnpm so pnpm patch @prisma/client. Then make these changes: https://github.com/prisma/prisma/pull/23754/files

@nzws I confirm that using the 5.14.0-integration-static-wasm-worker-loader.5 version of Prisma (not released officially yet), I can build and run your project.
Can you please try as well? @vegandiet705 @morgs32 @DannyNemer
Thank you!

Thank you for the response. I checked that version, but I encountered the following error in the calling Prisma function:
 ⨯ ReferenceError: wasm_262ccad897196f9ab2ade3f9f1444a4c7ab39a50 is not defined
    at __webpack_require__ (/Users/nzws/ghq/github.com/nzws/prisma-with-nextjs-edge-import-problem-repro/.next/server/edge-runtime-webpack.js:37:33)
    at fn (/Users/nzws/ghq/github.com/nzws/prisma-with-nextjs-edge-import-problem-repro/.next/server/edge-runtime-webpack.js:318:21)
    at __webpack_require__.t (/Users/nzws/ghq/github.com/nzws/prisma-with-nextjs-edge-import-problem-repro/.next/server/edge-runtime-webpack.js:115:38)
digest: "3648476947"

It seems different error, I don't know where this problem from.
(When creating the sample repository, I made an incorrect implementation related to Next.js. It has been fixed now. Sorry about that.)

jkomyno It works for me as well, thanks. Hope it gets in an official release soon

Hey, I'm back at this issue again!
@vegandiet705, great to hear that such version works for you. Unfortunately, that fixed some problems but caused some others in edge cases, as reported by @nzws.
May you please another new unofficial version of Prisma, and report back if it keeps working for your scenario? 5.15.0-integration-client-dynamic-wasm-imports.1
You can quickly install it via:
pnpm add -D<EMAIL_ADDRESS>pnpm update "@prisma/*" 5.15.0-integration-client-dynamic-wasm-imports.1

(please double check that prisma generate has run before retrying).
Thanks!
cc @morgs32

Closed via https://github.com/prisma/prisma/pull/24312.


feat: zksync subgraph

Bumped libraries and created subgraph config file for zkSyncEra.
ZK sync Era is only supported by The Graph's Subgraph studio, so our automated flow could not be used.
I updated the README with the instructions to update the zksync subgraph from here

What is the public URL for the Payments Subgraph on zkSync Era? Does it have one?

Oh never mind. I found it.
https://github.com/RequestNetwork/requestNetwork/blob/f1f2f91a4a90e9aef854aa23162acc944dedc779/packages/payment-detection/src/thegraph/client.ts#L20


Large Pull Request with goodies :)

Number of changes included:

Support for sl-timeout in trailingstoploss_tp script
Reverted notify change (specify from main script if 'next update' message should not be send)
GalaxyScore min score filter in galaxyscore and botassistexplorer script. Not tested for the first one, will request in the issue to do so.
Bot stop/start functionality in galaxyscore, altrank and botassistexplorer script to stop bots when there are no pairs available, and start when there are (and the bot was stopped).
Extended botassist parsing of data, include all columns which could be interesting! Makes it easier to filter later on inside the script itself, and less work required when new columns are added on the 3C-tools website.

Wow. nice work again, thanks a lot!!


Create some cool/fun wasm modules to demo the shell

Maybe some cool image output, some memes, or maybe a game? 🤔

Colsing this, as we got some cool / fun modules already on the way 😄 👍


Duplicate symbol with libfilamat.a on macOS

Describe the bug
While trying to link with pre-built macOS release libraries (filament-20191127-mac.tgz), the following error show up:
duplicate symbol 'spv::Parameterize()' in:
    external/filament/lib/x86_64/libfilamat.a(libSPIRV_doc.cpp.o)
    external/filament/lib/x86_64/libfilamat.a(libSPVRemapper_doc.cpp.o)
duplicate symbol 'spv::CapabilityString(int)' in:
    external/filament/lib/x86_64/libfilamat.a(libSPIRV_doc.cpp.o)
    external/filament/lib/x86_64/libfilamat.a(libSPVRemapper_doc.cpp.o)
duplicate symbol 'spv::MemoryString(int)' in:
...
...

I am not familiar with CMake though looking through the lines in:
third_party/glslang/SPIRV/CMakeLists.txt
I am wondering if the error is caused by doc.cpp file is included in both SOURCES and SPVREMAP_SOURCES?
To Reproduce
I am using Bazel to link pre-built filament libraries  (filament-20191127-mac.tgz) to a program. If it helps, I can try to come up with a minimal reproducible example to show the error.
Expected behavior
No duplicate symbol error when linking pre-built filament libraries .
Screenshots
n/a
Desktop (please complete the following information):

OS: macOS
GPU: n/a
Backend: n/a

Smartphone (please complete the following information):

Device: n/a
OS: n/a

Can you show the compiler / linker invocations used to link against libfilamat.a? We link against it ourselves in several places, such as the matc tool, so this is a peculiar find.

Thanks @bejado, I am trying to build a shared library (.so) with libfilamat.a. So it might be different from building a binary.
I created a small reproducible repo:
https://github.com/yongtang/graph
To repeat the issue (On macOS Catalina):

Install the Bazel (I am using 1.2.0) from https://github.com/bazelbuild/bazel/releases/tag/1.2.0
Run the following command:

bazel build -s --verbose_failures  //...

Then the following will show up:
duplicate symbol 'spv::Parameterize()' in:
....
...

The duplicate symbols are being caused by the -Wl,-force_load, compile flags before external/filament/lib/x86_64/libfilamat.a. Indeed the libraries libSPIRV and libSPVRemapper have duplicate symbols.
We link libfilamat.a into a JNI shared library but don't see the errors because the linker is free to strip unused symbols (I guess our JNI library isn't using those symbols). The -force_load flag tells the linker to load all symbols, and it has no choice but to complain about the duplicates.
Maybe bazel has a way to not force load symbols?
Note that you don't need to link against libfilamat.a unless you want to compile materials programatically. You can use the matc tool to precompile.

@bejado I haven't found the way to configure Bazel to not force load symbols, though indeed after removing libfilamat.a the build works correctly. 👍 ❤  Thanks for the help and really appreciate that!


Replace secret/credential reference to expose with reveal and update docs (#348, #842)

This solves both #348 and #842.
In addition to updating the acorn secret expose to be acorn secret reveal, I also updated the registry code to use reveal instead of expose terminology for credentials.

@tylerslaton please rebase and i'll get this merged. sorry it hung out so long


data capture logs

To meet the milestone of 'successful data capture', we need to

confirm that gantry is collecting all expected data streams
all of the data being generated by field gantry is making it to roger and made available in Clowder

We need to record:

what data was transferred, from what sensors, per day
did all files generated by gantry make it to Roger?
did all datasets get captured by Clowder?
what checks have been passed

md5sum
one metadata per dataset
does each metadata file have valid and minimum required information

summary of files (mean, count, sd by time point)

(anything else?)
We need to provide this information as a text file and perhaps html report.
Given a text log file, I could write an R markdown script to parse it and generate tables in html format.

As a FYI clowder will compute a SHA-512 for every file that you can get.

@dlebauer @robkooper  Is a good chunk of this something that should be implemented in Max's code?

that should be implemented in Max's code?

that seems reasonable, as long as we have a fall back or three if the code stops running ...

ok so...
what data was transferred, from what sensors, per day

this is captured in several places (FTP log, gantry monitor log, ROGER completed logs) - however there's no step on Roger side to aggregate these into a report. Needs to be implemented.

did all files generated by gantry make it to Roger?

When files arrive on Roger, message is sent back to gantry to create a symlink in /delete folder for removal from gantry. files that remain on gantry from more than a few days ago were likely missed. Aside from verifying the logs and checking for leftover files, this should be implicit in the logging steps.

did all datasets get captured by Clowder?

in the log an entry is made every time a dataset is created. we could parse these logs to create an extracted list of datasets and compare to the file/folder structure.

what checks have been passed

md5sum - this is done once by Globus upon arrival on Roger, and can potentially be done again by Clowder after file upload.

one metadata per dataset - because metadata and files can arrive asynchronously, this should be treated like a file - if we got a metadata.json file, did it end up in the right place?

does each metadata file have valid and minimum required information - this one is more nebulous

summary of files (mean, count, sd by time point) - we should flesh this out a bit more.

Just updated my comment after discussions with @jdmaloney

Assuming no new issues arise with the pipeline, improving these logs will be one of my main focuses for next week in anticipation of end of May milestone.

We are now capturing all necessary information listed in this issue:

gantry -> Roger transfers
Roger -> Clowder updates
files and metadata uploads are tracked

..with the exception of verifying sanity ranges in the metadata fields. I will create a followup issue for refining logs by using something like LogStash to create reports/digests to make them more readable.
https://github.com/terraref/computing-pipeline/issues/106


Net Core 3.1

Same request as for Log4NetHelper.
Any chance this could get updated to the latest net standard to support net core 3.1
I mean I'm sure I can make it work but since I use this in a lot of project I'd prefer to have access to your nuget version :)

Yes, i can do that :)
But do you have any support issue now - on net core 3.1 ?

Well the only issue is appenders using your library don't work under 3.1 so half the logging is dead for me. So it's just a versioning problem. No issues with the code on my end :)
Like I said I'm pretty sure that making both nugets packages compatible with the new standard would resolve the issue.
I'm currently swamped with a few projects so I thought I'd just ask if these could be updated to avoid needlessly building my own versions.
Other than that I've been more than happy with the libraries until I decided to update from net core 2x to 3.x and noticed the standards library got upped a version as well.

I can target the package to netstandard2.1, but that will be for .net core 3.0+. But i don't think that "lifting" the version will help you, it must be something else. Do you have a reproducible example you can test on?
I think it will have something to do with the SqlClient version being used. Do you known which version your running - where it is not working?

Also there have been some roadmap changes from Microsoft, moving from System.Data.SqlClient to Microsoft.Data.SqlClient. I don't know if using both could bring some
"noise"..

okay, you could be right at something. Just did a quick test and i didn't get it to log under .netstandard2.1 using System.Data.SqlClient, whereas it worked with Micosoft.Data.SqlClient. Since Microsoft has changed to library, it makes perfect sense to follow that path also.
There will be a version 2.1 shortly, and keep in mind to change the .config and switch to the new Microsoft.Data.SqlClient. I will update the Readme.

Sorry for the late reply. After reading your question about the sqlclient I remembered I too add #IF compiler lines to handle the change to Micosoft.Data.SqlClient.
Completely forgot about it. Changing to that has fixed the problem!
Thank you for your speedy replies


[BUG] Login Page Not Found - 404 Error on Click, Create login page

Fixes #338
https://github.com/user-attachments/assets/53a48a5e-749a-4d3c-9bf2-cacc1c76b375

Nice done @Ankul8471
Keep contributing 🚀


No need to be logged in for model download

It's not necessary anymore to be logged in to download the model. Might be confusing for the reader :-)

Hi, please sign-off the commit by clicking here:

After that I will be able to merge the PR, thank you!

Yeah don't get what's going on there. Too time-consuming to get this DCO in order - feel free to just copy paste the changes in a new PR and close this one.


Update for 2.3

Modal and Dimmer need flex styles to work with 2.3.

I'm currently transitioning to pure-v0.7, so this will have to come after that is completed which should, hopefully, be today or tomorrow.


preserve current url when switching tenant if current user can access…

This PR adds functionality to preserve the current page/url when switching to another tenant. It will change the tenant.

I'm using a combination of domain-based multi-tenancy (via separate package) + Filament's multi-tenancy (each "domain" tenant has multiple Filament tenants). Filament's current tenant switching logic works great in this scenario. Will this PR break that in any way?

Which package do you use for multi tenancy based on domain? This PR only is for the Filament  Tenancy menu switcher.
before it generates the tenant menu URL’s it checks if the page you’re on also is viewable for the other tenant. If this is the case it will generate the url fully otherwise base url
for example:
http://company.domain.com/admin/1/roles/34/edit
Is the current page I’m on. And I have 3 tenants with ID’s 1, 2 and 3
It will check if url
http://company.domain.com/admin/2/roles/34/edit
and
http://company.domain.com/admin/3/roles/34/edit
Is accessible even before you have clicked/switched in the tenant menu.
if it will be accessible that URL will be used otherwise it will use
http://company.domain.com/admin/2
If tenant 2 has no access to roles/34/edit
hope this makes sense.

Hey, thanks for the PR. However, this isn't a behaviour we are looking to change at the moment, sorry. This is due to the inconsistent nature of some pages being accessible & some not, creating inconsistent redirect behaviour between pages. In the future, if you would like to check if a PR would be merged or not, please ask a member of the team and we can chat about it.

Understandable.. but is there any method to override this? Without touching the core?
and if not .. are there ways to build this so that it becomes overidable/extendable?

The only way currently would be publishing this view, I think

The only way currently would be publishing this view, I think

Hey Dan, I actually think this PR has some foundation. Imagine a payroll app where they are handling payroll for different companies, it would massively reduce clicks. Same with any other app with many users processing certain information.
What if we add a panel config?
->preserveUrlInTenantSwitcher()
So then people can decide is it's right for their panel or not? Since the redirect 'generally' might go to a page without permissions but in that scenario it would trigger a 403/404 in my understanding.

For now you can override the view and this is an improved version of the code for keeping to the resource if possible too.
    @if ($canSwitchTenants)
        <x-filament::dropdown.list>
            @php
                $route = \Illuminate\Support\Facades\Route::current();
                $routeParams = $route->parameters();
                $routeController = $route->getController();
                $tenantUrlTenantModel = app(filament()->getTenantModel());
                $originalTenant = filament()->getTenant();
                $hasResource = method_exists($routeController, 'getResource');
            @endphp

            @foreach ($tenants as $tenant)
                @php
                    $hasAccess = false;
                    $resourceAccessible = false;

                    if ($hasResource) {
                        filament()->setTenant($tenantUrlTenantModel->find($tenant->id), true);
                        $tenantUrlResource = app($routeController->getResource());
                        $tenantUrlModel = app($tenantUrlResource::getModel());

                        if (isset($routeParams['record'])) {
                            $record = $routeController::getResource()::resolveRecordRouteBinding($routeParams['record']);
                            $tenantUrlResourceAction = array_values(array_intersect(
                                array_keys($tenantUrlResource->getPages()),
                                explode('.', $route->getAction()['as'])
                            ))[0];
                            $recordAccess = $tenantUrlResource::can($tenantUrlResourceAction, $tenantUrlModel->find($routeParams['record']));

                            $hasAccess = !empty($record) && $recordAccess;
                        } else {
                            $hasAccess = $routeController->canAccess();
                        }

                        if (!$hasAccess) {
                            $resourceAccessible = $tenantUrlResource::canViewAny();
                        }

                        filament()->setTenant($originalTenant, true);
                    } else {
                        $hasAccess = $routeController->canAccess();
                    }

                    $redirectUrl = $hasAccess
                        ? route($route->getName(), array_merge($routeParams, ['tenant' => $tenant->id]))
                        : ($resourceAccessible
                            ? $tenantUrlResource::getUrl('index', ['tenant' => $tenant->id])
                            : url(filament()->getCurrentPanel()->getPath() . '/' . filament()->getCurrentPanel()->getTenantRoutePrefix() . '/' . $tenant->getAttributeValue('id'))
                        );
                @endphp

                <x-filament::dropdown.list.item
                        :href="$redirectUrl"
                        :image="filament()->getTenantAvatarUrl($tenant)"
                        tag="a"
                >
                    {{ filament()->getTenantName($tenant) }}
                </x-filament::dropdown.list.item>
            @endforeach
        </x-filament::dropdown.list>
    @endif


Got both AP and AR equal to -1 when 'Quantitative Results on COCO'

I download coco test-dev dataset and run
python eval.py --trained_model=weights/yolact_resnet50_54_800000.pth --output_coco_json --dataset=coco2017_testdev_dataset.
Then I get two files in ./results/, mask_detections.json and bbox_detections.json.
But when I run
python run_coco_eval.py --gt_ann_file=data/coco/annotations/image_info_test-dev2017.json,
I got outputs below:

Evaluating Masks:
Running per image evaluation...
Evaluate annotation type segm
DONE (t=73.79s).
Accumulating evaluation results...
DONE (t=14.50s).
Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = -1
Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = -1
Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = -1
Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1
Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1
Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = -1
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = -1
Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = -1
Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1
Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1
Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = -1

But if I just
python eval.py --trained_model=weights/yolact_base_54_800000.pth --output_coco_json and python run_coco_eval.py, I get the right output, so why it didn't work on test-dev?

请问你怎么解决的，我也是这个问题


Removed double 'ell' for more distinct character

Helps to avoid stroop effect in reading tests when the parts are quickly visually deconstructed.

Nice and fast, thanks!


Add missing properties to BlobServicePropertiesProperties

Feature Request

https://github.com/Azure/azure-sdk-for-go/blob/master/storage/blobserviceclient.go implements the Blob Service Properties client including operations listed on https://docs.microsoft.com/en-us/rest/api/storageservices/operations-on-the-account--blob-service-.
However, the SDK does not currently implement fields such as Logging: https://github.com/Azure/azure-sdk-for-go/blob/e906ecd90d7cfeb084f91ede091657b1223cf068/services/storage/mgmt/2019-06-01/storage/models.go#L1061-L1079.
This prevents https://github.com/terraform-providers/terraform-provider-azurerm/issues/3581 from moving forward.

Hi @sirlatrom thanks for this issue.
The go SDK in services directory is generated from azure-rest-api-specs, and I did not find any property that related with logging here. Therefore unfortunately we cannot help on this.
As for this client: https://github.com/Azure/azure-sdk-for-go/blob/master/storage/blobserviceclient.go, this is the data plane storage SDK (and this is in maintenance mode). CCing @jhendrixMSFT for more information about this data plane storage SDK.
Also as far as I know, terraform is not using the storage directory in azure-sdk-for-go but this library for storage data plane. Maybe you also need a feature request there.

@ArcturusZhang Thank you for directing me to the right place, you are of course completely right that I should go to the https://github.com/tombuildsstuff/giovanni library instead.


MSDF font outlines are limited to 2 pixels and look worse at 2 pixels than 1

Godot version
4.0.beta8
System information
Fedora 36, Vulkan Forward Plus (or Forward Mobile), AMD Radeon RX 6900 XT
Issue description
Multichannel signed distance field font outlines are limited to 2 pixels and look worse at 2 pixels than 1, with visible artifacts on the edges. This can be seen in the videos below where I'm adjusting the outline size at run-time:
Rasterized DynamicFont
Make sure to view videos in fullscreen to notice artifacts more easily.
https://user-images.githubusercontent.com/180032/208261772-43075e1e-c45b-4431-b297-cf3fc8a2c23e.mp4
MSDF font
https://user-images.githubusercontent.com/180032/208261744-fd750f87-cfe1-4fd2-8738-25c69100d62d.mp4
If this is a limitation of the rendering algorithm, this should be documented.
cc @bruvzg
Steps to reproduce

Import a font file in the project (TTF/OTF/WOFF/WOFF2; make sure it doesn't have self-intersecting outlines for correct MSDF rendering).
Create a Label node, assign it a custom font and set the Outline Size custom constant to a value like 12. Also set an outline color that can be distinguished from the text itself.
Select the font file in the FileSystem dock, then enable Multichannel Signed Distance Field in the Import dock. Click Reimport.
Notice how the outline appears thinner. If you adjust the outline size, its appearance won't change with values greater than or equal to 3. The outline also has a worse appearance at outline size 2 compared to outline size 1.

Minimal reproduction project
msdf_font.zip

MSDF pixel range in the import settings should be about 2x of used outline size for it to work correctly, but there's also a scaling error, so it's not using correct outline size (should be fixed by https://github.com/godotengine/godot/pull/70219).