Scoped storage bugfixes

Description
Fix residual issues after PR #32 merge:

Read and write of filesync file now works as intended (before it always looked for a "filePath" file, instead of the path pointed by the $filePath variable). In the previous PR, without the bugfix, the user's specified filePath was respected the first time, on file creation, but afterwards the file was not updated nor read.
Calls grantFilePermissionCallBack() after folder is picked and permission is granted. Web app needs an update too to call isGrantedFilePermission() only after the requestId rId is deleted from requestMap in grantFilePermissionCallBack(), as discussed in more details here: https://github.com/johannesjo/super-productivity-android/pull/32#issuecomment-1382965427 .

A debug APK is available here: ~https://github.com/lrq3000/super-productivity-android/releases/tag/super-productivity-android_scoped-storage_bugfix1~ https://github.com/lrq3000/super-productivity-android/releases/tag/super-productivity-android_scoped-storage_bugfix2
Issues Resolved
Fixes #13 (again 😅)
Check List

[ ] Web app update to check isGrantedFilePermission() after granteFilePermissionCallBack(). Until then, the app must be killed and relaunched after folder selection, or the folder needs to be selected twice, to force the app to query again the permissions and hence be able to Enable Syncing (otherwise we get a "Needs permission" warning message).
[x] Tested bidirectional syncing myself (via Syncthing-Fork on Android + Synctrayzor on Windows 10).
[ ] Someone else needs to test too.

This time around I know a bit more how to use the software, I think file syncing works as expected now.
But still I'm pretty new to Super Productivity, it would be great if someone else could try too to double check everything is working as expected.

Thanks @lrq3000. I tested this and just wanted to note STH.
Other than the mentioned issue with the callback, I think its better to mention that the path is relative in the UI and it will be better if we could show the it is relative to what because its probable for the user to forget which directory he/she had given permission.
I myself just used my old path and it resulted in creating the whole path under the relative path that I gave permission to read and write.

@zoli Thank you for your feedback! Yes showing the current path would be nice. If someone like @johannesjo can help with the typescript part, I can modify the callback functions such as isGrantedFilePermission to return the folder path, and on the webapp this can then be displayed in a non-editable text label.
I also tried an alternative approach, to allow the user to select a file instead of a folder, so that we could directly store the full filepath instead of the folder and filepath separately, but the way file picking works in Android currently does not allow to do this in a straightforward manner, we can only pick already existing files. So I dropped this idea.

@lrq3000

Hence, isGrantedFilePermission() is called right away after grantFilePermission() returns. This worked before because grantFilePermission() used to directly request for permission in a blocking manner in older Android versions, but now grantFilePermission() calls an asynchronous folder/file picker which itself calls back storageHelper.onFolderSelected() (and other internal functions to storageHelper) which saves the permission.

This is a bit misleading. The functions are not called there (the round braces are missing). This is a check to see if those two functions are defined on the android interface to determine if file sync is available as a feature. The actual call to grantFilePermission() is made a few lines below and is only triggered when the file sync provider is selected:
        change: (field) => {
          if (
            IS_ANDROID_WEB_VIEW &&
            field.model.syncProvider === SyncProvider.LocalFile
          ) {
            androidInterface.grantFilePermissionWrapped().then(() => {
              field.formControl?.updateValueAndValidity();
            });
          }
        },

isGrantedFilePermission is in fact never called.
What would be the correct order of steps?

@johannesjo About the exception you encountered, this is not due to code I added but code that was already there. I'm not sure why but the readFile() function read the filesync file and then replaces each line return with the system's line return character, and then deletes the last, unnecessary line return - this last bit is what caused the exception for you, because at first the file does not exist, so trying to read it may lead to this issue. I have now removed this logic altogether, we simply read the file's content as a String, and from my own tests it seems to work well.
About isGrantedFilePermission(), sorry I'm not good with typescript :-/ What is needed is that the webapp calls isGrantedFilePermission() only after grantFilePermissionCallBack() gets called.
Also if we want to implement @zoli's suggestion, I can modify isGrantedFilePermission() to return a String, the path to the folder or null if no permission, instead of just a Boolean. You can then use this String in the webapp to display in a field or text label.

@johannesjo also if you still experience an exception, can  you please let me know what android version you are running? Because i don't get these exceptions, i guess you are using another version of android with a slightly different file management api.
I also didn't notice you said that isGrantedFilePermission is never called, but it is necessarily. I can see it being called in the Android app, and it's not called from within the app, it necessarily is called from the typescript webapp somehow. If you really have no idea what is going on, I'll try to trace the whole process later today.

I am still encountering errors:

When I tried to use the already existing file this happened:

2023-01-17 14:33:56.448 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:33:56.450 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:33:56.490 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: trying to save to filePath: Hh2hh.json
2023-01-17 14:33:56.490 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: trying to save to fullFilePath: /storage/emulated/0/Download/Hh2hh.json
2023-01-17 14:33:56.520 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:33:56.522 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:33:56.542 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: erase file content by recreating it
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: try to openOutputStream
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity W/System.err: java.lang.NullPointerException
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity W/System.err:     at com.superproductivity.superproductivity.CommonJavaScriptInterface.writeFile(CommonJavaScriptInterface.kt:422)
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.MessageQueue.nativePollOnce(Native Method)
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.MessageQueue.next(MessageQueue.java:336)
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.Looper.loop(Looper.java:174)
2023-01-17 14:33:56.551 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:67)
2023-01-17 14:33:56.555 7459-7562/com.superproductivity.superproductivity W/TW: JavascriptInterface: updateNotificationWidget
2023-01-17 14:33:56.559 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:33:56.560 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:33:56.561 7459-7459/com.superproductivity.superproductivity I/chromium: [INFO:CONSOLE(1)] "__error during sync__", source: https://app.super-productivity.com/main.05ec82a44189ec80.js (1)
2023-01-17 14:33:56.561 7459-7459/com.superproductivity.superproductivity I/chromium: [INFO:CONSOLE(1)] "Error: Error: Java exception was raised during method invocation", source: https://app.super-productivity.com/main.05ec82a44189ec80.js (1)

When I tried to use a new file name this happened:

2023-01-17 14:35:07.098 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: file does not exist, try to create it
2023-01-17 14:35:07.105 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: do we have access to parentFolder? androidx.documentfile.provider.TreeDocumentFile@97d9160
2023-01-17 14:35:07.110 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.111 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.126 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.127 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.143 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.144 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.161 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.162 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.177 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.177 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.193 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.194 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.211 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.212 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.224 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: erase file content by recreating it
2023-01-17 14:35:07.226 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.227 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.241 7459-7562/com.superproductivity.superproductivity D/SuperProductivity: writeFile: try to openOutputStream
2023-01-17 14:35:07.242 7459-7562/com.superproductivity.superproductivity W/System.err: java.lang.NullPointerException
2023-01-17 14:35:07.244 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 1 (1) 7 4
2023-01-17 14:35:07.244 7459-7562/com.superproductivity.superproductivity W/System.err:     at com.superproductivity.superproductivity.CommonJavaScriptInterface.writeFile(CommonJavaScriptInterface.kt:422)
2023-01-17 14:35:07.244 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.MessageQueue.nativePollOnce(Native Method)
2023-01-17 14:35:07.244 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.MessageQueue.next(MessageQueue.java:336)
2023-01-17 14:35:07.244 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.Looper.loop(Looper.java:174)
2023-01-17 14:35:07.244 7459-7562/com.superproductivity.superproductivity W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:67)
2023-01-17 14:35:07.244 7459-7491/com.superproductivity.superproductivity D/eglCodecCommon: setVertexArrayObject: set vao to 0 (0) 7 8
2023-01-17 14:35:07.245 7459-7459/com.superproductivity.superproductivity I/chromium: [INFO:CONSOLE(1)] "__error during sync__", source: https://app.super-productivity.com/main.05ec82a44189ec80.js (1)
2023-01-17 14:35:07.246 7459-7459/com.superproductivity.superproductivity I/chromium: [INFO:CONSOLE(1)] "Error: Error: Java exception was raised during method invocation", source: https://app.super-productivity.com/main.05ec82a44189ec80.js (1)

Currently isGrantedFilePermission is never called, so nothing needs to be changed :)
I use the is to indicate boolean functions so maybe we can rather provide a new interface, something like allowedFolderPath. To understand this better: Is it always just a single folder that the app can have access to? And we don't need to pass it from the web frontend as we know the value in the android world, right?

@johannesjo thank you for the logs, it seems you don't have permission to the file for some reason, but you do have permission on a folder, but it's unclear which one. Could you please tell me which version of Android you are running? Is it in an emulator or real device? I tested on both an emulador and a real device and it works perfectly well so at this point i will need to reproduce your environment to be able to debug.
About allowedFolderPath, yes it is stored in the android app. We can store either a path to an existing folder or an existing file, but Android does not provide a native dialog to pick a non existing file, so that's why i can only show a dialog to pick a folder. So yes i can return the folder path to the webapp, but it is stored anyway. I could even store the path to the file too, but it needs to be entered in a textbox as it is now, i can't provide a dialog to pick a non exsting file.
About isGrantedFilePermission, i will test again, but I'm pretty sure I already tested and this is the function that the webapp calls somewhere (not where i pointed, there are ither places) to check if it has permission to enable filesync.

I was finally able to get it to work. I had to switch away from the file sync provider and switch to it again and click through the allow dialog multiple times, but I now it works (maybe it's possible to polish this a bit later).

About isGrantedFilePermission, i will test again, but I'm pretty sure I already tested and this is the function that the webapp calls somewhere (not where i pointed, there are ither places) to check if it has permission to enable filesync.

Sorry! My bad! I got confused. It's actually called multiple times. I will make the adjustments you suggested.

Oh ok great, thank you! Yes the issue with selecting the folder multiple times before it works will be fixed once you implement the isGrantedFilePermission fix I mentioned above, then it should work on first try.
One major reason why I can't modify the web app myself, beyond my lack of typescript skills, is that I cannot access the local angular dev server that is run with ng serve from the Android Studio emulator. Do you maybe have some tips? It's only an issue with the Angular server, because if I run another server, like Xampp, then it can be accessed without any issue from the Android emulator. It seems the angular server is not serving other clients than localhost for some reason, and --disable-host-check does not help.

Ok after hours of cumbersome debugging, I could find a way to make the locally served web app accessible from inside the Android emulator. I have updated the instructions in the README.
Still, there is an issue. The web app launches, but it stays in infinite loading, but only from within the Android emulator, not from the host's web browser.

@johannesjo I have implemented allowedFolderPath(). It returns 3 possible String values:

either a path to a folder on android 10+ if we have permission
either "" on android 9- if we have permission over the whole filesystem
either "" (empty string) on any android version if we don't have permission

Please let me know if this is OK or if you would like some change.

Thank you very much for your efforts @lrq3000 and sorry about having to spend so much time on the web app setup. I should have written the part to the readme myself...
I added showing the allowedFolderPath. I also found a little mistake in the android code (see above) that was responsible for the issue we discussed above as the web-frontend was never able to resolve the promise of grantFilePermission.
I think everything should work now!! If you have no further remarks, I gladly will merge this!

Awesome, thank you @johannesjo for your responsiveness in following up on this issue :-) And good catch about requestId, I thought I double checked but this bug slipped through! I tested again and indeed folder picking works the first time around now :-)
I have no further remarks. I will try to stay available if other issues with this feature pop up, but from my own tests it seems to work fine (I am now already using Super Productivity as part of my daily workflow using my debug builds :D).

Great! I am merging this then. I plan to make a new android release at the start of February which will remove GoogleDrive support (since it doesn't work any more). This way users have a better alternative at hand :)
Thank you very much again @lrq3000 and also @zoli for your input!!!! <3

Awesome, thank you so much @johannesjo for your active support and reviewing of this PR! I expect the submission process to the Google Play Store should go without a hitch now that Super Productivity does not use the MANAGE_EXTERNAL_STORAGE anymore :-)


Support more DNS search paths

What is the problem you're trying to solve\
containerd does not allow DnsConfig to have more than 6 search paths. However modern libcs allow more search paths(many are unlimited)
According to https://man7.org/linux/man-pages/man5/resolv.conf.5.html,
In glibc 2.25 and earlier, the search list is limited to
six domains with a total of 256 characters.  Since glibc
2.26, the search list is unlimited.

Describe the solution you'd like
Remove the limitation of maxDNSSearches or relax the limitation (kubernetes allows 32 search paths when enabling the feature gate ExpandedDNSConfig)
https://github.com/containerd/containerd/blob/d0be7b90f1306d2c7d59e28d3ffd74eddcddfa21/pkg/cri/server/helpers_linux.go#L51-L53
https://github.com/containerd/containerd/blob/d0be7b90f1306d2c7d59e28d3ffd74eddcddfa21/pkg/cri/server/sandbox_run_linux.go#L275-L280
Additional context
https://github.com/kubernetes/kubernetes/issues/104352

/assign


Add modal link to other advice pages

hi @ldodds just pushed some updates addressing your review comments.  I think this is ok for a final review.


library does not parse correctly a result set.

i have the following json from a query that returns a list:
{
"odata.metadata": "http://localhost:63447/odata/$metadata#CompanyViewModels",
"value":[
{
"Id": 1,
"CompanyName": "Company1"
},
{
"Id": 2,
"CompanyName": "Company2"
}
]
}
it is not an array, because it has the 'odata.metadata' json payload.
and it throws an error here.
if (angular.isArray(data) !== (!isSingleElement && !!action.isArray) && !forceSingleElement) {
throw $resourceMinErr('badcfg',
'Error in resource configuration for action {0}. Expected response to ' +
'contain an {1} but got an {2} (Request: {3} {4})', name, (!isSingleElement && action.isArray) ? 'array' : 'object',
angular.isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url);
}
why? because the object is not an array ( [] ).
i had to add the following.
if (data.value)
{
data = data.value;
}
asp.net web api for backend.
should have if property named odata.metadata exists then something.

I agree on this, I am having the same issue. I would like to see it just check for data.value to validate it in case it isn't a "true" odata end point

@ionescuvictor where are you doing the data.value check?

sorry for late reply.
check for
// Need to convert action.isArray to boolean in case it is undefined
// jshint -W018
right after that you would write
if(data.value)
{
data = data.value
}
The resource is expecting an array.

Update to odata version v4, you are using v4 and the wrong odata scaffolder. See https://github.com/devnixs/ODataAngularResources/issues/1#issuecomment-144823254


Support removal of value() at the end of chains following times/…forEach/etc (fixes #3)

Adds a codemod to address bulletpoint 3 of https://github.com/lodash/lodash/wiki/Changelog#compatibility-warnings. Fixes #3.
It removes the value at the end of sequences when we can be sure that it's a Lodash method, or print a warning otherwise, even though it sounds pretty likely that anything that fits this is actually using Lodash. I prefer being on the "safe" side here.
@davidshepherd7 If you have some time reviewing, maybe even trying it out on your codebase at the point where it still had the value() calls, I'd much appreciate it :)

I think chains created with _.chain are still unwrapped with .value() so you might want to add tests for such cases with something like this:
testUnchanged(with_('_.chain([1, 2, 3]).forEach(console.log).value()'));

(I don't know if you handle this already or not, only read the tests so far).
Also before it was possible to put forEach etc in the middle of chains like:
_([1, 2, 3]).map(f).forEach(console.log).filter(g).sum()

I don't think that's possible any more with implicit chaining, so (if you want) you could convert such chains to explicit ones, or print a warning?

I think chains created with _.chain are still unwrapped with .value() so you might want to add tests for such cases with something like this:
(I don't know if you handle this already or not, only read the tests so far).

You're right. I'm handling it (like here), but I was removing it on purpose. I forgot there were differences between the two. Will handle that later.

Also before it was possible to put forEach etc in the middle of chains like:
_([1, 2, 3]).map(f).forEach(console.log).filter(g).sum()

Again, good catch. That will currently break. The use of filter in this example is fine as it's an Array method, but it breaks when it reaches sum. Will be tricky again if split into multiple assignments, so that's something we'll probably not handle unfortunately :disappointed:.

you could convert such chains to explicit ones

Sounds like a good idea :+1:
Thanks a lot for the feedback!


[SQL] Support SHOW CHARACTER SET Statement

What this PR does:
Support SHOW CHARACTER SET Statement
Which issue(s) this PR fixes:
Fixes #388
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE

Codecov Report

Merging #396 (be76ad4) into master (2c89224) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #396   +/-   ##
=======================================
  Coverage   39.59%   39.60%
=======================================
  Files         111      111
  Lines       14837    14848   +11
=======================================
+ Hits         5875     5880    +5
- Misses       8243     8249    +6
  Partials      719      719

Impacted Files
Coverage Δ

pkg/executor/redirect.go
6.39% <0.00%> (ø)

pkg/runtime/ast/ast.go
75.41% <0.00%> (-0.14%)
:arrow_down:

pkg/runtime/ast/proto.go
57.14% <ø> (ø)

pkg/runtime/ast/show.go
32.66% <0.00%> (-1.55%)
:arrow_down:

pkg/dataset/priority_queue.go
66.66% <0.00%> (+1.11%)
:arrow_up:

pkg/schema/loader.go
8.60% <0.00%> (+2.64%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


When using Go To File, find files with unnecessary parent directories

One common use case for "go to file" is to copy a filepath from a different tool and paste it into the "go to file" search bar. However, some tools emit filepaths that are rooted at a different directory.
For example, suppose I'm in a directory called "my_project", and I have a file called "README.md", and some tool I'm using (say, a documentation generator) emits an error that contains the string "my_project/README.md". When I double click on that in my terminal, it copies the whole thing (I've also run into this in GUIs with a "copy path" button). I would like to be able to paste the entire path into "go to file" and have it show README.md.
I think this could be implemented by finding the current working directory foo/bar/baz/my_project, and for anything searched in the "go to file" bar, removing any prefix which matches any suffix of the current working directory, and showing those matches AFTER the matches using the current logic (so that if you had my_project/my_project/README.md and my_project/README.md, if you were in the top my_project, you would see both results, and the first result would be sorted first).

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
Happy Coding!


partial Hieroglyph series by Aaron Marcus

implementation of http://recodeproject.com/artwork/v3n2untitled-3-marcus
with some aspects toward http://recodeproject.com/artwork/v3n2untitled-2-marcus

thanks!


Release 34.0.0 of arrow/arrow-flight/parquet/parquet-derive (next release after 33.0.0)

Follow on from https://github.com/apache/arrow-rs/issues/3682

Planned Release Candidate: 2023-02-24
Planned Release and Publish to crates.io: 2023-02-27

Items (from dev/release/README.md):

[ ] PR to update version and CHANGELOG:
[ ] Release candidate created:
[ ] Release candidate approved:
[ ] Release to crates.io:
[ ] Make ticket for next release

See full list here:
https://github.com/apache/arrow-rs/compare/33.0.0...master
cc @alamb @tustvold @viirya

DF update PR - https://github.com/apache/arrow-datafusion/pull/5375


An optional keyword argument with a default value has awkward typing

Repro
function fn({a = 1}: {a: number}) {
  return a;
}

fn({});

Expected: no error because a has a default value.
Actual get an error about not providing a.
I don't want to make a a maybe type because it means it needs to be refined to use it.

If I leave off the annotation it works how I expect. So maybe the question is how do I annotate that function as it gets inferred?

Sorry I messed this up. Here's what I wanted:
function fn({a = 1}: {a?: number}) {
  return a;
}

fn({});

This works great, so I'm closing the issue.


Form submit without action/redirect/display

I have a form embedded in my custom sidebar and I want the user to stay on the same page after the validation. The problem is that the validation cause the form to display itself replacing the whole page.
Here is the markdown 'pages/modules/subscribe/form.fr.md'
---
title: My contact Form
process:
    markdown: true
    twig: true
form:
    name: contact-form
    fields:
        - name: email
          label: Recevoir toutes les nouveautés directement
          autocomplete: on
          placeholder: Votre e-mail
          type: email

    buttons:
        - type: submit
          value: Valider

    process:
        - save:
            filename: newsLetterFR.csv
            extension: csv
            body: "{{ form.value.email|e }}\n"
            operation: add
---

Maybe the problem is how I integrated the form in 'myThemeDerivatedFromQuark/templates/partials/sidebar.html.twig
<div id="sidebar-subscribe">
{% include "embedded_form.html.twig" with { form: forms('contact-form') } %}
</div>

I tried action: "." , action: "" , action: . , action: without success.
I think the problem comes from 'plugins/form/templates/forms/default/form.html.twig' line 20
'{% set action = form.action ?: page.route ~ uri.params %}'
"form.action" is defaulted to "modules/subscribe" by the calling code. I tried to backtrace the problem but failed miserably...

You might want to ask this on the forum, since it is not really an issue with Grav. Also it is probably more related to the form plugin that has its own repository.
That said, perhaps the How to: Forms in modular pages might help?
I don't have much experience with forms, but have you tried adding a page parameter to the with part of the include, since form.html.twig sets the default action based on the page.route?

You should set the action to the route of the page that contains the sidebar as that is the page you want to end up on.


Added functionality to remove image from preview list

It's me again ^_^
Now every item from the list has a clickable icon to remove it from the preview list. I added a simple icon using the react-icons package. You should be able to style it better than me thou, I'm not good at styling things at all.

Thank you for your help again!
I will try to style the icon then publish a new version to NPM later :)

I change the color of remove button, then published new version to NPM.
Thank you for your help.


Qt5 requires extra libraries in the VNC

Updates in the base notebook image have necessitated some additional libraries to be installed in the VNC image.
This bug was caught when trying to run %gui qt5 in the newest VNC images, whereupon the kernel would die. Running napari on the VNC led to

Running export QT_DEBUG_PLUGINS=1 and then napari again gives

So the following libraries need to be added, presumably:

Woops - turns out the %gui magic is now semi-deprecated and not needed in all contexts - so things function as normal without that line.


how to extend class from animate?

I have a FLA file that export to canvas, I add a linkage movieClip that call OpenScreen_mc.
i try to extend the OpenScreen_mc
i try this code:
(function (window) {
  function OpenScreen() {
     // this.Container_constructor();
  }
  var p = createjs.extend(OpenScreen, lib.OpenScreen_mc);
  window.OpenScreen = createjs.promote(OpenScreen, "lib.OpenScreen_mc");
}(window));

and call to the "class" like this:
var  openScreen_mc = new OpenScreen()
stage.addChild(openScreen_mc);

but i don't see the OpenScreen on the stage.
i try to call the this.Container_constructor(); but i get overFlow.
How can i extend it?

Sorry for the late (probably unhelpful) reply.
You should be able to extend the class. There is an error in your extend, the 2nd parameter of "promote" is just the common name you want to prepend to methods.
window.OpenScreen = createjs.promote(OpenScreen, "OpenScreen_mc");

Not sure if that helps. I am closing the issue due to its age. Feel free to reopen if the issue persists or you have more info.


backgroundFill and backgroundStroke on text style not honored during postcompose animation

During development of my app, I found out that backgroundFill and backgroundStroke on text style are ignored during postcompose animation.
Feature

During postcompose animation

I prepared a sample derived from animation example on OL examples page.
JsFiddle
https://jsfiddle.net/cmuqLx3r/
Same sample in pastebin form.
https://pastebin.com/9vRYD2wz

vectorContext has other undocumentated limitations.  Another can be seen if you replace text: "test text", with text: "test\ntext",

i also met this problem. the backgroundFill of ol.style.Text doesn't show. only one point show.

@Yuki-Zhao  If you had a postcompose/postrender problem the background would not be displayed for any points.  If you see the background for only one point is more likely you are seeing something related to the problems described in #10098

The background fill does't work

The backgroundFill of ol.style.Text doesn't work

The backgroundFill of ol.style.Text doesn't work

The backgroundFill of ol.style.Text doesn't work

But does it appear for just one point? https://codesandbox.io/s/vector-label-decluttering-ssve7

yes! and some level, the backgroundfill doesn't work . some leverl, it work. why?

It's a decluttering bug #10098


[Add] Add good first issues link to the open source tools

Site URL
https://goodfirstissues.com/
Description of the above provided site
This website helps you filter out good first issues according to your tech stack.
Category
Open Source
Sub Category
issue tracker
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)
[X] I am a GSSoC'23 contributor

Hi @tayyab-ilyas, you may add this in open_source/tools.json file :)


Add ASSERT()

This time it also works w/ MSVC; I've tested it.
Fortunately, the first variadic argument of ASSERT() is always a string literal, which means we can (ab)use string literal concatenation instead of __VA_OPT__.
The macro can be used like this (all of these examples terminate, obviously):
ASSERT(1 == 0);
ASSERT(1 == 0, "One should equal zero");
ASSERT(1 == 0, "One should equal %s", "zero");

@Sirraide
Hey there! I have no problem resolving the merge conflicts, but it seems that it wants to push the commit that fixes them to your main branch. Just want to make sure you are okay with that before I screw up any of your working index or cause even more merge conflicts :p


Ability to configure template level Service Account

Summary
Provide the flexibility to configure different serviceaccount on the template level.
Motivation
Instead of giving all access to one service account. we can create multiple service account with different resource access. Each template will have appropriate serviceaccount based on needs
Proposal
  templates:
  - name: whalesay
    serviceaccount: test
    container:
      image: docker/whalesay:latest
      command: [cowsay]
      args: ["hello world"]

the feature is got implemented #1354


❌  Less Twitter more X

I'll leave it in draft until this question is resolved.
#294

Thanks for getting this moved along! It would be nice if we had some provenance of the image so that we know that it is aligned with our license. Do you think you could add that?

Thanks for getting this moved along! It would be nice if we had some provenance of the image so that we know that it is aligned with our license. Do you think you could add that?

It is the official X of x.com (Brand toolkit). With a black circle (homemade)
I haven't found anything about how to use or not use the logo.

I would say that this PR would solve #294 for now. If we want to make another change later, we can create a new more specified issue later or reopen it.


low hanging fruit

Looks good, but not sure about the new Usage. Square brackets indicate that they are optionals. If we want to include manly options we can make it:
Usage: manly COMMAND FLAGS...
   or: manly --help
   or: manly --version

or something like that.

Oh. I'd presumed all my life that square brackets were just delimiters for visual's sake.


Python environment is missing propagated inputs

Describe the bug
The propagatedBuildInputs of a Python package are not available in the shell created by devenv.
To reproduce
With this reproducing environment active, run
python -c "import requests"

You should get nothing, but instead get:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/p1g0gk6dkw7cmgb55mnp56vxksyqhwd2-devenv-profile/lib/python3.10/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
ModuleNotFoundError: No module named 'urllib3'

Version
devenv: 0.6.2

I've confirmed the issue. If you're looking for a workaround, you can use languages.python.package = pkgs.python3.withPackages(ps: [ ps.requests ]); in the meantime.

Let's compare 3 different environments:
1. pkgs.mkShell without python.withPackages
{
  default = pkgs.mkShell {
    packages = [pkgs.python3.pkgs.requests pkgs.python3];
  };
}

requests is not added to site-packages for this python package. Instead, each python dependency is added to PYTHONPATH:
$ echo $PYTHONPATH
/nix/store/mxgpk88mnqvxll57cyr2x49qlsi0pdc4-python3.10-requests-2.29.0/lib/python3.10/site-packages:/nix/store/n98j6fwy4lml4fc5hhgla3bgbnmrazcl-python3.10-brotlicffi-<IP_ADDRESS>/lib/python3.10/site-packages:/nix/store/n2zc7wanmvx51yh7z8cvw0r4bs4fryva-python3.10-cffi-1.15.1/lib/python3.10/site-packages:/nix/store/lmc6b17j60m1p2qqlggq8gw2rd822dxm-python3.10-pycparser-2.21/lib/python3.10/site-packages:/nix/store/92gqjlhr98gf1hv68r6mg44i65a1yfkn-python3-3.10.11/lib/python3.10/site-packages:/nix/store/crlxlwz5ihij0brs21n3r6l1a48y6sqy-python3.10-certifi-2022.12.07/lib/python3.10/site-packages:/nix/store/0p5p1spvq9p2r8lzlziz69b3m3432fra-python3.10-charset-normalizer-3.0.1/lib/python3.10/site-packages:/nix/store/iy9mm79nc0hw7kf6klzah1f4dwxqaflf-python3.10-idna-3.4/lib/python3.10/site-packages:/nix/store/vkpv88slzcgb6rqv7ha57b9yblp44ain-python3.10-urllib3-1.26.14/lib/python3.10/site-packages:/nix/store/vcmc87lniwyzsqbkxi7bb3kv914n8slh-python3.10-brotli-1.0.9/lib/python3.10/site-packages:/nix/store/ahqs5lwjdw7b62y2dxlniamhk0pqswbc-python3.10-pysocks-1.7.1/lib/python3.10/site-packages

2. pkgs.mkShell with python.withPackages
{
  default = pkgs.mkShell {
    packages =
      let pythonEnv = pkgs.python3.withPackages(ps: [ps.requests]);
      in [ pythonEnv ];
  };
}

The python package is wrapped and site-packages is populated with the dependencies.
$ ls /nix/store/n692zy7wl89ni3crl5jsc4hy26n7l0kz-python3-3.10.11-env/lib/python3.10/site-packages/
__pycache__                                     brotli.py                     cffi                                idna-3.4.dist-info        requests                   urllib3
_brotli.cpython-310-aarch64-linux-gnu.so        brotlicffi                    cffi-1.15.1.dist-info               pycparser                 requests-2.29.0.dist-info  urllib3-1.26.14.dist-info
_cffi_backend.cpython-310-aarch64-linux-gnu.so  brotlicffi-<IP_ADDRESS>.dist-info  charset_normalizer                  pycparser-2.21.dist-info  sitecustomize.py
_sysconfigdata__linux_aarch64-linux-gnu.py      certifi                       charset_normalizer-3.0.1.dist-info  PySocks-1.7.1.dist-info   socks.py
Brotli-1.0.9.dist-info                          certifi-2022.12.7.dist-info   idna                                README.txt                sockshandler.py

3. devenv.mkShell
{
  default = devenv.lib.mkShell {
    inherit inputs pkgs;
    modules = [
      ({ config, ... }: {
        packages = with config.languages.python.package.pkgs; [
          requests
        ];
        languages.python.enable = true;
      })
    ];
  };
}

$PYTHONPATH points to the python package's site-packages. It contains requests, but none of the runtime dependencies specified in propagatedBuildInputs.
$ echo $PYTHONPATH
/nix/store/x92y3vc5nfqpnx53paj9bjv1i4mi3mna-devenv-profile/lib/python3.10/site-packages
(devenv)
$ ls /nix/store/x92y3vc5nfqpnx53paj9bjv1i4mi3mna-devenv-profile/lib/python3.10/site-packages
__pycache__  _sysconfigdata__linux_aarch64-linux-gnu.py  README.txt  requests  requests-2.29.0.dist-info  sitecustomize.py

Modifying https://github.com/cachix/devenv/blob/828b46c011d220172977ccc9d1941d1755a8da98/src/modules/top-level.nix#L9-L13 with the following is enough to fix the issue:
{
  drvOrPackageToPaths = drvOrPackage:
    (if drvOrPackage ? outputs then
      builtins.map (output: drvOrPackage.${output}) drvOrPackage.outputs
    else
      [ drvOrPackage ]
    ) ++ (drvOrPackage.propagatedBuildInputs or [ ]);
}

That's interesting, thanks.
I wondered if we needed to handle the other kinds of propagated inputs, so I took another look at the Nixpkgs manual section Specifying depedencies. I still don't fully understand, this, but I think the answer is that we need propagatedBuildInputs , propagatedNativeBuildInputs, and depsTargetTargetPropagated unconditionally. Does that sound right to folks here?

we need propagatedBuildInputs , propagatedNativeBuildInputs, and depsTargetTargetPropagated unconditionally. Does that sound right to folks here?

Yeah, something like that.

Creating devenv.nix: ```
{ pkgs, ... }: {
packages = [ pkgs.python3Packages.requests ];
languages.python.enable = true;
}

This works:

`python -c "import requests"`


Something broken - with display of graphs

Hi Augustine,  I think we noticed this together on a recent Skype call, but the problem remains.
Thanks in advance for fixing this :-)

hi Augustine,
Now the window appears.  But in Safari, it is blocked from playing (upper image), and in Chrome, this is what I see (lower image):

back to the original error today

The above two responses seem to depend on the search results.  When I just click submit, without narrowing the search to a specific set of utterances, it returns all the utterances correctly, but the attempt to show graphs fails (with above error message).
However, when I first select "negative" and am displaying only negative sentences, then I see the windows as shown above, except that the videos don't play..

Display of graphs is not currently working.


componentschemas prefix?

Describe the bug
Since b719316, I see a lot of files and classes created prefixed with componentschemas_ and Componentsschema, which doesn't seem normal to me.
To Reproduce
Run openapi-python-client update --config=generator/config.yaml --path=generator/openapi.yaml && git status on sftpgo-client with openapi-python-client at b719316.
Expected behavior
Not this:
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	sftpgo_client/base/models/componentsschemas_admin_status.py
	sftpgo_client/base/models/componentsschemas_azure_blob_fs_config_access_tier.py
	sftpgo_client/base/models/componentsschemas_connection_status_protocol.py
	sftpgo_client/base/models/componentsschemas_filesystem_config_provider.py
	sftpgo_client/base/models/componentsschemas_ftpd_binding_tls_mode.py
	sftpgo_client/base/models/componentsschemas_gcs_config_automatic_credentials.py
	sftpgo_client/base/models/componentsschemas_secret_status.py
	sftpgo_client/base/models/componentsschemas_services_status_defender.py
	sftpgo_client/base/models/componentsschemas_transfer_operation_type.py
	sftpgo_client/base/models/componentsschemas_user_filters_tls_username.py
	sftpgo_client/base/models/componentsschemas_user_permissions.py
	sftpgo_client/base/models/componentsschemas_user_status.py

OpenAPI Spec File
https://github.com/ramnes/sftpgo-client/blob/5abdfe1ae486e1b16d56b72ac52fe20e9a418bf7/generator/openapi.yaml
Desktop (please complete the following information):

OS: Linux
Python Version: 3.9
openapi-python-client version b719316

Good catch! I've created a branch here which replicates the bug in our end-to-end tests. Looks like the auto-naming using parent class + property name is using the ref to the parent instead of the generated class name... whoops! 😬


[Feature request] Add support for independent windows

First of all, I start to say that I tried the drag and drop feature and it works perfectly, and I'm very thankful for such feature.
A couple of suggestions to push this plist editor experience even further (cit)

Please add support for separate tabs, it's handy when comparing files (one on the left side of the screen, one in the other)
The - (minus) button always works flawlessly when I need to delete an entry, and I saw that you implemented the = sign as a shortcut to add a child, and CMD + = to add a silbing, could be possible to change that to + maybe in a preference pane (I suppose that for american keyboards you need to press the shift key to use +, but in the IT keyboard we need to press shift to use =, so maybe the Plist editor can respect preferences policies to adapt to different shortcuts depending on the keyboard layout)
While this one could be low priority, consider to improve the toolbar GUI a little, (this doesn't need to be done in a day or two, it's something that could even take a couple of weeks or more)

Thank you for your time

Ok, I will improve them. Also, about the toolbar GUI, I don't have any artwork base, so I can't make these icons by myself, can you provide help or design a set of toolbar icons? Thanks!

Ok, I will improve them. Also, about the toolbar GUI, I don't have any artwork base, so I can't make these icons by myself, can you provide help or design a set of toolbar icons? Thanks!

Thanks for the updates, the + and - are working perfectly!
I took some time to get how to create a new window, I suggest to add a shortcut maybe, such as CMD+Shift+N, that would be nice
Another cool idea would be to be able to drag a tab from a window to another, just as chrome/firefox allows (also if you drag a tab out from a group, that tab becomes independent) but these are optional, feel free to implement them whenever you want

Thanks for the updates, the + and - are working perfectly!
I took some time to get how to create a new window, I suggest to add a shortcut maybe, such as CMD+Shift+N, that would be nice
Another cool idea would be to be able to drag a tab from a window to another, just as chrome/firefox allows (also if you drag a tab out from a group, that tab becomes independent) but these are optional, feel free to implement them whenever you want

Thanks for the updates, the + and - are working perfectly!
I took some time to get how to create a new window, I suggest to add a shortcut maybe, such as CMD+Shift+N, that would be nice
Another cool idea would be to be able to drag a tab from a window to another, just as chrome/firefox allows (also if you drag a tab out from a group, that tab becomes independent) but these are optional, feel free to implement them whenever you want

This is a great idea and I will try to implement it.

Thanks for the updates, the + and - are working perfectly!
I took some time to get how to create a new window, I suggest to add a shortcut maybe, such as CMD+Shift+N, that would be nice
Another cool idea would be to be able to drag a tab from a window to another, just as chrome/firefox allows (also if you drag a tab out from a group, that tab becomes independent) but these are optional, feel free to implement them whenever you want

This is a great idea and I will try to implement it.


file_selector path as input path

To select files for improvement faster, the inital path of the file selector should be the input path.
This is especially important if using the CLI option as the printed tree can become very large otherwise.

Cannot judge whether there are any unforseen drawbacks of this. Input @pbharrin @UmerHA ?

Cannot judge whether there are any unforseen drawbacks of this. Input @pbharrin @UmerHA ?

Hey, I don't see any drawback. Both changed functions (gui_file_selector and terminal_file_selector) still return a list of filenames, so it should be fine.

I like this.
Makes me think we should refactor the core logic and CLI UX specific things to make it easier to take decisions on what makes sense from UX perspective, and how the core building blocks should work.

See #718, tagging @lukaspetersson for visibility


Characters disappeared

Version confirmation

[X] Confirm

Following prerequisites

[X] Confirm

Neovim version
NVIM v0.8.3
Operating system/version
Archlinux with kernel version 6.1.10, x86_64
Terminal name/version
kitty 0.27.1
$TERM environment variable
xterm-kitty
Branch info
main (Default/Latest)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
sudo pacman -S neovim

bash

if command -v curl >/dev/null 2>&1; then
    bash -c "$(curl -fsSL https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.sh)"
else
    bash -c "$(wget -O- https://raw.githubusercontent.com/ayamir/nvimdots/HEAD/scripts/install.sh)"
fi

nvim

Then open any file with indent.
Expected behavior
Characters render normally.
Actual behavior
Some of the characters disappear.
Additional information

wow that's weird. Have u tried other terminal emulator? Things look fine on my end.

Yes, I tried gnome-terminal, Alacritty and foot, nothing changed.

I think I know what the problem, I always use 2-spaces for tab, but I changed tabstop only, and I also need to change shiftwidth and softtabstop to 2 to make it work!


TypeError using interface ui: 'exports'

Description of the Change
Cannot run ui: 'exports' tests using API. The call to mocha.run() throws an exception "TypeError: Cannot read property 'skip' of undefined".
/home/rpaterson/programming/signpost/toshokan/node_modules/mocha/lib/mocha.js:207
    exports.xit = context.xit || context.test.skip;
                                             ^

TypeError: Cannot read property 'skip' of undefined

The ui: 'exports' interface is implemented in a basic manner. Only suites, tests and before-/beforeAll- and after-/afterAll-hooks are supported. Neither it.skip nor it.only are accepted.
This bug was introduced by PR #2997.
The correction is very simple:
exports.xit = context.xit || (context.test && context.test.skip);

Benefits
Bug fixing
Applicable issues
issue #3004

Coverage increased (+0.09%) to 90.663% when pulling ca6492e2be26a3d90b2419fb7699ec9197e6e576 on juergba:issue/3004 into d60b3339ffe79fadcaad22047dd20334cd77babb on mochajs:master.

@boneskull please close, since solved in b5c0fb0


[package.json] repository field does not need to be an object

VSCode Version: 0.10.11
OS Version: OS X 10.11.3

Steps to Reproduce:

Create a valid package.json file
Add a repository field with the values Microsoft/vscode (or whatever repository)

It looks like VS Code is complaining about the repository field not being an object. This is not entirely correct as per the documentation.

For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:
"repository": "npm/npm"

"repository": "gist:11081aaa281"

"repository": "bitbucket:example/repo"

"repository": "gitlab:another/repo"

Code is using the schemas from scheamstore.org and http://json.schemastore.org/package defines repository to be an object.

@egamma added a PR to fix this https://github.com/SchemaStore/schemastore/pull/129

@aeschli until the PR is accepted, could we use your schema override mechanism to fix this?

@egamma @aeschli PR got accepted!

great thanks & closing.

Is this automatically being picked up by VS Code?

We fetch the schema dynamically whenever possible. I've just checked and this seems to be the case

npm does a lot of normalizations of package.json, meaning it supports a lot of shortcuts. Someone should probably go through this list https://github.com/npm/normalize-package-data#what-normalization-currently-entails and ensure it's all supported.

@sindresorhus Thanks for pointing to the docs. Will add it to my todo.


Add dotnet SDK manifest

Fixed https://github.com/ably/ably-dotnet/issues/1175

I wonder if this may not be complete as when I view the rendered matrix then I notice we're indicating lack of compliance with Protocol: MessagePack, which I was under the belief was implemented in this SDK. Is that not the case?
Unrelated, as far as I can tell the lack of Agent Identifier is because #498 was closed without being implemented (#607 was created but then closed without explanation).

I was working on the message pack, you can see the PR https://github.com/ably/ably-dotnet/pull/494, but I was asked to stop the work in the interest of other high-priority work, then we never picked it up from there.
But I can say, we had made some progress with it.
There seems to be a new issue created to resolve this -> https://github.com/ably/ably-dotnet/issues/590.

Seems I don't have permission to merge this PR : (

Timeout

Transport: Connection Open Timeout is just provided as a option under ClientOptions. If you try to find usages, you will find none.

A couple of notes:

Transport: Connection Open Timeout seems to be implemented in ably-dotnet
It seems like there's a msgpack serialiser and tests in the ably-dotnet repo, is there no way for developers using the library to enable it? If there is then we should probably add it with a caveat.

Transport: Connection Open Timeout is just provided as a option under ClientOptions. If you try to find usages, you will find none.

@sacOO7 HttpOpenTimeout Is used here

@sacOO7 HttpOpenTimeout Is used here

It's using the value from Defaults.MaxHttpOpenTimeout and not from clientOptions.httpOpenTimeout

@sacOO7 I stand corrected :)


Update xengsort Docker image

bump the tool to version 2.0.5
support building using GHA

@AnzeLovse please give it another round of review. The install is now from pip.


Add support for label branches

Would you consider adding the branch name to the repr method for LabelRowV2? It would then make interactive use and telling which row belongs to which branch. I've discussed with Laverne and he thinks it could be appropriate given that branch_name sits on a potentially similar level to data_hash etc.
I originally thought that it might be nice to have the labels belonging to a data_hash coming together and you could then select on branch however I think that having all labels sit on a flat level is at least as good and makes it a bit more self-serve.


support for multiple servers in DSN connection string

Add support for multiple host:ip pairs in DSN connection string:
crate:<HOSTNAME_OR_IP>:<PORT>[,<HOSTNAME_OR_IP>:<PORT>,...][/<SCHEMA>]

This will generate a pool of available servers. Each execute() will select the next available server from the pool and perform the HTTP request on that server. If a server is not reachable any more, it will be removed from the list of available servers.

also travis failed, pls check

unfortunately travis still fails, pls check

otherwise ack


Resolved #582: display ClientConnection select cipher of TLS

Resolved #582
Display the select cipher of TLS on the tui

Fantastic, thanks! This was requested for a loong time 😊 🎉 🍰
Next stop: ServerConnection 😉

Guys, any update on the server connection details?
@mhils @chhsiao90

@Tushar-Rastogi: all that information is present in the data (https://docs.mitmproxy.org/stable/api/mitmproxy/connection.html), if it's not exposed in the UI I'd be more than happy to accept a pull request! 😃


Docker volumes are created in /var/lib/docker/volumes even with devicemapper

Description
I'm using devicemapper, and have allocated disk space to that purpose (see info output below).
Part of the reason I did this is that I don't have enough space in /var/lib/docker to store my docker volumes, but this command:
  sudo docker create -v /home/rlpowell/.stack -v /home/rlpowell/.local --name stackstore rlpowell/shell /bin/true

creates the volume in /var/lib/docker/volumes:
rlpowell@vrici> sudo docker volume inspect b8d5d1ec03ac6b10fe6fa90c3022613290ae726bd483383342a1037665e5866e
[
    {
        "Name": "b8d5d1ec03ac6b10fe6fa90c3022613290ae726bd483383342a1037665e5866e",
        "Driver": "local",
        "Mountpoint": "/var/lib/docker/volumes/b8d5d1ec03ac6b10fe6fa90c3022613290ae726bd483383342a1037665e5866e/_data",
        "Labels": null,
        "Scope": "local"
    }
]

Describe the results you received:
My / filling due to docker volume operations.
Describe the results you expected:
I expected everything docker to go into the devicemapper LV
Output of docker version:
Client:
 Version:         1.12.1
 API version:     1.24
 Package version: docker-common-1.12.1-28.git9a3752d.fc26.x86_64
 Go version:      go1.7.1
 Git commit:      9a3752d/1.12.1
 Built:
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.1
 API version:     1.24
 Package version: docker-common-1.12.1-28.git9a3752d.fc26.x86_64
 Go version:      go1.7.1
 Git commit:      9a3752d/1.12.1
 Built:
 OS/Arch:         linux/amd64

Output of docker info:
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 77
Server Version: 1.12.1
Storage Driver: devicemapper
 Pool Name: docker-docker--pool
 Pool Blocksize: 524.3 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file:
 Metadata file:
 Data Space Used: 4.269 GB
 Data Space Total: 48.32 GB
 Data Space Available: 44.05 GB
 Metadata Space Used: 1.835 MB
 Metadata Space Total: 54.53 MB
 Metadata Space Available: 52.69 MB
 Thin Pool Minimum Free Space: 4.832 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Library Version: 1.02.135 (2016-09-26)
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
 Volume: local
 Network: null host bridge overlay
Swarm: inactive
Runtimes: oci runc
Default Runtime: oci
Security Options: seccomp selinux
Kernel Version: 4.6.0-0.rc6.git0.1.fc25.x86_64
Operating System: Fedora 26 (Server Edition)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 4
Total Memory: 2.801 GiB
Name: vrici.digitalkingdom.org
ID: JIIS:TCH7:ZYXV:M2KK:EXQH:GZPY:OAPY:2DJF:SE7A:UZBO:A3PX:NUWF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://registry.access.redhat.com/v1/
Insecure Registries:
 <IP_ADDRESS>/8
Registries: registry.access.redhat.com (secure), docker.io (secure)

Additional environment details (AWS, VirtualBox, physical, etc.):
This is on a KVM/Qemu virtual host on a physical box in my basement.

Storage driver is only used for storing image layers. Not volumes, configuration files etc. If you want to switch all storage to a different path/drive use the --graph option.

Thanks for the workaround.  The current situation seems a bit anti-POLS to me, though; I told docker to use devicemapper, I expect it to do so.

Wait, hold on.  If I'm reading correctly --graph is an option I give to the daemon that points it at some other place in the file tree, instead of /var/lib/docker ; that doesn't help me at all.  The whole issue is that I allocated a bunch of space to the unformatted docker LV for docker to use; there is no place in my filesystem tree to point to.
I guess I'll just format the LV with a regular file system and go back to using overlay.

Storage driver is not used for managing the data volumes. As mentioned by @tonistiigi, they are used only to manage the image layers.
Data volumes are managed by volume drivers. By default, the local volume driver is used which keeps the volumes under /var/lib/docker/volumes.  If you intend to use an unused LV for volumes, mount it at /var/lib/docker/volumes.

@rlpowell I agree this is a valid usecase. You don't want to exhaust your disk space under the root tree /, by creating a lot of volumes which are stored under /var/lib/docker/volumes.
One solution to your problem is docker volume plugins. I don't know if you have used that before.
I wrote a docker-lvm-plugin which seems to be more optimal for your usecase. You can check it out at the below link:
https://github.com/projectatomic/docker-lvm-plugin
With this plugin you can have a separate volume group (VG) dedicated for your volumes.  You can carve out volumes and they will come out of this volume group and not stored under /var/lib/docker/volumes. You can also create a thin pool and provision thin volumes, take snapshots of thin and regular volumes.
PS: thin volumes are more space friendly since they are COW and don't take up space unless you write on the volume.
Shishir

@rlpowell one reason to use volumes is to prevent the overhead that layered file systems give; in your case (I see you're using an anonymous volume), is there a reason to use a volume at all? Omitting the volume will just use the containers filesystem (which is on devicemapper).
Other than that, I think the question here is answered; volumes are separate from the graphdriver / containers filesystem (and for a reason); if you need a specific type of volume (for example, a volume that uses devicemapper), a volume driver plugin is the right approach.

I'm finding this a bit confusing... I think my problem falls under this issue:
I have a huge docker image (22G) built with:
FROM scratch
COPY data/ /data/
VOLUME /data/

I cannot docker create --name=mydata --read-only myimage:latest nop because it copies everything out to /var/lib/docker/volumes?
I expected that it would leave everything in the devicemapper lvm-direct storage space and then I could use it via docker run --name=mytests --volumes-from=mydata ... without ending up with duplicate copy of my 22G on the host's root filesystem.
The mydata is test data (relatively unchanging) and I want to access it from mytests so I can run tests using the corpus of test data.
What's the right approach to do this then?  Does something like the docker-lvm-plugin mentioned above even come into play?

I do not believe we populate volumes via volumes-from.
It's also not copying your entire image into the volume, it's copying the data from the image at requested volume path into the volume.

I do not believe we populate volumes via volumes-from.

In my testing, I haven't even gotten to the --volumes-from= part... I'm stuck on docker create....
It runs out of space as it copies everything (all the data is in the VOLUME directory) into /var/lib/docker/volumes/2fb0353bcc6aa90db1638e85baa0ab42eb988db2ec94fa53fb18e8e0f0003125.  I did an ls in there and it looks like the /data/ directory from my image.
So this isn't expected behavior then?

@docwhat If you have data in /data and have a VOLUME /data then yes it is expected to copy everything from /data. If you do not want this behavior, then you can either use the nocopy flag with a named volume (e.g. docker run -v mydata:/data:nocopy) or remove all data in /data in the image.

:nocopy? I haven't seen that before.

...And that'd be too late, since the docker create for the mydata container has already copied everything to /var/lib/docker/volumes/xxxx.

Just to be clear... given this run.sh script...
#!/bin/bash

set -euxo pipefail

cat <<EOF > Dockerfile
FROM scratch
COPY ./ /data/
VOLUME /data/
CMD ["nop"]
EOF

date > file1
date --utc > file2

docker build -t data .
docker create --name=mydata data nop
docker inspect mydata | jq '.[0].Mounts[0]'
dir=$(docker inspect mydata | jq '.[0].Mounts[0].Source' -r)

ls -al "$dir"

I get this output:
+ cat
+ date
+ date --utc
+ docker build -t data .
Sending build context to Docker daemon  5.12 kB
Step 1 : FROM scratch
 --->
Step 2 : COPY ./ /data/
 ---> af348fc85577
Removing intermediate container ad95fe7f353e
Step 3 : VOLUME /data/
 ---> Running in e0a8d052fcb7
 ---> 35f83caae681
Removing intermediate container e0a8d052fcb7
Step 4 : CMD nop
 ---> Running in 635a40e3b984
 ---> 5583ecb7835c
Removing intermediate container 635a40e3b984
Successfully built 5583ecb7835c
+ docker create --name=mydata data nop
daa3b7f88bbde3139d8a598bb98980400e2abaa4bdd4851a9fd38399cb19693a
+ docker inspect mydata
+ jq '.[0].Mounts[0]'
{
  "Name": "5f0e158aa1acf0621c4d05af44fd804be7c0aa7d6c0983430b2ada81e81e5b75",
  "Source": "/var/lib/docker/volumes/5f0e158aa1acf0621c4d05af44fd804be7c0aa7d6c0983430b2ada81e81e5b75/_data",
  "Destination": "/data",
  "Driver": "local",
  "Mode": "",
  "RW": true,
  "Propagation": ""
}
++ docker inspect mydata
++ jq '.[0].Mounts[0].Source' -r
+ dir=/var/lib/docker/volumes/5f0e158aa1acf0621c4d05af44fd804be7c0aa7d6c0983430b2ada81e81e5b75/_data
+ ls -al /var/lib/docker/volumes/5f0e158aa1acf0621c4d05af44fd804be7c0aa7d6c0983430b2ada81e81e5b75/_data
total 16
drwxr-xr-x 2 root root  60 Nov 14 15:55 .
drwxr-xr-x 3 root root  18 Nov 14 15:55 ..
-rw-r--r-- 1 root root  54 Nov 14 15:55 Dockerfile
-rw-r--r-- 1 root root  29 Nov 14 15:55 file1
-rw-r--r-- 1 root root  29 Nov 14 15:55 file2
-rwxr-xr-x 1 root root 328 Nov 14 15:55 run.sh

This is expected?
And there is no way to prevent the /var/lib/docker/volumes/5f0e158aa1acf0621c4d05af44fd804be7c0aa7d6c0983430b2ada81e81e5b75 directory from being created and just letting it export directly from the LVM device/snapshot?

I'm expecting the answers to be "yes" and "no, that's how it works", but I want to be certain.

Yes that's correct.
It sounds like you don't want to do VOLUME /data in the dockerfile.

Okay, thanks for clearing that confusion up! I didn't expect to suddenly see /var/lib/docker filling up because I didn't understand what was really going on under the covers.
How would you suggest dealing with huge amounts of (versioned, though infrequently changing) data like this?

@docwhat Generally I wouldn't put data into an image.

I know this has been closed. But there's a LOT of information out there about docker LVM setup... and it seems that a LOT of people have made the same assumption that I have... that if I set up Docker for LVM thinpooldev, it will store its "stuff" there. We'd been running that way for almost two months before discovering that our data volumes (which we use to allow other containers to access data from a given container, and for backups) are ending up on the rootfs.
Would it be possible to get a clarification of this in the docs, somewhere obvious?

@jantman Please open an issue on github.com/docker/docker.github.io
Thanks!


Possible inheritance issue with Pveil.

Hi @gmischler , I was trying to understand your code when I came across this. shouldn't Pveil be inheriting from ProcMixin. I don't see any other way that the method here will be legal.

Pveil.py was rather out of date, it had some other problems as well.
I didn't pay much attention to it for a while, since the original pveil.csh is undocumented and normally doesn't even get installed.
But I think I've fixed it now.


Implement Tarallo.restore_item method

Useful for testing purposes and for fixing stronzate made by utonti asd

Also call the restore_item in the tests where comments say so and assert something useful


Duplicate Workflow option

Describe the solution you'd like
In the overflow menu of a workflow, create a duplicate button.
Describe the benefits or justification for this request
Saves time in copying an existing workflow
Additional context
Add any other context or screenshots about the feature request here.

@marcusdroy could you take a look at this
Duplicate seems to create just an empty new workflow sharing some of the workflow details but no duplication of the revision.

Thanks for the update @Okisa . @BenjaminRuby has opened a PR and merged that in for the slight URL change.


Always on Top goes above Full Screen items as well

Microsoft PowerToys version
0.53.1
Running as admin

[ ] Yes

Area(s) with issue?
Always on Top
Steps to reproduce

activate Always on Top on a window
go full screen in a video from a different window

✔ Expected Behavior
full screen content takes precedence and goes over the 'Always on Top' window still.
or there should be another toggle to control if an 'always on top' window goes above full screen content or not
❌ Actual Behavior
the active 'Always on Top' window is still on top over the full screened content
Other Software
No response

2. go full screen in a video from a different window

Do you mean another virtual desktop?

no, just another window/app in general.
for example, say you make the calculator active as always on top then try to full screen a youtube video. I would expect the full screen video to take precedence over the calculator still.
I suggest a toggle for this as I can see it both ways based on use case situation.

Hi friends! This bug is relatively old. In an effort to clear out any stale bugs, could you please let us know if this bug is still showing up on any of the latest builds, 0.74 or up!
/needinfo


move badges on top of the readme

Most of our repositories usually have the badges placed at the very top of the README.md file even before the project name.
Aligning with the majority here and moving badges to the top.

Ignoring ci from the ancient gods.


Slow performance of Perl 6 notebook

Hi there,
Perl 6 notebook is running great. Works fabulous.
I frequently use R notebook of which R kernel is here. But compared to the Python and R kernel, Perl 6 notebook runs much slower.
Is it due to the problem in rakudo itself or the Perl 6 kernel ? Or is it due to communication in the sockets?
Best,
Suman

Hi Suman,
Could you be a bit more specific about what runs slower?  Have you seen performance differences between Perl 6 code in a notebook and in a standalone program?  (or in the built-in REPL?)
thanks
Brian

Hi Brian,
I mean execution of the Perl 6 code in notebook cell.
Executing 1/3 in REPL is faster than in notebook.
This is the docker image I used.
Best,
Suman

Hi Suman,
I can confirm the behavior you're seeing -- on my machine even a simple round trip seems to take about 0.7 seconds.  The bad news is I don't see a simple explanation, but the good news is that optimization is definitely possible.
For instance, the HMAC+SHA256 is computed for every message (as part of the protocol) -- this computation takes between 0.10 and 0.15 seconds, and there are several messages involved in generating a response (sending a status of busy to iopub, then sending an execute_input message to iopub, then sending an execute_result to iopub, and finally and sending an execute_reply to shell), so this computation be a good candidate for optimization.
Brian

I think the above commit resolves the slowness -- the response time seems to be a lot better now (closer to 0.1s).   I'll go ahead and close this ticket (not that future optimizations wouldn't help even more of course)


API for becomeFirstResponder?

I am trying to make a TextFieldRowFormer the default selection for the form, so that the keyboard is up and ready when the form appears.
I have tried both row.cell.textField.becomeFirstResponder() and
let rowToSelect: NSIndexPath = NSIndexPath(forRow: 0, inSection: 0);
tableView.selectRowAtIndexPath(rowToSelect, animated: true, scrollPosition: UITableViewScrollPosition.None)

...but neither seems to trigger selection of the row.  Am I missing something obvious?

Of course, I discovered immediately after posting. The answer is
          let rowToSelect: NSIndexPath = NSIndexPath(forRow: 0, inSection: 0);
          row.cellSelected(rowToSelect)

in case anyone else has the same question.


[BUG] - onPress Button doesn't have PressEvent type

NextUI Version
2.2.9
Describe the bug
The docs say that we need to use onPress instead onClick. I'm trying to return whole Event but returning Parameter 'e' implicitly has an 'any' type.. Because PressEvent does not defined.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue

Create Button component
add onPress attribute with parameter

Expected behavior
returning PressEvent types
Screenshots or Videos
No response
Operating System Version
Windows 10
Browser
Chrome

I'm able to get PressEvent. Mind to share a Stackblitz link for reproducing the issue?

I'm able to get PressEvent. Mind to share a Stackblitz link for reproducing the issue?

Yup, we can get the log, but we can't importing the types

@LangRizkie You may try the following
import {PressEvent} from "@react-types/shared";

const handlePress = (e: PressEvent) => {
  console.log(e)
};

<Button {...args} onPress={(e) => handlePress(e)}>
...
</Button>

import {PressEvent} from "@react-types/shared";

So, its not the part of nextui or react itself? I should install another lib for it, thank you!

I believe so. I don't see it's exported from nextui.

Note that it only needs to be a devDependency, like here:
https://github.com/nextui-org/nextui/blob/e67b3af223607c6e8ef2dedb1348b3424e3b75d3/package.json#L70
I must admit that I am a little confused as to why this is here:
https://github.com/nextui-org/nextui/blob/e67b3af223607c6e8ef2dedb1348b3424e3b75d3/packages/hooks/use-aria-press/src/events.ts#L5

If you prefer not to install an extra package just for this, the following seems to work:
type PressEvent = Parameters<NonNullable<React.ComponentProps<typeof Button>['onPress']>>[0];

I ran into this as well and unfortunately, possibly due to a newer version of some package the suggestion to use @react-types/shared does not provide a compatible type.
  Types of parameters 'e' and 'e' are incompatible.
    Type 'PressEvent' is missing the following properties from type 'PressEvent': x, yts(2322)

I went with the approach of introspecting Parameters above but perhaps it would be easier to use the component if it reexported the compatible PressEvent.


Data provenance

Posted by @dmoglioni
USER STORY - notebook/ingestion/timeseries/versioning/data provenance
A user codes a script or notebook that generates a datasets as an output (e.g. timeseries) and then wants to ingest both data and source code (versioned) in EOTDL.

For Q0 datasets this can already be done.
For Q2+ datasets, we should enable a new item type in the specification which allows linking the source code as assets.
Versioning is automatically supported.

This sounds interesting. I think we should consider adding this new feature to any STAC object (Catálogo, Collection, Items), depending on the case. A new "ml-dataset:provenance" feature should be added, composed by STAC links objects that point the script or Notebook, both local or URL. We should also consider adding a new mediatype for STAC links, such as "Code" or "script" or something similar.
Use cases:

Catalog: when the entire catalog has the same data provenance.
Collection: when the entire Collection has the same data provenance. Question: should the "ml-dataset:provenance: objects inside the Collections be also placed in the root Catalog? This may duplicate data, but give an holistic view of the catalog provenance.
Item: when the item has a concrete data provenance. Same question as before. In STAC items we should consider to add the provenance as assets instead of links in a separate object, but the "ml-dataset:provenance" should contain the title/name of the asset, just as a link and a wat to define It as part of the extension.


Map Hotfix 2

Changelog:
Hive

Adds Warden's locker
Moves salvage magnet further into space
Gives Chem their goldarned Chem Dispenser back
Links metamphisics machine->console->scanner
Some other little tweaks I'm too tired to remember

Arena

Something about a chem dispenser

Proto for Hive

Bumps minpop up to 30

oh wait what! dang it...


Allow to add multiple configuration file to configmap

Q
A

Bug fix?
yes

New feature?
no

API breaks?
no

Deprecations?
no

License
Apache 2.0

What's in this PR?

This PR fixes the ability to use multiple plugin crs. Now if multiple plugin crs are submitted the created ConfigMap will hold all cr related config instead of overwriting it.
Checklist

[x] Implementation tested (with at least one cloud provider)
[x] Error handling code meets the guideline
[x] Logging code meets the guideline (TODO)
[x] User guide and development docs updated (if needed)

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


How to get a model.pt for pretrained Roberta

❓ Questions and Help
Hello, I trained my own Roberta model following these steps. I would like to convert it to be usable with hugging face transformers (this can be done with this function).
However, after the training I have the checkpoint directory with all checkpoints saved (with checkpoint_best.pt/checkpoint_last.pt and earlier steps) but not a model.pt. It something normally found in this directory, how can I generate such a file ?
Thank you !

You can use checkpoint_best.pt or checkpoint_last.pt. We manually rename them to model.pt before releasing model checkpoints, but any checkpoint file can be used. The huggingface script should work with any of them as well.


Add Livestreamfails tests

Pull request checklist:

[ ] CHANGELOG.md was updated, if applicable

Description

Looks good to me!


Contributing MedMCQA dataset

Adding MedMCQA dataset ( https://paperswithcode.com/dataset/medmcqa )
Name: MedMCQA
Description: MedMCQA is a large-scale, Multiple-Choice Question Answering (MCQA) dataset designed to address real-world medical entrance exam questions.
MedMCQA has more than 194k high-quality AIIMS & NEET PG entrance exam MCQs covering 2.4k healthcare topics and 21 medical subjects are collected with an average token length of 12.77 and high topical diversity.
The dataset contains questions about the following topics: Anesthesia, Anatomy, Biochemistry, Dental, ENT, Forensic Medicine (FM), Obstetrics and Gynecology (O&G), Medicine, Microbiology, Ophthalmology, Orthopedics Pathology, Pediatrics, Pharmacology, Physiology,
Psychiatry, Radiology Skin, Preventive & Social Medicine (PSM), and Surgery
Code: https://github.com/medmcqa/medmcqa
All files are at place :
a dataset script  : medmcqa.py
a dataset card with tags and information  : README.md.
a metadata file : dataset_infos.json
a dummy-data file  : Please help to generate this file, I was facing
 raise JSONDecodeError("Extra data", s, end)  error

Hi, thank you for the modifications and suggestions. Please check the changes.

Can you run make style to fix the code formatting please ?
Oh and was wrong with the dummy_data.zip file, it must actually be placed at datasets/medmcqa/dummy/1.1.0/dummy_data.zip - sorry about that
Can you also set the class label names to names=["a", "b", "c", "d"] to make it explicit which label corresponds to each answer ? You might have to regenerate dataset_infos.json after that

Hi, The labels are not ['a', 'b', 'c', 'd'] rather the labels are [1,2,3,4] where 1 represents the 1'st option, 2nd represents 2nd option so on, and its int.
I tried changing to ['a','b','c','d'] and getting this error :
ValueError: Class label 4 greater than configured num_classes 4
Please check.

@lhoestq lhoestq Please check

You have this error because we expect the labels to start at 0, not 1. I think you just need to pass int(data["cop"]) - 1 when generating the examples

Hey ! You can use this instead:
"cop": -1 if split == "test" else int(data["cop"]) -1

@lhoestq Thank you for your assistance, and I have updated the dataset_infos.json without any error. All the issues are resolved. Please review and approve if it's ready to merge.

Thanks ! There are two things to fic the CI:

run make style to fix code formatting
fix the dummy_data.zip file. Currently it's created from a directory called "dummy" that contains the JSON file, but it should be called "dummy_data" instead

@lhoestq All done! Please check :)

@lhoestq Please check if anything else needs to be done :)


implement new aws sdk

Kinesis sending to an S3 bucket works, great.
The data is still inconvenient to retrieve making it essentially unusable to the user. Whether this is a setup issue with S3, or something else, starting a rdms in the same way that the proof-of-concept S3 service was used may solve the immediate issue of making the data usable by the user.

After reading the following whitepaper:
https://d0.awsstatic.com/whitepapers/whitepaper-streaming-data-solutions-on-aws-with-amazon-kinesis.pdf
I am going to implement the suggested solution to use KDF. The goal is to send the datastream to Elasticsearch and then see if a custom HTTP endpoint can be created to give the user more options.
Resources:

https://aws.amazon.com/kinesis/data-firehose/
https://aws.amazon.com/kinesis/data-firehose/pricing/?nc=sn&loc=3
https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html
https://docs.aws.amazon.com/firehose/latest/dev/create-destination.html
https://aws.amazon.com/what-is/elasticsearch/
https://aws.amazon.com/opensearch-service/

Firehose is.... a firehose.
Dynamodb seems to be the best option until multiple destinations are made available. This should not be too difficult since trait impl allows each destination sdk to be implemented.
Creating a well-organized config file will make automation a breeze.

adding opensearch is the next goal. Once done, then the option to send to multiple destination can become available.


Update hardhat.config.ts

Added an option for deploying TokenFrenzy on mumbai-network.

I this okay? Since moonkey's bundler and paymaster are on mumbia network. TokenFrenzy could also have mumbia instance to interact as a moon.

We can use it on mumbai network if there are a couple of UniswapV2 pools with some liquidity and if Chainlink has VRF2 service on mumbai


fix javadoc for AnimationController

zero loopCount doesn't play animation (which make sense in term of API) and from repo history it looks like it always been like that. Also, 1 is the default for methods without loop count parameter.

Huh, unfortunate naming on that parameter. Passing 0 to loop 0 times is obviously more natural than passing 1 to loop 0 times. I'd say playCount is a better name, except then the negative value to play continuously doesn't feel natural.

I guess that "loopCount" could be interpreted as "looping count"  or "number of loops to play".  Considering you're playing a looped animation, it feel more naturals to me to define how many times i want it to be played. Also, in the code, you either compute the number of loops to play, or hard code it eg. animator.animate("myAnim", 3, ...), which is suggesting (my interpretation) the animation will be played 3 times (and not 4).
In the javadoc we have :

The number of times to loop the animation, 1 to play the animation only once, negative to continuously loop the animation.

To disambiguate, it could be replaced by :

The number of times to play the animation, 1 to play the animation only once, negative to continuously loop the animation.

What do you think?

I like it.


Invalid pack schema

Thanks for the cool work here! I noticed that the schema for this pack is incorrect: https://github.com/teoseller/osquery-attck/blob/master/network_connection_listening.conf#L32. Maybe that description is supposed to be included with one of the queries?

changed the pack schema thanks to zwass.


[Feature Request] Support directly specifying the input data of a flow in Web UI for batch run instead of specifying it through an additional evaluate flow.

Is your feature request related to a problem? Please describe.
When we click run in Web UI, we can't specify the input data such as a .jsonl file for batch run. Normally, if we want to specify the input data for a flow in Web UI, we need to click evaluate and then select the data, but this will create an additional evaluate flow. Is there any way to directly specify the input data of the flow and run the flow?
Describe the solution you'd like
When we click run, we can directly select the input data instead of specifying it through an additional evaluate flow.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Hi @CodeFree-xzk , you can also create a batch run without evaluation, the evaluation tab is optional:

Also, for Studio UI issue, please refer to Frequency asked questions (FAQ) — Prompt flow documentation and create feedback on azure portal, thanks!


Incorporate terms from open demographics project

http://nikkistevens.com/open-demographics/questions/gender.html

Thanks, but how do you propose to incorporate these subtleties into proporti.onl? I have access only to each Twitter account's public profile data:
https://emptysqua.re/blog/gender-of-twitter-users-i-follow/


Response JSON

Hello,
Thanks you for this project.
Can you give me the way to return a JSON reponse if the limit is over and not a simple response ?
I have a other question... I will config different request rate limit for different type of customers.
What will be for you the best solution ? Can I overide your script to add this specification ?
Thanks you

Hello @Grazulex
You can wrap a closure with the rate limit facade and check if it has been executed or not. With that result, you could return your own JSON response.
https://laravel.com/docs/9.x/rate-limiting#basic-usage
About the second question, you should check the segmenting rate limits documentation to see how to apply a custom rate limiter for a specific user.
https://laravel.com/docs/9.x/routing#segmenting-rate-limits
Anyway, PR are welcome if you want to add new functionalities to the package :)


python310Packages.asn1: 2.6.0 -> 2.7.0

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 211470 run on x86_64-linux 1

5 packages marked as broken and skipped:

home-assistant-component-tests.smart_meter_texas
python310Packages.asn1
python310Packages.smart-meter-texas
python311Packages.asn1
python311Packages.smart-meter-texas

Result of nixpkgs-review pr 211470 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.smart_meter_texas
python310Packages.asn1
python310Packages.smart-meter-texas
python311Packages.asn1
python311Packages.smart-meter-texas


Mediafile video properties

Hi,
does exist a way to get video width/height properties from a url stream?
I'm using this library in my Xamarin Forms project, and when i set in VideoView horizontal/vertical options to "FillAndExpand" (AspectMode="AspectFill"), video get stretched to max width/height of my Android device in portrait mode.
Video is this streaming url:
http://fms.105.net:1935/live/rmc1/playlist.m3u8
Thank you & sorry if this feature is already implemented.
UPDATE:
I noticed same xaml (Xamarin Forms) in UWP app works correctly: aspect ratio video is ok even if screen height is greater than screen width ("portrait mode" in UWP).
My code is:
Xaml Page
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:CocoTV"
             xmlns:forms="clr-namespace:Plugin.MediaManager.Forms;assembly=Plugin.MediaManager.Forms"
             x:Class="CocoTV.MainPage">
    <ContentPage.Content>
        <forms:VideoView x:Name="videoView"
        HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
                     AspectMode="AspectFill"/>
    </ContentPage.Content>
</ContentPage>

.cs page
namespace CocoTV
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
        }

        protected override void OnAppearing()
        {
            base.OnAppearing();

            videoView.Source = "http://fms.105.net:1935/live/rmc1/playlist.m3u8";
            CrossMediaManager.Current.PlaybackController.Play();
        }
    }
}

Lewix

Download and parse the M3U8 file, the dimensions are contained within the playlist.
#EXT-X-STREAM-INF:BANDWIDTH=1058446,CODECS="avc1.66.31,mp4a.40.2",RESOLUTION=720x432

Ok thank you @mike-rowley
yes i noticed metadata inside m3u file, i will parse them.
But I think issue about wrong aspect radio in portrait mode esists (in UWP issue is not present, aspect ratio is ok)

Yes, it is a known issue on Android.

Any possibility of this issue getting fixed anytime soon?

Looks like SimpleExoPlayerView has a method called setResizeMode that we could possibly leverage?


Add timing capability to FSMs

Requirement
This Issue is a continuation (a second increment) to PR #560.
The Styx FSMs need a capability to trigger timed state transitions. To protect from being trapped indefinitely within a state, or to perform certain transitions in a repeated fashion.
A PR #560 demonstrates a use case. The FSM needs to detect a ByteStream subscriber inactivity. But it solved the problem by implementing a custom trimer for this purpose only. This timer is intimately tied to the particular FSM and cannot be reused for other uses.
We could use a generic timer also for detecting Netty channel inactivity. Currently we need an IdleStateHandler in a Netty pipeline that feeds an external event into a FlowControllingHttpContentProducer FSM. From design point of view it would be much simpler if the FlowControllingHttpContentProducer could detect this itself by timing the ContentChunkEvents.
Acceptance Criteria

Remove all inactive subscriber related logic away from FlowControllerTimer class.
The FlowControllerTimer must not have any knowledge about FSM internal state such as:

        if (producer.state() != COMPLETED && producer.state() != TERMINATED) {
            resetTimerOrTearDownFlowController();
        }

The FlowControllerTimer should provide start, stop and restart methods.
A timer instance could be injected in the FlowControllingHttpContentProducer and the timer implementation should encapsulate any threading model etc away from the FSM.

Closing all issues over 3 years old. New issues can be created if problems are still occurring.


Fix/change logo

Changed low quality png logo for svg logo and tweek welcome screen layout.
task: https://cesko-digital.atlassian.net/browse/LOON-370

LGTM


chore: pre-bundle lambda functions

The internal Amazon build system makes it extremely hard to use esbuild to bundle during app synthesis. So we are taking this opportunity to experiment with the idea of pre-bundling lambda functions during library build, alongside synthesis of a construct class that can be used seamlessly in the construct hub code.
The developer experience is pretty neat:

Create a file somewhere under the src tree with the .lambda.ts extension.
This file should export a single async function called handler.
Run projen.
This will do the following:

Add a compile task that uses esbuild to create a bundle from them under lib/xxx.bundle/index.js
Generate TypeScript code under xxx.ts with a construct that extends lambda.Function which points to the bundled asset.

Now, in your CDK code, just import the generated construct and use it.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

I'm not super familiar with esbuild, but if my lambda handler used some random NPM package or maybe a specific version of the JS AWS SDK, would esbuild bundle those dependencies into the bundled lambda output (EG: in lib/xxx.bundle/index.js)?

I'm not super familiar with esbuild, but if my lambda handler used some random NPM package or maybe a specific version of the JS AWS SDK, would esbuild bundle those dependencies into the bundled lambda output (EG: in lib/xxx.bundle/index.js)?

Yessir

I'm going to take this for a swing in p6-namer.  Hopefully we can move it to ts, 2.0, this.  The idea and convention is imho better than the current lambdanodejs, I feel like the naming conventions are more consistent.
How does this flow to the other langs?


Restart does not help after first installation

Aug 08 18:08:59 T470s gnome-shell[1642]: JS ERROR: Extension<EMAIL_ADDRESS>TypeError: device is null
                                         _getIPAddress@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/net/DeviceMonitor.js:176:13
                                         _loadDevices@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/net/DeviceMonitor.js:111:36
                                         init@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/net/DeviceMonitor.js:80:14
                                         DeviceMonitorClass@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/net/DeviceMonitor.js:23:14
                                         AppClass@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/App.js:24:31
                                         instance@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/App.js:13:52
                                         enable@/home/alex/.local/share/gnome-shell/extensions/network-stats@gnome.noroadsleft.xyz/extension.js:17:9

DEBUG net/DeviceMonitor.js::_loadDevices(100) 5 - wlp58s0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
INFO net/DeviceMonitor.js::_getIPAddress(188) No IP addresses found for device 'enp0s31f6'
INFO extension.js::init(10) initializing Network Stats
INFO extension.js::enable(15) enabling Network Stats
DEBUG net/DeviceMonitor.js::_loadDevices(100) 2 - lo:   20895     192    0    0    0     0          0         0    20895     192    0    0    0     0       0          0
DEBUG net/DeviceMonitor.js::_loadDevices(100) 3 - enp0s31f6:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
DEBUG net/DeviceMonitor.js::_loadDevices(100) 4 - wwan0:  131761     270    0    0    0     0          0         0    64118     326    0    0    0     0       0          0
DEBUG net/DeviceMonitor.js::_loadDevices(100) 5 - wlp58s0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
DEBUG net/DeviceMonitor.js::_loadDevices(100) 6 - tun0:   58068     111    0    0    0     0          0         0    30081     139    0    0    0     0       0          0
INFO net/DeviceMonitor.js::_getIPAddress(188) No IP addresses found for device 'enp0s31f6'

I don't understand exactly why it is the way it was, but at least it works now.
As far as I know, the Java framework works with nmcli and reads the data from /proc/net/dev and there is a small problem with me.
My modem is called wwan0 in the path mentioned. With nmcli device status, however, I get the name cdc-wdm0 for the interface.
Therefore I got an error in the file deviceMonitor.js that device = null.
I have therefore changed the function _loadDevices() slightly. It is anything but nice, but it works for now.
        for (const name of devices) {
            let deviceObj;
            if (name == 'wwan0'){
                deviceObj = this._client.get_device_by_iface('cdc-wdm0');
            } else {
                deviceObj = this._client.get_device_by_iface(name);
            }
            const addresses = this._getIPAddress(deviceObj, GLib.SYSDEF_AF_INET);
            const type = this.getDeviceTypeFromDevice(deviceObj);
            this._devices[name] = {
                name,
                type,
                device: deviceObj,
                ip: addresses[0] || ""
            };
        }

@mindsuru  Can you check what does below comands print ?
ifconfig
ls /sys/class/net
If these commands are giving us correct value we can think of using it depending on compatibility and consistency, otherwise we will add a safety check to avoid the crash.

`ifconfig
enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
ether 54:e1:ad:b4:7b:d3  txqueuelen 1000  (Ethernet)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 0  bytes 0 (0.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 16  memory 0xdc200000-dc220000
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
inet <IP_ADDRESS>  netmask <IP_ADDRESS>
inet6 ::1  prefixlen 128  scopeid 0x10
loop  txqueuelen 1000  (Lokale Schleife)
RX packets 109135  bytes 11480053 (11.4 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 109135  bytes 11480053 (11.4 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
lxcbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
inet -----------  netmask <IP_ADDRESS>  broadcast -----------
ether -----------  txqueuelen 1000  (Ethernet)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 0  bytes 0 (0.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1330
inet -----------  netmask <IP_ADDRESS>  destination -----------
inet6 -----------  prefixlen 64  scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
RX packets 19840  bytes 7264648 (7.2 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 20863  bytes 4083116 (4.0 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
wlp58s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
ether 9c:da:3e:7c:cb:2b  txqueuelen 1000  (Ethernet)
RX packets 59920  bytes 69032469 (69.0 MB)
RX errors 0  dropped 3421  overruns 0  frame 0
TX packets 20997  bytes 5852551 (5.8 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
wwan0: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST>  mtu 1430
inet -----------  netmask <IP_ADDRESS>  broadcast -----------
inet6 -----------  prefixlen 64  scopeid 0x0
inet6 -----------  prefixlen 64  scopeid 0x0
inet6 -----------  prefixlen 64  scopeid 0x0
ether -----------  txqueuelen 1000  (Ethernet)
RX packets 34362  bytes 26771948 (26.7 MB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 28481  bytes 6411450 (6.4 MB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0`
ls /sys/class/net enp0s31f6  lo  lxcbr0  tun0  wlp58s0  wwan0

Doesn't look like a problem with the output inteface names are correct.
I don't think we can add some workaround for this. But will add safety check in next release.