Fix defaults HTTPBodyReader with ReadJSON option for GET request

Hello,
Using default HTTPBodyReader with ReadJSON option activated, I find a behaviour that is I guess not expected:
Use case:
Used modules: register + confirm.
Since I want to use JSON body for the register module, the ReadJSON option for HTTPBodyReader is set to true.
The confirm module generate a link the user must click on to confirm its account.
Clicking on the link send a GET request to the endpoint with cnf query parameters containing confirm selector & confirm verifier data.
Issue:
The HTTPBodyReader expects a JSON body filled for each received request.
For some request, we don't have a body: the GET request user performs confirming its account.
Point of views:
From the HTTP/1.1 :"A server SHOULD read and forward a message-body on any request; if the request method does not include defined semantics for an entity-body, then the message-body SHOULD be ignored when handling the request."
Some would even say a GET request should never receive a message but it is a today only a convention.
Solution:
I have modified the default HTTPBodyReader to be open to all cases we could face:

We want to handle message-body if JSON is expected.
We want to take into account URL parameters, even if JSON is expected: we might have both so I do a merge of values from message body and url parameters.
http.Request Form handler is permissive, it will not handle JSON content-type and just ignore message body if header is not handled on its side.

-> I do ParseForm in all cases and handle manually JSON case if required.
Thanks for your feedback !

Something to consider is that in the ReadJSON side, the GET request for confirm isn't actually meant to hit the server directly from a browser.
It's intended that you have something interacting with the API (like a Javascript client) that's performing these API requests on behalf of the user. In that mode, the GET request is a no-op.
Have you seen this documentation?
https://github.com/volatiletech/authboss/blob/master/config.go#L89-L102
This is how Authboss should be configured if using JSON to make that GET a POST instead so it's more semantically correct (POST has a body).

Thank you for your help. I indeed missed this configuration variable.
I'll implement it your way to solve the issue then.


Allow terminating default TaskPool threads

What problem does this solve or what need does it fill?
The way TaskPool is designed means that the only way to terminate its threads is to drop it. Bevy's three default TaskPools are stored in static OnceLocks, which means they cannot be modified or dropped after being initialized. Thus, the threads managed by those pools simply run forever until the process ends.
This is a problem, because I am using Bevy in an environment where all of those threads need to have terminated before the process is able to exit, but currently there is no way to do that. It also means that the on_thread_destroy callback currently never actually gets called.
What solution would you like?
I'm not experienced enough with multithreading and async, nor library API design in general, to know what a good solution for this would look like. Presumably, the way the default pools are stored would need to be changed, to make it actually possible to drop them. An alternative would be to add an API to terminate a TaskPool's threads without dropping it, but I don't think that would be a feasible solution, because of how footgunny it would be to allow people to do that and then continue to use the pool.
What alternative(s) have you considered?

Running Bevy single-threaded, by disabling the multi-threaded feature. Probably the easiest solution, but I'd prefer not to have to lose all the benefits of running multi-threaded.
Attempting to fix the issue of needing threads to have terminated before stopping the process. I haven't been able to get this to work.
Forking bevy to add the aforementioned terminate-threads-without-dropping API, and being careful to only call it when the process is about to exit. This does work, but it would be better if a more proper solution could be found, also so that I don't have to deal with the overhead of using a fork.

Additional context
The environment I'm using Bevy in that is causing these issues, is a C# application running on Mono. I'm using C#'s p/invoke functionality to call unmanaged (Rust) code from C#, and visa-versa. When the application is exiting, Mono attempts to terminate any remaining threads, but freezes up if any of those threads are stuck running native code, as happens with Bevy's default TaskPools.

I found this forum thread which seems to describe my problem. The proposed solutions are to clean up all of your native threads before exiting, or to mess with the Windows security attributes stuff. From my testing the former works, but the latter doesn't.

By the way, the default task pools are currently exposed through wrapper types, that only have get-or-init and panicking getter methods. It would be nice if these wrapper types also had a standard fallible getter that returns an Option or Result.

Thinking about this on-and-off while doing other things, the only reasonable solution I can think of would be to replace the OnceLock<TaskPool>s with RwLock<Option<TaskPool>>s, and expose an Option::take-like method.
If noone else is going to engage with this issue, I'm just going to open a PR that implements this and the other API improvements I want.


Changing The Sample Frequency of T265 Accelrometer

Required Info

Camera Model
T265

Firmware Version
<IP_ADDRESS>7

Operating System & Version
Ubuntu 16

Kernel Version (Linux Only)
4.4.0-45-generic

Platform
PC

SDK Version
2.0

Language
Python or C

Segment
Robot

Issue Description
Is it at all possible to change the frequency at which the T265's IMU samples the accelerometer so that it can match the gyroscope's sample frequency at 200hz? For our application we would like the accel and gyro synchronized at 200hz, but the only existing stream profile has the accel sample at 64 hz. Is it possible that I could make a new stream profile which would sample at the rate I want, or is the rate locked in by the firmware? If it is possible to make a new profile, where should I begin?

Hi @schmitd
Unfortunately, this is currently locked by firmware.


[Question] Return Key

It's possible change the "Search" text from Return Key to "Done"?

Hey @gperdomor this is implemented in https://github.com/umhan35/react-native-search-bar/pull/133/commits/a1811f2b5b518c052507ada8b9af6d3f64437b5e and is scheduled to be in the next release


Use LLVM's new pass manager when possible

Fixes #12115
Using havlak as an example:

With the old pass manager:

Time that took to produce bc file and optimize it: 3.49s
Binary size: 372K
Time to execute: 4.043s

With the new pass manager:

Time that took to produce bc file and optimize it: 4.81s
Binary size: 332K
Time to execute: 3.759s

So just from this example we can see that:

it takes a bit longer to optimize
the resulting binary is smaller
the resulting binary is faster

But I don't think this is generally true. Well, for a "hello world" program I can also see that it takes a bit longer to optimize, and that the binary is smaller.

The new pass manager is used automatically when available (with LLVM version >= 13).


security: zynqmp: succint description

Docs for 9a3986cea3c27144fd9c11af942e1448a109b903 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/979/docs/artifacts/html/index.html

Docs for 0120d054b274b624518327322245824cc0cb3d8b are browesable at: https://ci.foundries.io/projects/fio-docs/builds/980/docs/artifacts/html/index.html

Docs for 9f0fbd545a37289652fac305fd82f0ae1b03264a are browesable at: https://ci.foundries.io/projects/fio-docs/builds/981/docs/artifacts/html/index.html

Would also be nice to have some links for the application notes covering this from Xilinx.

Would also be nice to have some links for the application notes covering this from Xilinx.

ok

Docs for f20cd3d0ddc6d589343a690332c60068a6ce7199 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/982/docs/artifacts/html/index.html

Docs for 120b28028090727e679d946218d6fa8c805b4b67 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/983/docs/artifacts/html/index.html

@angolini thanks for the review! will address it now

@angolini I updated with your comments and took the liberty to add your reviewed-by. in any case, let me know if you need me to change anything

Docs for 45d371dc7fc7e69690e201c7659c314afbd322f3 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/984/docs/artifacts/html/index.html

Docs for 54f70963a8f2d41f682079a86f625e0731d7fe2f are browesable at: https://ci.foundries.io/projects/fio-docs/builds/985/docs/artifacts/html/index.html

Docs for 7c2ad254b07279f615914077e26ee6950bd86f4a are browesable at: https://ci.foundries.io/projects/fio-docs/builds/986/docs/artifacts/html/index.html

Docs for f66b3564996b9386c08b03166f28c419f61bdb6f are browesable at: https://ci.foundries.io/projects/fio-docs/builds/987/docs/artifacts/html/index.html

Docs for f44745ab6eac500c444e72be9132285c1fd0f65e are browesable at: https://ci.foundries.io/projects/fio-docs/builds/988/docs/artifacts/html/index.html

Docs for cab15e735cb89e891a7a73cc08b7d619d579edf8 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/989/docs/artifacts/html/index.html

I was wondering if the first part (until line 31) would better fit as a blog post, which would point to the reference manual. Only because "reference manual" docs usually don't include the decision process.
And also, it's always good to update the blog.

I agree, the format of this doc is covering the narrative behind the work required to secure the platform, which is better in a blog post or tutorial.
I think here we can simply just add the high level overview and steps required, and move the decision process to a blog post (that can later be referenced here).
@ldts what do you think? You can use https://github.com/foundriesio/website/pull/31 as a reference for what needs to be done for publishing a blog post.

Docs for 6565a0d26ccf7d4d0b4448e415a43769878d3fc3 are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1007/docs/artifacts/html/index.html

Docs for ba9f666289a0346575c6482b7f1d44407b707f7b are browesable at: https://ci.foundries.io/projects/fio-docs/builds/1008/docs/artifacts/html/index.html

@doanac should I just rebase and merge this one too?

@ldts - as long as the comments are addressed feel free to merge


Support sphinx.ext.doctest directives

I have a project where most of the reStructuredText python source is in a .. testcode:: python block instead of .. code-block:: python.


Export all results to a file

Is your feature request related to a problem? Please describe.
Not related to a problem.
Describe the solution you'd like
When using the SOQL builder UI we have an option to export the results to a CSV or JSON file but it seems only the first 2,000 records get exported. It would be nice if all of the results would be exported to a CSV or JSON.

Hi @elijahnavarro - Thanks for submitting feedback.  The underlying API has a max of 2,000 records, so you see the same in SOQL Builder.  How much data are you looking to export?  What are you seeking to do with that data once you export it?   I'd like to hear more about your use case(s).
(This is a duplicate of #145 but will combine the feedback once you weigh in with more info)

Hello @smaddox-sf - Exporting all of the results would be ideal. There are some cases where I would like to share all my results with someone through a CSV if they for some reason do not have access to my Salesforce instance. I believe this functionality exists in Salesforce reports (exporting all report results to a CSV).


How do I disable dark mode?

How do I disable dark mode. The moment I set my Windows 11 to dark mode, the datepicker changed to darkmode.  I want it to always stay in light mode. I was unable to find a prop to do that. Kindly suggest.

Same here. By default, it is set to dark mode.

Hi @rahul4200  and @kudaleganesh 👋
Thanks for your feedback.
Ideally, this component should not need any special props to disable or enable the dark mode. By default, it uses the system settings to determine the mode. But you can specify in your tailwind.config.js configuration file that you want to handle the mode change manually.
In your tailwindcss.config.js file
module.exports = {
  darkMode: 'class',
  // ...
}

This code should allow you to solve the problem. For more information on the dark mode, you can consult

@rahul4200 & @kudaleganesh I think we can close this issue. If you have any issues, you can reopen it so we can discuss it.


Increment version for eventhub releases

Increment version for eventhub releases

Can one of the admins verify this patch?


Copy to gcp

Pull Request
Description
Small PR to make a scrip that moves prepare_ml_data from local to gcp
But it does that a long time - might be quicker to run on gcp, but thought it was worth sharing the script
How Has This Been Tested?
Run the script

[ ] No
[ ] Yes

Checklist:

[ ] My code follows OCF's coding style guidelines
[ ] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have checked my code and corrected any misspellings

Very nice use of ThreadPoolExecutor!
Um... Does this script do anything that gsutil -m cp -rJn <source> <destination> doesn't do? (notes about gsutil here)
In general, I'm keen to ensure that - as a team - we have as little code to maintain as possible! The more code we have to maintain, the slower we'll be.
I appreciate this script is by no means a huge maintenance burden! And the script is lovely and well written! It's just that, if we can use someone else's code (gsutil, in this instance!) then let's use someone else's code and let them worry about maintenance! 🙂

Yea i appreciate, that we should keep things as neat as possible. Im also torn between not having any files locally on my computer and not committing them.
Perhaps a solution here is to put in in the notebook  (or scratch) folder, then its there, but it doesnt need any maintaince

Perhaps a solution here is to put in in the notebook (or scratch) folder, then its there, but it doesnt need any maintaince

SGTM!


Fix close settings causing split webviews (#188).

There is one other problem -

we should not allow creating multiple setting pages.

@akashnimare Fixed. This occurs only when there is no domains. I forgot to distinguish 0 and undefinded.

@geeeeeeeeek looks good. Thanks 😄


Add a small utility to call a CDF function

Useful to reduce code duplication in extractors.

Checkmarx scan completed with the following findings

Lines
Severity
Category
File
Link

68
Medium
Heap_Inspection
Cognite.Metrics/MetricsConfig.cs
Checkmarx


Extract LwLsn cache into extension

Only a few direct references to the existence of the cache remain. Most synchronizations can be replaced by utilizing smgrimmedsync calls to update the LwLsn of the relation to ProcLastRecPtr, which generally is "good enough".
Notes:

This changes the eviction algorithm from LRU to "lowest value" (see #2760)
It changes the request value of uncached pages from "max evicted from shared buffers" to "max evicted from shared buffers without fitting in the LwLsn cache".

Didn't review in detail, just looked at a high level.
Note: This doesn't merely move code around! This also changes the eviction policy, from LRU to evicting the entry with oldest LSN. In essence, this implements the "pairing heap" idea from #2760. I think that's a good idea, and I'm pleasantly surprised how small that change was, but please call it out in the commit message.
Since this changes the behaviour, got performance tests or diagnostics or something to demonstrate the benefit? My gut feeling is that if the cache is large enough, it won't make much difference in practice as the LSN used in getpage requests will be "good enough" anyway. But potentially this let's us get away with a smaller cache.

It was my actually feedback on #2760: I do not think that it is good idea to true to optimize something without proving that it is a bottleneck: without any test demonstrating the problem or benchmark illustrating advantage if new approach.
LRU is IMHO in this case should provide quite good approximation of LSN order (actually I can not imaging situation when it will swap out entries with smaller LSN).  pairingheap_add is fast but still much slower than dlist_push_tail (just one VAX instruction:). And I am +1 for "pleasantly surprised how small that change was", but still it is ~10 times more lines of code than maintaining LRU list.
So while moving lat written LSN cache to neon extension is definitely right thing, I am not so sure about replacinf LRU with pairing heap. And as far as I understand it will not solve the problem with vacuum+prefetch.

As discussed moving to draft


Surface action cache hit rate

Problem
Surface the action cache hit rate, in particular if remote caching is used.
Suggested solution
The following events may help detect these:

no cache hit:
check cache hit (category remote action cache check) within event ActionContinuation.execute (category general information), thereafter execution

remote execution: potentially upload missing inputs (category Remote execution upload time) followed by execute remotely (category remote action execution)
remote cache only: TODO
disk cache: not included in profile?

cache hit:
check cache hit within event ActionContinuation.execute, no execution thereafter

DataProvider to provide rate and/or absolute numbers (cache checks, successful cache checks)
SuggestionProvider to suggest strategies to increase the cache hit rate, e.g. --incompatible_strict_action_env

If latency is high, then having many parallel check cache hit actions can help speed up getting remote cache hits (as the jobs are idle due to high latency).
An estimated latency might be extracted by looking for the shortest check cache hit entry.
Increasing --jobs to above your machine's # of cores could help.

All actions that weren't in the internal action cache:

event with category action processing

All events that check a remote cache (disk_cache or remote_cache)

event with category remote action cache check

Cache hits also have a related event of category remote output download, but not any events indicating remote execution (e.g. of category remote action execution)
Cache misses should have a related event for execution (local or remote)


HTTP hook on_close modification. Fixes for Mac OS X and CherryPy installation.

Merged from my local master into develop branch as advised from my previous pull request. Copying relevant parts of the description here:
These set of commits fixes some of the issues I found while trying to build on Mac OS X and also modifies on_close HTTP hook.
CherryPy installation process blindly tries to install CherryPy using sudo. On systems that have virtualenv, sudo is not required. Blindly installing CherryPy will also clobber existing installations. I made a few changes to the procedure so that:
We check to see if we can import cherrypy. If we can do this then there is no need to install it.
If we need to install CherryPy, we first check if the python binary is in a virtualenv. We don't use sudo if this is the case. We check to see if we have homebrew. We don't use sudo for homebrew installations too.
Prompt the user if they indeed want to install CherryPy. In this way, the user has the option to cancel and manually install CherryPy in the correct location.
on_close HTTP hook is modified so that it receives bytes send and received for the duration of the connection. This is to allow for systems that want to track bandwidth usage. This is only a minor change and does not affect the current existing HTTP hooks that don't use these fields. NB: I just found out there is already bandwidth usage statistics in the HTTP management API. However, for our use case, we need this management API turned off but we still need the usage statistics. Since bytes send and received is already being tracked per connection anyway, I just modify on_close to add these two to the HTTP hook parameters.
Also fixed output colorization on Mac OS X. Somehow, Mac OS X Bash does not support \e.

Great work! I will merge some commits from your pull request.

Added .AppleDouble folders to ignore patterns.
https://github.com/rudeb0t/simple-rtmp-server/commit/f83e6a80501ac107f45bee791bc229be3843d541
merged.

Hide Linux epoll code on Darwin.
https://github.com/rudeb0t/simple-rtmp-server/commit/56e1ce52f5d8c46cdebc4796ddbd3b62545bc34e
merged with modification, should enable the queue:
well， there seems some bug of st for OS X with kqueue: #336
I have add patch 3rdparty/patches/3.st.osx.kqueue.patch

Modified on_close webhook.
Pass the send_bytes and recv_bytes count to the web hook.
9203ff3
but I change the get recv/send bytes from kbps, not the skt.

about 1bf937c, Do not use sudo with brew on OS X, already fixed.
about ab11519, Fix CherryPy installation process on OS X, reject for no plan to support virtualenv.


Can this be used in objective c?

(BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
if (self.navigationController.viewControllers == 2) {
return true;
}
if ([self.navigationController isKindOfClass:[NavigationStack class]]) {
[((NavigationStack *)self.navigationController) showControllers];
}
return false;
}

Yes you can use it

I will close this since i answered my own question.


cass-config-builder

New Image Pull Request Template
I didn't include any tests since the image throws an error as the upstream did.

Image Size

[x] The Image is smaller in size than its common public counterpart.
[ ] The Image is larger in size than its common public counterpart (please explain in the notes).

Notes:
Image Vulnerabilities

[ ] The Grype vulnerability scan returned 0 CVE(s).
[x] The Grype vulnerability scan returned > 0 CVE(s) (please explain in the notes).

Notes:
NAME     INSTALLED  FIXED-IN  TYPE  VULNERABILITY   SEVERITY
busybox  1.36.1-r2            apk   CVE-2023-42366  Medium
busybox  1.36.1-r2            apk   CVE-2023-42365  Medium
busybox  1.36.1-r2            apk   CVE-2023-42364  Medium
busybox  1.36.1-r2            apk   CVE-2023-42363  Medium

@dlorenc said they nacked the CVEs and it should be good tomorrow then.
Image Tagging

[ ] The image is not tagged with version tags.
[x] The image is tagged with :latest
[ ] The image is not tagged with :latest (please explain in the notes).

Notes:
Basic Testing - K8s cluster

[ ] The container image was successfully loaded into a kind cluster.
[x] The container image could not be loaded into a kind cluster (please explain in the notes).

Notes: The image throws an error since the upstream also throws an error datastax/cass-config-builder:1.0.7
Basic Testing - Package/Application

[ ] The application is accessible to the user/cluster/etc. after start-up.
[ ] The application is not accessible to the user/cluster/etc. after start-up. (please explain in the notes).

Notes:
Helm

[ ] A Helm chart has been provided and the container image can be used with the chart.  If needed, please add a -compat package to close any gaps with the public helm chart.
[ ] A Helm chart has been provided and the container image is not working with the chart (please explain in the notes).
[x] A Helm chart was not provided.

Notes:
Processor Architectures

[ ] The image was built and tested for x86_64.
[ ] The image could not be built for x86_64 (please explain in the notes).
[x] The image was built and tested for aarch64.
[ ] The image could not be built for aarch64. (please explain in the notes).

Notes:
Functional Testing + Documentation

[ ] Functional tests have been included and the tests are passing.  All tests have been documnted in the notes section.

Notes:
Environment Testing + Documentation

[ ] There has not been a request and/or there is no indication that this image needs tested on a public cloud provider.
[ ] The container image has been tested successfully on a public cloud provider (AWS, GCP, Azure).
[ ] The container image has not been tested successfully on a public cloud provider (AWS, GCP, Azure) (please explain in the notes).

Notes:
Version

[ ] The package version is the latest version of the package.  The latest tag points to this version.
[ ] The package version is the not the latest version of the package (please explain in the notes).

Notes:
Dev Tag Availability

[x] There is a dev tag available that includes a shell and apk tools (by depending on 'wolfi-base')
[ ] There is not a dev tag available that includes a shell and apk tools (by depending on 'wolfi-base') (please explain in the notes).

Notes:
Access Control + Authentication

[x] The image runs as nonroot and GID/UID are set to 65532 or upstream default
[ ] Alternatively the username and GID/UID may be a commonly used one from the ecosystem e.g: postgres
[ ] The image requires a non-standard username or non-standard GID/UID (please explain in the notes).

ENTRYPOINT

[x] applications/servers/utilities set to call main program with no arguments e.g. [redis-server]
[ ] applications/servers/utilities not set to call main program with no arguments e.g. [redis-server] (please explain in the notes)
[ ] base images leave empty.
[ ] base image and not empty (please explain in the notes).
[ ] dev variants is set to entrypoint script that falls back to system.
[ ] dev variants is not set to entrypoint script that falls back to system (please explain in the notes).

CMD

[ ] For server applications give arguments to start in daemon mode (may be empty)
[ ] For utilities/tooling bring up help e.g. –help
[ ] For base images with a shell, call it e.g. [/bin/sh]

Environment Variables

[ ] Environment variables added.
[ ] Environment variables not added and not required.

SIGTERM

[ ] The image responds to SIGTERM (e.g., docker kill $(docker run -d --rm cgr.dev/chainguard/nginx))

Logs

[ ] Error logs write to stderr and normal logs to stdout. Logs DO NOT write to file.

Documentation - README

[x] A README file has been provided and it follows the README template.

I didn't include any tests since the image throws an error as the upstream did.

This isn't super reassuring. Is there anything we can test about the image to ensure even a minimum level of functionality?
Is there an upstream issue about why their image fails basic tests?

Is there an upstream issue about why their image fails basic tests?

I don't think so maybe @mamccorm can help us with that?

Is there anything we can test about the image to ensure even a minimum level of functionality?

To be honest I couldn't find anything since the image is failing already

according to the latest comments in the image request here we understand that how they use this image so we created test cases to test the image we built to ensure whether it fits their needs. We used the same Helm chart to deploy cass-operator and edited the ImageConfig to ensure that the image we built is going to be used.


fix YAML file for usability/limit-output…

… since starting a YAML scalar with a special character ('*') can cause some versions of the python yaml module to baulk (although others seem ok with it, as long as there are two, so I didn't notice this on my version). See #368 for details.

LGTM


Even bandsCount >= 5 in DataTileSource not working correctly

Describe the bug
Using even bandsCount >= 6 in DataTileSource generates incorrect output, when using last band as alpha channel.
What we try to do

Set layer style to show RGBA
{color: ["color",["band", 4],["band", 3],["band", 2],["/", ["band", bands.length + 1], 255]]}
Ask for 5 bands from titiler - you'll get 6bands (5bands + alpha) as output
Set DataTileSource to work with 6 bands (5 + alpha)
Alpha mask is not working correctly
To fix this behavior we generated ol/DataTile with one more dimension, when working with even bandsCount:

To Reproduce
Steps to reproduce the behavior:

Change value of totalBandsCount (row: 24) directly to bandsCount (In this example it is 6).

Example
https://codesandbox.io/s/numpytile-forked-e279im

I also encounter this with a 5 band GeoTIFF (returning 6 bands including the alpha).  The workaround there is to explicitly specify the bands and duplicate one of them:
  sources: [
    {
      nodata: 0,
      bands; [1, 2, 3, 4, 5, 5],
      url: 'xxxx.tif',
    },
  ],


Empty string with quotes.

for example:
filter = ""
this code can't handle it
} else if (sscanf (line, "%[^=] = \"%[^\"]\"", key, value) == 2
       ||  sscanf (line, "%[^=] = '%[^\']'",   key, value) == 2) {

this string will be processed in
} else if (sscanf (line, "%[^=] = %[^;#]", key, value) == 2) {

the condition
if (!strcmp(value, "\"\"") || (!strcmp(value, "''"))) {
        value[0]=0 ;
}

will not be processed.
result:
load = ""
save = """"
load = """"
save = """"""
etc.

Hi,
You're right, quotes are not well handled when a dictionary is resaved.
I've work a bit on this trouble and end up with a rewrite save/load mechanism (see https://github.com/ndevilla/iniparser/tree/quoting and 9daa5ac)

quotes (" and ') can be used to protect special values (#, ;, ", ')
escaping \ char can be used to protect special values outside quotes
escaping \ char can also be used to represent \n, \r, \t
when saving a value, if it contains a special value it will be surrounded by "

According to wikipedia those behavior are part of some ini implementations (see https://en.wikipedia.org/wiki/INI_file#Escape_characters)
@ndevilla Given this change is not trivial I'd like to have your opinion on this before going further

Good catch @edgbla !
Seems the empty-quoted value is just not processed in the correct place. I would just move the test one case down, so that filter="" is understood like filter=
You would lose the empty quotes when saving back, but they were unneeded anyway, no?
@touilleMan I would rather avoid getting into character escape handling. Not so hard to write I believe, but it would break existing implementations that expect to see \n come in and out as \n (character backslash + character n) rather than a literal CR.
BTW: this is probably worth including in the documentation to avoid surprising users.
What do you think?

@ndevilla you're right about this : my fix break the api which is not really nice
I guess we can explicit the "no escaping" policy in the documentation and explain the user is expected to run sprintf on the returned value if he wants to cook the escaping (i.g. order to turn 2-chars literal \n into a real \n)
But I'm still not sure about the saving of a quoted value:
Considering an ini file
[main]
key = "   my    value   " # surounding witespaces

We load it into iniparser, then save the resulting dictionary:
[main]
key =    my   value

This time the string "   my    value   " is become   my value   (no quotes), which means if we reload it into iniparser the starting and ending witespaces will be stripped.
Solution could be to check on save if the value starts/ends with a space and then automatically surround it by quotes...

I always use quotes for strings, they make the text more readable.
I can't use filter without quotes, spaces will be removed.

54716a77d621373ad3428170af6dacf9f106c264 solve the key="" bug, Better late then never ! :smile:
@ndevilla What do you think about the point I exposed in my previous post about the way a quoted-string get it quotes removed when saved ? Do you see something to do about it ?

I would keep things the way they are, and document the fact that if you are using iniparser to read/write/read pathologic cases like key="    value    " you will lose the surrounding white spaces on the second read.
What makes ini a great config file format is the fact that it is so simple it can be understood without need to read some documentation.  Users can automatically guess how it works: a key is set to a value. The value is anything between the first and last non-blank character on the line, and comments are preceded by a hash.  Getting into whitespace handling when surrounded by quotes seems like opening a can of worms. You will have to tag such values as special cases in the parser to be able to print them back exactly as they were read. That can be done, but is it really worth it?
The initial goal of this library was to easily access values parsed from a config file, I never meant it to be a full-fledged round-trip editor. That said, I have nothing against extending the library to do such things. It would probably best be renamed as iniedit or similar to indicate its intentions.

Good catch @edgbla ! Seems the empty-quoted value is just not processed in the correct place. I would just move the test one case down, so that filter="" is understood like filter= You would lose the empty quotes when saving back, but they were unneeded anyway, no?

This had been fixed with commit 54716a77d621373ad3428170af6dacf9f106c264


Microsoft 365 learning pathways has a configuration issue. Ask your administrator for assistance.

PROVISIONING NOTE: If you are having issues with the SharePoint look book while trying to provision M365 learning pathways please do not post that issue to this repo as we cannot help you here. Please post all questions and issues for the SharePoint look book to SharePoint/sp-provisioning-service GitHub Issues List.

WEB PART NOT LOADING: If you are getting the error: "Microsoft 365 learning pathways has a configuration issue. Ask your administrator for assistance". Please review the Diagnosing Pre-Check guidance before submitting your bug.

Describe the bug
Similar bug related to #301. However, we only have 1 M365 Learning Pathways solution deployed to our tenant. Please find the attached screenshots and error logs.
To Reproduce
I am unable to view any of the Learning pages including admin page.
Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Learning Pathways version number
4.0.2

fhi360web.sharepoint.com-1594829038422.log
fhi360web.sharepoint.com-1594829074793.log
fhi360web.sharepoint.com-1594829081793.log
fhi360web.sharepoint.com-1594829088443.log
Additional context

Add any other context about the problem here.

Delete all the entries from the above list with the title "CustomConfig".  Then navigate to the CustomLearningAdmin.aspx page and see if the admin page reloads.

Delete all the entries from the above list with the title "CustomConfig". Then navigate to the CustomLearningAdmin.aspx page and see if the admin page reloads.

Unfortunately, that didn't work Julie. A blank page loads.

That's actually more than we had before... so now if you have a blank page, what's the browser console return.

Please see the attached

fhi360web.sharepoint.com-1594847998074.log

Try putting the query string parameter ?forceUpdate=V3 at the end of the CustomLearningAdmin.aspx page url. Then run the update... see if that fixes it.

I still ran into the same issue. However, what I tried was restoring the latest CustomConfig item from the recycle bin and then forceupdate and it worked. Thank you very much for pointing me in the right direction. Appreciate your prompt response.

Oh right, yes sorry that would have to be there.


ECONNRESET and ERR_PING_TIMED_OUT

Hi, I have an issue with mys smart plug, I can't connect to him.
To explain at the beginning my homebridge just don't connect to my device, so I have to try to add an IP adress in the config to do this I have set a static IP address (<IP_ADDRESS>) to my device and I have set the same IP in the config on homebridge and I have retry.
After that homebridge say he had success connect to my device but a few second after that he said for the first time "The socket had a problem and will reconnect  to "my device" " with the error ECONNRESET (see the screen) after he said "closed connection with "my device" "
And he said for the second time "The socket had a problem and will reconnect  to "my device" " but the error is now ERR_PING_TIMED_OUT (see the screen).
So with it, I have to think the computer where is the homebridge can't ping my device, so I have to try my self to ping the device using "ping <IP_ADDRESS>" and that work the ping is some time very big, but he never lost (see the screen). So now I think your ping "limit" (I don't really think how to say that) is too low for my device.
I'm sorry for my bad English I'm French.
Thank you in advance for your help.

After retrying to ping my device the ping was perfect, but the co

nnection don't work.


No support for your platform win32

Got a new typescript project going, and I ran into this issue installing tensorflow2
No support for your platform win32
I am fairly confident that I am running 64 windows 10
I tried running the command inside VS Code and Powershell
Full Error
D:\development\rader\node_modules\@pipcook\boa\tools\check-dependence.js:16
  throw new TypeError(`No support for your platform ${PLATFORM}`);
  ^

TypeError: No support for your platform win32
    at Object.<anonymous> (D:\development\rader\node_modules\@pipcook\boa\tools\check-dependence.js:16:9)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>preinstall: `node tools/check-dependence.js && make -C ./pybind11/ && node tools/install-python.js && node tools/install-requirements.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\digim\AppData\Roaming\npm-cache\_logs\2021-02-07T07_56_52_487Z-debug.log
PS D:\development\rader>

Looks like this is from boa, https://github.com/imgcook/boa/issues/11


TypeScript's defineProps macro does not properly map to the object version in the case of booleans

What problem does this feature solve?
Vue has an unexpected behavior where if you do this:
props: {
  foo: {
    type: Boolean,
    required: false
  }
}

...the value of foo, if not specified, will be false instead of undefined. This is somewhat unexpected, as noted in https://github.com/vuejs/vue/issues/7646 and https://github.com/vuejs/vue/issues/4792, but my guess is that this was a conscious choice by Vue to imitate the behavior certain HTML values, at least their values in the DOM.
The problem comes in the TypeScript extension of Vue. Say you have this:
<script setup lang="ts">
interface Props {
  foo?: boolean
}
defineProps<Props>()
</script>

TypeScript is very clear about interface syntax, which is that foo?: boolean means that the value of foo will be undefined if it is not specified. The type, in fact,  is not boolean but boolean | undefined from TypeScript's perspective.
Meaning, the most accurate translation of TypeScript to Vue's JavaScript API when passing an interface would be:
props: {
  foo: {
    type: Boolean,
    required: false,
    default: undefined
  }
}

I would consider this a bug of not interpreting a TypeScript interface accurately, BUT it could be also considered a feature request as supporting optional properties in TypeScript, which may have not been fully implemented.
What does the proposed API look like?
Ideally, the API would be identical:
<script setup lang="ts">
interface Props {
  foo?: boolean
}
defineProps<Props>()
</script>

However, it's rational that there would be concern about breaking changes, so this is what I propose, which is a compile-time error vs a possible runtime change:

If a TypeScript type is passed into withDefaults(defaultProps<Props>, {}), any boolean type should be required in the withDefaults object, so that the developer can make it clear if they are intending the default Vue behavior, or the default TypeScript behavior.
Ideally, a withDefaults macro would be required with a defaultProps macro if, again, there are boolean types in the interface, but that could be considered too high of a burden for developers.

So, my proposal, at minimum, is that the provided script block throws an error (or I can set a TypeScript strictness check to throw an error?). Thanks for considering this.

FYI, the return type of defineProps does take this into account:
interface Props {
  foo?: boolean
}
const p = defineProps<Props>()
//    ^ { foo: boolean }
 p.foo
// ^ boolean

The interface declares foo as being optional, but it is not the type of the resolved runtime props. The resolved props type correctly excludes the undefined type, making it consistent with the runtime behavior.
The default casting behavior is indeed something that we cannot easily change due to potential breakage, but I don't think your case should be considered an error either.
When using an explicit undefined default value with withDefaults, the previous return type does have a bug where it still resolves the type to boolean - this is fixed by #8602.

@yyx990803
This statement didn't make sense to me:

The interface declares foo as being optional, but it is not the type of the resolved runtime props. The resolved props type correctly excludes the undefined type, making it consistent with the runtime behavior.

I'm not sure what you mean "correctly excludes". It's not correct according to TypeScript and the runtime does support undefined as a default value, so it's perfectly consistent to include it as the default, and booleans defaulting to false was a non-sensical design choice.

@yyx990803 Here's an even worse, more egregious example, where Vue's type inference is way off-base.
I made a component with these props (I've reduced it to the specific problem):
interface Props {
  error?: string | true
}
defineProps<Props>()

Now, in this case, the error can only have 3 possible value types: the value true, a type of string, or undefined.
The safest thing to infer? Obviously, it's undefined, according to the types. Instead, error has a default value of false, a value that should not be possible.
In fact, if I write this:
if (props.error === false) {}

...I get the error This comparison appears to be unintentional because the types 'ReactiveVariable<string> | ReactiveVariable<true> | undefined' and 'false' have no overlap.
TypeScript itself is stating outright that Vue is not handling types correctly, is abusing the type system, and is assigning values which violate those types and which could lead to runtime errors.
 PLEASE RE-OPEN.

At the very least, can there be changes to the Vite / Webpack plugins to fix this behavior for the defineProps macro and correctly reflect TypeScript types in the runtime (and in Volar), if the Vue team does not want to create a breaking change?
Something like:
vue({
  script: {
    accurateTypes: true
  }
})

I've found workaround is to use uppercase/class version of Boolean. Most likely your linter will complain about this. 😄But it works, and I get undefined instead of false.

I've created useForwardProps as another workaround for this issue as it is quite crucial for radix-vue.
I've also pointed out some pain point and challenges here https://github.com/vuejs/vue/issues/4792#issuecomment-1751643093

I made a component with these props (I've reduced it to the specific problem):

请问怎么去解析这种情况：
type Props = {
  prop?: true | string
}

明确都排除了不能传 false 还是默认转换为false 吗？这个 defineProps 明显就是一个 bug ，为什么要担心破坏性更改。
有 bug 就修复啊，现今为止我身边的开发者没有不为这种默认行为感到不吃惊的 。为了等待你们的修复都转而使用 defineComponent。

官方明确说明了只有是 boolean 类型才会默认转换。
你这里是只要包含 boolean 类型就会转换
type Props = {
  dom?: VNodeChildAtom
}

只是因为 VNodeChildAtom 中含有 boolean 类型就给我转换为 false。我无法相信怎么会有这么反直觉的行为

This issue can lead to application corruption after updating dependencies.
I only discovered this discussion after mentioning an RFC.
https://github.com/vuejs/rfcs/discussions/660

FYI, the return type of defineProps does take this into account:
interface Props {
  foo?: boolean
}
const p = defineProps<Props>()
//    ^ { foo: boolean }
 p.foo
// ^ boolean

The interface declares foo as being optional, but it is not the type of the resolved runtime props. The resolved props type correctly excludes the undefined type, making it consistent with the runtime behavior.
The default casting behavior is indeed something that we cannot easily change due to potential breakage, but I don't think your case should be considered an error either.
When using an explicit undefined default value with withDefaults, the previous return type does have a bug where it still resolves the type to boolean - this is fixed by #8602.

The issue is that there is a wrong assumption at the bottom. Yes, booleans should be true or false BUT assuming you want booleans here is not correct. What is needed in the context of templates, etc. are optional booleans.
This case has been made several times and with good examples as to why this is true.
It's also the reason why this behaviour turns out to be inconsistent with TS, it is not by chance. It contradicts useful functionality of the default optional boolean type.
It's somewhat understandable how we got here but not why we have to stick with this. A philosophical discussion is pointless.

FYI, the return type of defineProps does take this into account:
interface Props {
  foo?: boolean
}
const p = defineProps<Props>()
//    ^ { foo: boolean }
 p.foo
// ^ boolean

The interface declares foo as being optional, but it is not the type of the resolved runtime props. The resolved props type correctly excludes the undefined type, making it consistent with the runtime behavior.
The default casting behavior is indeed something that we cannot easily change due to potential breakage, but I don't think your case should be considered an error either.
When using an explicit undefined default value with withDefaults, the previous return type does have a bug where it still resolves the type to boolean - this is fixed by #8602.

什么时候能把这个问题解决下，拖了很久了，这是一个严重的 bug 在基于组件二次封装时，会出现不可预料的问题，烦请看一下大家对于该问题的理解。mdn 明确说明，只有类型为 boolean 时默认才为 false ，你这里是只要包含 boolean 类型就默认为 false。并未达到对齐 mdn attrs 规范的目的。它是个 bug 就应该解决，而不是担心其破坏性更改


Release 2.3

Type of change

Bug fix
New feature
Improvement (improvement to code, performance, etc)
Test update
Documentation update

Description

Additional details

Related issues

2.3 update

only update from the hyperledger fabric


device is not offline

enhancing the log to try to find the reason the plugin is saying the device is offline.

My local tests brought me:
Alive: true, Provisioned: false, Class: Thermostat
Can you help understanding why it shows as not provisioned?

then I removed the check for the provisioned and this is the output:
[7/15/2020, 4:30:05 PM] [HoneywellHome] [DEBUG] Getting devices for Lylebrooke...
[7/15/2020, 4:30:06 PM] [HoneywellHome] Found 3 devices at Lylebrooke.
[7/15/2020, 4:30:06 PM] [HoneywellHome] Registering new device: 1st - TCC-xxx
[7/15/2020, 4:30:06 PM] [HoneywellHome] Registering new device: 2nd - TCC-xxx
[7/15/2020, 4:30:06 PM] [HoneywellHome] Registering new device: 3rd - TCC-xxx
(node:21444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at HoneywellHomePlatformThermostat.updateFirmwareInfo (/usr/lib/node_modules/homebridge-honeywell-home/index.js:431:70)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:21444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21444) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:21444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at HoneywellHomePlatformThermostat.updateFirmwareInfo (/usr/lib/node_modules/homebridge-honeywell-home/index.js:431:70)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:21444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:21444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of undefined
at HoneywellHomePlatformThermostat.updateFirmwareInfo (/usr/lib/node_modules/homebridge-honeywell-home/index.js:431:70)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:21444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
[7/15/2020, 4:30:06 PM] [Hubitat hhh:0.3.11] Configuration of cached accessories not done, wait for a bit... 19
[7/15/2020, 4:30:07 PM] [HoneywellHome] [DEBUG] Fetched update for 1st from Honeywell API: {"mode":"Auto","autoChangeoverActive":true,"emergencyHeatActive":false,"heatSetpoint":72,"coolSetpoint":77,"heatCoolMode":"Cool"} and Fan: {"mode":"Auto"}
[7/15/2020, 4:30:07 PM] [HoneywellHome] [DEBUG] "Auto"
[7/15/2020, 4:30:07 PM] [HoneywellHome] [DEBUG] {"mode":"Auto"}
[7/15/2020, 4:30:07 PM] [HoneywellHome] [DEBUG] Fetched update for 2nd from Honeywell API: {"mode":"Auto","autoChangeoverActive":true,"emergencyHeatActive":false,"heatSetpoint":72,"coolSetpoint":77,"heatCoolMode":"Cool"} and Fan: {"mode":"Auto"}
[7/15/2020, 4:30:07 PM] [HoneywellHome] [DEBUG] "Auto"
[7/15/2020, 4:30:07 PM] [HoneywellHome] [DEBUG] {"mode":"Auto"}
[7/15/2020, 4:30:07 PM] [Hubitat hhh:0.3.11] Configuration of cached accessories not done, wait for a bit... 19
[7/15/2020, 4:30:08 PM] [HoneywellHome] [DEBUG] Fetched update for 3rd from Honeywell API: {"mode":"Auto","autoChangeoverActive":true,"emergencyHeatActive":false,"heatSetpoint":73,"coolSetpoint":78,"heatCoolMode":"Cool"} and Fan: {"mode":"Auto"}
[7/15/2020, 4:30:08 PM] [HoneywellHome] [DEBUG] "Auto"
[7/15/2020, 4:30:08 PM] [HoneywellHome] [DEBUG] {"mode":"Auto"}


simplify tree_rows helper by only counting bits

This helper basically calculates the number of trailing zeros of the next power of two of the input number, which can be simply achieved by counting the number of bits after the input number is reduced by 1 (to take perfect powers of two into account). Tests still pass, additionally the following script was used to verify this for n from zero up to one billion:
#!/usr/bin/env python3
import math

def next_power_of_2(x: int) -> int:
    return 1 if x == 0 else 2**(x - 1).bit_length()

def tree_rows_old(n: int) -> int:
    return int(math.log2(next_power_of_2(n)))

def tree_rows_new(n: int) -> int:
    return (n - 1).bit_length()

for n in range(1, 1_000_000_000):
    assert tree_rows_old(n) == tree_rows_new(n)

I took a few days thinking/testing this and this is really nifty. It should always work since only the numbers that's 2^n should decrement in the bits it's using.
Tested the script, tested with the go library at https://github.com/utreexo/utreexo
ACK 8446862e92156ce456b352797a45f3f3ed87bd46
This is just a straight up better implementation of treeRows. This change should go into all the other implementations as well :)


Update README.md

Fix broken coverall status badge link

By analyzing the blame information on this pull request, we identified @grantland to be a potential reviewer.

Looks like they even look identical! :)
Perfect, thanks for fixing this!


Support BigInteger as return type for method Invocation #334

@nevenr Could you please resolve this (simple) conflict and maybe be squash your commits to a single one ?
thanks !

merci !


python310Packages.pymupdf: 1.22.3 -> 1.22.5

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python310Packages.pymupdf is: Python bindings for MuPDF's rendering library
meta.homepage for python310Packages.pymupdf is: https://github.com/pymupdf/PyMuPDF
meta.changelog for python310Packages.pymupdf is: https://github.com/pymupdf/PyMuPDF/releases/tag/1.22.5
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.22.5 with grep in /nix/store/ba447cq54b1rl2z3jaj3l2q17q1s61gw-python3.10-pymupdf-1.22.5
found 1.22.5 in filename of file in /nix/store/ba447cq54b1rl2z3jaj3l2q17q1s61gw-python3.10-pymupdf-1.22.5

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)

4 package rebuild(s)

First fifty rebuilds by attrpath
browsr
python310Packages.pymupdf
python311Packages.pymupdf
termpdfpy

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/ba447cq54b1rl2z3jaj3l2q17q1s61gw-python3.10-pymupdf-1.22.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python310Packages.pymupdf https://github.com/r-ryantm/nixpkgs/archive/0a12cf4a845ba4581ea2cd5f9ddcf2fba793c7cc.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/ba447cq54b1rl2z3jaj3l2q17q1s61gw-python3.10-pymupdf-1.22.5
ls -la /nix/store/ba447cq54b1rl2z3jaj3l2q17q1s61gw-python3.10-pymupdf-1.22.5/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

4 packages built:

browsr
python310Packages.pymupdf
python311Packages.pymupdf
termpdfpy

Maintainer pings
cc @teto for testing.

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

8 packages built:

browsr
browsr.dist
python310Packages.pymupdf
python310Packages.pymupdf.dist
python311Packages.pymupdf
python311Packages.pymupdf.dist
termpdfpy
termpdfpy.dist


[BUG]: Query API returning empty array result

What version of drizzle-orm are you using?
^0.32.1
What version of drizzle-kit are you using?
^0.23.0
Describe the Bug
Using drizzle with a Next.js, tRPC and Neon Postgres setup. The following function returns an empty array in query syntax, correct data otherwise.
For additional context, this issue comes when calling the trpc fn server side during ssr, on client side useQuery, the data is returned as expected.
  getTasks: adminProcedure.query(async () => {
    const tasks = await db.query.Tasks.findMany({
      orderBy: [desc(Tasks.createdAt)],
    });
    console.log(tasks, ctx); // []
    return tasks;
  }),

  getTasks: adminProcedure.query(async () => {
    const tasks = await db.select().from(Tasks).orderBy(desc(Tasks.createdAt));
    console.log(tasks, ctx); // [ { ... }, { ... }, ...   ]
    return tasks;
  })

Expected behavior
It should return the correct data in query syntax too
Environment & setup
Both local (Bun, Nextjs, Neon, tRPC) and production (Vercel)

The issue stemmed from how I set up the tRPC context, but still not sure how that fixed the behaviour of drizzle


Using Different LMs in Complilation

Hi, I'm using dspy to better prompt llama3.1.
However, I find that llama3 itself does not perform well in proposing new instructions, as this task is quite challenging.
I'm wondering whether there is an elegant way to use different LLMs when compilation (e.g. use gpt to propose new prompts)
Thanks :)

Hey @kxzxvbk ! Yes definitely. Are you using MIPROv2?
optimization_model_kwargs = dict(prompt_model=gpt4o, task_model=llama, teacher_settings=dict(lm=gpt4o))
tp = dspy.MIPROv2(metric=YOUR_METRIC, auto="medium", num_threads=8, **optimization_model_kwargs)
optimized_react = tp.compile(YOUR_PROGRAM, trainset=trainset)

@okhat That's great, thank you! Maybe this can be added to relevant docs.


PromptDialog.Choice does not display all choice buttons

Team
I have created a Bot to display choices as Buttons, it is working fine in Emulator and Chrome but it does not display the options in IE11
Please advise on resolution
Please refer attached for view from IE11 and Chrome for the same Bot
Thx
Vinod Arya

Hello, can you please provide the JSON for your message?

Thanks a lot for your response, please advise how to present list as clickable link to act as an input

@support, can we get a repro on v3 and v4? Please tag @compulim with results

Closing due to lack of activity.


Feature Request: YouTube Music Desktop App Integration

Prerequisites

[X] I have read and understand the CONTRIBUTING guide
[X] I looked for duplicate issues before submitting this one

Description
YouTube Music Desktop App (YTMDA) is a cross-platform desktop music player for YouTube Music (YTM), a la the Spotify desktop app.
The request here is to add a segment very similar to the Spotify segment for YTM/YTMDA.
Based on some (very brief) investigation, similar logic ("scrape" the currently playing Artist - Song in the title of the application window) used in the Spotify segment should be able to be used with the YTMDA segment.

Upon further investigation, my initial solution will work, with the caveat that the title persists if the song is paused. The Spotify player sets the title to Spotify (or Spotify Free if you don't not have Spotify premium).
The good news is that YTMDA has a Remote Control API that can be used to get the currently playing track, which also returns whether the song is paused.

If the title persists it's even better. It will work likthe macos version of the spotify segment.
The status will be paused with the right artist and track, instead of nothing on windows.

Interesting. I'm on Windows so for me the segment just "disappears" when I pause Spotify (or if an ad is playing).
If we want to display a play/paused icon in the segment, we'll likely have to go down the Remote Control API route, as there's no way of determining if the song is paused purely from the title of the window.

If we go for remote control, it can be identical to MacOS Spotify. It's localhost so theoretically this should go fast.

@JanDeDobbeleer Unless you want to implement this yourself, I can give this a shot.

@JanDeDobbeleer Unless you want to implement this yourself, I can give this a shot.

Feel free to do so!


Need guidance for building entities without parameterless constructor

Create examples for how to use builders when the object has no parameterless constructor. The Build method probably needs a hook that can be used in a hand written partial class to allow for custom construction of the object in order to handle any additional non-standard cases. The builder should probably be more intelligent about this if possible, though. How would it choose which constructor to use? Greediest? Stingiest? I think a partial Build method called from the main Build method might be the only real solution, but this will take some thought.

Hi, I'm using your great project to create builders for DevExpress XPO entities. These entities must be created by an ObjectSpace.CreateObject<{{TargetClassFullName}}>() factory method. Unfortunately this is not supported of the box (yet) and unfortunately https://github.com/MelGrubb/BuilderGenerator/issues/32 is also not implemented yet.
Therefore I cloned you repo and modified the templates.
Really would like to see out of the box support for such scenarios! Thank you!

`[BuilderFor(typeof(Company))]
public partial class CompanyBuilder
{
public static CompanyBuilder Minimal()
{
var test = new CompanyBuilder().WithObject(new Company(id: Guid.NewGuid(), companyCode: "TEST", name: "Test Company"));
return new CompanyBuilder();

}
}`
In the above, I was hoping that "WithObject" would allow me to call the constructor myself and therefore work around the fact that my object has no parameterless constructor. However, in this example "var test" is a Builder instead of CompanyBuilder.
To workaround this, I am currently inheriting from Company and creating a class with a parameterless constructor that passes some defaults to the base constructor, but it would be great if WithObject worked, or if there was some kind of WithInstance which took an instance of the object I'm attempting to build.

What you've posted is what WithObject was meant to enable. It lets you start from a pre-existing object, or that was the idea at least. I think you're getting the Builder<Company> because of the WithObject call. Since that's defined down on the base class, it's going to return what it knows, and it can't know about the existence of CompanyBuilder. I'm curious why this is a problem, though. You should still be able to call Build on it and get back the company you wanted, right?
Sorry, it's been a little while. I was developing on this pretty hard and then the day job got busy on me. I really need to find my way back to my own projects.

After thinking about it for a while, I think I see the problem you're running into. After calling FromObject, you're ending up with an instance of the generic base class, and can't use additional .With methods, is that it? If that's the problem, then just cast what you get back from WithObject back to CompanyBuilder and you should be all set. I suppose moving the WithObject from the base class to the generated class would make this a non-issue, so I'm going to leave this one open with a note to myself.
Self, move WithObject to the generated class. Anyone already casting to a derived type should just get some helpful grayed-out text telling them that the cast isn't necessary, but otherwise it should all be 100% compatible since CompanyBuilder would still derive from Builder.

I wrapped up some work I'd left outstanding, and created a new PR this evening (https://github.com/MelGrubb/BuilderGenerator/pull/43)
There was a lot of reorganization and general cleanup, but the main additions are

Moved WithObject to the generated file to get rid of the type confusion
Added a FromTemplate method, which I might rename to FromExample or something. I'm open to suggestions.

I need to do some other cleanup still before I make a build out of this. Maybe tomorrow.

I've just released what I'm calling v2.4.0-alpha.
Among other things, it introduces a parameter to the generated builders' constructors so that you can skip calling WithObject altogether and just pass your "starter" object straight to the new builder.
Internally, it sets the underlying object, but also does a shallow clone of that object's properties into the builder's backing fields so that when you call .Build(), it will only change values you've explicitly changed on that builder instance. I don't have a good local test case for this, so you'll have to tell me if it works for you.
There was quite a bit of refactoring in this one, so if you forked the repo, it's going to change a lot if you merge my changes in. I've laid some of the groundwork for custom templates, but there are some conceptual problems to deal with. Mainly, it's where to specify what templates to use. If you specify them in the attribute, then there's the possibility of mismatches. Mixing and matching the templates for the generated code is fine, but the base class and attribute also come from templates, so which version would win? My current thought is to create another attribute that would be applied at the assembly level, maybe. That way, you'd have just one place to say which templates you're using.
Anyway. Progress was made this weekend. Please test it out and see if it works better for you.


Add search bar for filtering the todo items

Should be able to filter by

Todo contents
Todo tags

Implemented in #73


Problem: migrating extensions with code in stored procedures

To enable proper migration between arbitrary revisions, we'd need to make a separate numbered migration for every stored procedure whenever that procedure's code changes.
This is really inconvenient.
Solution: extract actual stored procedures code into source files and refer to them from migrations.
This way, when we assemble migration in any given revision, we can get the right code for it. The most important scenario of all:
Imagine we have an extension A at revision R0 with some structual migrations and one stored procedure. New revision of this extension (R1) changes the code of that stored procedure and nothing else.
The script to create extension at this revision will be correct immediately as we'll pull the correct code from a separate source file.
What's the upgrade path here between R0 and R1? It's a bit involved, but please stay with me:
We first provision a database with R0 and record source code in all functions created by the extension (avoiding C-language ones). Then, we provision R1 and do the same. For every function that exists in both but has a different source code, we need to replace those function definitions with the new ones. pg_get_functiondef covers us here.

so create or replace function is not suitable ?

The purpose of this change is to avoid multiple incremental migrations changing the same function source code
100_replace_myfunc.sql
101_replace_myfunc.sql
...

Instead, put the actual source (SQL, PL/pgSQL, Python, etc.) into separate files and include them from the migration template.


Can't build this with docker-compose

Getting this error:
ERROR: Service 'webapp' failed to build : The command '/bin/sh -c bundle install' returned a non-zero code: 7

Taking a look and should get this addressed soon.

I have fixed this issue with mimemagic.  Identified another issue so working on resolving all of them.  Reference here:https://github.com/mimemagicrb/mimemagic/issues/98

Fixed the issue and pushed a new commit with fix.  Feel free to test again @oxyo .

Thank You. It build now fine, but getting this error in web app on localhost:3000:
ActiveRecord::NoDatabaseError Unknown database 'rackvuln_development'  ![$screen_036](https://user-images.githubusercontent.com/304258/112734178-cf1cf500-8f4c-11eb-8780-8c6a8f41b375.png)

Yes, I had that same issue until I destroyed and rebuilt the container.  Give that a try.  As reference, I used some of these commands:
https://colorfield.be/blog/cleaning-lando-containers

Didn't hear back on suggested fix to rebuild the container.  Closing.


What are the known problems related to the MVAR table?

At https://github.com/googlefonts/fontbakery/pull/3412 we stopped rejecting MVAR tables, but the code had some comments by @m4rc1e that we should review. It may be useful to create an MVAR specific check at WARN level if there are still problems we should alert users about.
Here are the relevant comments:

MVAR produces a bug in DirectWrite which causes
https://bugzilla.mozilla.org/show_bug.cgi?id=1492477
See also: https://github.com/google/fonts/issues/2085

Marc Foley found that VFs containing a MVAR table have very loose vertical metrics, even if the MVAR table hasn't adjusted any vertical metric values.

@davelab6 also said at https://github.com/googlefonts/fontbakery/issues/3400#issuecomment-893610777:

@khaledhosny thanks, I agree that this check ought to change by around now. That was always the idea, to make a decision that was good for the situation at that time and as that situation improve then change the check. So, @m4rc1e please could you queue up redoing the QA testing work you did a few years ago that led to this check decision, so we can document more details about why we'll change it.

Even though the modern browsers have fixed this issue, we need to ensure that less than 2% of out total traffic isn't using these browsers.
Also, browserstack screenshots still hasn't updated the browsers in a few years. We're currently using Win Chrome 72 (released 2018) which does have this issue. By removing this check, the vertical metrics in our diff images will appear wrong.
Please revert #3400.

To answer your original question, we forgot to remove the MVAR table in Quicksand and this issue cropped up within 1 hour, https://github.com/google/fonts/issues/2085

Even if the user base is lower than 2%, we still have the diff image issue. I'll send browserstack a mail asking if they're ever going to update their browser list.

chopping off MVAR may be ok-ish if the only thing that varies are relatively useless things like xHeight or capHeight (which are more of a compiler's afterthought). But it may be that some VF projects rely on MVAR to variate other, more visible font-wide metrics and that's done intentionally as part of their design for whatever reason. Thus I believe that outright banning MVAR without considering what it contains and why it's there is a bit heavy handed, even considering the above mentioned DirectWrite bug.

Thus I believe that outright banning MVAR without considering what it contains and why it's there is a bit heavy handed, even considering the above mentioned DirectWrite bug.

It may sound like I have a vendetta against this table but I don't. I have no problems with us readding it once our diff tooling doesn't rely on these old browsers and the user count of the affected browsers is so low that we don't care. I'm also not claiming this table isn't useful because it is.

Supporting minority users on legacy systems is good idea, but it shouldn’t be on the expense of the majority users on modern systems, and outright banning an OpenType table is just that. Software is basically bugs with features add to them, it is not font job to pend backwards for every software bug that was once in some application released in the since the last century.

I don’t like working around software bugs in general, but I can be pragmatic and do that if it does not negatively affect other software, but that is not the case here, rather you are crippling fonts for the majority of users to make a minority clinching to outdated and unsupported systems happy.


Calling new bootstrap.Modal() multiple times does not work

Trying to show and hide a modal by calling new bootstrap.Modal() multiple times (potentially in different files) does not work. It seems you need to keep a reference to the returned object. In my opinion this should either be fixed or the documentation should be clearer in that case.

Ubuntu 19.04
Chrome 75.0.3770.100
https://codepen.io/anon/pen/bPOoBR vs working https://codepen.io/anon/pen/GbPMMN

in JavaScript, new [blah] creates a new instance of an object https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new
i don't really think the bootstrap docs need to explain the basics of JavaScript

Then maybe implement it differently. With jquery you had the convenience to just call $(selector).modal('hide');

This is just an idea and it probably is not a good idea for some reasons and probably also not compatible and valid for some browsers. But what about something like this:
diff --git a/js/src/modal.js b/js/src/modal.js
index 9943f93e0..ece88f255 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -100,6 +100,13 @@ class Modal {
     Data.setData(element, DATA_KEY, this)
   }

+  static get(element, config) {
+    if (!element.modal) {
+      element.modal = new Modal(element, config)
+    }
+    return element.modal
+  }
+
   // Getters

   static get VERSION() {

Then you can just call:
bootstrap.Modal.get(selector).show()

Hi @mohe2015 it's already exist and documented.
You have to do:
var modal = bootstrap.Modal._getInstance(element)
modal.show()
modal.hide()

See: https://twbs-bootstrap.netlify.com/docs/4.3/components/modal/#getinstance

Oh thank you, that's nice. I just looked at the general javascript doc and missed that one.

You're welcome @mohe2015 😉
See a working example: https://codepen.io/Johann-S/pen/PrXJLJ

@Johann-S It seems to me that this would not initialize a modal if it wasn't already. What do you (and others) think about adding that for convenience? Or should I just clean up my code :laughing:

Yep _getInstance do not create a new instance but just return an existing one.
I'm not in favor of creating another helper method which do the same as a constructor.
/CC @twbs/js-review for other feedbacks


typo: Double word "specialized"

@nschonni : Thanks for your contribution! The author, @dlepow, has been notified to review your proposed change.

@nschonni - Thanks for taking the time to submit this fix! Looks good.
#sign-off


"java.import.generatesMetadataFilesAtProjectRoot" is not honored

I've set the property "java.import.generatesMetadataFilesAtProjectRoot" to TRUE in user settings, remote settings, workspace and even at folder level. Tested in local env as well as on remote. Could never get it to work.
I wanted the .classpath and .project folders to be created in root directory for easier access.

Bit confused if it's the right place though.

This extension is only responsible for displaying the Java Project explorer.


How to add system-wide and apt proxy

Could you also add the value for adding a system-wide proxy with maybe an example use-case? Would be super awesome!

Awesome, could you also just add a line in the beginning why I want to proxy? (Because I have no idea, would love to know! Then it's cool to merge I think!

Sure; I am trying to find a good use case.
If your network uses a proxy-server, none of the Internet based services like curl, wget etc. would work if proxy variables are set.

are not set* ? :)

@gaursagar I think that's a good enough explanation, commit it and we're good to go! :)

Hey check now :)

Awesome @gaursagar !


A TPC-DS query runs significantly slower

Describe the bug
When running the TPC-DS benchmark, comparing the execution time of 99 queries, it is found that the performance of one query (query78) has dropped significantly, about 10 times.
To Reproduce
run 1t TPC-DS 99sql with NativeSQL
Expected behavior
Based on the vision of NativeSQL, a query will either have the same query time or a slight decrease, that is, fall back, or it will have some performance improvement and will not be significantly slowed down.
Additional context
The query-78 didn't fall back, and there were no observable errors, and the task didn't retry, it just took 29 minutes in the last stage. Normally, the sql execution takes over 100 seconds, but now it's taking 1700 seconds.

Hi @kelvin-qin,
Looks like you are also hit by Driver issue
If its possible could you please share plan ?


[SPARK-8713] Make codegen thread safe

Codegen takes three steps:

Take a list of expressions, convert them into Java source code and a list of expressions that don't not support codegen (fallback to interpret mode).
Compile the Java source into Java class (bytecode)
Using the Java class and the list of expression to build a Projection.

Currently, we cache the whole three steps, the key is a list of expression, result is projection. Because some of expressions (which may not thread-safe, for example, Random) will be hold by the Projection, the projection maybe not thread safe.
This PR change to only cache the second step, then we can build projection using codegen even some expressions are not thread-safe, because the cache will not hold any expression anymore.
cc @marmbrus @rxin @JoshRosen

Merged build triggered.

Merged build started.

Test build #36047 has started for   PR 7101 at commit 4ddaaed.

LGTM.  To make sure I understand, this still requires that the caller passes in a new set of expression for each thread in order to be safe? (which I think we get for free due to the way deserialization happens)

@marmbrus Yes.

Test build #36047 has finished for   PR 7101 at commit 4ddaaed.

This patch fails PySpark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Merged build triggered.

Merged build started.

Test build #36061 has started for   PR 7101 at commit 847bd08.

Test build #36061 has finished for   PR 7101 at commit 847bd08.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
      class SpecificOrdering extends $
    class SpecificProjection extends $
    final class SpecificRow extends $

Merged build finished. Test FAILed.

Merged build finished. Test FAILed.

Test build #980 has started for   PR 7101 at commit 847bd08.

@JoshRosen Why it run all python tests?

@davies, it ran all of the Python tests due to a small mistake that I overlooked when porting the Python test runner script to Python: the pyspark-core module still depends directly on sql, which causes any SQL change to trigger all Python changes.  @zsxwing noticed this as well and has a fix in his PR: https://github.com/apache/spark/pull/6830#discussion_r33477034

Test build #980 has finished for   PR 7101 at commit 847bd08.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build triggered.

Merged build started.

Test build #36144 has started for   PR 7101 at commit 7dd41f1.

Test build #36144 has finished for   PR 7101 at commit 7dd41f1.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
trait AutoCastInputTypes
trait ExtractValue
abstract class ExtractValueWithStruct extends UnaryExpression with ExtractValue
abstract class ExtractValueWithOrdinal extends BinaryExpression with ExtractValue
      class SpecificOrdering extends $
    class SpecificProjection extends $
    final class SpecificRow extends $
case class Hex(child: Expression) extends UnaryExpression with Serializable
case class Atan2(left: Expression, right: Expression)
case class Pow(left: Expression, right: Expression)
case class Sha1(child: Expression) extends UnaryExpression with AutoCastInputTypes
case class Not(child: Expression) extends UnaryExpression with Predicate with AutoCastInputTypes
trait StringRegexExpression extends AutoCastInputTypes
trait CaseConversionExpression extends AutoCastInputTypes
trait StringComparison extends AutoCastInputTypes
case class StringLength(child: Expression) extends UnaryExpression with AutoCastInputTypes

Merged build finished. Test PASSed.


Micro on Termux

On Termux the  SHIFT  key can only be combined with alpha-numeric keys.
What do people do to make the best of this situation?
Many thanks for a hint,
Helmut
OS: Termux
Terminal: Termux

Correction:
On Termux the  key can only be combined with alpha-numeric keys.

Rebind what you need and all seems to work. I use them 😊

I tried testing a bit but I think shift key on software keyboard is not recognized when pressing it with extra keys at the same time. Shift key in extra keys row is recognized when pressed with other extra keys at the same time, but the key is written as SHIFT in termux.properties. It is written in this page how extra keys row can be edited:
https://wiki.termux.com/wiki/Touch_Keyboard#Extra_Keys_Row


Add fingerprinting generation to library

Added SHA-256 and MD5 but haven't added Rabin due to lack of a well supported library. May
be implemented at a later phase either directly here or by creating a library to calculate
it.

Thank you! I'll release v0.6.3 shortly


Pass host's open files ulimit inside a container

The goal is to align max open file limit in the host OS and inside a container.
currently, if host's ulimit is low (e.g. 1024) and container starts with a higher number (e.g. ceos has<PHONE_NUMBER>) this may lead to bugs in certain python scripts. For example:
$ ulimit -n
1024
$ docker exec -it ceos bash
< inside the container now>
bash-4.2# cat test.sh
#!/usr/bin/python3
import resource
import os

max_fd = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
print(max_fd)
os.closerange(3, max_fd)

bash-4.2# ulimit -n
1073741816

bash-4.2# ./test.sh
1073741816

^Z
[1]+  Stopped                 ./test.sh
bash-4.2# bg
[1]+ ./test.sh &
bash-4.2# top -n1 | grep test
   2400 root      20   0   27504   7192   4500 R 100.0   0.1   0:18.87 test.sh

The above python script will block and eat 100% of available CPU core.

What's the output of "olimit -Hn" on this system?
I believe containers inherit the hard limit (instead of the soft one)

Or, looking at the docker docs, it might be that it is inherited from the default docker daemon setting instead. Yeah, either way, should be easy to match both.

For what it's worth I see this as well, for example:
⇨  docker exec -it clab-netgo-srl bash
[root@srl /]# ulimit -n
1000

⇨  docker exec -it clab-netgo-ceos bash
bash-4.2# ulimit -n
1073741816

⇨  ulimit -Hn
524288

I'll update Docker to see if this behavior changes.
 ⇨  docker version
Client: Docker Engine - Community
 Version:           20.10.13
 API version:       1.41
 Go version:        go1.16.15
 Git commit:        a224086
 Built:             Thu Mar 10 14:08:18 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Thanks @nleiva
Would you mind checking one more thing

docker container inspect [CONTAINER_NAME] -f {{.State.Pid}}
grep 'files' /proc/[PID]/limits

for both containers?
Also, what's the host OS & version?

@LimeHat it does look like docker passes its own limits to spawned containers:
fedora@testbed ~ ⇨  ulimit -Hn
524288
fedora@testbed ~ ⇨  ulimit -Sn
1024
fedora@testbed ~ ⇨  grep 'files' /proc/$(pgrep -f dockerd)/limits
Max open files<PHONE_NUMBER><PHONE_NUMBER>           files

# launched a "test" container

fedora@testbed ~ ⇨  grep 'files' /proc/$(docker container inspect test  -f {{.State.Pid}})/limits
Max open files<PHONE_NUMBER><PHONE_NUMBER>           files

But that still means that, given the above mismatch, we are open to bugs.
The way I see it is we could raise the ulimit on hostOS based on dockerD's ulimit or lower them in containers best on host's ulimits.
What do you think is the best way forward?

Ahhh i see. This is one of those newer fedoras with bumped up defaults. Well. I totally forgot about those with my legacy systems.. 😄

But that still means that, given the above mismatch, we are open to bugs.
The way I see it is we could raise the ulimit on hostOS based on dockerD's ulimit or lower them in containers best on host's ulimits.

I mean, this is technically not a mismatch. The number you see is the actual system limit in this case; and 524288/1024 are currently allocated hard/soft limits to the shell process. Containers in this case aren't children of the shell, so these numbers are independent (sort of). And docker just goes for the maximum (which was capped by lower numbers in earlier kernel/systemd combos).
Anyhow. Practical solution (given that we want to provide seamless, zero-configuration experience to our users..) would be to cap the limits with a reasonable, lower value (e.g. 2^20) while spawning containers.
Can you quickly check if your script works fine if you set the limit to 1048576? (add --ulimit nofile=1048576:1048576 as a parameter when you launch the test container via docker run)

I think it's a little more complicated than that, but I may be just misunderstanding the entire theory about ulimits completely.
Here's what I observe (on fedora 35 running in AWS):
fedora@testbed ~ ⇨  ulimit -Hn
524288
fedora@testbed ~ ⇨  ulimit -Sn
1024
fedora@testbed ~ ⇨  grep files /proc/$(pgrep dockerd)/limits
Max open files<PHONE_NUMBER><PHONE_NUMBER>           files
fedora@testbed ~ ⇨  cat  /proc/sys/fs/file-max
9223372036854775807

So assuming that my shell's ulimits are independent of dockerd's ulimits, my containers should be constrained by<PHONE_NUMBER>.
Here's what  I do to test:
fedora@testbed ~ ⇨  docker run --rm -it --name test ubuntu bash
root@8389cc2b4a35:/# ulimit -Hn
1073741816
root@8389cc2b4a35:/# ulimit -Sn
1073741816
root@8389cc2b4a35:/# ./test.sh
1073741816
< hangs until killed >

but the following works (note that  594290  >> 524288):
fedora@testbed ~ ⇨ docker run --rm -it --name test --ulimit nofile=594290 ubuntu bash
root@d2beed74110c:/# ulimit -Hn
524288
root@d2beed74110c:/# ulimit -Sn
524288
root@d2beed74110c:/# ./test.sh
524288
< exits successfully >

So it looks like there's some sort of limit but it's between the minimal value that user shell gets and the high value that dockerd gets.
do you guys have any ideas? @LimeHat @nleiva

just to confirm there are no overrides in /etc/security/limits
fedora@testbed ~ ⇨  grep -R file /etc/security/limit*
/etc/security/limits.conf:#This file sets the resource limits for the users logged in via PAM.
/etc/security/limits.conf:#Also note that configuration files in /etc/security/limits.d directory,
/etc/security/limits.conf:#file in case the domain is the same or more specific.
/etc/security/limits.conf:#can be overridden with a wildcard setting in a config file in the
/etc/security/limits.conf:#        - core - limits the core file size (KB)
/etc/security/limits.conf:#        - fsize - maximum filesize (KB)
/etc/security/limits.conf:#        - nofile - max number of open file descriptors
/etc/security/limits.conf:#        - locks - max number of file locks the user can hold
/etc/security/limits.conf:# End of file

here's an interesting piece:
fedora@testbed ~ ⇨  cat /usr/lib/systemd/system/docker.service | grep -i nofile
LimitNOFILE=infinity

Hi all
Just wondering what are those real use cases that suffer from the files limit discrepancy?

@networkop I don't think there's any controversy between what i wrote and what you're seeing?
2^30 (give or take a few) is the max, docker goes for it.
You might be asking why in this case your script hangs - that i don't know (just suboptimal implementation on huge numbers or some sort of collision when it reaches those) - but doesn't really matter imo.
Anyway I'll submit a patch to give containers 2^20 and that should do it. No reason to give them more than that.

to give a bit of a context, I've come across this issue here: https://github.com/amoffat/sh/blob/c65d81a996441c4bf880626ee2d8cef253392fd2/sh.py#L1956
This is a part of Cumulus Linux's dependencies and leads to one of CL's processes hanging forever.  This issue only manifests itself on Fedora, I haven't seen it happening on Debian/Ubuntu derivatives.
@LimeHat the problem is that the high enough number doesn't guarantee that your script won't hang. I don't think it's a clab's issue, more of a docker|fedora issue but I was just hoping to understand what is the root cause. Why do you think that 2^30 is good enough?
@nleiva any chance you can find out why this happens in fedora and not debian/ubuntu?

No, what I'm saying is that 2^30 causes your issue.
Indeed it is not a clab issue, however a practical approach is to enforce this value is not used with clab (instead of asking our users to change systemd/kernel/docker settings; or vendors to enforce lower values in their images, as we do in srlinux).
I'm somewhat confident that 2^20 should be good since it is the old default, but you can try it to confirm as well (I inquired about this above). But you did test just over 2^19 so it should be fine.
If you want to investigate this - I would suggest to start without containers at all, just take Python (preferably the same version as you have inside the container); bump the limits to the max, see what happens; etc.

@networkop
do you want to test what @LimeHat added in #825?
this will get you a binary with the fix
docker run --rm -v $(pwd):/workspace ghcr.io/oras-project/oras:v0.12.0 pull ttl.sh/clab-39f8654c:1d

@hellt @LimeHat thanks guys, that workaround has done the trick. I can see the ulimits set on the container and I can't reproduce the original bug:
docker inspect test | jq '.[0].HostConfig.Ulimits'
[
  {
    "Name": "nofile",
    "Hard": 524288,
    "Soft": 524288
  }
]
fedora@testbed ~ ⇨  ulimit -Hn
524288

I still don't understand how/why it happened in the first place, but this is fine. maybe @nleiva can ask one of his colleagues for some documentation/explanation?

cool, thanks for confirming @networkop
merging the PR which will auto-close this issue

@networkop

I still don't understand how/why it happened in the first place

My main guess is still a suboptimal implementation in Python [as I suggested in the comment above]. Not sure why you want to blame our redhat friends ;-)
How long did you wait for your script to complete?
I just timed closerange() for ~1 mil values (our new max), which produced ~0.5s delay, and 10 mil values, which increased completion time linearly to about ~5 seconds.
root@4c774d3d1f39:/# time ./test2.sh
real	0m0.517s
user	0m0.322s
sys	0m0.193s
root@4c774d3d1f39:/# time ./test3.sh
real	0m5.021s
user	0m3.253s
sys	0m1.743s

So with 2^30 (1+ billion) descriptors and linear scale we are talking about 8-10 minutes on my system.


changing ctrl+` shortcut doesn't toggle terminal when terminal is in focus

Toggling the new 1.3 Terminal works well when bound to it's default shortcut ctrl+ but when changed to alt+ it will only toggle the terminal if it is not the focus. If the terminal is the focus it will only type the backtick/grave. This happens with the default cmd.exe terminal and with a powershell.exe terminal.
I did not try any shortcuts other than alt+ so I can't speak to the extent of the issue but using alt+ worked with the 1.2 integrated terminal.

VSCode Version:  1.3.0
OS Version:  Windows 10.0.10586

Steps to Reproduce:

Add new keyboard shortcut to keybindings.json
{ "key": "alt+`",                "command": "workbench.action.terminal.toggleTerminal" }

Closing as duplicate of #7269.


[Data History Explorer]: Builder components

Summary of changes 🔍
You can find the design doc here.

Added DataHistoryExplorer and DataHistoryExplorerModal standalone components
DataHistoryExplorer has TimeSeriesBuilder and TimeSeriesCallout internal components
Added ADTDataHistoryAdaper which is a mixin of ADT and ADX adapters
Added DataHistoryUtils shared file and moved some files to there since now these components are also using some methods that data history widget related components used to use only before.
Moved some constants and types around and did some renamings that is why it touches many files

TODO: I will validate the design with @azimamansuri. The items to be discussed:

[ ] Is coloring the data types okay instead of using a circle and adding a data type icon next to it as we originally discussed with @darsney
[ ] Is keeping the "Add new" stacked at the bottom of the builder on the left hand side okay (even if the list is empty)? Otherwise it keeps moving as we add another item using the callout. Alternatively, I can change it to primary button and use the style as we use for Elements and Behaviors stacked to bottom with border top.
[ ] Should we enable "Property Inspector" and "Advance Twin Search" buttons on the TimeSeriesCallout? Since it is already a callout, another modal or callout on top of it may not be good for the user as it was part of our discussion with @darsney?

Testing 🧪
I added both local and mock stories for each of those components, please search for their names in storybook
Checklist ✔

[ ] Linked associated issue (if present)
[x] Added relevant labels
[x] Requested developer reviews
[x] Request UI review from design / PM
[x] Verify all code checks are passing

Interaction comment:
It feels like the callout should go to the right instead of down.

the double scrollbars are not good. I think I saw you made a style change to the twin search. is that a side effect?

The label for the toggle feels very loud. Did we make that text bold ourselves or is that default? It draws my eyes a lot and I feel like it shouldn't. Not a deal breaker but I'd be curious if it might look better as normal weight.

The spacing between the toggle and the next field looks larger than the standard. Can you check if maybe there is something extra going on there?

How would you feel about pushing the callout to the right of the list item?

Opening twin search from the callout of a list item is a rouggggh experience. It seems to close the original modal, the callout is still there and now we have a modal on top of that. I think this is what you referenced in your question to @darsney but it doesn't feel great.

There hsould be a primary button on the modal IMO, even if it doesn't do anything right now.

I follow now. That totally makes sense. It could almost be chartOverrides or something like that. But not required. Thanks for explaining.

The label for the toggle feels very loud. Did we make that text bold ourselves or is that default? It draws my eyes a lot and I feel like it shouldn't. Not a deal breaker but I'd be curious if it might look better as normal weight.

I don't think it feels like a action item with normal font weight, but maybe?:

The label for the toggle feels very loud. Did we make that text bold ourselves or is that default? It draws my eyes a lot and I feel like it shouldn't. Not a deal breaker but I'd be curious if it might look better as normal weight.

@msnyder-msft I don't think it feels like a action item with normal font weight, but maybe?:

I actually think this looks pretty good. I feel like it's kind of a "sub-item" to the dropdown above so it doesn't need it's own visually bold label. I'm not deadset on it, but I like this screenshot.

the double scrollbars are not good. I think I saw you made a style change to the twin search. is that a side effect?

I think I did not change styling for TwinPropertySearchDropdown specifically, but I fixed the double scroll issue here in this component and also fixed another issue which was rendering double "MenuList" Reach select component:

the double scrollbars are not good. I think I saw you made a style change to the twin search. is that a side effect?

I think I did not change styling for TwinPropertySearchDropdown specifically, but I fixed the double scroll issue here in this component and also fixed another issue which was rendering double "MenuList" Reach select component: UPDATE: this is a weird issue, still debugging...

@msnyder-msft it seems like this requires a separate PR, I do not want to include the fixes in this. React select in twin search requires some revision.


Fix: test_data_locality_basic sometimes fails

Fixed some timing issues. More explanation in comments below

It's better to follow the schema of test_node_config_annotation_invalid to split the test to several sub-cases by adding comments. Otherwise, it's hard to understand the whole test since there are more than 40 steps.

Thank you, I fixed it.

It seems that the implementation for step11~14 is missed.

It is not necessary. I deleted it.

Why is there a scheduling failed replica after the replica count update in line 678? And it's a little bit similar to the test in case 4. Can you add more comments for that?

I added the comment to explain it

Actually there is only 800MB rather than 10GB data written to volume(3) in step 29.

Thank you. Fixed the test skeleton

It's better not to add the check since the failed replica will be reused automatically. In other words, the replica becoming error is a transient state. Instead, you can directly check if this replica is cleaned up after the volume detachment.

Thank you. Fixed it


Sort by multiple fields

Is your feature request related to a problem? Please describe.
It appears that there is no way to sort a query by multiple fields, which should be possible according to https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html.
Describe the solution you'd like
var response = _elasticsearchClient.Search<MyModelType>(r => r
    .Index("my-index)
    .Query(query)
    .Sort(s => s
        .Field(u => u.Field1)
        .Field(u => u.Field2)
    )
);

Currently this only sorts by field2, as the last configuration will overwrite the previous one instead of adding to it.
Describe alternatives you've considered
Could also be a separate method for multiple fields

Hi @erik-kallen. There is an overload of sort accepting a params Action<SortOptionsDescriptor<TDocument>>[], which you need to use here. In your current code, you're reconfiguring the same SortOptionsDescriptor, so only the final call applies to the final object.
Your code should be:
var response = client.Search<MyModelType>(r => r
	.Index("my-index")
	.Query(query)
	.Sort(
		s => s.Field(u => u.Field1),
		s => s.Field(u => u.Field2)
	)
);

Ah, thank you!