Making ActiveTransactionRegistry pluggable

Problem description
Hey folks, as noted on the dev-distro, we're working on a replicated triplestore and would like to stay compatible with rdf4j code as much as possible.
One area that's causing us some issue at the moment is the use of the ActiveTransactionRegistry (https://github.com/eclipse/rdf4j/blob/main/tools/server-spring/src/main/java/org/eclipse/rdf4j/http/server/repository/transaction/ActiveTransactionRegistry.java) which is an in memory cache for active transactions.  While this works for single-node implementation, it would not work in the distributed space.
I think a simple first step would be:

Make this into a class (currently it's an enum)
Make this pluggable (a bean that can be loaded at runtime).

We will provide a local implementation, try and get it working with software, and submit back the changes once we get something working on our end.
Let me know if you have other thoughts on the approach. tx
Preferred solution
No response
Are you interested in contributing a solution yourself?
Yes
Alternatives you've considered
No response
Anything else?
No response

Sounds good on both counts. No objection to turning it into a class (if I remember correctly the only reason it's an enum is that I was enamoured of that particular approach to creating a singleton at the time).
No objection to creating a spring bean injection for this either. Painfully aware the server code is quite ancient, spring-config-wise.

still planning to do this.  some work reprioritizaton but hoping to finish this in march.


fix issue #2870

Added bug fix and tests as required

Tests are failing now (because the RoutablePageTest class isn't properly registered with migrations etc, I think) - please can you fix?

Merged in a3b850f37e4564dd2b6e1eec88574b9a79aee6dc - thanks!


shift principle points by .5 in undistortion

addresses https://github.com/nerfstudio-project/nerfstudio/issues/3048

@f-dy @jb-ye If you could look at this that'd be great, I think this implements the convention difference between OpenCV/nerfstudio correctly, but I'm not sure

@kerrj Let me test this change a bit and come back to you.


commute:0.1.0

I am submitting

[x] a new package
[ ] an update for a package

I have read and followed the submission guidelines and, in particular, I

[x] selected a name in conformance with the guidelines
[x] added a typst.toml file with all required keys
[x] added a README.md with documentation for my package
[x] have chosen a license and added a LICENSE file or linked one in my README.md
[x] ensured that my submission does not infringe upon the rights of a third party
[x] tested my package locally on my system and it worked
[x] named this PR as name:version of the submitted package
[x] agree that my package will not be removed without good reason

Description: This package can create commutative diagrams, useful for many fields of mathematics. It has a decent amount of features and it's relatively easy to use.
Sorry for any rookie mistake i might have made, i think this is the first time that i do a pull request

Hi, i updated the pull request with a new commit where i switch everything to kebab-case (it's a bit weird, but i guess i'll get used to it). I also moved the code example to the top of the readme, it was a nice suggestion.

Thank you!


Thumbnail card bug on Team's IOS client

Hello,
I have a thumbnail card that works fine on the emulator, Team desktop app (windows), Skype for Desktop, and Skype for Mobile on IOS.
But on Team's IOS client, there are two issues:

The image is not displaying. My image is shown as a gray box.
There are 2X duplicated cards. When I only have one card, the client shows two identical cards for a brief moment and then back to one card. It also happens when there are 2 or more cards.

Thanks for reporting this issue.
We have developed the fixes and would be rolling them out in the next release.

@siduppal  Hello. I updated to the latest C# Bot framework SDK. 3.5 and I am still seeing this issue with the IOS Team client.

Hi @siduppal, was the fix released?
@miaosenwang, still having the issue?

@Andrea-Orimoto Thank you for following up. I have updated the SDK to the latest 3.5.2. The duplicated card problem is solved. However, there is still a problem with the image. The image shows up initially, but if you scroll up until the image is invisible and then scroll down, the image becomes a gray box.

iOS client fixes are supposed to rollout this week

Can you please reply with version of Teams iOS app installed?
Go to More->settings->about to find it.

@siduppal The version I have is 1.0.20446. What's the version that has the fix?

@miaosenwang are you still experiencing this issue?

@carlosscastro I just checked. Both problems are resolved. Thank you!


Timestamps in search

Hi all! I've just integrated strapi-plugin-meilisearch "^0.3.2" in my blog app (with fe in NextJs; in FE I use"meilisearch": "^0.19.0").  I want to impleement the search in my Article entity. Is there a way I can make the search method return also the auto-generated timestamps from Strapi (created_at, published_at)? I tried to specify these fields in the displayedAttributes , but it doesn't work. Thanks!

It is absolutely possible. They are voluntarily removed because I thought they would not be necessary.

@bidoubiwa ,could you help me add them?

Hi! I've had feedback from users who want to be able to use the sortBy with these fields, maybe we should consider transforming those fields into timestamps too? WDYT?
@atintescu from what I see, all the logic is in the ./services/http.js file  🙂

(sorry I was on vacation)

Hi! I've had feedback from users who want to be able to use the sortBy with the created_at, updated_at and published_at fields, maybe we should consider transforming those fields into timestamps too? WDYT?

I don't think it is a good idea to change the format of the data before sending it to MeiliSearch. User's might want to keep it in their original form. A solution to that is the user creating its own created_at_timestamp where he converts created_at when it is being updated. This is possible using lifecycles hooks.
@anatintescu About the PR requests, to make the changes you should remove the following lines from http.js
// remove the whole function
function removeDateLogs(document) {
  const {
    updated_at: omitUpdatedAt,
    created_at: omitCreatedAt,
    created_by: omitCreatedBy,
    updated_by: omitUpdatedBy,
    published_at: omitPublishedAt,
    ...noDateLogDocument
  } = document
  return noDateLogDocument
}

async function addDocuments({ indexUid, data }) {
  const noDateLogDocuments = data.map(document => removeDateLogs(document)) // remove
  return this.client.index(indexUid).addDocuments(noDateLogDocuments)
}

For the other parts of the contribution: making the pr, etc.. here is a guide on how to do so 😊.
If you have any question about how to contribute feel free to come and talk to me on our slack (link is in the upper right part of the docs).

PR #265 allow us to take full control over what is to be sent to search engine for indexing .
This way , we can address these kind of issues without changing hard-coded default behavior


Site: Edit Features in the home page with link to the examples

With target="_blank"

Added some links, we will continue with other After Release


chore(deps): upgrade non major breaking deps - fixes #1

This upgrades all deps except for wagmi (breaking change)
The upgrade also brings in the missing chains reported in #1 and #2

Awesome, this fixes the issue 🙏❤

Looks good! Merged!!!

And thank you!


[Bug]: The execution plan should not support exporting JSON

ODC version
odc431
OB version
ob424
What happened?

What did you expect to happen?
The execution plan and execution profile should not support exporting JSON
How can we reproduce it (as minimally and precisely as possible)?
After executing SQL, click on the execution profile and click on the execution plan
Anything else we need to know?
No response

Fixed In Commit b8310dbf525090e447de8ab108fba352e21af1e0
------
畅晚
Mon Jul 8 09:36:58 2024 +0800

pass


Convert to noarch generic

This is a stub package with no contents. As such it should be fine to convert it to noarch: generic. AFAIK there is no magic when installing noarch: generic packages. Though please correct me if I'm wrong.
cc @kalefranz

Agreed
Sent from my iPhone

On Jul 11, 2018, at 12:30 PM, jakirkham<EMAIL_ADDRESS>wrote:
This is a stub package with no contents. As such it should be fine to convert it to noarch: generic. AFAIK there is no magic when installing noarch: generic packages. Though please correct me if I'm wrong.
cc @kalefranz
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

can this package just get ripped out instead? what actually depends it? I've found conda depends on it, but that is kinda circular right?


API endpoint to expose export wins for a company

Description of change
Context
This PR is part of a bigger piece of work to extract export wins from the export-wins-data project and display them in DataHub.
See the presentation for more context on the approach.
https://docs.google.com/presentation/d/132Kzu0dW-nt0qVzszjV0EdJCcC87FqIAZcNslcFQOA0/edit?usp=sharing
Changes in this PR
A new endpoint, GET /v4/company/<ID>/export-win, was added to expose company's export wins.
The new view facilitates proxying the response from Export Wins API that gives a list of export wins for given company match id.
Helper functions added to consume Export Wins Service, that takes match_id as input and gives out list of export wins.
Match id is obtained from Company Matching Service.
Checklist

[x] If this is a releasable change, has a news fragment been added?

Explanation
A news fragment is required for any releasable change (i.e. code that runs in or affects production) so that a corresponding changelog entry is added when releasing.
Check changelog/README.md for instructions.

[x] Has this branch been rebased on top of the current develop branch?

Explanation
The branch should not be stale or have conflicts at the time reviews are requested.

[x] Is the CircleCI build passing?

General points

Other things to check

Make sure fixtures/test_data.yaml is maintained when updating models
Consider the admin site when making changes to models
Use select-/prefetch-related field lists in views and search apps, and update them when fields are added
Make sure the README is updated e.g. when adding new environment variables

See docs/CONTRIBUTING.md for more guidelines.

@sekharpanja This exceeds the agreed-upon max-LOC for PRs by some margin. While the max-LOC is only a guide and we sometimes make exceptions, it seems each of the following can be a separate PR :)

A new endpoint, GET /v4/company//export-win, was added to expose company's export wins.
The new view facilitates proxying the response from Export Wins API that gives a list of export wins for given company match id.
Helper functions added to consume Export Wins Service, that takes match_id as input and gives out list of export wins.
Match id is obtained from Company Matching Service.

I thought 600 lines is our max-LOC. But fair enough, will split the PR @alixedi .


Can't translate 2000+ words from a text file - character limit?

deep_translator version: 1.3.9
Python version: 3.7.4
Operating System: Windows 10

Description
Hi! :)
I wanted to translate 2000+ words from a text file but when running:
translated = GoogleTranslator(source=select_source_language, target=select_target_language).translate_file("file.txt")

I got an error:
raise NotValidLength(payload, min_chars, max_chars)

with Text length need to be between 1 and 5000 characters.
It was working fine when I ran the code on 200+ words, though.
Does this package have a character limit then? If so, is there any workaround?

@vardecab hmm I'm guessing you have too many spaces in your files, which makes the algorithm thinks that there are more than 5k characters. Can you check that up?
I should have catched this behavior already!

@vardecab Can you try upgrading to 1.4.0 ?

@vardecab Can you try upgrading to 1.4.0 ?

I did, same error is happening but...

I'm guessing you have too many spaces in your files, which makes the algorithm thinks that there are more than 5k characters.

I have a file with ~ 2000 words (~ 19k characters) which is way over 5k characters you've mentioned. They are stored line by line as seen here:

Does it mean that I cannot have more than 5k characters in the file I'm passing to translate_file()?

@vardecab Exactly, you can pass more than 5k characters. This is a restriction from google translate not deep-translator.
You can use the translate_batch for this task ;)


MINOR: Fix StreamsOptimizedTest

We have seen recent system test timeouts associated with this test.
Analysis revealed an excessive amount of time spent searching
for test conditions in the logs.
This change addresses the issue by dropping some unnecessary
checks and using a more efficient log search mechanism.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

In detail, here's my analysis of a recent timeout:
Looking at the debug log for the test, there seem to be some remote commands that really burn the clock. Consider this segment:
 680 [DEBUG - 2021-01-12 21:34:54,612 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 681 [INFO  - 2021-01-12 21:35:18,751 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 682 [DEBUG - 2021-01-12 21:35:19,752 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 683 [INFO  - 2021-01-12 21:36:08,111 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 684 [DEBUG - 2021-01-12 21:36:09,112 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 685 [INFO  - 2021-01-12 21:37:38,270 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 686 [DEBUG - 2021-01-12 21:37:39,271 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 687 [INFO  - 2021-01-12 21:40:28,719 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 688 [DEBUG - 2021-01-12 21:40:29,720 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 689 [INFO  - 2021-01-12 21:46:12,541 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check

The first sed takes 20 seconds, the second takes 50, the third takes 90, the fourth takes 2.5 minutes, and the last takes 5.5 minutes.
The next time we try it (on worker6) it pushes the whole test over the 30m mark:
1030 [DEBUG - 2021-01-12 21:46:29,527 - remoteaccount - _log - lineno:160]: ubuntu@worker6: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
1031 [INFO  - 2021-01-12 21:53:31,673 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
1032 [DEBUG - 2021-01-12 21:53:32,675 - remoteaccount - _log - lineno:160]: ubuntu@worker6: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
1033 [INFO  - 2021-01-12 22:01:38,267 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
1034 [DEBUG - 2021-01-12 22:01:39,268 - remoteaccount - _log - lineno:160]: ubuntu@worker6: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
1035 [INFO  - 2021-01-12 22:03:50,579 - runner_client - log - lineno:240]: RunnerClient: kafkatest.tests.streams.streams_optimized_test.StreamsOptimizedTest.test_upgrade_optimized_topology: FAIL:
1036 Traceback (most recent call last):
1037   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/tests/runner_client.py", line 134, in run
1038     data = self.run_test()
1039   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/tests/runner_client.py", line 192, in run_test
1040     return self.test_context.function(self.test)
1041   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/tests/kafkatest/tests/streams/streams_optimized_test.py", line 88, in test_upgrade_optimized_topology
1042     self.verify_processing(processors, verify_individual_operations=True)
1043   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/tests/kafkatest/tests/streams/streams_optimized_test.py", line 114, in verify_processing
1044     if not self.all_source_subtopology_tasks(processor):
1045   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/tests/kafkatest/tests/streams/streams_optimized_test.py", line 133, in all_source_subtopology_tasks
1046     found = list(processor.node.account.ssh_capture("sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/\1/p' %s" % processor.LOG_FILE, allow_fail=True))
1047   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/cluster/remoteaccount.py", line 651, in next
1048     return next(self.iter_obj)
1049   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/cluster/remoteaccount.py", line 318, in output_generator
1050     for line in iter(stdout.readline, ''):
1051   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/file.py", line 291, in readline
1052     new_data = self._read(n)
1053   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/channel.py", line 1361, in _read
1054     return self.channel.recv(size)
1055   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/channel.py", line 699, in recv
1056     out = self.in_buffer.read(nbytes, self.timeout)
1057   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/buffered_pipe.py", line 160, in read
1058     self._cv.wait(timeout)
1059   File "/usr/local/lib/python3.6/threading.py", line 295, in wait
1060     waiter.acquire()
1061 KeyboardInterrupt

Looks like the first sed is 7 minutes, the second 8 minutes, and then we time out in the third.

In detail, here's my analysis of a recent timeout:
Looking at the debug log for the test, there seem to be some remote commands that really burn the clock. Consider this segment:
 680 [DEBUG - 2021-01-12 21:34:54,612 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 681 [INFO  - 2021-01-12 21:35:18,751 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 682 [DEBUG - 2021-01-12 21:35:19,752 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 683 [INFO  - 2021-01-12 21:36:08,111 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 684 [DEBUG - 2021-01-12 21:36:09,112 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 685 [INFO  - 2021-01-12 21:37:38,270 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 686 [DEBUG - 2021-01-12 21:37:39,271 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 687 [INFO  - 2021-01-12 21:40:28,719 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
 688 [DEBUG - 2021-01-12 21:40:29,720 - remoteaccount - _log - lineno:160]: ubuntu@worker8: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
 689 [INFO  - 2021-01-12 21:46:12,541 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check

The first sed takes 20 seconds, the second takes 50, the third takes 90, the fourth takes 2.5 minutes, and the last takes 5.5 minutes.
The next time we try it (on worker6) it pushes the whole test over the 30m mark:
1030 [DEBUG - 2021-01-12 21:46:29,527 - remoteaccount - _log - lineno:160]: ubuntu@worker6: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
1031 [INFO  - 2021-01-12 21:53:31,673 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
1032 [DEBUG - 2021-01-12 21:53:32,675 - remoteaccount - _log - lineno:160]: ubuntu@worker6: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
1033 [INFO  - 2021-01-12 22:01:38,267 - streams_optimized_test - all_source_subtopology_tasks - lineno:134]: Returned [] from assigned task check
1034 [DEBUG - 2021-01-12 22:01:39,268 - remoteaccount - _log - lineno:160]: ubuntu@worker6: Running ssh command: sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/^A/p' /mnt/streams/streams.log
1035 [INFO  - 2021-01-12 22:03:50,579 - runner_client - log - lineno:240]: RunnerClient: kafkatest.tests.streams.streams_optimized_test.StreamsOptimizedTest.test_upgrade_optimized_topology: FAIL:
1036 Traceback (most recent call last):
1037   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/tests/runner_client.py", line 134, in run
1038     data = self.run_test()
1039   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/tests/runner_client.py", line 192, in run_test
1040     return self.test_context.function(self.test)
1041   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/tests/kafkatest/tests/streams/streams_optimized_test.py", line 88, in test_upgrade_optimized_topology
1042     self.verify_processing(processors, verify_individual_operations=True)
1043   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/tests/kafkatest/tests/streams/streams_optimized_test.py", line 114, in verify_processing
1044     if not self.all_source_subtopology_tasks(processor):
1045   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/tests/kafkatest/tests/streams/streams_optimized_test.py", line 133, in all_source_subtopology_tasks
1046     found = list(processor.node.account.ssh_capture("sed -n 's/.*current active tasks: \[\(\(0_[0-9], \)\{3\}0_[0-9]\)\].*/\1/p' %s" % processor.LOG_FILE, allow_fail=True))
1047   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/cluster/remoteaccount.py", line 651, in next
1048     return next(self.iter_obj)
1049   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/ducktape-0.8.0-py3.6.egg/ducktape/cluster/remoteaccount.py", line 318, in output_generator
1050     for line in iter(stdout.readline, ''):
1051   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/file.py", line 291, in readline
1052     new_data = self._read(n)
1053   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/channel.py", line 1361, in _read
1054     return self.channel.recv(size)
1055   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/channel.py", line 699, in recv
1056     out = self.in_buffer.read(nbytes, self.timeout)
1057   File "/home/jenkins/workspace/system-test-kafka-branch-builder/kafka/venv/lib/python3.6/site-packages/paramiko-2.7.2-py3.6.egg/paramiko/buffered_pipe.py", line 160, in read
1058     self._cv.wait(timeout)
1059   File "/usr/local/lib/python3.6/threading.py", line 295, in wait
1060     waiter.acquire()
1061 KeyboardInterrupt

Looks like the first sed is 7 minutes, the second 8 minutes, and then we time out in the third.

I confirmed this change works both positively and negatively:
================================================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.8.0
session_id:       2021-01-15--012
run time:         2 minutes 0.269 seconds
tests run:        1
passed:           1
failed:           0
ignored:          0
================================================================================
test_id:    kafkatest.tests.streams.streams_optimized_test.StreamsOptimizedTest.test_upgrade_optimized_topology
status:     PASS
run time:   2 minutes 0.208 seconds
--------------------------------------------------------------------------------

For the negative test, I changed the regex string in the test and confirmed that the test fails by timeout waiting to see that (wrong) string in the stdout.

I confirmed this change works both positively and negatively:
================================================================================
SESSION REPORT (ALL TESTS)
ducktape version: 0.8.0
session_id:       2021-01-15--012
run time:         2 minutes 0.269 seconds
tests run:        1
passed:           1
failed:           0
ignored:          0
================================================================================
test_id:    kafkatest.tests.streams.streams_optimized_test.StreamsOptimizedTest.test_upgrade_optimized_topology
status:     PASS
run time:   2 minutes 0.208 seconds
--------------------------------------------------------------------------------

For the negative test, I changed the regex string in the test and confirmed that the test fails by timeout waiting to see that (wrong) string in the stdout.

Hey @bbejeck , I don't suppose you have time for a review of this, since you had come context?

Hey @bbejeck , I don't suppose you have time for a review of this, since you had come context?

Re-triggered unit tests again, some other flaky tests are supposed to be fixed last night.

Re-triggered unit tests again, some other flaky tests are supposed to be fixed last night.

Thanks, all! I'll go ahead and merge despite the build, since only a Python file has changed.

Thanks, all! I'll go ahead and merge despite the build, since only a Python file has changed.

Cherry-picked to 2.7 and 2.6

Cherry-picked to 2.7 and 2.6


React bubbling problem

Description
Bubbling Problem using react
Type
Machine Coding Round
Related Technology
React, css
Source
Asked in Ridecell interview
Working Solution
Codesandbox link: https://codesandbox.io/s/bubbling-problem-8erwc

Will raise new a new PR as suggested in previous PR


example for file sharing

Could you give us an example to use this library for file sharing over wifi?..
thanks..

I'm building a new module for that purpose with the help of this lib too.

Any luck with it? @assemmohamedali ? I'm in need of such a module

@peckyboy if you need a quick way to get started to this (until I release this module) you can use react-native-tcp and this lib to do that task. The idea is you just need to put the devices which they need to connect in a same network and then open a socket to send data over it.

Oh! I see. I actually looked at that module but wasn't very detailed so I thought it wasn't what I looking for. You're saying I'd have to create the hotspot manually and open a socket to send and receive data? @assemmohamedali

Yeah, exactly my lib will help you establish a hotspot and ask a device to connect to then use react-native-tcp to open a socket.

Awesome @assemmohamedali . Looking forward to it. Thanks for your responses


CI: build all systems in hercules

Since we switched to hercules ci on monday, we can build checks and other packages in CI on the following architectures:

aarch64-linux
aarch64-darwin
x86_64-darwin

This is a draft as I'd like to take a day or two trying to fix the still-failing builds or disabling them and linking a specific github issue for each.
Questions

[ ] Could we refresh lock files in CI?
Need to check whether that's better implemented via hercules effects or impure derivations?
It would already be very useful to at least verify that lock-files are reproducible - and the
copies in the repo are up to date.
Maybe there could even be an optional job to refresh lock files on other platform, so that contributors could i.e. commit their x86_86-linux lock file and CI builds aarch64-linux et al?
Should we run this on each and every commit?
I think with the current state of things and the fact that most contributors won't have access to each supported systems.
But you need that to keep lock files up to date, we can't expect all platforms to work on each commit to main.
Additionally, we are effectively doing ~4 times the work every time, while platform-specific breakage will be much more likely for some commits (i.e. drvs changes, compared to refactoring of functions).
-> We could only run x86_64-linux on commits to main and only test the rest for releases or upon request (not sure how to implement that in hercules yet)

Having different lock files for different systems seems to be a python specific problem. And probably just even a pip specific one, since there are other locking tools for python, like poetry that do not have that problem.
I'm not sure if this is the right time putting effort into building infra for cross system lock file management, as that is is problem of only the pip module for now, and it's unclear if or when we will have another use case for this.
If I'm not mistaken by this observation, I'd prefer to minimize our efforts in cross system locking infra.
Us having the ${system} in the file name for lock files is currently just done through configuration via lock.lockFIleRel. We should probably move this configuration to the pip module and have a system-less default for all other modules.
I'm wondering if it would generally make more sense to redirect this effort towards improving the pip module to be able to lock multiple systems at once. This improvement would free us from this problem domain entirely as of now. AFAICT, all that needs to be done is some monkeypatching of the pip vendored packaging library, to be able to inject a fake environment, specifically a fake sys_platform etc. Afterwards we could simply run the fetchPipMetadata script multiple times for multiple systems in one go.
This seems like a reasonable simple fix that would spare us the overhead in Ci pipeline logic and workload.

It would already be very useful to at least verify that lock-files are reproducible

Lock file creation being reproducible is also a property specific to the pip module, and not a property of the lock file module in general. I'm happy to have a test, but it should be a pip specific integration test and doesn't need to be a generic feature of our infra. Still personally, this test doesn't have a high prio for me, because I think non-reproducible lock file updates are not crucial for the user. Important is, that after the locking, things are reproducible, which is still the case.

Having different lock files for different systems seems to be a python specific problem. And probably just even a pip specific one, since there are other locking tools for python, like poetry that do not have that problem.

This could very well be the case, because the problem as such mostly exists due to pythons sdists and their missing metadata. We wouldn't have that problem with pep-518 wheels only.
If there's really no other subsystem with a change to be ported to v1 that requires this, I agree that it might be a good idea to move the locking stuff to a separate issue and lock into what poetry does, more on that below ;)
cross system ci

I'm not sure if this is the right time putting effort into building infra for cross system lock file management, as that is is problem of only the pip module for now, and it's unclear if or when we will have another use case for this.

Do we in agree that it's the right time to put effort into cross-system testing, so is this just about the lock-file management or about multi-system CI in general? Just want to clarify because I think most of the runtime overhead it would cause is due to the latter, i.e. evaluating, building, testing packages on multiple systems, not locking them. Not sure if that's controversial? I think those tests are useful as platform-specific issues and requirements seem pretty common, at least for -darwin targets.
cross-system locking

If I'm not mistaken by this observation, I'd prefer to minimize our efforts in cross system locking infra.

The former, cross-system locking, can be seen as less urgent I suppose, at least for CI.
The thing is that I'd like to implement the ability to refresh lock files via remote-builders, if they stay platform-specific for at least one subsystem (i believe it's necessary for python, see below.
That should ease the maintenance work during development IMO, as you wouldn't need to switch machines between committing. Think that could be doable on builders supporting the ´impure-derivations´ experimental flag. And if it is, the effort to plug that into hercules with such a builder - at least for python - does not seem too high?
If not, we can probably live with it, not a hill I am willing to die on ;)
making lock files cross-system

Us having the ${system} in the file name for lock files is currently just done through configuration via lock.lockFIleRel. We should probably move this configuration to the pip module and have a system-less default for all other modules.

I agree that it shouldn't generally be the case, but just to be clear about the second sentence: We would i.e. move a lock-x86_64-linux.json which includes paths such as .fetchPipMetadata.sources to lock-x86_64-linux.json and .fetchPipMetadata.x86_64-liniux.sources?
making pips locking cross-system

I'm wondering if it would generally make more sense to redirect this effort towards improving the pip module to be able to lock multiple systems at once. This improvement would free us from this problem domain entirely as of now. AFAICT, all that needs to be done is some monkeypatching of the pip vendored packaging library, to be able to inject a fake environment, specifically a fake sys_platform etc. Afterwards we could simply run the fetchPipMetadata script multiple times for multiple systems in one go.

I guess we should look a bit more into what poetry does here if we want to go down that route. I think it could be tricky with regards to sdists, their build requirements and their setup.py hacks. They are becoming less and less common in bigger libraries, but leaving out support for them entirely sadly isn't really feasible yet, but I might be wrong or missing a clever hack here.
Monkeypatching pips dependencies should be a proof-of-concept before suggesting an upstream patch if necessary, but that's another discussion :)

This seems like a reasonable simple fix that would spare us the overhead in Ci pipeline logic and workload.

Only for locking, not for building and tests, unless I am misreading? (Not arguing about the definition of "simple fix" here ;-P)
Should lock files be reproducible and what would that mean?

Lock file creation being reproducible is also a property specific to the pip module, and not a property of the lock file module in general. I'm happy to have a test, but it should be a pip specific integration test and doesn't need to be a generic feature of our infra. Still personally, this test doesn't have a high prio for me, because I think non-reproducible lock file updates are not crucial for the user. Important is, that after the locking, things are reproducible, which is still the case.

tl;dr: Python-specific check works for me :)
But I think we wouldn't need pypiSnapshotDate in fetchPipMetadata, if we don't consider that as useful feature at all, or do we? We inherited it from the old FOD builder, but as we now have hashes and urls in the lock file directly, builds would stay reproducible without it.
My thinking was mostly that it's a useful feature to review changes of the lock files in git. I'd expect the diffs to be slightly more readable due to less random changes with the reproducible ones, but might be mistaken. For python and dream2nix dev purposes alone adding some snapshot tests to fetch_pip_metadata might be the better solution for that though, now that i thought more about it.
Invalidation hashes in lock files

This invalidation hash can be stored inside the lock file and re-computed in the next evaluation, which would allow us to tell early if a lock file is out of date or not. If configured correctly, there wouldn't be a need to build a package or re-lock to determine if a lock file is out of date.

I think that's probably a good idea, and at least one worth exploring. Well commented inputs to the validation hash and good test coverage are probably worth the effort here but i think the invalidation hashing was and is a useful mechanism :)

I'm not sure what/if anything should be done about it, but I'd like to gently register that there's still a sharp corner here that may deserve to be sanded down a bit.
I'm porting a web app hosted on Heroku from a mach-nix workflow to dream2nix. One of my general goals with its dev and production workflows has been to retain compatibility with its old non-nix based git-push/requirements.txt workflow   in case I get run over by a bus and grokking the nix-based setup becomes a bottleneck.
I didn't internalize, until I got to the point of validating dev environments and production builds in CI, that the lockiles I was generating while working on macOS weren't going to be portable. That was, of course, after I'd already invested quite a bit of effort in porting everything. I thought I was almost done, but now I'm pondering what I can do to keep it from being a PITA to develop against until I have cycles to figure out if it's worth abandoning the pip/requirements format  and how straightforward that is.
For now, I think I'm settling with forcing -${system}- into our lockfile paths (we already have separate lockfiles for dev and prod) so that we don't end up with tedious merge conflicts or stash/restore workflows around these files.
To avoid complaining without imagining improvements:

At the risk of being mocked if I just skimmed over an existing warning (😅), prominently mentioning this sharp corner in the documentation would be a start.
Examples that acknowledge this pip-idiomatic limitation and model best practices for dealing with it in the least-painful way might also be nice? (I haven't lived with my current approach yet. I imagine we'll have less friction if we just fold the system into the lockfile paths for intel macs, aarch64 macs, and x86/linux-based CI systems, but I don't know if I'm just retreading something that's already been discarded by people who've done this before.
If there are already known/obvious approaches to porting projects that depend on requirements*.txt formats to another python-based module and perhaps generating the requirements.txt files, dropping warning/caution admonitions that call out the workflow problems here and leaving breadcrumbs about those might also help. (I'm not trying to go down with the pip-ship. I feel like it's responsible to ensure I remain compatible with Heroku's normal post-push pip install -r requirements.txt python flow, but I'm happy to port our canonical definitions to another format as long as it's a net QoL improvement and I can generate back-compatible requirements files from it. This is somewhat complicated by us having complex requirements with private indexes and such.)

Happy to open a new issue if you think it's merited.

Hey @abathur, using pdm might work better since there's a WIP module for that here, and they've already done the hard work of making cross-platform lock files, and have the tools to convert to and from a requirements.txt as needed.

I suspected as much myself (I already have TODOs for this, but I'm out of time to poke at it for now) but only after I'd done all of the porting work and ran into the sharp corner.
I'm commenting less for myself (I've already sunk in the time to learn this the hard way) than to point out that there's still a sharp corner here--others can benefit from efforts to sand it down or clearly document it.
(thanks for confirming this suspicion, though)


fix not rewrite first_value when first_value ignore nulls

What problem does this PR solve?
Issue Number: close #xxx
Related PR: #44996 #27623
Problem Summary:
Release note
None
Check List (For Author)

Test

[ ] Regression test
[ ] Unit Test
[ ] Manual test (add detailed scripts or steps below)
[ ] No need to test or manual test. Explain why:

[ ] This is a refactor/code format and no logic has been changed.
[ ] Previous test can cover this change.
[ ] No code files have been changed.
[ ] Other reason

Behavior changed:

[ ] No.
[ ] Yes.

Does this need documentation?

[ ] No.
[ ] Yes.

Check List (For Reviewer who merge this PR)

[ ] Confirm the release note
[ ] Confirm test cases
[ ] Confirm document
[ ] Add branch pick label

run cloud_p0

run cloud_p0

run buildall

run buildall

run buildall

run p0

run buildall

run buildall


Canisters [ Continuation of clement-or #2544 ]

I'm attempting to maintain this PR.
Note that if clement-or (author of most of the commits here in #2544 ) wants to instead continue it, they can.
The added commits so far are just to handle the "obvious" issues that appeared during my testing of the PR.
Under the circumstances, I'd consider this not-draft, as pipenet port connections were implemented by clement-or contrary to the description of their PR.
Transfer of air between canisters works but seems to act "non-obviously" in regards to the mechanics of transfer to/from the PipeNet.
Something that doesn't seem to be present at all is transfer to/from tank items, but this could be delayed for a future PR - having a way to use PipeNet at all is a start in getting it going.

Seems fine, I approve

Seems fine, I approve

Our great lord approves. Blessed day.

Oh, so I'm the great lord now? Uh, OK?

Apparently there's a conflict with Resources/Credits/GitHub.txt because that file is all on one line. Someone could manually resolve, in which case, here's what you need to know: clement-or was changed to Topy over two commits,
1986fb0 and 94f3b0e

That file shouldn't be edited manually so it must be reverted to the one in latest master.

Attempted to leave an additional note on the commits, failed hilariously

Aside from these few nitpicks, this seems fine to merge. It still seems to be missing a feature to fill gas tank using canisters, but that can be added in a future PR if you want. Up to you.

Might wanna fix this for windows.

Might wanna fix this for windows.

Look at the test that failed

Yes

Thanks for all the big work, it was my first big PR and I didn't have a chance to complete it due to health issues


Better naming convention for events

the events being sent between the client, server and app I feel are a bit messy and could use better naming

fixed


add button> no quick add

System Information:

Version: 1.5.3
Language: en-US
Timezone Offset: +00:00
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36

What steps will reproduce the problem?

do a calendar add from the toolbar icon

What is the expected result?
To make a 'quick' add to the calendar. Otherwise what is the reason of the toolbar addition?
What happens instead?
Opens the site for further edit.
Screenshot URL:
Logs:

Hehe, fair enough. :+1:


how to combine image prompts and conditions such as structural control?

take T2I-adapter as example, the inputs include a image prompt "p" and a condition "c", what is the input of unet?

@ruaruaruabick hi, the structural control models are used same as their original implementation


Doesn't build without prerequisites not mentioned in Readme

This looks like a pretty interesting project, and I am curious to try it out.
I think it'd be a good fit for providing networking to unprivileged pet distroboxes.
As I am trying to build this in a fresh environment, the poetry build step fails.
[wireguard4netns]$ poetry build

Preparing build environment with build-system requirements poetry-core
Building wireguard4netns (0.1.3.post.dev0)
Downloading golang-v1.19.4
Copying wireguard-go source
Patching wireguard-go source
Traceback (most recent call last):
  File "/home/example.box/wireguard4netns/build.py", line 147, in <module>
    build()
  File "/home/example.box/wireguard4netns/build.py", line 57, in build
    subprocess.run([patch, "-p1"], stdin=patchfile.open(), cwd=tmp_root, check=True)
  File "/usr/lib64/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.11/subprocess.py", line 1775, in _execute_child
    and os.path.dirname(executable)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 152, in dirname
TypeError: expected str, bytes or os.PathLike object, not NoneType

On inspecting the build.py code, and trying to retrace the steps manually, I believe the error is because go and patch executables are not present.
Perhaps the presence/absence of these can be detected in the script and a warning provided?
Additionally, it might be a good idea to mention them somewhere in the readme.
Cheers.

Ah yes, I definitely should at least mention those build dependencies.
Adding warnings to the build.py should be fairly straightforward because we're already using shutil.which to find if we have the necessary binaries and so we can trivially test for none and we don't have to mess with exception handlers around subprocess.run. The only thing I would have to check is what the actual poetry/setuptools expectation here is. Do we raise an exception or use sys.exit with some (specific?) non-zero value, etc.
Unless you really need the VPN functionality provided by the WireGuard tunnel, a far more mature and probably stable solution for pet distroboxes would be slirp4netns which was a huge inspiration for this project. They proved this could even be done without root to begin with and it is more likely already packaged as a pre-compiled binary for various systems.

Yes Distrobox already uses slirp4netns through podman, but this uses the default network interface of host to access the internet at large.
I was looking at somehow plumbing slirp4netns with user-space WireGuard myself to have a transparent VPN-like functionality for the distroboxes (without root), while keeping the host unaffected. That's how I came across this project. :)
I did compile and install the cmd line wireguard4netns eventually, and iiuc: it should add a tap interface to netns identified by ns_pid and route the incoming packets to wireguard peer defined in wireguard.conf through a wireguard tunnel over the host interface interface. Is this understanding correct?

Yeah, sounds about right. When the network namespace goes away, the tun/tap interface closes which should trigger the wireguard-go process to quit. I've spun up processes in an isolated network namespace with unshare and then attached a tunnel with this to give them network access.


[top / pwrmgr / rstmgr] Escalation connections

connect escalation to pwrmgr / rstmgr
connect escalation output from alert_handler to the correct locations
nmi_gen is temporarily kept because there are no other modules that can generate a non-escalate reset request.
once those modules are instantiated, nmi_gen can be removed.
there is a fake hjson introduced for ibex, although the solution proposed in #4447 might also work.

@tjaychen just pushed an additional commit to this repo. It should do the trick, I ran it locally and the tests pass.

@tjaychen just pushed an additional commit to this repo. It should do the trick, I ran it locally and the tests pass.

thanks!


Installing fails: mysql_config not found

I want to upgrade from pattern 2.6 to 3.6
I uninstalled, and now I do:
sudo pip install pattern
and get
EnvironmentError: mysql_config not found

Try installing mysqlclient separately  and then try the sudo pip install pattern
for macos try
brew install mysqlclient

and then install pattern

Hi, but I don't want to install mysql...
I just want to use the Pattern for the English textual skills, like singularize, etc.

When you install pattern mysqlclient is a dependency. It is not made optional yet.

So we can install the client, but don't have to install the database itself, right?

I managed to install 3.6 after I did
sudo apt-get install libmysqlclient-dev
and then
sudo pip2 install pattern==3.6
However, when I am now doing
from pattern.en import singularize
It fails:
from pattern.en import singularize

File "/usr/local/lib/python2.7/dist-packages/pattern/text/en/init.py", line 61, in
from pattern.text.en.inflect import (
File "/usr/local/lib/python2.7/dist-packages/pattern/text/en/init.py", line 80, in
from pattern.text.en import wordnet
File "/usr/local/lib/python2.7/dist-packages/pattern/text/en/wordnet/init.py", line 57, in
nltk.data.find("corpora/" + token)
File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 653, in find
return find(modified_name, paths)
File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 639, in find
return ZipFilePathPointer(p, zipentry)
File "/usr/local/lib/python2.7/dist-packages/nltk/compat.py", line 221, in _decorator
return init_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 486, in init
zipfile = OpenOnDemandZipFile(os.path.abspath(zipfile))
File "/usr/local/lib/python2.7/dist-packages/nltk/compat.py", line 221, in _decorator
return init_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/nltk/data.py", line 1012, in init
zipfile.ZipFile.init(self, filename)
File "/usr/lib/python2.7/zipfile.py", line 770, in init
self._RealGetContents()
File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file

I got it working with no errors.

OS: Ubuntu 19.04
Anaconda environment: python 3.6

make sure you install libmysqlclient-dev first!

sudo apt install libmysqlclient-dev
git clone https://github.com/clips/pattern
cd pattern/
# activate conda environment.
python setup.py install

output after running python setup.py install:

Using /home/<USER-NAME>/anaconda3/envs/<ENV-NAME>/lib/python3.6/site-packages
Finished processing dependencies for Pattern==3.6

You don't have root on all machines where you might want to use pattern, and I also do not see a reason why mysql-client should be a required dependency. Especially when the documentation mentions:
The module has no external dependencies except when using LSA in the pattern.vector module, which requires NumPy

Please make optional dependencies optional.

Related to #250

Related to #250

Please....We are unable to use Pattern because of this error message from MySQL.....


Added synology information to the troubleshooting page

Just a quick edit, noticed an uptick in synology requests. :)

@gantoine


How to get bullet impact position?

Trying to make hitmarker dmg indicator .
Can someone tell me how to get the bullet impact position.
I'm using the enemy bone
Vector bone {Enemy bone (head)}
Vector w2screen

World2Screen(bone,w2screen)

SetTextPosition

But when in game
The hitmarker only appear on the floor where the localplayer spawn.
And then crash a few min later

#835

#835

I want to make it like this
https://www.youtube.com/watch?v=Rpsnnp3qeeI

https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events#bullet_impact

Thanks @3Ld4D


Cookies not sent in SSR mode

Version
v4.0.0-rc.19
Reproduction link
https://pyj86.sse.codesandbox.io
Steps to reproduce
If httpLinkOptions.credentials = true it seems the Cookie header is set when client side, but not when the SSR request is happening.
Setup nuxt.config.js like so:
    apollo: {
        authenticationType: "Basic",
        clientConfigs: {
            default: "~/plugins/apollo-config-default.js"
        }
    }

And then in apollo-config-default.js
export default function() {
    return {
        httpEndpoint: process.env.DEFAULT_ENDPOINT,
        getAuth: () => process.env.BASIC_API_TOKEN || "",
        httpLinkOptions: {
            credentials: "include"
        }
    }
}

Hard load to a public URL, like: https://pyj86.sse.codesandbox.io/
It works fine, browse to a private URL via a nuxt-link and it works fine.
Hard load into a private URL and it will give SSR node not matching server-rendered errors.
This page will only work if you are logged into backend. DM me for the logins which is here: https://stackhaus-backend.funkhaus.us /wp-admin
Public page: https://pyj86.sse.codesandbox.io/
Private page: https://pyj86.sse.codesandbox.io/featured/private-page
What is expected ?
Cookie header should be sent when both client side and SSR
What is actually happening?
SSR gives node not matching server-rendered errors
Additional comments?
I'm running WordPress as a headless CMS and trying to get preview/draft/private pages/posts working. The setup results in the backend having a different domain to your frontend, like example.com and api.example.com.

This bug report is available on Nuxt community (#c296)

Got more data on this error, from a custom error handler in the smart query:
 ERROR  We've got an error! GraphQL error: Internal server error                                               18:26:41

  at new ApolloError (node_modules/apollo-client/lib/bundle.cjs.js:89:24)
  at node_modules/apollo-client/lib/bundle.cjs.js:1585:32

  at node_modules/apollo-client/lib/bundle.cjs.js:2005:13
  at Set.forEach (<anonymous>)
  at node_modules/apollo-client/lib/bundle.cjs.js:2003:24
  at Map.forEach (<anonymous>)
  at QueryManager.broadcastQueries (node_modules/apollo-client/lib/bundle.cjs.js:2001:18)
  at node_modules/apollo-client/lib/bundle.cjs.js:2128:17
  at Object.next (node_modules/zen-observable/lib/Observable.js:322:23)
  at notifySubscription (node_modules/zen-observable/lib/Observable.js:135:18)
  at onNotify (node_modules/zen-observable/lib/Observable.js:179:3)
  at SubscriptionObserver.next (node_modules/zen-observable/lib/Observable.js:235:7)
  at node_modules/apollo-client/lib/bundle.cjs.js:1099:34
  at Set.forEach (<anonymous>)
  at Object.next (node_modules/apollo-client/lib/bundle.cjs.js:1098:19)
  at notifySubscription (node_modules/zen-observable/lib/Observable.js:135:18)

Looked into this some more today. Almost certain that cookies are not being sent for the SSR request, only on the client side requests now.

Is there any update on that?

bump

This issue is very old but this is still an issue with this library. In SSR mode the server simply doesn't send any cookies which is particularly annoying even if you don't use SSR because it cannot be disabled in dev (afaik).
I figured out a workaround to this issue:
export default defineNuxtPlugin(async (nuxtApp) => {
  const { $apollo } = useNuxtApp();

  $apollo.defaultClient.setLink(
    from([
      new ApolloLink((operation, forward) => {
        operation.setContext(({ headers = {} }) => {
          if (import.meta.server) {
            headers['cookie'] = useRequestHeader('cookie') ?? '';
          }
          return { headers };
        });

        return forward(operation);
      }),
      $apollo.defaultClient.link,
    ])
  );
});

This uses apollo's setLink function to set config values at runtime, import.meta.server to detect if its being run on the server, and Nuxt's useRequestHeader('cookie') to get the cookies of the client's current request.

The bug has to do with the proxyCookies option in the configuration. It is set to true by default but it isn't working.
Documentation says:

Specify if client cookies should be proxied to the server.

This module provides a proxyCookies option (enabled by default) which when enabled, will proxy all cookies from the client to the server. This is particularly useful for server-side rendering (SSR).

Still no fix to date.
Setting the token.value to something will work and the request will have the cookies for authentication.
Here is another workaround for whom is struggling with this:
Create a plugin plugins/apollo.ts with the following:
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.hook('apollo:auth', ({ client, token }) => {
    token.value = 'workaround'
  })
})

This issue is very old but this is still an issue with this library. In SSR mode the server simply doesn't send any cookies which is particularly annoying even if you don't use SSR because it cannot be disabled in dev (afaik).
I figured out a workaround to this issue:
export default defineNuxtPlugin(async (nuxtApp) => {
const { $apollo } = useNuxtApp();
$apollo.defaultClient.setLink(
from([
new ApolloLink((operation, forward) => {
operation.setContext(({ headers = {} }) => {
if (import.meta.server) {
headers['cookie'] = useRequestHeader('cookie') ?? '';
}
return { headers };
});
    return forward(operation);
  }),
  $apollo.defaultClient.link,
])

);
});
This uses apollo's setLink function to set config values at runtime, import.meta.server to detect if its being run on the server, and Nuxt's useRequestHeader('cookie') to get the cookies of the client's current request.

anyone who wants to use this. i got error saying "from is not defined" and solved it by importing it via adding this line at the top: import { from, ApolloLink } from '@apollo/client';


nuget-to-nix: small fixes, ryujinx: 1.1.213 -> 1.1.223

Description of changes

#181512 added a new argument to nuget-to-nix, breaking existing usages in package-specific updater scripts like ./pkgs/applications/emulators/ryujinx/updater.sh. Let's make it optional to prevent regressions.
Meanwhile, make it possible to override the output file name for passthru.fetch-deps so it can be more easily integrated into the package-specific update scripts. As an example, ryujinx's updater script was migrated to passthru.fetch-deps.
Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

Thanks! I had been meaning to make this possible for quite a while now :)
In my opinion we should merge https://github.com/NixOS/nixpkgs/pull/187070 first seeing how this needs a rebase anyways, it includes some more fixes for Ryujinx.
Afterwards I'll gladly merge this and make an effort in switching the existing update scripts over :)

Alternatively, should we have a SDK-specific nuget-to-nix, like dotnetCorePackages.sdk_6_0.passthru.nuget-to-nix that automatically applies the correct exclusion list?

Alternatively, should we have a SDK-specific nuget-to-nix, like dotnetCorePackages.sdk_6_0.passthru.nuget-to-nix that automatically applies the correct exclusion list?

Since nuget-to-nix is just meant to generate lockfiles for buildDotnetModule, I dont really see the usecase for that. With buildDotnetModule it should be based off of the SDK used by the derivation already.
Im opposed to adding it, I just dont understand why you would need it

Ok, I was asking about the direct usages of nuget-to-nix which won't automatically exclude the SDK packages. If we are going to migrate all/most uses to passthru.fetch-deps then it shouldn't be a problem.

Ok, I was asking about the direct usages of nuget-to-nix which won't automatically exclude the SDK packages. If we are going to migrate all/most uses to passthru.fetch-deps then it shouldn't be a problem.

Thats the plan :)
Should be a lot more reliable seeing how stuff like the projectFile's and dotnet{,Restore}Flags are automatically set with it. Microsoft also recommands to restore in the same environment as you build in, with the same flags as well. fetch-deps enforces that as much as possible.


Azure: Disk with Zone are not restored with Zone

What steps did you take and what happened:

Made a backup with volumes
Deleted the k8s cluster
Recreated the cluster
Restored the backup with volumes

Pod with restored volume can not launch because the Disk restored has no Availability Zone
Events:
  Type     Reason              Age   From                     Message
  ----     ------              ----  ----                     -------
  Normal   Scheduled           1m    default-scheduler        Successfully assigned monitoring/prometheus-server-dbb7755f-6szrq to k8s10-euw-sandbox-agentzone3-vmss-000000
  Warning  FailedAttachVolume  1m    attachdetach-controller  AttachVolume.Attach failed for volume "pvc-31870f80-142b-11e9-8d0e-000d3a22e4ac" : Attach volume "restore-f2e4d7e5-83c9-424d-a965-fc87b2f705a9" to instance "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/k8s10-EUW-sandbox-RG/providers/Microsoft.Compute/virtualMachineScaleSets/k8s10-euw-sandbox-agentzone3-vmss/virtualMachines/0" failed with compute.VirtualMachineScaleSetVMsClient#Update: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Disk /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/k8s10-EUW-sandbox-RG/providers/Microsoft.Compute/disks/restore-f2e4d7e5-83c9-424d-a965-fc87b2f705a9 cannot be attached to the VM because it is not in zone '3'."

Here the describe of the backup:
sylvain@ubuntu-1604-dev:~/git/k8s-conf[master]$ $GOPATH/src/github.com/heptio/ark/_output/bin/linux/amd64/ark --kubecontext k8s10-euw-sandbox -n backup describe backup 20190111-0842 --details
Name:         20190111-0842
Namespace:    backup
Labels:       ark.heptio.com/storage-location=default
Annotations:  <none>

Phase:  Completed

Namespaces:
  Included:  *
  Excluded:  <none>

Resources:
  Included:        *
  Excluded:        <none>
  Cluster-scoped:  auto

Label selector:  <none>

Storage Location:  default

Snapshot PVs:  true

TTL:  720h0m0s

Hooks:  <none>

Backup Format Version:  1

Started:    2019-01-11 09:42:06 +0100 CET
Completed:  2019-01-11 09:44:51 +0100 CET

Expiration:  2019-02-10 09:42:06 +0100 CET

Validation errors:  <none>

Persistent Volumes:
  pvc-318505c3-142b-11e9-8d0e-000d3a22e4ac:
    Snapshot ID:        /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ark-EUW-sandbox-RG/providers/Microsoft.Compute/snapshots/k8s10-EUW-sandbox-dynamic-pvc-318505c3-142b-9558e68f-7b9d-4f2d-b7c6-ce76b2962813
    Type:               Premium_LRS
    Availability Zone:  westeurope-1
    IOPS:               <N/A>
  pvc-31870f80-142b-11e9-8d0e-000d3a22e4ac:
    Snapshot ID:        /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ark-EUW-sandbox-RG/providers/Microsoft.Compute/snapshots/k8s10-EUW-sandbox-dynamic-pvc-31870f80-142b-029ff66d-a5dd-4a76-82d2-e14f080b9eff
    Type:               Premium_LRS
    Availability Zone:  westeurope-3
    IOPS:               <N/A>

Environment:

Ark version (use ark version):  2ed241b0b7bce2d69ac291c63ebdc42f85a8ace4-dirty
Kubernetes version (use kubectl version): 1.13.1
Kubernetes installer & version: aks-engine
Cloud provider or hardware configuration: Azure
OS (e.g. from /etc/os-release): ubuntu 16.04

@sylr we already have an open issue to upgrade our Azure SDK (#1086) -- I'm going to close this issue  as a dupe but please follow along there.

@skriss why did you close this, the upgrade of the Azure SDK is just a requirement to fix this as you need to implement the restore in the good zone.

@sylr I'll reopen this, but assuming the SDK supports the relevant zones, the restore should work correctly without changes.

Did some analysis on this issue and it looks like we do need a small code change.  I think the current version of the Azure SDK that we're using should be sufficient to support this.  The following code needs to be changed:
https://github.com/heptio/velero/blob/master/pkg/cloudprovider/azure/block_store.go#L141
The disk.Disk type now has a Zones field which we need to populate based on the volumeAZ argument to the function.  I'm not sure if we can directly pass in the value (which based on the description above appears to be something like westeurope-3), or if we need to just pass the 3 (which aligns with a lot of the documentation I've seen).
AKS doesn't yet support availability zone-based clusters, but aks-engine does. So, to test this, you'd have to spin up a cluster in a location that supports AZs (westeurope or westus2, for example) using aks-engine, ensure your StorageClass is set up for zoned disks (see https://github.com/kubernetes/cloud-provider-azure/blob/master/docs/using-availability-zones.md#managed-disks), then go through the backup/restore workflow on a workload with a zoned PV.  More details on aks-engine and AZs:
https://github.com/Azure/aks-engine/blob/master/examples/kubernetes-zones/README.md#availability-zones


Upgrade DB failing in Airflow 2.3.x

Currently I am running Airflow 2.2.5 with python 3.8 on docker. When trying to upgrade to 2.3.x, db upgrade command is not working properly.
How can I fix the issue?

Hi! Sorry, but is the issue with your Airflow upgrade OpenLineage related somehow? Or did you mean to open this in the Airflow repo?

Closing this as no further information has been provided.


Do you have a plan to upgrade to React v15.*

I realy love this component, but now It doesnt work with  react v15.0.2 (and react-motion v0.4.4). Do you have a plan to upgrade ?

Done in #15


Sort for searchspace object

Added an option for the searchspace object to be sorted during initialisation, either from first to last parameter or from last to first parameter. The compute overhead of the sorting is minimal.

Thanks!


Add verbose output to autope plan

This aids in debugging and using autope.

👍  Looks good to me @reidmv


Simplify some code around isAppTy calls

changes made:

AugmentWithHashCompare.TypeDefinitelyHasEquality: save one call to isAppTy (when we go in the else branch)
Infos.FoldHierarchyOfTypeAux: save one call to isAppTy and make tcrefOfTypeApplication a lazy value to save one call to tcrefOfAppTy (when we go into the accumulator branch)
NameResolution.ResolveLongIdentInTypePrim: use tcrefOfAppTy instead of destAppTy and only taking fst
NameResolution.ResolveCompletionsInTypeForItem: avoid using a top level sequence CE, it is needed only in the last fallback branch, others are just returning single list expression

The changes are too obfuscating for my liking, I'll add some comments about why

@dsyme thanks for the review.
Yes I mostly followed suit on some of identical calls to isAppTy that were put off a loop in @vasily-kirichenko PR, just looked at usage in compiler if I could spot any redundant calls.
I'd like to get the profiling going for better focused work but I'm not able to build the vs bits yet.
On the changes:
I think suppressing the redundant calls is good, but agree that introducing the lazy for tcrefOfAppTy is unknown at best and probably costly.
For the change to ResolveCompletionsInTypeForItem, given how the sequence builder is generated, it is best to have smaller scoped seq { } expressions and most branches don't need it.
We should consider using seq  { } a smell when it is just to yield! a single thing.
That smaller scoped of my change has those effects on generated code:

avoid one allocation and 24 parameter pass for the seq builder in all the first cases that are now out of it
this remove patternInput, tinst and tc, 24 parameters down to 21, and we only call this in the fallback branch

This is called ResolvePartialLongIdentInTypeForItem, that recursive function could probably benefit from same optimization as we have a large seq while the first branch (calling ResolveCompletionsInTypeForItem) could avoid using the builder altogether.
I think I've made the changes you were looking after, thanks again for checking it.

Note that the 3 extra parameters are related to deconstructing a tuple which could be identified as 100% local, touching on this in #5073.
https://github.com/Microsoft/visualfsharp/pull/5072/files#diff-dbb9e59b8ac1e1e04e1b00282a91ec97R4074

@dsyme agreed, I'll close this one for now.


Premium limits are not being applied to slash commands

Ensure that premiums limites works in slash commands.

They are fixed alongside with #135


I'm using mui v5.11.0, After install that some errors are occurred in my project

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Link to live example:
Steps:
1.Check my Images
2.how to solve that issue

Current behavior 😯
No response
Expected behavior 🤔
No response
Context 🔦
No response
Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

@FjVillar  i'm using mui v5.11.0, but errors are occurred
if you have any doubts, check my above images

Please share a repository that we can reproduce.

In my library I'm getting reports that my debounce import is no longer valid https://github.com/KevinVandy/material-react-table/issues/257
Apparently, this no longer works
import debounce from '@mui/material/utils/debounce';

I'm pushing an emergency fix with this
import { debounce } from '@mui/material/utils';

But I'm going to get a log of complaints while devs install incompatible versions

Hi @siriwatknp,
I confirm, this is pretty serious 🥵, it affect all Next.js setups.
Reproduction:
git clone https://github.com/garronej/react-dsfr-next-demo
cd react-dsfr-next-demo
yarn
yarn dev

The repo is pinned on @mui/material: 5.10 so it work. Now if you update @mui/material to 5.11 you'll get the errors.

Reason of the bug: Since 5.11 it's pulling an ESM distribution of MUI instead of CJS.  There are ways to tell Next.js to transpile specific module but it's beter if MUI just works out of the box.

@garronej Thanks! We are figuring out what happened.

@garronej It seems that react-dsfr suffers from the same issue: https://github.com/codegouvfr/react-dsfr/blob/main/src/mui.tsx#L14

With react DSFR this is by design, the lib does not provide ESM distribution (to be able to import assets internally) and explicitely provides setup instructions to make it work.

I meant that it has the same issue as @KevinVandy's code - it imports from a path three levels deep.

I meant that it has the same issue as @KevinVandy's code - it imports from a path three levels deep.

Ah ok!  Thank you very much.
Indeed, if I avoid importing from path I'm not supposed to be importing things works.
I can't import the default shadows directly though but that's no big deal...
Sorry for the falsly alarmin report and thank you for the quick explaination.

yeah @siriwatknp it's solved my problem, im installing npm i @mui/material --force after installing forcely errors are resolved...

Thanks for the info. I'm closing this issue then.


After registering the first user, redirected to http://<IP_ADDRESS>:5000/None

After registering the first user, I'm redirected to http://<IP_ADDRESS>:5000/None after submitting the registration form. This goes nowhere.

It happened to me too. check FQDN in config-deploy.py


Reorganize dev docs into sections, add debugging info

Forgot to merge this. Doing it now! Thanks for the update!


Unify telemetry reporting between TestManager and OmniSharpServer

@DustinCampbell  The PR is merged. Can we close this now ?


`parse': Illformed requirement [""] (ArgumentError) in 1.0.18

I am run into an error on my ubuntu 11.04 with bundler-1.0.18.
Following the trace and I find the problem is caused by /var/lib/gems/1.8/gems/bundler-1.0.18/lib/bundler/resolver.rb in 352 line, which is base.first.version.to_s. Compare to around I think it should be base.first.version and I confirm this in bundler-1.0.15; Even more, I find the parse method defined in /usr/lib/ruby/1.8/rubygems/requirement.rb in 68 line, it also can depend on Gem::Version instance.
here is diff:
--- resolver.rb.diff	2011-09-03 16:06:41.182173820 +0800
+++ resolver.rb	2011-09-03 16:07:15.922224778 +0800
@@ -348,7 +348,7 @@

     def search(dep)
       if base = @base[dep.name] and base.any?
-        reqs = [dep.requirement.as_list, base.first.version.to_s].flatten.compact
+        reqs = [dep.requirement.as_list, base.first.version].flatten.compact
         d = Gem::Dependency.new(base.first.name, *reqs)
       else
         d = dep.dep

bellow is my envs:
mcspring@mc:~$ ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
mcspring@mc:~$ gem list bundle

*** LOCAL GEMS ***

bundle (0.0.1)
bundler (1.0.18, 1.0.15)
mcspring@mc:~$ cat tutcache/sinatra/Gemfile
source 'http://rubygems.org'

#gem 'rack'
#gem 'thin'
#gem 'haml'
#gem 'sinatra', :require => 'sinatra/base'
gem 'oauth-plugin', :git => 'http://github.com/pelle/oauth-plugin.git', :branch => 'rails3'

Thanks!


ADD foo /usr/bin nukes /usr/bin

$ git clone https://github.com/sosiouxme/scratch -b 20180626-overwrite-dir
$ cd scratch

[scratch] $ docker build .
Sending build context to Docker daemon 61.44 kB
Step 1/3 : FROM fedora:28
 ---> 75aeb7f897fd
Step 2/3 : ADD some-binary /usr/bin
 ---> ad0d2f7819ca
Removing intermediate container 777b88ad62b1
Step 3/3 : RUN echo
 ---> Running in e9bd7b6ca65a

 ---> 511014a1d278
Removing intermediate container e9bd7b6ca65a
Successfully built 511014a1d278

[scratch] $ imagebuilder .
--> FROM fedora:28 as 0
--> ADD some-binary /usr/bin
--> RUN echo
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: not a directory"

running 'echo' failed with exit code 126

https://docs.docker.com/engine/reference/builder/#add seems to be wrong about this (does not look changed since docker 1.13):
If <dest> does not end with a trailing slash, it will be considered a regular file and the contents of <src> will be written at <dest>.
This is not specific to /usr/bin, seems to apply to any pre-existing directory on the image.

Hrm, this works for me.

Tested with the following:
FROM centos:7
ADD script /usr/bin
RUN find /usr/bin

Puts script into /usr/bin/script
FROM busybox
ADD script /usr/bin
RUN find /usr/bin

puts script at /usr/bin
fedora:
FROM fedora:28
ADD script /usr/bin
RUN find /usr/bin

Fails as described.

docker run fedora:28 find /usr/bin
container_linux.go:247: starting container process caused "exec: \"find\": executable file not found in $PATH"
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"find\": executable file not found in $PATH".
ERRO[0000] error getting events from daemon: net/http: request canceled

I think there is something off about the fedora 28 image

Oh, it doesn't have find.
Ok, i have a reproducer.  Docker is checking the destination path.  We can't do that as easily as the daemon.  Going to have to look at options.

Fixed, please test it out.


Support the logging level per module, hostif and networkif

Support the logging level per module, hostif and networkif.

@iTetsuyaMurakami  I already applied your patch to the master.
https://github.com/Telecominfraproject/oopt-tai/commit/320b974a246c495ada526dc840b9bafe9a25c904
Please check the master branch.


Speech view, speech twig templates, updates to speech config

Summary

This adds the speeches to the profile as a feature.

Updates the fields on the speeches
Adds templates for them
Adds speeches views

Metadata

Question
Answer

Did you use a meaningful pull request title?
yes

Did you apply meaningful labels to the pull request?
yes

Did you perform a self review first?
yes

Documentation reflects changes?
n/a

CHANGELOG reflects changes?
yes

Unit/Functional tests reflect changes?
n/a

Did you perform browser testing?
yes

Risk level
Low

Relevant links

Development
https://thinkoomph.jira.com/browse/RIG-120

Design
https://thinkoomph.jira.com/browse/RIG-260

Just needs rebase


Source maps must be small, correct, and make debugging simple

There are a number of ways source maps can "go wrong". They can get very large. File references can be unusable due to incorrect relative paths. Debuggers may get confused and refer to transpiled JS files when TS source files are available.
This issue tracks to work of making sure the source maps we produce with our metro configuration are portable and correct and as small as possible. If any issues are found, they should be logged as new bugs.

Closing stale issue


Fix broken get_local_branch when using older git versions

When running git <2.22.0 (I had 2.14.1), I get
moon run build
Error:   × Process git failed with a 1 exit code.
  │
  │ git: 'rev-parse --abbrev-ref HEAD' is not a git command. See 'git --help'.

@ilyasotkov Thanks for the fix. You'll need to run yarn version:bump:bin patch for the PR to pass.


Addition of !leet command to generate coding problems

Initial version of !leet command which allows users on Slack to type !leet and get a random question from Leetcode or Hackerrank back. Also allows specifying the difficulty.
Some tests included.

V2 to come when I have time to allow community qs + cronjob for #code-problems

Will fail style tests (which would have been picked up by Jenkins once upon a time).
uqcsbot\scripts\leet.py:42: error: Need type annotation for 'questions'
uqcsbot/scripts\leet.py:3:1: F401 'uqcsbot.utils.command_utils.UsageSyntaxException' imported but unused
uqcsbot/scripts\leet.py:10:47: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:12:5: E128 continuation line under-indented for visual indent
uqcsbot/scripts\leet.py:13:101: E501 line too long (106 > 100 characters)
uqcsbot/scripts\leet.py:20:1: E302 expected 2 blank lines, found 1
uqcsbot/scripts\leet.py:26:88: W291 trailing whitespace
uqcsbot/scripts\leet.py:31:21: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:35:12: E111 indentation is not a multiple of four
uqcsbot/scripts\leet.py:36:12: E111 indentation is not a multiple of four
uqcsbot/scripts\leet.py:42:24: E203 whitespace before ':'
uqcsbot/scripts\leet.py:42:39: E203 whitespace before ':'
uqcsbot/scripts\leet.py:42:52: E203 whitespace before ':'
uqcsbot/scripts\leet.py:49:54: W291 trailing whitespace
uqcsbot/scripts\leet.py:50:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:51:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:52:5: E303 too many blank lines (2)
uqcsbot/scripts\leet.py:52:63: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:56:45: W291 trailing whitespace
uqcsbot/scripts\leet.py:57:13: E128 continuation line under-indented for visual indent
uqcsbot/scripts\leet.py:62:32: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:68:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:70:5: E303 too many blank lines (3)
uqcsbot/scripts\leet.py:76:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:77:36: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:82:21: E128 continuation line under-indented for visual indent
uqcsbot/scripts\leet.py:86:1: E303 too many blank lines (3)
uqcsbot/scripts\leet.py:94:80: W291 trailing whitespace
uqcsbot/scripts\leet.py:95:73: W291 trailing whitespace
uqcsbot/scripts\leet.py:100:9: W291 trailing whitespace
uqcsbot/scripts\leet.py:101:84: W291 trailing whitespace
uqcsbot/scripts\leet.py:102:13: E128 continuation line under-indented for visual indent
uqcsbot/scripts\leet.py:102:20: E251 unexpected spaces around keyword / parameter equals
uqcsbot/scripts\leet.py:102:22: E251 unexpected spaces around keyword / parameter equals
uqcsbot/scripts\leet.py:105:21: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:108:94: E251 unexpected spaces around keyword / parameter equals
uqcsbot/scripts\leet.py:108:96: E251 unexpected spaces around keyword / parameter equals
uqcsbot/scripts\leet.py:118:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:119:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:120:5: E303 too many blank lines (2)
uqcsbot/scripts\leet.py:121:15: E711 comparison to None should be 'if cond is None:'
uqcsbot/scripts\leet.py:122:13: E117 over-indented
uqcsbot/scripts\leet.py:122:37: E203 whitespace before ':'
uqcsbot/scripts\leet.py:122:43: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:125:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:126:16: E711 comparison to None should be 'if cond is None:'
uqcsbot/scripts\leet.py:127:34: E203 whitespace before ':'
uqcsbot/scripts\leet.py:127:40: E261 at least two spaces before inline comment
uqcsbot/scripts\leet.py:131:16: E711 comparison to None should be 'if cond is None:'
uqcsbot/scripts\leet.py:132:50: W291 trailing whitespace
uqcsbot/scripts\leet.py:136:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:137:5: E303 too many blank lines (2)
uqcsbot/scripts\leet.py:144:13: E128 continuation line under-indented for visual indent
uqcsbot/scripts\leet.py:150:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:152:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:155:35: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
uqcsbot/scripts\leet.py:157:17: E128 continuation line under-indented for visual indent
uqcsbot/scripts\leet.py:160:1: W293 blank line contains whitespace
uqcsbot/scripts\leet.py:167:1: W391 blank line at end of file
test/test_leet.py:7:1: E302 expected 2 blank lines, found 1
test/test_leet.py:12:39: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
test/test_leet.py:13:97: W291 trailing whitespace
test/test_leet.py:14:21: E128 continuation line under-indented for visual indent
test/test_leet.py:18:1: E302 expected 2 blank lines, found 1
test/test_leet.py:21:1: E302 expected 2 blank lines, found 1
test/test_leet.py:31:1: E302 expected 2 blank lines, found 1
test/test_leet.py:37:1: E302 expected 2 blank lines, found 1
test/test_leet.py:42:1: E302 expected 2 blank lines, found 1
test/test_leet.py:49:9: E128 continuation line under-indented for visual indent
test/test_leet.py:50:1: W391 blank line at end of file

Will resolve these once my studies allow.

jenkins retest this please

Apologies, Flake8 didn't complain and I wasn't aware you could type annotate outside function parameters.

mb, old type annotation was wrong.


Random test fixes

Multiple simultaneous runs of make -C controller/ test-unit have collided on our CI server, so this uses Django's TEST_NAME setting to add a psuedo-random suffix to the PostgreSQL database name. Also changes the ec2 test script to use openssl rand instead of /dev/urandom, which allows us to set -eo pipefail again.

Code LGTM.

LGTM!


WIP: CI: add a job with Intel Fortran + MSVC in Azure CI

Taken over from Meson (see Meson issue gh-10775), who in turn took it over from MODFLOW, and they from https://github.com/oneapi-src/oneapi-ci (MIT license).
[skip actions][skip circle]
First time downloading and installing ifort took 4m 35s in total. Of that, 1m 24s was for the download (~1.2 GB), the rest for running the installer. After a first successful run, that download and install was cached; restoring the cache took 1m 48s (it's a hefty 1.86 GB download - 3.98 GB uncompressed). Compiler info after that:
"Visual Studio Version: vs2019"
"OneAPI version: 2022.1.0"
"C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\env\vars.bat"
"OneAPI root directory: "
C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\bin\intel64\ifort.exe

Configure info:
  C compiler for the host machine: cl (msvc 19.29.30146 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64")
  C linker for the host machine: link link 14.29.30146.0
  C++ compiler for the host machine: cl (msvc 19.29.30146 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64")
  C++ linker for the host machine: link link 14.29.30146.0
...
  Fortran compiler for the host machine: ifort (intel-cl 2021.6.0)
  Fortran linker for the host machine: xilink.exe xilink 2021.6.0
...
  Found pkg-config: C:\ProgramData\Chocolatey\bin\pkg-config.EXE (0.28)
  Run-time dependency openblas found: YES 0.3.18
  Dependency openblas found: YES 0.3.18 (cached)

Now we're getting somewhere:
  [62/1556] Compiling Fortran object scipy/sparse/linalg/_propack/liblib__spropack.a.p/PROPACK_single_sblasext.F.obj
  FAILED: scipy/sparse/linalg/_propack/liblib__spropack.a.p/PROPACK_single_sblasext.F.obj
  "ifort" "-Iscipy\sparse\linalg\_propack\liblib__spropack.a.p" "-Iscipy\sparse\linalg\_propack" "-I..\..\scipy\sparse\linalg\_propack" "/MD" "/nologo" "/warn:general" "/warn:truncated_source" "/stand:none" "/Zi" "/traceback" "/O2" "/Fdscipy\sparse\linalg\_propack\liblib__spropack.a.p\PROPACK_single_sblasext.F.pdb" "/module:scipy\sparse\linalg\_propack\liblib__spropack.a.p" /Foscipy/sparse/linalg/_propack/liblib__spropack.a.p/PROPACK_single_sblasext.F.obj "/c" ../../scipy/sparse/linalg/_propack/PROPACK/single/sblasext.F
  ../../scipy/sparse/linalg/_propack/PROPACK/single/sblasext.F(5): warning #5117: Bad # preprocessor line
  #ifdef _OPENMP
  -^
  ../../scipy/sparse/linalg/_propack/PROPACK/single/sblasext.F(152): warning #5117: Bad # preprocessor line
  #else
  -^
  ../../scipy/sparse/linalg/_propack/PROPACK/single/sblasext.F(154): error #5508: Declaration of routine 'PSNRM2' conflicts with a previous declaration
        real function psnrm2(n, x, incx)
  --------------------^
  compilation aborted for ../../scipy/sparse/linalg/_propack/PROPACK/single/sblasext.F (code 1)

This has probably been broken since PROPACK support was merged. The issue is that ifort doesn't run the preprocessor by default for F77 files, and PROPACK code includes
#ifdef _OPENMP

Adding -fpp (or /fpp on Windows) is the solution apparently, see the docs on fpp

The excluding parts for caching probably isn't working well, the file sizes are too large. There's a standalone download for the Fortran compiler at https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#fortran, it's 530 MB rather than several times more.

Next one is:
D:\a\1\s\scipy\fft\_pocketfft\pocketfft_hdronly.h(76): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

The dependency is found (second one is for pocketfft):
Run-time dependency threads found: YES
Dependency threads found: YES unknown (cached)

The issue is that what's being found is native Windows threading support, but the code assumes it's pthreads. We need to distinguish between the two - there's a Meson issue and PR for making this easier:

https://github.com/mesonbuild/meson/issues/553
https://github.com/mesonbuild/meson/pull/7174

It is possible to install pthreads on Windows and use it with MSVC, but by default we're going to get Win32 threading.

Next issue:
[291/1556] Linking target scipy/special/_specfun.cp39-win_amd64.pyd
  FAILED: scipy/special/_specfun.cp39-win_amd64.pyd
  "xilink.exe"  /MACHINE:x64 /OUT:scipy/special/_specfun.cp39-win_amd64.pyd scipy/special/_specfun.cp39-win_amd64.pyd.p/meson-generated_..__specfunmodule.c.obj "/nologo" "/DLL" "/IMPLIB:scipy\special\_specfun.cp39-win_amd64.lib" "scipy\special\libspecfun.a" "scipy\lib_fortranobject.a" "C:\hostedtoolcache\windows\Python\3.9.13\x64\libs\python39.lib"
     Creating library scipy\special\_specfun.cp39-win_amd64.lib and object scipy\special\_specfun.cp39-win_amd64.exp
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol clqmn_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol lqmn_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol clpmn_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol jdzo_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol bernob_
<etc>

This seems fun, Fortran name mangling. From https://en.wikipedia.org/wiki/Name_mangling#Fortran:
"The GNU g77 compiler converts identifiers to lower case plus an underscore foo_, except that identifiers already containing an underscore FOO_BAR have two underscores appended foo_bar__, following a convention established by f2c. Many other compilers, including SGI's IRIX compilers, GNU Fortran, and Intel's Fortran compiler (except on Microsoft Windows), convert all identifiers to lower case plus an underscore (foo_ and foo_bar_, respectively). On Microsoft Windows, the Intel Fortran compiler defaults to uppercase without an underscore"
Info on this seems to have disappeared from the Intel Fortran docs, but content from the link referenced from Wikipedia can still be found (and confirms the above): http://web.archive.org/web/20160817173106/https://software.intel.com/en-us/node/525345

Okay, this one was kinda expected:
  [306/1556] Linking target scipy/linalg/_fblas.cp39-win_amd64.pyd
  FAILED: scipy/linalg/_fblas.cp39-win_amd64.pyd
  "xilink.exe"  /MACHINE:x64 /OUT:scipy/linalg/_fblas.cp39-win_amd64.pyd scipy/linalg/_fblas.cp39-win_amd64.pyd.p/meson-generated_..__fblasmodule.c.obj scipy/linalg/_fblas.cp39-win_amd64.pyd.p/meson-generated_..__fblas-f2pywrappers.f.obj scipy/linalg/_fblas.cp39-win_amd64.pyd.p/..__build_utils_src_wrap_dummy_g77_abi.f.obj "/nologo" "/DLL" "/IMPLIB:scipy\linalg\_fblas.cp39-win_amd64.lib" "scipy\lib_fortranobject.a" "c:/opt/openblas/if_32/64/lib/libopenblas.a" "C:\hostedtoolcache\windows\Python\3.9.13\x64\libs\python39.lib"
     Creating library scipy\linalg\_fblas.cp39-win_amd64.lib and object scipy\linalg\_fblas.cp39-win_amd64.exp
  libopenblas.a(zherk_kernel_LC.obj) : error LNK2001: unresolved external symbol ___chkstk_ms
...
  libopenblas.a(openblas_error_handle.obj) : error LNK2001: unresolved external symbol __mingw_vfprintf
  libopenblas.a(zgemv_thread_o.obj) : error LNK2019: unresolved external symbol __emutls_get_address referenced in function zgemv_thread_o
...
  scipy\linalg\_fblas.cp39-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals

___chkstk_ms and other such symbols are provided by libgcc. We can't expect our own mingw-built libopenblas.a to work here. Dynamic linking may work, but preferably should use MKL in this setup.

Next issue:
[291/1556] Linking target scipy/special/_specfun.cp39-win_amd64.pyd
  FAILED: scipy/special/_specfun.cp39-win_amd64.pyd
  "xilink.exe"  /MACHINE:x64 /OUT:scipy/special/_specfun.cp39-win_amd64.pyd scipy/special/_specfun.cp39-win_amd64.pyd.p/meson-generated_..__specfunmodule.c.obj "/nologo" "/DLL" "/IMPLIB:scipy\special\_specfun.cp39-win_amd64.lib" "scipy\special\libspecfun.a" "scipy\lib_fortranobject.a" "C:\hostedtoolcache\windows\Python\3.9.13\x64\libs\python39.lib"
     Creating library scipy\special\_specfun.cp39-win_amd64.lib and object scipy\special\_specfun.cp39-win_amd64.exp
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol clqmn_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol lqmn_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol clpmn_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol jdzo_
  meson-generated_..__specfunmodule.c.obj : error LNK2001: unresolved external symbol bernob_
<etc>

This seems fun, Fortran name mangling. From https://en.wikipedia.org/wiki/Name_mangling#Fortran:
"The GNU g77 compiler converts identifiers to lower case plus an underscore foo_, except that identifiers already containing an underscore FOO_BAR have two underscores appended foo_bar__, following a convention established by f2c. Many other compilers, including SGI's IRIX compilers, GNU Fortran, and Intel's Fortran compiler (except on Microsoft Windows), convert all identifiers to lower case plus an underscore (foo_ and foo_bar_, respectively). On Microsoft Windows, the Intel Fortran compiler defaults to uppercase without an underscore"
Info on this seems to have disappeared from the Intel Fortran docs, but content from the link referenced from Wikipedia can still be found (and confirms the above): http://web.archive.org/web/20160817173106/https://software.intel.com/en-us/node/525345
EDIT: numpy.distutils has the following hardcoded flags, which makes things work with f2py:
        opt = ['/nologo', '/MD', '/nbs', '/names:lowercase',
               '/assume:underscore', '/fpp']

xref numpy/numpy#21484

/MD is for dynamic linking (/MT would be static): docs on MD
/names:lowercase should resolve the name mangling issue we see here: docs on names
/assume:underscore: from the docs on assume: On Windows systems, the compiler does not append an underscore character to external user-defined names. On Linux* and macOS systems, the compiler appends an underscore character to external user-defined names.

The abiility to decorate symbols with one or 2 underscores is still in the compiler and documented here.  Scroll and look for 2underscore near the bottom of this page.
We did remove the reference to the origins of this decoration since: 1) most people don't care where it came from and 2) g77 is so old and unused that very few people even remember it.  It might be a good historical challenge question at a bar trivia night for programming wonks.

I wonder to what extent the this PR is affected by the upcoming transition from ifort to ifx
https://fortran-lang.discourse.group/t/deprecation-notice-for-intel-fortran-compiler-classic-ifort/6841

We've stopped using Azure as a CI provider for the time being, having consolidated various CI runs on other providers. I'm going to close the PR, but if people want to resurrect on e.g. GHA, they are welcome to create an entry.

I've spoken with Ralf about this, and a next reasonable step will be to introduce a flang-based CI on windows (there's builds in conda-forge now; still needs a patched meson, but we can limit the impact of that).


ReSharper All The Things

This fixes the issues Microsoft presented during an import analysis.

@robbez Awesome - thank-you for the recommendation. We could probably do that for the next release.


Issue reporter UI should better indicate that "Don't Know" cannot be used for submission

Extracted from https://github.com/microsoft/vscode/issues/90937

Additionally, when trying to submit an issue using Report Issue from the Command Palette, if I choose "File on > Don't Know" nothing happens when I click the Preview on GitHub button and I'm unable to report the issue from that form.

VS Code version: Code 1.42.1 (c47d83b, 2020-02-11T14:44:27.652Z)
OS version: Darwin x64 19.3.0

Added validation messages for empty fields with https://github.com/microsoft/vscode/commit/fe4d4f7d027ed65cd02197e73b364548e6b6ef13.


hongbo/fix some warnings

fix warnings
info
AI generated docs
fmt

Pull Request Test Coverage Report for Build 3864
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 80.081%

Totals

Change from base Build 3863:
0.0%

Covered Lines:
4350

Relevant Lines:
5432

💛  - Coveralls


Broken code example in docs under Advanced Patterns

In the Managing Resources section of Advanced Patterns, there is a code example where a Repo class is used as a context manager to be passed to Context.with_resource.
    class Repo:
        def __init__(self, home=None):
            self.home = os.path.abspath(home or ".")
            self.db = None

        def __enter__(self):
            path = os.path.join(self.home, "repo.db")
            self.db = open_database(path)

        def __exit__(self, exc_type, exc_value, tb):
            self.db.close()

The __enter__ method on Repo currently returns None, which means that the code snippet below is broken since repo is None (the result of __enter__()).
    with Repo() as repo:
        repo.db.query(...)

In the snippet below that, we are also assigning None to ctx.obj, since ctx.with_resource returns the result of calling the resource’s __enter__() method.
    @click.group()
    @click.option("--repo-home", default=".repo")
    @click.pass_context
    def cli(ctx, repo_home):
        ctx.obj = ctx.with_resource(Repo(repo_home))

The fix is to have Repo.__enter__ return self.

Click version: 8.1.7

@davidism I think this issue should be marked as resolved 😄