[MRG] RealTime client refactor

following up on #6120. It also adds a mock client and an example using LSL. This refactors the FieldTripClient and the lsl test.

This pull request introduces 10 alerts when merging 13c89af0435b92386d4441010d4b2033f820c471 into 35d7c539c93bd0bff7788fad93ce08686e0cc760 - view on LGTM.com
new alerts:

5 for Unused import
2 for Signature mismatch in overriding method
2 for First argument of a method is not named 'self'
1 for Unused local variable

Comment posted by LGTM.com

This pull request introduces 10 alerts when merging 8fba9e944b26812c0f83de795a60d2a17a5f2a33 into aa74f02c3be4e69963b78cf835af9b9e08a81a67 - view on LGTM.com
new alerts:

5 for Unused import
2 for Signature mismatch in overriding method
2 for First argument of a method is not named 'self'
1 for Unused local variable

Comment posted by LGTM.com

This pull request introduces 1 alert when merging 6763f7fdfeba006ca4c3c4a0ba00578b33dba76e into<PHONE_NUMBER>2264c43cdd489684418a35b2135fe4 - view on LGTM.com
new alerts:

1 for Wrong number of arguments in a call

Comment posted by LGTM.com

@jasmainak this is marked MRG now, can you take a look?

I need to take a closer look by running some of the realtime examples. Could we mark this for the sprint?
@teonbrooks you should not tag someone in a commit if you plan to rebase :p I got like 10 emails because you rebased lol

i didn't tag you, lol. and i didn't realize you got emails about the rebasing too, sorry about that

This pull request introduces 2 alerts when merging 3f8f05e860a8f75e59936a7d335065c62db898ef into b3dfd7a1dd4cfc2fb501f9db9c4bcb3eb158cc2c - view on LGTM.com
new alerts:

2 for Unused import

Comment posted by LGTM.com

@teonbrooks the CIs are not happy
I'll test tomorrow if the fieldtrip examples are not broken.
Otherwise, LGTM

Also, you'd need to implement this to work with RtEpochs so that it is feature complete. We can open an issue when this PR is merged so that we don't forget

Also, could we triage based on whether stream ID or stream name is provided? If this is not possible, perhaps we should add a bit of documentation how the stream ID can be obtained.
cc @akovrig

@teonbrooks I confirm that the fieldtrip examples are not broken. They work as expected :)

Also, could we triage based on whether stream ID or stream name is provided? If this is not possible, perhaps we should add a bit of documentation how the stream ID can be obtained.

just updated the LSLclient host docstring about the source_id.

@teonbrooks what are your thoughts on copying the pylsl code into externals? It seems there is only one file in their repo. This way we avoid an external dependency.

it's more than just the single pylsl file, you need to also make sure that the computer has the dynamic library files installed https://github.com/labstreaminglayer/liblsl-Python/blob/master/pylsl/pylsl.py#L1178

@teonbrooks make all CIs happy and you have my +1

LGTM. Whoever wants to feel productive this morning can merge :-)

Thanks @teonbrooks @jasmainak !

Broke CircleCI:
generating gallery for auto_examples/realtime... [ 71%] plot_lslclient_rt.py
Note (minor): could not create multicast responder for address FF31:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 (failed with: set_option: No such device)
Note (minor): could not create multicast responder for address FF02:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 (failed with: set_option: No such device)
Note (minor): could not create multicast responder for address FF05:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 (failed with: set_option: No such device)
Process Process-1931:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/circleci/project/mne/realtime/mock_lsl_stream.py", line 81, in _initiate_stream
    outlet.push_sample(mysample)
  File "/home/circleci/.local/lib/python3.7/site-packages/pylsl/pylsl.py", line 454, in push_sample
    raise ValueError("length of the data must correspond to the "
ValueError: length of the data must correspond to the stream's channel count.
Stream transmission broke off (Input stream error.); re-connecting...

It gets killed shortly thereafter. Maybe there is a memory problem? CircleCI does not have a ton of memory. Can you fix it? Maybe it's not related to memory and is something else?
https://circleci.com/gh/mne-tools/mne-python/12424

Maybe a bit late, just stumbled upon this one:
https://github.com/kaczmarj/rteeg
@kaczmarj

@stfnrpplngr and others reading this - i just wanted to provide a disclaimer about https://github.com/kaczmarj/rteeg. i don't have time to maintain that package now, and frankly, i wrote that when i just started out programming, so it probably doesn't follow good practices...
i've just read through this PR, and i think it makes my rteeg package redundant. thanks @teonbrooks for all your work on this!


threads and large files

Hi Chris,
I am attempting to implement iRep for a single metagenomic reconstruction and a very large sam file (36 G). The default thread behaviour is listed a 6 threads, but top reveals I am only using 1 cpu during the parsing mapping files phase.
Is the entire operation threaded or only parts?
 Should the end results turn out similar?
Thanks,
Jordan

Hi Jordan,
Only a few parts of the operation are multi-threaded. I chose not to multi-thread reading the sam file due to I/O. Unfortunately, this step takes the longest.
You could subset the sam file. At least as an initial test to make sure the script is working with your data. It should not change the results as long as you still have sufficient coverage for the genomes of interest (min. 5x required for accurate iRep calculations).
However, it should not take prohibitively long to run through a 36 G sam file.
Chris

On Jun 24, 2016, at 10:19 AM, jbird9<EMAIL_ADDRESS>wrote:
Hi Chris,
I am attempting to implement iRep for a single metagenomic reconstruction and a very large sam file (36 G). The default thread behaviour is listed a 6 threads, but top reveals I am only using 1 cpu during the parsing mapping files phase.
Is the entire operation threaded or only parts?
 Should the end results turn out similar?
Thanks,
Jordan
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks for the quick response Chris,
Messing around in samtools it seems like it was an absence of header (@SQ...) problem that was throwing a silent error.
Love the program.
Thanks,
Jordan

Unfortunately, this step takes the longest.

If iRep supported indexed BAM files, wouldn’t this solve this problem and greatly improve performance and disk load?
Best,
Bela

Yes, it would! Adding support for BAM files is on my (long) to-do list! :-)

On Dec 5, 2016, at 6:17 AM, Bela Hausmann<EMAIL_ADDRESS>wrote:
Unfortunately, this step takes the longest.
If iRep supported indexed BAM files, wouldn’t this solve this problem and greatly improve performance and disk load?
Best,
Bela
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Yes, it would! Adding support for BAM files is on my (long) to-do list! :-)

Still any plan for this? I think this is a must-have if one wants to use iRep for large scale analysis (lot of genomes in a lot of samples).

Hi Nils,
I’m really not sure when I will have time to provide proper support for BAM files.
However, you can provide mapping files to iRep by pipe, so it should be straightforward to write a simple script to parallelize analysis of BAM files using samtools.
For a single file, this would look something like the following.
$ samtools view sample_data/l_gasseri.fna-vs-l_gasseri_sample1-shrunk.sam | iRep -f sample_data/l_gasseri.fna -s - -o test
Sorry this is not simpler, but hope that it helps.
Best,
Chris

On Apr 24, 2018, at 5:14 AM, Nils Giordano<EMAIL_ADDRESS>wrote:
Yes, it would! Adding support for BAM files is on my (long) to-do list! :-)
Still any plan for this? I think this is a must-have if one wants to use iRep for large scale analysis (lot of genomes in a lot of samples).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi Chris,

However, you can provide mapping files to iRep by pipe, so it should be straightforward to write a simple script to parallelize analysis of BAM files using samtools.

I didn't know you could pipe mapping files that way in iRep. That is indeed very useful, thank you. For now I managed to improve the parsing step of iRep by splitting my SAM file before feeding it to iRep:
samtools sort mapping.bam -o mapping.sorted.bam			# Sort bam file
samtools index mapping.sorted.bam				# Index bam file
contigs=`awk '{if(gsub(/^>/,"")){printf " " $1}}' genome.fna`;	# Get contig names space separated
samtools view mapping.sorted.bam $contigs -h \			# Get reads with reference in $contigs
| samtools sort -n -o mapping#genome.sam \			# Sort by RNAME for iRep parsing
| iRep -f genome.fna -s - -o mapping#genome			# iRep

Since I have >8000 genomes in my initial mapping.bam file (to reduce cross-mapping), the parsing by iRep was initially taking forever.
If you ever plan to implement BAM file support, you might want to look at pysam since I think they already implement it (along other useful features).
Best,
Nils

Hi Nils,
Thanks for sharing this workflow! Very nice solution for dealing with a large number of genomes and/or mappings. Indeed, the iRep parsing is very slow.
Thanks for pointing me to pysam, I’ll have a look and see if it can be incorporated.
Best,
Chris

On May 2, 2018, at 7:32 AM, Nils Giordano<EMAIL_ADDRESS>wrote:
Hi Chris,
However, you can provide mapping files to iRep by pipe, so it should be straightforward to write a simple script to parallelize analysis of BAM files using samtools.
I didn't know you could pipe mapping files that way in iRep. That is indeed very useful, thank you. For now I managed to improve the parsing step of iRep by splitting my SAM file before feeding it to iRep:
samtools sort mapping.bam -o mapping.sorted.bam			# Sort bam file
samtools index mapping.sorted.bam
Index bam file
contigs=
awk '{if(gsub(/^>/,"")){printf " " $1}}' genome.fna;	# Get contig names space separated
samtools view mapping.sorted.bam
$contigs -h \			# Get reads with reference in $contigs
| samtools sort -n -o mapping#genome.sam \			# Sort by RNAME for iRep parsing
| iRep -f genome.fna -s - -o mapping#genome			# iRep
Since I have >8000 genomes in my initial mapping.bam file (to reduce cross-mapping), the parsing by iRep was initially taking forever.
If you ever plan to implement BAM file support, you might want to look at pysam since I think they already implement it (along other useful features).
Best,
Nils
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi Chris,
I would like to know if it is possible to list more genome names when you lunch iRep in order to scan the sam file once and to perform the calculation for all the genomes listed.
Thanks

Sorry, but I’m not entirely sure that I understand the question.
If you provide a FASTA file with a subset of the genomes reported in the SAM file, then iRep values will only be calculated for those genomes. Does this help?

On Jul 19, 2018, at 7:56 AM, stefcamp<EMAIL_ADDRESS>wrote:
Hi Chris,
I would like to know if it is possible to list more genome names when you lunch iRep in order to scan the sam file once and to perform the calculation for all the genomes listed.
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I am sorry, probably my question was not very clear. I reformulate.
When I lunch iRep, is it possible to specify more genomes in the command line?
So, instead of running iRep for "genome1.fna" and then for "genome2.fna", etc.
iRep -f genome1.fna -s samfile.sam -o tag1
iRep -f genome2.fna -s samfile.sam -o tag2
etc.
to specify more genomes such as
iRep -f genome1.fna,genome2.fna,genome3.fna -s samfile.sam -o tag1,tag2,tag3
in order to scan the sam file only once for all the genomes?
This is because, I tried the procedure suggested by Niels, but it is not working and the coverage calculated by iRep is zero.
Thanks

Thanks for clarifying. That is a good question. As you point out, it definitely can save a lot of time to read through the SAM file only once.
You can provide additional genomes with a space or wild card, e.g. -f genome1.fna genome2.fna or -f *.fna.
Then, supply a single output file name, e.g. -o iRep_output, and all the results will be combined.
Hope this helps!
Chris

On Jul 19, 2018, at 10:53 AM, stefcamp<EMAIL_ADDRESS>wrote:
I am sorry, probably my question was not very clear. I reformulate.
When I lunch iRep, is it possible to specify more genomes in the command line?
So, instead of running iRep for "genome1.fna" and then for "genome2.fna", etc.
iRep -f genome1.fna -s samfile.sam -o tag1
iRep -f genome2.fna -s samfile.sam -o tag2
etc.
to specify more genomes such as
iRep -f genome1.fna,genome2.fna,genome3.fna -s samfile.sam -o tag1,tag2,tag3
in order to scan the sam file only once for all the genomes?
This is because, I tried the procedure suggested by Niels, but it is not working and the coverage calculated by iRep is zero.
Thanks
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks a lot Chris for your explanation, I did not understand this option by reading the manual. It is  extremely useful!
Best
Stefano

Hi Stefano,
Thanks for pointing that out - I updated the README to try to make this more clear.
Chris

On Jul 19, 2018, at 11:27 AM, Stefano Campanaro<EMAIL_ADDRESS>wrote:
Thanks a lot Chris for your explanation, I did not understand this option by reading the manual. It is extremely useful!
Best
Stefano
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


Add notification drawer

Add a notification drawer that opens when you click the notification badge. The drawer shows all the notifications it receives through the API.
The top menu should contain the following actions:

Mark all as read
Clear all
Show all notifications (goes to a page that contains a list of all notifications)

Each notification tile show the title + the severity + the message + the relative time. When a notification is clicked it should be marked as read. The the badge should change accordingly
The kebab menu of each message should contain:

An action to mark it unread again
An action to clear it from the list
If a link is provided, a link to go to the correct page/report/...

The severity levels provided by the api should be mapped to those in the API as follows:

message: default
info: info
success: success
warning: warning
error: error

Hey team! Please add your planning poker estimate with ZenHub @andraskvr @bartv @Stijnkool


The list of open source repositories is outdated

We had multiple new repositories added since this page was last updated, so it makes sense to update the page.
Two repos I know of are:

https://github.com/microsoft/quantum-viz.js
https://github.com/microsoft/qdk-python

There might be more; need to follow up with the team to track down every repo.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 462770d2-93e5-8aa7-5aed-3ca00816b38a
Version Independent ID: 080d4d40-41e2-2da2-137e-3afcaa5a1672
Content: Contributing to the Quantum Development Kit - Azure Quantum
Content Source: articles/contributing-overview.md
Service: azure-quantum
Sub-service: qdk
GitHub Login: @cgranade
Microsoft Alias: chgranad

I was not aware of the existence of these two repos. Do we have any sort of database which collects the active repositories?

Fixed via https://github.com/MicrosoftDocs/quantum-docs-private/pull/710.


Cannot see outcome while: I'm refactoring my own code that I publish publicly

Type: Bug
I'm trying to refactor code I publish publicly on GitHub. From HTML to markdown. And Co-Pilot refuses saying I shoudl re-prompt.
Here are a few requestIds:

401f715f-83b5-4ef6-b688-8dc871cc230b

Input file to use: source
Extension version: 0.21.0
VS Code version: Code 1.94.0 (Universal) (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Darwin x64 23.6.0
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabledwebgpu: enabledwebnn: disabled_off

Load (avg)
2, 2, 2

Memory (System)
32.00GB (0.33GB free)

Process Argv
--crash-reporter-id 709d17c1-02f0-4614-a36c-55452be4172d

Screen Reader
no

VM
0%

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
bdiig495:31013172
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
2f103344:31071589
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
flighttreat:31134774
wkspc-onlycs-t:31132770
nativeloc2:31134642
wkspc-ranged-t:31125599
pme_test_c:31118331
defaultse:31133495
ei213698:31121563

Can you please share an example prompt too so we can try to reproduce the issue

Sorry for the delay. The only thing I can do with copilot is the auto complete, it's kinda nice. But nothing much.
Here is an example of something I've asked.
1. Find duplicate lines
PS: Created Bug reporter with Diagnosis microsoft/vscode-copilot-release/issues/2100
(Yes, I could sed out commented lines, and sort -u in vim. But why not trying this)
In a file on my project, with lines like the following, I asked:

In the current file do you see matches of the same URL on the first part of the space separated files

And it blocked what it was doing with

Sorry, the response was filtered by the Responsible AI Service. Please rephrase your prompt and try again. (...)

I wonder what it's supposed to filter. That must not be an easy problem to solve: Trying to block Intellectual Property misuse.

#
# Redirects
#
# Format:
#
# [source] [destination] [code?]
#
# source required
#     A file path.
#     Can include wildcards (*) and placeholders.
#     Because fragments are evaluated by your browser and not Cloudflare’s network, any fragments in the source are not evaluated.
#
# destination required
#     A file path or external link.
#     Can include fragments, query strings, splats, and placeholders.
#
# code default: 302
#     Optional parameter
#
#
# A project is limited to 2000 static redirects and 100 dynamic redirects,
# for a combined total of 2100 redirects.
# Each redirect declaration has a 1000-character limit.
#
# Bookmarks:
# - https://developers.cloudflare.com/pages/configuration/redirects/
#
# REWRITING URL TO SOMETHING BETTER ----------
#
/blog/2009/08/inexis-net-2004-sur-flickr/ /blog/2009/08/realisation-site-web-inexis-solution-web-2004/ 301
/blog/2009/11/realisation-du-site-et-de-limage-«branding»-de-beebox-2008/ /blog/2009/11/realisation-du-site-et-de-image-produit-de-beebox/ 301
/blog/2009/11/realisation-du-site-et-de-limage-%c2%abbranding%c2%bb-de-beebox-2008/ /blog/2009/11/realisation-du-site-et-de-image-produit-de-beebox/ 301
/blog/2010/01/le-defi-«project52»-un-billet-par-semaine-minimum/ /blog/2010/01/le-defi-project52-un-billet-par-semaine/ 301
/blog/2010/01/le-defi-%c2%abproject52%c2%bb-un-billet-par-semaine-minimum/ /blog/2010/01/le-defi-project52-un-billet-par-semaine/ 301
/blog/2010/01/le-manifeste-open-cloud-pour-standardiser-linformatique-«dans-les-nuages»/ /blog/2010/01/le-manifeste-open-cloud-pour-standardiser-info-nuagique/ 301
/blog/2010/01/le-manifeste-open-cloud-pour-standardiser-linformatique-%c2%abdans-les-nuages%c2%bb/ /blog/2010/01/le-manifeste-open-cloud-pour-standardiser-info-nuagique/ 301
/blog/2010/02/realisation-dune-application-dechange-de-cadeau-avec-red-lagence-le-«club-echangiste»-2009/ /blog/2010/02/realisation-dune-application-dechange-de-cadeau-avec-red-lagence/ 301
/blog/2010/02/realisation-dune-application-dechange-de-cadeau-avec-red-lagence-le-%c2%abclub-echangiste%c2%bb-2009/ /blog/2010/02/realisation-dune-application-dechange-de-cadeau-avec-red-lagence/ 301

Another example of usage was a request to make manipulations to a Markdown file that has HTML.
Basically doing what this commit does
I started using ClaudeAI instead to do the conversion instead.
PS: I understand responsible AI. But that code and article is something I wrote many years ago, it's public some for many years, even two decades sometimes.
The prompt was something like:
Adjust contents of text files and reorganize contents from Markdown to an uniform format

Key Tasks: (1) Reformat HTML content to Markdown (2) Normalize the provided front matter (3) Ensure title hierarchy makes sense when possible (4) Standardize front matter with the a provided key order (5) Take into account images and links to them into a new pattern of provided HTML tags (6) When you see at the top of the content an image, that's going to be the page's "cover image" that should be used for front matter coverImage that'll describe further. For each file you rewrite, show your writing as artifacts as Markdown.

and a few more lines like this.

Thanks for creating this issue! We figured it's covering the same as another one we already have: https://github.com/microsoft/vscode-copilot-release/issues/2625. Please refer to that one for updates and discussions. Feel free to open a new issue if you think this is a different problem.


[YUNIKORN-352] - fixed max resource check and behavioural change

Hey @kingamarton,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: 84538710-139a-11eb-a355-c174999d48b2

Travis tests have failed
Hey @kingamarton,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
1st Build
View build log

     curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.22.2

golangci/golangci-lint info checking GitHub for tag 'v1.22.2'
golangci/golangci-lint info found version: 1.22.2 for v1.22.2/linux/amd64
golangci/golangci-lint info installed /home/travis/gopath/bin/golangci-lint

     make lint

running golangci-lint
pkg/common/resources/resources.go:807: File is not `gofmt`-ed with `-s` (gofmt)
	if r == nil {return true}
pkg/common/configs/configvalidator.go:113: File is not `gofmt`-ed with `-s` (gofmt)
	if err !=nil {
pkg/common/configs/configvalidator_test.go:45: File is not `gofmt`-ed with `-s` (gofmt)
		true,
		"invalid guaranteed resource map[memory:-50 vcores:33] for queue , cannot be negative"},
pkg/common/configs/configvalidator.go:101:7: shadow: declaration of "err" shadows declaration at line 80 (govet)
			if err := checkResourceConfigurationsForQueue(cur.Queues[i], maxToPass, guaranteedToPass); err != nil {
			   ^
Makefile:45: recipe for target 'lint' failed
make: *** [lint] Error 1

TravisBuddy Request Identifier: 6ac220d0-18fa-11eb-86f8-31dd4df69769

Hey @kingamarton,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: 22e8b310-196c-11eb-a6ec-b9eb403ed3be

The patch looks good beside the codecov remarks.
I can see that the error or no input cases are not hit based on the remarks it puts in. Specially in the resources ComponentWiseMinPermissive() we can get a couple easily fixed by nil testing. However this is a central part of the code and we should really strive for a higher test coverage.


⚠ Bofrost.ch has degraded performance

In 346b117, Bofrost.ch (https://www.bofrost.ch) experienced degraded performance:

HTTP code: 200
Response time: 4513 ms

Resolved: Bofrost.ch performance has improved in 6836f30.


Add allowed_actions for ViewSet and View.

When using the ResourceRepositoryViewSet class, all the available resource actions are available on the endpoint by default. It's difficult to block certain actions, like "delete", as this requires creating custom ListView / DetailView classes only to raise an exception.
This PR adds an optional mixin that can be used to disallow all actions by default and explicitly state which ones are allowed.
Example (all actions are allowed by default):
class MyResourceViewSet(flask_jsonapi.ResourceRepositoryViewSet):
    schema = schemas.MySchema
    repository = repositories.MyRepository()

Example (allowed actions are limited to "read" and "read_many"):
class MyResourceDetailView(flask_jsonapi.AllowedActionsResourceDetailMixin, flask_jsonapi.ResourceRepositoryDetailView):
    pass

class MyResourceListView(flask_jsonapi.AllowedActionsResourceListMixin, flask_jsonapi.ResourceRepositoryListView):
    pass

class MyResourceViewSet(flask_jsonapi.AllowedActionsResourceViewSetMixin, flask_jsonapi.ResourceRepositoryViewSet):
    schema = schemas.MySchema
    repository = repositories.MyRepository()
    detail_view_cls = MyResourceDetailView
    list_view_cls = MyResourceListView
    allowed_actions = (
        resources.Actions.read,
        resources.Actions.read_many,
    )

We encourage you to make this the default behavior for your app (deny by default, only allow access explicitly). Introducing a base ViewSet class will help.
Example:
File base.py
class BaseDetailView(flask_jsonapi.AllowedActionsResourceDetailMixin, flask_jsonapi.ResourceRepositoryDetailView):
    pass

class BaseListView(flask_jsonapi.AllowedActionsResourceListMixin, flask_jsonapi.ResourceRepositoryListView):
    pass

class BaseViewSet(flask_jsonapi.AllowedActionsResourceViewSetMixin, flask_jsonapi.ResourceRepositoryViewSet):
    detail_view_cls = MyResourceDetailView
    list_view_cls = MyResourceListView

File endpoints.py:
from flask_jsonapi import resources

from my_app import base, repositories, schemas

class MyResourceViewSet(base.BaseViewSet):
    schema = schemas.MySchema
    repository = repositories.MyRepository()
    allowed_actions = (
        resources.Actions.read,
        resources.Actions.read_many,
    )

This change is

Coverage increased (+0.2%) to 94.651% when pulling 617709e68012eea56737bd4c9c618d7971b33e4d on allowed_methods into f2f179984b608dfd4ff5febe0d84950a90115e0b on master.


GEODE-5268: fixing race condition in GMSHealthMonitor

Signed-off-by: Michael Oleske<EMAIL_ADDRESS>Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:

[x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

[ ] Has your PR been rebased against the latest commit within the target branch (typically develop)?

[x] Is your initial contribution a single, squashed commit?

[x] Does gradlew build run cleanly?

[x] Have you written or updated unit tests to verify your changes?

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

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to<EMAIL_ADDRESS>

Can you explain why this change fixes the race? I see that you removed the volatile, and split the if statement on two lines. How does that help?

There was race condition that hit the if statement where it was split where serverSocket was not null but before it got to the &&  the finally in startTcpServer set serverSocker to null.  The test case recreates this with some trickery.  @WireBaron might be able to give a more detailed answer than I can.

+1, agree with Dan's comments.  Both read and write ops must have synchronization to access shared state.

So, the root of the problem here is that there's a member variable keeping track of the socket which was being set to null in two different places (oddly so in one case).  The socket itself is thread-safe and properly handles concurrent access, so we're not concerned about multiple threads trying to close this.
The real fix here is just the removal of line 734.  With this gone, the nulling of the local variable is only done in the StopServices call and the race condition goes away.  It seems like the volatile is no longer necessary as this variable is no longer being accessed by multiple threads (curiously, with the exception of line 734, the other thread only accessed the socket through a separate local variable), but I'll go ahead and add it back in just to minimize the chances for unintended consequences.

Agreed, removed the null assignment.


vNext: enable "Virtual Reality Supported" automatically like htk did

Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)?
Mixed Reality Toolkit
Is your feature request related to a problem? Please describe.
I've gotten hamstrung by not having Virtual Reality Supported checked for me. I'm so used to htk project settings setup doing it for me, that I keep forgetting it in MRTK, and I send up spending 30+ minutes figuring out why my headset doesn't work.
Describe the solution you'd like
I'd like for this to be turned on for me, or at least to have a prompt asking if I want it turned on like the IL2CPP prompt.

This is a good point, and surprised we haven't addressed this sooner.
One of the ideas we had was to enable/disable VR support as hardware changed/plugged in/or was removed. I'm pretty certain you can do this at runtime, but harder still is the api support to intelligently choose which sdk to support based on that hardware.

@Ecnassianer can you please update this to reflect a task with a set of requirements and acceptance criteria?

A prompt would be best.  As I find it actually quite annoying (especially while in OpenVR) that Unity "autostarts" the VR client when you open the editor.
But this check needs to verify it for ALL platforms you have enable in the project, and validate it when you have a new one.
Personally, I'd also like a "Update VR Settings" bool, so if I have it OFF, it stays off until I'm ready to test :D
But have it on by default so existing HTK users get what they expect.

A prompt might get annoying as not every project will be XR specific.

Simon, I thought we discussed active SDK features where things set up based on the hardware detected?

The prompt was more whether to turn on/off the VR switch easily.  To stop Unity being annoying.
Based on the comment from the MRW team work work 90% in the editor, having SteamVR and / or MR Portal open EVERY time you open the editor would BE annoying :D
Not saying the prompt should be ALL the time, just the first time you import the toolkit.

Generally I'll keep the portal open and running if I'm testing in VR anyway.
Seems like this should be something that's automagickally handled for you.
If we were to get into "simulation" of said devices, I could see that being a toggle it switch somewhere, to turn in/off said simulator feature.


Add render_function to UserManager class

Short:
add render_function attribute to UserManager class ;
replace flask.render_template with render function that call user_manager.render_function ;
Idea
Make it available to customize render function.
For example, if someone uses Flask-Admin library, that requires additional arguments for rendering built-in templates, he must to copy all Flask-User's view functions and replace them render_template with Flask-Admin's render function. It isn't a beautiful solution.
So I decided to make this pull request that makes Flask-User more customizable.replace flask.render_template with render function that call user_manager.render_function ;

Released in v0.6.9.


Can't run with openai model:gpt-4-1106-preview

python startup.py --idea "write a cli blackjack game"
2023-12-05 20:27:03.903 | INFO     | metagpt.const:get_project_root:21 - PROJECT_ROOT set to /Users/pzhang/ai2/MetaGPT
2023-12-05 20:27:04.205 | INFO     | metagpt.config:init:44 - Config loading done.
2023-12-05 20:27:10.301 | INFO     | metagpt.team:invest:39 - Investment: $3.0.
2023-12-05 20:27:10.303 | INFO     | metagpt.roles.role:_act:212 - Alice(Product Manager): ready to WritePRD
[CONTENT]
{
"Original Requirements": "Write a CLI blackjack game",
"Product Goals": [
"Create an engaging and easy-to-use CLI blackjack game",
"Ensure the game rules are consistent with standard blackjack",
"Provide a clear and intuitive user interface"
],
"User Stories": [
"As a user, I want to easily start a game of blackjack so that I can play without hassle.",
"As a player, I want to see my current hand and the dealer's visible card to make informed decisions.",
"As a gaming enthusiast, I want the option to hit or stand so that I can strategize my gameplay.",
"As a casual player, I want to be informed when I win, lose, or draw so that I understand the outcome of the game.",
"As a user, I want to be able to quit the game at any time so that I can stop playing whenever I choose."
],
"Competitive Analysis": [
"Competitor A offers a variety of card games but lacks a user-friendly interface.",
"Competitor B has a strong user base but the game rules do not align with standard blackjack.",
"Competitor C provides a good user experience but the game lacks features like betting.",
"Competitor D has a visually appealing interface but is not accessible via CLI.",
"Competitor E offers a CLI blackjack game but it has frequent bugs and stability issues.",
"Competitor F has a well-implemented game logic but lacks documentation and support.",
"Competitor G is popular for its multiplayer feature but does not offer a single-player mode."
],
"Competitive Quadrant Chart": "quadrantChart\n    title Competitive Analysis of CLI Blackjack Games\n    x-axis Less Features --> More Features\n    y-axis Lower Usability --> Higher Usability\n    quadrant-1 We should expand\n    quadrant-2 Need to promote\n    quadrant-3 Re-evaluate\n    quadrant-4 May be improved\n    "Competitor A": [0.2, 0.3]\n    "Competitor B": [0.4, 0.2]\n    "Competitor C": [0.6, 0.7]\n    "Competitor D": [0.8, 0.4]\n    "Competitor E": [0.3, 0.5]\n    "Competitor F": [0.5, 0.6]\n    "Competitor G": [0.7, 0.8]\n    "Our Target Product": [0.9, 0.9]",
"Requirement Analysis": "The game should be simple, engaging, and adhere to standard blackjack rules. The user interface must be clear and intuitive, allowing for easy gameplay.",
"Requirement Pool": [
["Implement basic blackjack game logic", "P0"],
["Create a simple and intuitive CLI interface", "P0"],
["Allow the user to start a new game or quit", "P1"],
["Implement the options to hit or stand during gameplay", "P1"],
["Display game outcome messages (win/lose/draw)", "P1"]
],
"UI Design draft": "The CLI interface will display the user's hand, dealer's visible card, and options to hit or stand. It will have a simple text-based layout with clear instructions at the top, the game state in the middle, and the available commands at the bottom.",
"Anything UNCLEAR": "The requirements are clear. However, the complexity of the game logic and potential edge cases in blackjack rules need to be further defined."
}
[/CONTENT]
Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613.
2023-12-05 20:27:58.217 | INFO     | metagpt.provider.openai_api:update_cost:89 - Total running cost: $0.032 | Max budget: $3.000 | Current cost: $0.032, prompt_tokens: 895, completion_tokens: 761
2023-12-05 20:27:58.223 | INFO     | metagpt.roles.role:_act:212 - Bob(Architect): ready to WriteDesign
[CONTENT]
{
"Implementation approach": "To implement the CLI blackjack game, we will use Python due to its simplicity and the rich ecosystem of open-source libraries. We will leverage the 'cmd' module for creating an interactive command-line interface. The game logic will be encapsulated in classes that handle the game state, player actions, and the dealer's behavior. We will use 'unittest' for testing our game logic and ensuring that all edge cases are covered. The application will be designed to be extensible, allowing for future features such as betting or multiplayer functionality.",
"Python package name": "cli_blackjack",
"File list": ["main.py", "game.py", "player.py", "dealer.py", "card.py", "deck.py", "ui.py", "constants.py", "test.py"],
"Data structures and interface definitions": '
classDiagram
class Card {
-suit: str
-rank: str
+init(suit: str, rank: str)
+value() -> int
}
class Deck {
-cards: list[Card]
+init()
+shuffle() -> None
+deal_card() -> Card
}
class Hand {
-cards: list[Card]
+init()
+add_card(card: Card) -> None
+value() -> int
+is_busted() -> bool
+str() -> str
}
class Player {
-hand: Hand
+init()
+hit(deck: Deck) -> None
+stand() -> None
+is_busted() -> bool
+str() -> str
}
class Dealer {
-hand: Hand
+init()
+reveal_card() -> None
+play(deck: Deck) -> None
+str() -> str
}
class Game {
-player: Player
-dealer: Dealer
-deck: Deck
-ui: UI
+init(ui: UI)
+start() -> None
+evaluate_game() -> str
}
class UI {
+start_game_prompt() -> None
+show_hands(player_hand: Hand, dealer_hand: Hand) -> None
+show_result(result: str) -> None
+hit_or_stand_prompt() -> str
+quit_prompt() -> bool
}
Deck "1" -- "" Card : contains
Hand "1" -- "" Card : contains
Player "1" -- "1" Hand : has
Dealer "1" -- "1" Hand : has
Game "1" -- "1" Player : has
Game "1" -- "1" Dealer : has
Game "1" -- "1" Deck : has
Game "1" -- "1" UI : uses
',
"Program call flow": '
sequenceDiagram
participant Main
participant UI
participant Game
participant Player
participant Dealer
participant Deck
Main->>UI: start_game_prompt()
UI->>Game: start()
Game->>Deck: shuffle()
Game->>Player: hit(deck)
Game->>Dealer: hit(deck)
Game->>UI: show_hands(player_hand, dealer_hand)
loop Game Loop
UI->>UI: hit_or_stand_prompt()
alt Hit
UI->>Player: hit(deck)
Player->>Game: evaluate_game()
Game->>UI: show_result(result)
else Stand
UI->>Dealer: play(deck)
Dealer->>Game: evaluate_game()
Game->>UI: show_result(result)
end
end
UI->>Main: quit_prompt()
Main->>Game: end game
',
"Anything UNCLEAR": "The requirement is clear. The implementation details for handling edge cases in blackjack rules, such as splitting pairs, insurance, and doubling down, are not specified and will not be included in the initial version. These can be added in future iterations if required."
}
[/CONTENT]
Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613.
2023-12-05 20:29:03.383 | INFO     | metagpt.provider.openai_api:update_cost:89 - Total running cost: $0.071 | Max budget: $3.000 | Current cost: $0.039, prompt_tokens: 1276, completion_tokens: 879
2023-12-05 20:29:03.410 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/competitive_analysis.pdf..
2023-12-05 20:29:07.448 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:07.450 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/competitive_analysis.svg..
2023-12-05 20:29:09.376 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:09.380 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/competitive_analysis.png..
2023-12-05 20:29:11.449 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:11.451 | INFO     | metagpt.actions.design_api:_save_prd:175 - Saving PRD to /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/docs/prd.md
2023-12-05 20:29:11.458 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/data_api_design.pdf..
2023-12-05 20:29:13.783 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:13.785 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/data_api_design.svg..
2023-12-05 20:29:16.000 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:16.003 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/data_api_design.png..
2023-12-05 20:29:18.324 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:18.332 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/seq_flow.pdf..
2023-12-05 20:29:20.492 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:20.495 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/seq_flow.svg..
2023-12-05 20:29:22.529 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:22.531 | INFO     | metagpt.utils.mermaid:mermaid_to_file:46 - Generating /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/resources/seq_flow.png..
2023-12-05 20:29:25.144 | INFO     | metagpt.utils.mermaid:mermaid_to_file:70 - Generating single mermaid chart
2023-12-05 20:29:25.149 | INFO     | metagpt.actions.design_api:_save_system_design:188 - Saving System Designs to /Users/pzhang/ai2/MetaGPT/workspace/cli_blackjack/docs/system_design.md
2023-12-05 20:29:25.155 | INFO     | metagpt.roles.role:_act:212 - Eve(Project Manager): ready to WriteTasks
[CONTENT]
{
"Required Python third-party packages": "requirements.txt\npytest==6.2.2\n",
"Required Other language third-party packages": "requirements.txt\nNo third-party packages required.\n",
"Full API spec": """
openapi: 3.0.0
info:
title: CLI Blackjack Game API
version: "1.0.0"
paths: {}
components: {}
""",
"Logic Analysis": [
["constants.py", "Define game constants"],
["card.py", "Class Card"],
["deck.py", "Class Deck depends on card.py"],
["hand.py", "Class Hand depends on card.py"],
["player.py", "Class Player depends on hand.py"],
["dealer.py", "Class Dealer depends on hand.py"],
["ui.py", "Class UI"],
["game.py", "Class Game depends on player.py, dealer.py, deck.py, ui.py"],
["main.py", "Main entry point depends on game.py"],
["test.py", "Test cases for all classes"]
],
"Task list": [
"constants.py",
"card.py",
"deck.py",
"hand.py",
"player.py",
"dealer.py",
"ui.py",
"game.py",
"main.py",
"test.py"
],
"Shared Knowledge": """
The 'constants.py' file will contain all the game constants such as suits, ranks, and blackjack values which will be used across various modules.
The 'card.py' module will define the Card class and should be implemented with a method to determine the card's value.
The 'deck.py' module will use the Card class from 'card.py' and should provide methods to shuffle and deal cards.
The 'hand.py' module will use the Card class from 'card.py' and should provide methods to add cards and calculate the value of a hand.
The 'player.py' and 'dealer.py' modules will use the Hand class from 'hand.py' for their respective hand management.
The 'ui.py' module will handle all user interactions and should be designed to be easily extendable for future features.
The 'game.py' module will be the core of the game, coordinating between the UI, Player, Dealer, and Deck classes.
The 'main.py' module will be the entry point of the application and will initialize and start the game using the Game class from 'game.py'.
The 'test.py' module will contain all the unit tests for the classes and methods defined in the project.
""",
"Anything UNCLEAR": "The main entry point should be defined in 'main.py' and should handle the initialization and starting of the game. The integration of the UI with the game logic needs to be clearly defined. The process of initializing third-party libraries, if any, should be documented."
}
[/CONTENT]
Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613.
2023-12-05 20:30:05.342 | INFO     | metagpt.provider.openai_api:update_cost:89 - Total running cost: $0.103 | Max budget: $3.000 | Current cost: $0.032, prompt_tokens: 1403, completion_tokens: 613
[CONTENT]
{
"Required Python third-party packages": "requirements.txt\npytest==6.2.2\n",
"Required Other language third-party packages": "requirements.txt\nNo third-party packages required\n",
"Full API spec": """
openapi: 3.0.0
info:
title: CLI Blackjack Game API
version: "1.0.0"
paths:
/start:
get:
summary: Start a new game of blackjack
responses:
'200':
description: Game started successfully
/hit:
post:
summary: Player chooses to hit and get another card
responses:
'200':
description: Card dealt to player
/stand:
post:
summary: Player chooses to stand and end their turn
responses:
'200':
description: Player's turn ended
/dealer_play:
post:
summary: Dealer plays their turn
responses:
'200':
description: Dealer's turn played
/game_status:
get:
summary: Get the current status of the game
responses:
'200':
description: Returns the current game status
""",
"Logic Analysis": [
["card.py", "Card class with suit, rank, and value methods"],
["deck.py", "Deck class with cards list, shuffle, and deal_card methods"],
["hand.py", "Hand class with cards list, add_card, value, is_busted, and str methods"],
["player.py", "Player class with hand, hit, stand, is_busted, and str methods"],
["dealer.py", "Dealer class with hand, reveal_card, play, and str methods"],
["game.py", "Game class with player, dealer, deck, ui, start, and evaluate_game methods"],
["ui.py", "UI class with start_game_prompt, show_hands, show_result, hit_or_stand_prompt, and quit_prompt methods"],
["main.py", "Main entry point, orchestrates the game flow"],
["test.py", "Test cases for all game logic"]
],
"Task list": [
"card.py",
"deck.py",
"hand.py",
"player.py",
"dealer.py",
"ui.py",
"game.py",
"main.py",
"test.py"
],
"Shared Knowledge": """
The 'constants.py' file should contain all the constant values such as suits, ranks, and blackjack values for cards. This file should be created and agreed upon before implementing the 'Card', 'Deck', and 'Hand' classes as they will rely on these constants.
""",
"Anything UNCLEAR": "The main entry point should be defined in 'main.py' and should properly initialize the game by creating instances of the Game and UI classes and starting the game loop. Make sure to initialize any third-party libraries if needed."
}
[/CONTENT]
Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613.
2023-12-05 20:30:50.316 | INFO     | metagpt.provider.openai_api:update_cost:89 - Total running cost: $0.136 | Max budget: $3.000 | Current cost: $0.033, prompt_tokens: 1403, completion_tokens: 628
[CONTENT]
{
"Required Python third-party packages": "requirements.txt\npytest==6.2.2\n",
"Required Other language third-party packages": "requirements.txt\nNo third-party packages required.\n",
"Full API spec": """
openapi: 3.0.0
info:
title: CLI Blackjack Game API
version: "1.0.0"
paths: {}
components: {}
""",
"Logic Analysis": [
["card.py", "Card class with value method"],
["deck.py", "Deck class with shuffle and deal_card methods"],
["hand.py", "Hand class with add_card, value, is_busted, and str methods"],
["player.py", "Player class with hit, stand, is_busted, and str methods"],
["dealer.py", "Dealer class with reveal_card, play, and str methods"],
["game.py", "Game class with start and evaluate_game methods"],
["ui.py", "UI class with start_game_prompt, show_hands, show_result, hit_or_stand_prompt, and quit_prompt methods"],
["main.py", "Main entry point, orchestrates the game flow"],
["test.py", "Test cases for all game logic"]
],
"Task list": [
"card.py",
"deck.py",
"hand.py",
"player.py",
"dealer.py",
"ui.py",
"game.py",
"main.py",
"test.py"
],
"Shared Knowledge": """
The 'constants.py' file should contain all the constant values like suits, ranks, and blackjack values which will be used across different modules of the game.
""",
"Anything UNCLEAR": "The main entry point should be defined in 'main.py' and should handle the initialization and termination of the game. Make sure to initialize any third-party libraries if used."
}
[/CONTENT]
Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613.
2023-12-05 20:31:19.760 | INFO     | metagpt.provider.openai_api:update_cost:89 - Total running cost: $0.163 | Max budget: $3.000 | Current cost: $0.026, prompt_tokens: 1403, completion_tokens: 411
Traceback (most recent call last):
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in call
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/metagpt/actions/action.py", line 84, in _aask_v1
instruct_content = output_class(**parsed_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 2 validation errors for task
Required Python third-party packages
value is not a valid list (type=type_error.list)
Required Other language third-party packages
value is not a valid list (type=type_error.list)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/pzhang/ai2/MetaGPT/startup.py", line 72, in
fire.Fire(main)
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/fire/core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/startup.py", line 68, in main
asyncio.run(startup(idea, investment, n_round, code_review, run_tests, implement))
File<EMAIL_ADDRESS>line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File<EMAIL_ADDRESS>line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File<EMAIL_ADDRESS>line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/startup.py", line 47, in startup
await company.run(n_round=n_round)
File "/Users/pzhang/ai2/MetaGPT/metagpt/team.py", line 60, in run
await self.environment.run()
File "/Users/pzhang/ai2/MetaGPT/metagpt/environment.py", line 67, in run
await asyncio.gather(*futures)
File "/Users/pzhang/ai2/MetaGPT/metagpt/roles/role.py", line 324, in run
rsp = await self.react()
^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/metagpt/roles/role.py", line 283, in react
rsp = await self._react()
^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/metagpt/roles/role.py", line 264, in _react
rsp = await self._act()
^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/metagpt/roles/role.py", line 213, in _act
response = await self._rc.todo.run(self._rc.important_memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/MetaGPT/metagpt/actions/project_management.py", line 184, in run
rsp = await self._aask_v1(prompt, "task", OUTPUT_MAPPING, format=format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in call
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pzhang/ai2/env3.11/lib/python3.11/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x11ae45f90 state=finished raised ValidationError>]

current openai sdk version can not support gpt-4-turbo. We should upgrade openai>=1.0.0

#519 upgrade openai version to 1.6.0 @Undertone0809

Could you try latest main branch code? @pzhang25


Apply page enhancement

The website is great but the apply section in the navbar is quite normal and basic also spacing is very cluttered type and can be made more dynamic and enhanced like current trends with better transitions and effects .
I would like to work on this issue .
Please assign it to me @subhadipbhowmik
Also please add tags for gssoc, hacktoberfest, level

@subhadipbhowmik Hi, I’d love to help resolve this issue—could you please assign it to me?

@subhadipbhowmik  would love to use my experience in UI design to enhance the components. Please do assign!


TypeExtensions.GetAllProperties doesn't return properties from implemented interfaces

Contact Details
No response
Version
8.x
On which operating system(s) are you experiencing the issue?
Windows
Using which broker(s) did you encounter the issue?
No response
What are the steps required to reproduce the issue?

interface  ISomeInterface{
public string Prop {get;} => { return default implementation }
}
class MyType:ISomeInterface{
}

typeof(MyType).GetAllProperties() doesn't return Prop
this if statement is   not needed  (https://github.com/MassTransit/MassTransit/blob/afd8bb961abbc9cd5a7c9c8149ad1a3b47aba002/src/MassTransit.Abstractions/Internals/Extensions/TypeExtensions.cs#L47)
What is the expected behavior?
typeof(MyType).GetAllProperties() to return Prop
What actually happened?
Prop is not returned
Related log output, including any exceptions
No response
Link to repository that demonstrates/reproduces the issue
No response

Is this impacting some aspect of MassTransit, related to publishing/sending or consuming a message?

no (not yet, to be precise)

Okay, so just something you found? If you have a unit test that fails before the change using MassTransit in some way, and are able to resolve it with that change, you're welcome to submit a PR. Otherwise, I'm likely to close this as a non-issue.

You mean e2e test (publish/subscribe) or just a call to GetAllProperties() that doesn't return property from interface ?

Yes, for example, a serialization test that would show it properly serializing and deserializing the message property. Similar to this one.


Resnet 152 extracted Features.

Hi,
Resnet 152 extracted features drive link is not correct, it is cracked.
Kindly update the correct link.
Thank you for your great Work.

Hi @Henryy-rs do you have an idea what has happended?


Eliminate "lib*.a(filexx.cpp.o)" has no symbols on macOS

On macOS there is some warnings about object that has no symbols in it, this is needed to be fixed to make building more clean and clear.
example of build log :
[ 94%] Linking CXX static library libretdec-bin2llvmir.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libretdec-bin2llvmir.a(idioms_borland.cpp.o) has no symbols

After those, there will be no warnings at all on macOS compile time.

@s3rvac could you take a look.


Generate  relative js path error

config as follows
let createHtml = new HtmlWebpackPlugin({
	title: 'My App',
	filename: '../index.html',
	template:'./src/bin/index.ejs',
	inject:'body',
	hash: true
})

webpack config
output: {
	filename: 'app.js',
	path: './dist/' + config.name + '/js/',
	publicPath: '/'
}

The file generated as I expected, the dir as follow

But, the app.js path is not correct in index.html

I need the app.js path is /js/app.js, is a bug? thanks.

Your public path is / so the script will be on /app.js.


news-flash API - Add Pagination

Request opened by FE team here
api/news-flash API can be found in here


Error while calling the GeocodioClient

Pasting the exact error here:
Traceback (most recent call last):
File "main_new.py", line 21, in
from geocodio_util import *
File "/home/ayan_chandra/services/forms-service/geocodio_util.py", line 1, in
from geocodio import GeocodioClient
File "/home/ayan_chandra/anaconda3/lib/python3.7/site-packages/geocodio/init.py", line 9, in
from client import GeocodioClient
ModuleNotFoundError: No module named 'client'
I have installed the package by
pip install pygeocodio

I don't see a line in the current version of this project that has from client import GeocodioClient, so I looked back across the version history, and it seems like that line is from, at latest, version 0.2.0, which is behind by many major versions. I'd highly recommend trying to upgrade to a newer version and trying again.
You can upgrade the package to a newer version with:
$ pip install [package_name] --upgrade OR $ pip install [package_name] -U
Version 1.0.0 is the most recent (but it drops Python 2.7 support, if that's relevant)
Version 0.12.0 is the most up-to-date version compatible Python 2.7, if that's relevant.


ant332-lab-material folder

Hi, I am trying to find the cloudformation stack for the lab http://eseksworkshop.com/en/
I didn't find this lab in your repo, but was using this fork https://github.com/saadrana219/community/tree/saadrana-ant332
Trying to run this stack and still getting the error

2020-02-13 10:03:30 UTC-0500
eksdeployapiserver
CREATE_FAILED
Template error: Unable to get mapping for RegionMap::us-west-1::AMI

Please let me know where I can find working version of the cloudformation stack for this lab.
Thanks!

Hi @krasova, the CFN stack is only supporting eu-west-1 region right now, we're actively working on adding support for more regions. You may use the same stack but can only deploy it in eu-west-1 region.

Hi @krasova did @saadrana219 's suggestion work for you? Let us know. Thanks!


Laravel 5.2 compatibility

I'm trying to use this with Laravel 5.2 and cannot get it to work.
KamranAhmed\Faulty\Handler is trying to extend Laravel\Lumen\Exceptions\Handler which does not exist in the Laravel 5.2 code base. Maybe this was intended for an earlier version of Laravel?

I have this issue with Laravel 5.3 too.

Hey, I ended up realizing that this was not meant for Laravel but for Laravel/Lumen which is their microframework. I switched to https://github.com/nilportugues/php-api-problems for my app. Note that with that package you will also need to install "symfony/psr-http-message-bridge".

Hey guys, thank you for reporting the issue, I will fix it this weekend or maybe before.


No more gcloud update

Hmmm. I'm not sure why your commits are in here...

Ah, looks like I had an old copy.


fix [flathub] version error handling

Not Found behaviour has changed (for the worse) upstream

Warnings

:warning:
This PR modified service code for flathub but not its test code. That's okay so long as it's refactoring existing code.

Messages

:book:
:sparkles: Thanks for your contribution to Shields, @chris48s!

  Generated by :no_entry_sign: dangerJS against 70acfb96d0c06d22a087c9b29d570fe65c5b5421


Can Emotion's css tool be used in conjunction with string classNames in Reakit?

Taking this example from the docs:
import { Button } from "reakit";
import { css } from "emotion";

function Example() {
  return (
    <Button
      className={css({
        color: "white",
        background: "red",
        "&:not([disabled]):hover": { background: "green" },
        "&:not([disabled]):active": { background: "blue" }
      })}
    >
      Button
    </Button>
  );
}

Is there some way we can also use string classNames in conjunction? Say I had a class called primaryButton or something like that that I wanted to use in addition to the css shown above. Is that possible?
I think what I'm asking is not something that conforms with best practices, but it would make it easier to move from SCSS styling to Reakit in a piecemeal fashion.

There's nothing special on Reakit regarding this. So I guess you'll have better answers asking on emotion channels.
As far as I know, css returns a string, and you can concatenate it with other strings. There's also a cx helper:
import { Button } from "reakit";
import { css, cx } from "emotion";

function Example() {
  const className = css({
    color: "white",
    background: "red",
    "&:not([disabled]):hover": { background: "green" },
    "&:not([disabled]):active": { background: "blue" }
  });
  return (
    // <Button className={cx(className, "a")}>
    // or
    <Button className={`${className} a`}>
      Button
    </Button>
  );
}

@diegohaz specifically the reason I asked is because with emotion you pass css as a prop called css which leaves the className prop open for use as usual.  That's not the case with reakit though.
For example, the emotion Array example:
/** @jsx jsx */
import { jsx } from '@emotion/core'

render(
  <div
    css={[
      { color: 'darkorchid' },
      { backgroundColor: 'hotpink' },
      { padding: 8 }
    ]}
  >
    This is darkorchid with a hotpink background and 8px of
    padding.
  </div>
)

Your example is very helpful though. I think what you're saying is that it returns a className on the fly, and that makes a lot of sense. I'll give that a shot! Thanks for taking the time @diegohaz .

Emotion's css prop should work with Reakit. Isn't it working?

@diegohaz It looks like the reason I wasn't seeing changes applied is this bug that I think is in Emotion. Doesn't appear to be anything to do on reakit's size.
That said, I didn't have any luck at all with this pattern in my attempts to get this working:

import { Box, Button } from 'reakit';
import styled from '@emotion/styled';
import { css } from '@emotion/core';

const StyledButton = styled(Button)``

const FinalButton = props => (
  <StyledButton
    {...{
      ...props,
      css: css`
        color: red;
      `,
    }}>
    Some Text
  </StyledButton>)


Automated cherry pick of #262: fix task complete

Cherry pick of #262 on release/2.8.0.
#262: fix task complete

/approve
/lgtm


vscode.dev: better focus for the git password entry field when git pushing from terminal

I ran git push from a terminal in a hosted instance of vscode.dev and didn't notice that it was opening an "enter password" input. It seemed like the git push was just hanging. I was using the default light theme but don't easily notice the input field in the dark theme either. I've attached a screenshot below.
Input element:

:

Version: 1.90.2
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
Embedder: vscode.dev

I guess playing around with the shadow here might make things better: https://github.com/microsoft/vscode/blob/524d1ecedd33104381e7e0a6715c13813128f89c/src/vs/platform/theme/common/colors/editorColors.ts#L331-L333.

//cc @daviddossett, @hbons

Looks like the input isn't focused which isn't helping here. I think I've seen this in one or two other issues cc @TylerLeonhardt

I believe the input was focused but it lost focus because of how I took the screenshot. This is to say that there was a browser outline around the "Password" input when it had focus, but the outline wasn't noticeable and the focus didn't draw my attention because of the colour contrast (IMO).

Is this Light Modern/Dark Modern? I'll explore some shadow and/or border adjustments. The challenge here is that some changes to tiny quick input instances like this can sometimes feel like too much in more typical cases (e.g. the command palette, file picker, etc.).

Yeah, this is Light +. I wonder if there's any other way to shift attention when a modal of any kind is opened?

Adjusting label and ownership.

This does feel more like a theme issue than a quick pick issue.


update JReleaser config

Our JReleaser version is ~2 years old.
Also we want to customize the brew formula that is geneated, and this requires <some version newer than 1.0>.
So this is required for #1513.

/gradlew :maestro-cli:jreleaserFullRelease --stacktrace fails with 401 Unauthorized (which is expected since I exported a dummy JRELEASER_GITHUB_TOKEN), so I assume everything else works.


[Bug] Message ordering isn't retained in Key_Shared AUTO_SPLIT mode in a rolling restart type of test scenario

Search before asking

[X] I searched in the issues and found nothing similar.

Read release policy

[X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version

[!WARNING]
It's possible that the test setup contains bugs. More work is needed to validate that the test case is valid.

This applies to both master branch (which includes PIP-282 changes) as well as in branch-3.3
Minimal reproduce step
the test case has invocationCount=50 to repeat it 50 times. It usually fails about 25% of the test runs.
This is the test case:
org.apache.pulsar.client.api.KeySharedSubscriptionTest#testOrderingAfterReconnects
The test code depends on some new test utility methods.
reproducing based on master branch (with PIP-282 changes)
git clone -b lh-key_shared-testing-2024-09-13-220512 --depth=2 --single-branch https://github.com/lhotari/pulsar
cd pulsar
mvn -Pcore-modules,-main -T 1C clean install -DskipTests -Dspotbugs.skip=true -Dcheckstyle.skip=true -Dlicense.skip=true -DnarPluginPhase=none
mvn -DredirectTestOutputToFile=false -DtestRetryCount=0 test -pl pulsar-broker "-Dtest=org.apache.pulsar.client.api.KeySharedSubscriptionTest#testOrderingAfterReconnects"

based on branch-3.3 (without PIP-282)
git clone -b lh-key_shared-testing-branch-3.3-2024-09-13-220747 --depth=2 --single-branch https://github.com/lhotari/pulsar
cd pulsar
mvn -Pcore-modules,-main -T 1C clean install -DskipTests -Dspotbugs.skip=true -Dcheckstyle.skip=true -Dlicense.skip=true -DnarPluginPhase=none
mvn -DredirectTestOutputToFile=false -DtestRetryCount=0 test -pl pulsar-broker "-Dtest=org.apache.pulsar.client.api.KeySharedSubscriptionTest#testOrderingAfterReconnects"

What did you expect to see?
Key_Shared subscription in AUTO_SPLIT mode should retain ordering of messages by message key.
This should happen by holding back delivery of message keys that are currently handled by a consumer that is no longer the current "owner" of the hash range where the message key belongs to at the time of sending.
What did you see instead?

message ordering by key isn't preserved in message processing
sometimes message processing gets blocked and doesn't proceed
there are duplicate messages in cases where it isn't expected

Anything else?
The initial goal of the test scenario was to simulate a rolling restart of consumers. However this isn't strictly followed in the test case. The test case was modified until test failures started appearing.
Are you willing to submit a PR?

[X] I'm willing to submit a PR!

@equanz Do you have a chance to validate whether the test results are valid?

It's possible that this is a Pulsar client bug. I'm using .receiveAsync in the test case.
I also tested with .receive and threads to consume: https://github.com/lhotari/pulsar/blob/53188f42babd14c8120b7244b83066ec22b8222a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/KeySharedSubscriptionTest.java#L2074-L2108
The results were similar.
The third experiment was with messageListeners to receive messages and where consumers are paused initially. The problem doesn't reproduce in this case. I added some jitter for simulating processing. https://github.com/lhotari/pulsar/blob/0e608c93c5b0d6a9cf76751a4a82726b5e1654b4/pulsar-broker/src/test/java/org/apache/pulsar/client/api/KeySharedSubscriptionTest.java#L1922-L2109
It looks like using .receive and .receiveAsync might be messing up ordering.

The test fails consistently when using .messageListener without .startPaused(true). In that case, there's 7 to 10 duplicates in each test run. With these changes: https://github.com/lhotari/pulsar/commit/ca41a88f
I remember seeing a bug report or someone planning to create one about this issue.

The test fails consistently when using .messageListener without .startPaused(true). In that case, there's 7 to 10 out-of-order messages in each test run. With these changes: lhotari@ca41a88f
This looks like a client-side bug instead of broker side issue with Key_Shared.

I was testing this in branch-3.3 . It's possible that it reproduces the PIP-282 issue without .startPaused(true). I'll check.

I've created #23309 as a proposal to address the issue.

Further investigation may be needed, but I think this is an issue related to redelivery.
I added the following patches.
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/KeySharedSubscriptionTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/KeySharedSubscriptionTest.java
index b0717f1326..3ae52d71f0 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/KeySharedSubscriptionTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/KeySharedSubscriptionTest.java
@@ -2348,7 +2348,7 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {

         // Adding a new consumer.
         @Cleanup
-        Consumer<Integer> c1 = pulsarClient.newConsumer(Schema.INT32)
+        ConsumerImpl<Integer> c1 = (ConsumerImpl<Integer>) pulsarClient.newConsumer(Schema.INT32)
                 .topic(topic)
                 .consumerName("c1")
                 .subscriptionName(subscriptionName)
@@ -2358,7 +2358,7 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {
                 .subscribe();

         @Cleanup
-        Consumer<Integer> c2 = pulsarClient.newConsumer(Schema.INT32)
+        ConsumerImpl<Integer> c2 = (ConsumerImpl<Integer>) pulsarClient.newConsumer(Schema.INT32)
                 .topic(topic)
                 .consumerName("c2")
                 .subscriptionName(subscriptionName)
@@ -2367,7 +2367,7 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {
                 .subscribe();

         @Cleanup
-        Consumer<Integer> c3 = pulsarClient.newConsumer(Schema.INT32)
+        ConsumerImpl<Integer> c3 = (ConsumerImpl<Integer>) pulsarClient.newConsumer(Schema.INT32)
                 .topic(topic)
                 .consumerName("c3")
                 .subscriptionName(subscriptionName)
@@ -2417,8 +2417,10 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {
         c1.resume();
         c3.resume();
         Thread.sleep(pauseTime);
+        log.info("c1 incomingMessages: {}", c1.incomingMessages.toList().stream().map(Message::getMessageId).toList());
+        log.info("c3 incomingMessages: {}", c3.incomingMessages.toList().stream().map(Message::getMessageId).toList());
         // reconnect c2
-        c2 = pulsarClient.newConsumer(Schema.INT32)
+        c2 = (ConsumerImpl<Integer>) pulsarClient.newConsumer(Schema.INT32)
                 .topic(topic)
                 .consumerName("c2")
                 .subscriptionName(subscriptionName)
@@ -2428,7 +2430,7 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {
         // close and reconnect c1
         c1.close();
         Thread.sleep(pauseTime);
-        c1 = pulsarClient.newConsumer(Schema.INT32)
+        c1 = (ConsumerImpl<Integer>) pulsarClient.newConsumer(Schema.INT32)
                 .topic(topic)
                 .consumerName("c1")
                 .subscriptionName(subscriptionName)
@@ -2438,7 +2440,7 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {
         // close and reconnect c3
         c3.close();
         Thread.sleep(pauseTime);
-        c3 = pulsarClient.newConsumer(Schema.INT32)
+        c3 = (ConsumerImpl<Integer>) pulsarClient.newConsumer(Schema.INT32)
                 .topic(topic)
                 .consumerName("c3")
                 .subscriptionName(subscriptionName)
@@ -2450,6 +2452,7 @@ public class KeySharedSubscriptionTest extends ProducerConsumerBase {
                 + dispatcher.getNumberOfMessagesInReplay());

         logTopicStats(topic);
+        log.info("c2 incomingMessages: {}", c2.incomingMessages.toList().stream().map(Message::getMessageId).toList());

         // produce more messages
         for (int i = 1000; i < 2000; i++) {
diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
index 9748a42f0c..a5d5cd7772 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
@@ -87,7 +87,7 @@ public abstract class ConsumerBase<T> extends HandlerState implements Consumer<T
     protected final ExecutorService externalPinnedExecutor;
     protected final ExecutorService internalPinnedExecutor;
     protected UnAckedMessageTracker unAckedMessageTracker;
-    final GrowableArrayBlockingQueue<Message<T>> incomingMessages;
+    public final GrowableArrayBlockingQueue<Message<T>> incomingMessages;
     protected ConcurrentOpenHashMap<MessageIdAdv, MessageIdImpl[]> unAckedChunkedMessageIdSequenceMap;
     protected final ConcurrentLinkedQueue<CompletableFuture<Message<T>>> pendingReceives;
     protected final int maxReceiverQueueSize;

And I ran the test, then failed as follows.
2024-09-17T18:15:31,906 - INFO  - [TestNG-method=testOrderingAfterReconnects-1:KeySharedSubscriptionTest] - c1 incomingMessages: [8:5:-1, 8:6:-1, 8:7:-1, 8:11:-1, 8:13:-1, 8:17:-1, 8:500:-1, 8:511:-1, 8:549:-1, 8:559:-1]
2024-09-17T18:15:31,906 - INFO  - [TestNG-method=testOrderingAfterReconnects-1:KeySharedSubscriptionTest] - c3 incomingMessages: [8:0:-1, 8:1:-1, 8:2:-1, 8:3:-1, 8:4:-1, 8:8:-1, 8:9:-1, 8:10:-1, 8:12:-1, 8:14:-1]
...
2024-09-17T18:15:32,186 - INFO  - [TestNG-method=testOrderingAfterReconnects-1:MockedPulsarServiceBaseTest] - [testOrderingAfterReconnects-40ecbc0c-7f8f-4973-9513-c3bcadd0fb5b] stats: {
...
      "consumersAfterMarkDeletePosition" : {
        "consumerName=c2, consumerId=11, address=/<IP_ADDRESS>:63188" : "8:500",
        "consumerName=c1, consumerId=12, address=/<IP_ADDRESS>:63188" : "8:500",
        "consumerName=c3, consumerId=13, address=/<IP_ADDRESS>:63188" : "8:500"
      },
      "lastSentPosition" : "8:500",
      "individuallySentPositions" : "[(8:510..8:511],(8:548..8:549],(8:558..8:559]]",
...
2024-09-17T18:15:32,192 - INFO  - [TestNG-method=testOrderingAfterReconnects-1:KeySharedSubscriptionTest] - c2 incomingMessages: [8:15:-1, 8:16:-1, 8:18:-1, 8:19:-1, 8:20:-1, 8:21:-1, 8:22:-1, 8:23:-1, 8:24:-1, 8:25:-1]
2024-09-17T18:15:33,860 - ERROR - [broker-test-util-executor-2-1:KeySharedSubscriptionTest] - key: 397 value: 2 prev: 8:21/c2 current: 8:2/c2

When the c2 is reconnected, the dispatcher sends replay messages to the c2. After the c3 is disconnected, 8:2 will be resent to the c2.
(I didn't address redelivery messages in the PIP-282 because I think we can't fully address redelivery messages' ordering. For example, the dispatcher can't control the client-side redelivery operation such as unack x:101 before x:100. cf. https://github.com/apache/pulsar/pull/21953#discussion_r1519261144 )

When the c2 is reconnected, the dispatcher sends replay messages to the c2. After the c3 is disconnected, 8:2 will be resent to the c2.
(I didn't address redelivery messages in the PIP-282 because I think we can't fully address redelivery messages' ordering. For example, the dispatcher can't control the client-side redelivery operation such as unack x:101 before x:100. cf. #21953 (comment) )

There's a past related issue #12885 with PR #12890 in this area.

I am asking some questions below to see if this issue is resolved in PIP-379. #23309 (review)

It'll try to take this case into account when working on PIP-379 design and implementation.

This issue is fixed in PIP-379 implementation, #23352


Server side rendering error with angular 4

Hi,
I get the project from https://github.com/angular/universal-starter and add the apollo-angular. It works perfectly in the client side rendering but not in the server side rendering (it shows error log: 'Error: Network error: fetch is not defined')
Could someone help me how to fix it?
Best thanks!!!

Try to add isomorphic-fetch to dependencies and import it at the very beginning of your source code.
Quite some time ago I created a working example of that starter with usage of Apollo.
https://github.com/kamilkisiela/universal-starter-apollo
Because Angular Team change the way they handle async operations in SSR I'll try to implement those changes in apollo-angular soon

Hi @kamilkisiela,
Thanks for your support, it works now 😊
Thank you!


fix(duplicate users crated): try to mitigate bug where multiple insta…

…nces of user is crated

Merging because it messed up my local environment not having the Tenant Id field. But please provide review on the code either way


efibootmgr: 13 -> 15

Motivation for this change

Update to efibootmgr 15
Add dependency on pkgconfig (listed as required in INSTALL)
Remove dependency on perl, pciutils and zlib
Set EFIDIR to 'nixos'  (the same used in fwupdate)
Update homepage

Changes
Things done

[x] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

I note that 0.14 is what upstream advertises as the latest proper release (0.15 is marked as pre-release; I can't speak to what that means in real terms, of course, but something to keep in mind perhaps).

On the other hand, Debian's idea of 14-2 includes backporting parts of 15


Why the refinement via condition with $ReadOnly doesn't work as expect

https://flow.org/try/#0C4TwDgpgBAShCGATA9gOwDYgPICMBWUAvFACRxJYYgA8A3gD4BQUU8AXFKgK4C2OEAJyj1OXdOgA0zKDg7c+g4aPGN6AXwB80xgDMuqAMbAAlmigGcUABQBnYALm9+AgJRRa0g2hvJ0EAHToyADmtvYuANyMaoy6+kamqFA2vNbI+BzkKFS4eG4eLMY6afj+8FAAZBVQ6Xj+OPnSLBZWtWWRTeY4raUNUSwxMYxeqHZQYPAC8DyZCNmYuUTurI7iEjKr6FBqUSk8VhNTPC5AA
type ReadonlyObj = $ReadOnly<{|
  a: number | null,
  b: number | null
|}>

function cb (str: number) {
  console.log(str);
}

function sum (obj: ReadonlyObj) {
  if (obj.a && obj.b) {
    cb(obj.a);
    cb(obj.b);
  }
}

const param: ReadonlyObj = { a: null, b: null };
sum(param)

13:     cb(obj.b);
           ^ Cannot call `cb` with `obj.b` bound to `str` because null [1] is incompatible with number [2].
References:
3:   b: number | null                 ^ [1]
6: function cb (str: number) {
                     ^ [2]

I await there won't be error, because I made the parameter and argument readonly .
Also if I get the property, which is readonly, from this.state of the React object and use such approach for refinement I get same error.

Flow is correct.
You have a reference to obj: ReadonlyObj, but that does not mean that
all references to obj are read-only. I could write:
const param: {| a: number | null, b: number | null |} = { a: 1, b: 2 };
sum(param);  // okay: `param` is upcast to `ReadonlyObj`

But then the callback could mutate the value in question:
// @flow
type ReadonlyObj = $ReadOnly<{|
  a: number | null,
  b: number | null
|}>;

const param: {| a: number | null, b: number | null |} = { a: 1, b: 2 };

function cb(n: number) {
  param.b = null;
  console.log(n.toFixed());
}

function sum(obj: ReadonlyObj) {
  if (obj.a && obj.b) {
    cb(obj.a);
    cb(obj.b);
  }
}

sum(param);

The above typechecks except for the error at cb(obj.b), which
is the correct behavior, because it is that call that will throw at
runtime.
To fix this problem, you can either perform the check again after the
call, or bind the values ahead of time:
  if (obj.a && obj.b) {
    const { a, b } = obj;
    cb(a);
    cb(b);
  }

yee, you're right, thanks.


Make closing current scene faster

Fixes #30140 (this was especially noticeable when using Ctrl + Shift + W shortcut)
Scene tab handling might use some refactor, because there are multiple pretty equivalent ways to close a tab.

Needs a rebase on current master to fix CI.

Needs a rebase.

Thanks!


python311Packages.pysensibo: 1.0.35 -> 1.0.36

Changelog: https://github.com/andrey-git/pysensibo/releases/tag/1.0.36
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] Fits CONTRIBUTING.md.

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

5 packages built:

home-assistant-component-tests.sensibo
python310Packages.pysensibo
python310Packages.pysensibo.dist
python311Packages.pysensibo
python311Packages.pysensibo.dist


PR/Feature Request: Add window changing lua functions

changeWindowTitle
changeWindowIcon
This is a hybrid pr and feature request lmao
not neccassary, and quite simple really, but would be cool to have.

hold on wait i forgor to sync my repo like a dummy

this very epic

i just realized theres already an event for this

😔


The TxnNotFound log is missleading for heartbeat

Development Task
The txn heartbeat error is misleading when the corresponding lock is not found, it's bettet to distinguish the situation that the lock is not found doing commit or the lock not fonud doing heartbeat.
If the lock record is not found processing a commit request, it means the request could be stale or there's possible atomic risk for this transaction.
In https://github.com/tikv/tikv/pull/9028 we change the TxnLockNotFound error to TxnNotFound, maybe it's still needed to distinguish these two error types printing the error log.

I'm a little confused. If a commit request failed, it seems to return TxnLockNotFound error instead of TxnNotFound. Why should we distinguish commit and heartbeat?

I'm a little confused. If a commit request failed, it seems to return TxnLockNotFound error instead of TxnNotFound. Why should we distinguish commit and heartbeat?

I'm a little confused. If a commit request failed, it seems to return TxnLockNotFound error instead of TxnNotFound. Why should we distinguish commit and heartbeat?

@dwangxxx
The motivation is to distinguish the log info for these two paths, we could verify it and close this task.


Possibility to add Query params in form of struct.

Don'y You mind if i'll implement such thing?
Its pretty obvious to send struct as query params too, due to already existing possibility to do this with POST (sendStruct).
Why I'm asking - i have a structure which represents some parameters for GET request and what am i doing right now its marshalling data and sending them to Query function in form of string. And when Query unmarshalls it again. Its absolutely unnecessary overhead.
Of course i can concatenate this string in cycle - but it would be really shitty way.
So, what would You say?

Hi @warik, how are you?
Wanna give it a try? Pull request is still welcome ;)

I  have done this in the features/add_query_from_structures branch of my fork of your repo github.com/figlief/gorequest
The problem is only capital first letters are allowed! for now  I lower case the  keys. Other alternatives?
I have done a simple cut and paste job, the common code should be factored out really.
I have refactored the  relavent bit of test code as the tests crash if the key is not found! very confusing and unhepfull.
Will do more work if you approve.
This is my first ever pull request , sorry If I screw it up.

For now, it works. If we find more issue, let's fix it.
Thanks for your contribution. ;)

Was this every actually implemented?


Dirty files watcher - no prompt, no notification

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: Latest - ArchLinux Build
OS Version: Arch Rolling

Steps to Reproduce:

Default install, no plugins
All options set according to manual, Arch watcher number rised a lot.

Issue will be sure close fast because it is not bug. I do not get any info in bar, no notification, no prompt, that opened file is modified / changed in third party editor.
Tried every possible setting for that, tweaked Arch watchers, even uninstalled Vscode, deleted manually all Vscode folders and tried with naked default install, and settings for that correctly set. Vscode just shows changes made in another editor and allows me to save them without any warning or anything.
I like Vscode but cannot use it without it.

What exactly is the issue you see?

Hi. I do not see anything, absolutely nothing.

I (just for test) open one PHP file in Vscode
I open Kate editor and add some text in file just to test
Written (newly added) text is for millisecond visible in Vscode
No notification that file is changed in other editor, no message in bar, no prompt
I can save newly edited file in Vscode as normal, no warning

I really tried everything advised in manual, Github, Google.

/duplicate https://github.com/microsoft/vscode/issues/23107

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


IP Filter

Our IP filter isn't always able to resolve the host IP. When we encounter an error, we consider the host's IP as redundant, causing unnecessary churn at times. This PR doesn't really change that but whilst trying to figure out where the churn was coming from I found some stuff I wanted to improve or suggest.
I'm not sure whether we can really handle the errors better unfortunately... Currently we treat any error to resolve a host's IP as a redundant IP, this will definitely cause some churn since sometimes we run into  server misbehaving errors. We now log them at least so we're more aware.

@ChrisSchinnerl I found that on both my node and the integrity-checker node the "server misbehaving" and "I/O timeout" errors that sometimes occur on DNS lookups cause contract to flip-flop in and out of the contract set causing unnecessary migrations and spammy alert messages.
Currently we will mark the host as redundant and move on but maybe we can either increase the timeout or even use a cached lookup response in case one fails? We could add the IPFilter on the contractor instead and resort to using cached addresses if we have one that's not stale.

Yeah we could try that. Maybe give them a reasonable timeout like a day or so.


Not working for existing records

Why does this not work on existing records, just like in any other database?
Who comes up with these solutions?
(sorry, extremely frustrated with dataverse)

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 5a3df80b-f571-21e7-b622-33ebc6926c7d
Version Independent ID: bee61c6a-753e-09f8-31c6-5c8dd0cec95f
Content: Autonumber columns in Microsoft Dataverse - Power Apps
Content Source: powerapps-docs/maker/data-platform/autonumber-fields.md
Service: powerapps
Sub-service: dataverse-maker
GitHub Login: @daemelia
Microsoft Alias: kvivek

@EricBos - What you're asking for is a feature request that can't be addressed in the Power Apps documentation. You can submit a new feature request or vote for an existing one here: Power Apps community ideas
Closing issue.


A11y_AzureExtensionsforVSCode_AzureFuction_DefaultScreen_Screenreader : The controls such as "Repository" and "License" are not announced with proper role for screen reader users

“Check out Accessibility Insights! - Identify accessibility bugs before check-in and make bug fixing faster and easier.”
GitHubTags: #A11yMAS; #A11yTCS; #MAC; #ColorContrast; #A11y_VSCode; #A11ySev2;#CAITestPass_May2020;#Benchmark;#Visual Studio Code;#FTP;#VoiceOver;#MAS1.3.1;#MAS4.1.2;
Environment Details:
Application Name: Azure Extensions for VS Code
Application Version: 1.48.0-insider
Commit: cfbd1999769f4f08dce29629fb92fdc0fac53829
Date: 2020-08-06T05:40:40.871Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.6.0
Operating system: macOS Catalina Version 10.15.6 (19G73)
Screen Reader: VoiceOver
Repro Steps:
Open Visual studio code
Click on extension button and search for "Azure Functions"
Click on install and move to the "Azure" button, the "Default Screen" will appear.
Start screen reader and navigate to controls such as "Repository" and "License" and observe if these are announced with role as link or not.
Actual:
When screen reader users navigate to the controls such as "Repository" and "License" they are announced as group and text which is incorrect as on activating them web page appear on the screen so they should be announced with proper role for screen reader users.
Expected:
The controls such as "Repository" and "License" should be announced as 'link' for screen reader users when they navigate to these controls.
Attachment link for Reference:
104552_A11y_AzureExtensionsforVSCode_AzureFuction_DefaultScreen_Screenreader.The.controls.such.as.Repository.and.License.are.not.announced.with.proper.role.for.screen.reader.users.zip

Please file against ms-azuretools.vscode-azurefunctions extension.
Then that team can identify if it is really an issue in vscode and file it here with minimal human readable steps.

@isidorn We have already logged bug in ms-azuretools.vscode-azurefunctions extension and their team says that this issue is external to VSCode then we have filed issue .
Bug reference: https://github.com/microsoft/vscode-azurefunctions/issues/2281
Please reactivate this issue.

Makes sesne but that team should then file an issue in VS Code. They should put effort in filling an issue and use VS Code language when filling an issue, not just forward you to file an issue in our repository. They should search for duplicates etc..


balance check for delegation, Delegate with trackNum, Gov2 sidebar icons, Navheader shadow, Voters List alignment, latest activity cell width


Explicit means of switching automation and image DB off

I would like to  disable the registry scanning feature for now. I can see in the introduction this feature can be disabled but i can not find how to do that.

Not sure I understand.  The intro still says that this can be disabled.  Can it be?
I have no use for this feature, but my logs are full of registry scan messages.

@dpgeekzero I think I will have posted this as a reminder to either add the ability to disable registry scanning entirely, or to find and excise the claim to have that ability.
We can also damp down the amount of logging done by the registry scanning, e.g., by suppressing repeated messages.

In my case we run a single registry for test, acceptance and prod. Registry scanning would only make sense for test. We don't want to retag images for the different environments.
Anyway to have the option to disable will serve some use cases imo.

@markbenschop Do you mean you would want scanning to be done in one place, but the results used for multiple environments? Or, that you don't need the image database for acceptance or prod -- you always make changes to their configs by some means other than flux?

i mean I have T/A/P k8s clusters. On T i want to scan the registry and automatically install new container versions and run integration tests. On A I only want to install the new version after the integration test (triggered by e.g. Jenkins) succeed. After successful integration test on T scripts ran by Jenkins another script will modify the flux git repository of A. So in this scenario we do not want A to install new pods because it found them in the registry but have more control. Disabling the registry scanning would make sense here.

@markbenschop OK got it. Automation is opt-in (you have to annotate the workloads for them to get automated updates), so you can just leave your acceptance testing and production config unannotated, and fluxd will sync it, but not modify it.
fluxd will still do some work you don't strictly speaking need -- it'll scan the registries for the image versions -- but it won't use that information unless you query for it.

#1654 effectively fixes the image DB part of this, since you can now exclude all image registry domains from scanning.


Update resource name limit for Policyassignments

As per the documentation, we have highlighted that the resource naming limit for policyassignment resource name can be between 1-64 characters.
The resource name for the policyassignment resource when assigned at Management group scope is limited to 1-24 characters like what we have explained for policySetDefinition resource in the documentation.
The limit for policyassignments resource name at Management group scope should be added to the documentation

@Saglodha : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@Saglodha : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@Saglodha - thanks for this contribution.

@Saglodha - thanks for this contribution.

#sign-off

#sign-off


About Plugins

https://community.ekstep.in/developer-knowledgebase/111-how-do-i-think-about-a-plugin
Is this all we have about plugins? @kochhar
I don't feel this provides comprehensive information about plugins .Please provide point of contact for the same if you can .

The link to the documentation on creating a plugin is on the same page.
On Wed, Sep 6, 2017 at 11:32 AM Nawab<EMAIL_ADDRESS>wrote:

https://community.ekstep.in/developer-knowledgebase/111-how-do-i-think-about-a-plugin
Is this all we have about plugins? @kochhar https://github.com/kochhar
I don't feel this provides comprehensive information about plugins .Please
provide point of contact for the same if you can .
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/project-sunbird/sunbird-commons/issues/36, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAGVqj0F3PL42jni2_i_A1naZGmncjkDks5sfjWPgaJpZM4PN4dn
.

fine will check it , thank you .


Unable to update Mongo records.

Repro steps:

Connect to Mongo DB
Select a databse and find a record to ammend
Update a string (I added a word to a name just to test the extension)
Receive an popup asking if you want to upload/always upload
Select upload (For now, plus it's a chance to sanity check changes)
Receive the error

Action: cosmosDB.CosmosEditorManager.onDidSaveTextDocument
Error type: Error
Error Message: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
Version: 0.7.1
OS: linux

Dupe of https://github.com/Microsoft/vscode-cosmosdb/issues/663

Though I feel this is better structured.

Looks like a dupe of #534.

Close via PR

Hi @Goddak , the merged fix was published today (version 0.8.0). Hope this fixes your issue. :-)
Let us know how the fix holds up with your use-case.

@PrashanthCorp - It's been working a joy, thank you :D


feat: refactor best/worst record api in response time

Description

Related links

Notes for reviewers

Pre-review checklist for the PR author

[x] I've confirmed the contribution guidelines.
[x] The PR is ready for review.

In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.

[ ] The PR has been properly tested.
[ ] The PR has been reviewed.

Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.

[ ] (Optional) The PR has been properly tested with CARET_report verification.
[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@xygyo77
Is the difference about best-case?
Regarding this,
Before refactoring, the response time of the 1st path is not calculated.
This is because in the worst-with-external-latency case, the start time of the previous path (worst-case external input time) cannot be defined.
In fact, except in the worst-with-external-latency case, the response time can be calculated for the 1st path (output time - input time).
Therefore, after refactoring, the response time for the 1st path is recorded more than before refactoring.