转录视频出现报错

如图 这个视频六分钟，我转录一分钟的视频的时候就可以，这是什么原因？视频太大了吗

由于网络不佳，从Github上加载VAD模型时失败：transcribe.py#L65
[autocut:transcribe.py:L37] INFO   Transcribing ./video/1.mp4
Traceback (most recent call last):
  File "/opt/conda/bin/autocut", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.9/site-packages/autocut/main.py", line 119, in main
    Daemon(args).run()
  File "/opt/conda/lib/python3.9/site-packages/autocut/daemon.py", line 18, in run
    self._iter()
  File "/opt/conda/lib/python3.9/site-packages/autocut/daemon.py", line 34, in _iter
    transcribe.Transcribe(args).run()
  File "/opt/conda/lib/python3.9/site-packages/autocut/transcribe.py", line 48, in run
    speech_timestamps = self._detect_voice_activity(audio)
  File "/opt/conda/lib/python3.9/site-packages/autocut/transcribe.py", line 65, in _detect_voice_activity
    self.vad_model, funcs = torch.hub.load(
  File "/opt/conda/lib/python3.9/site-packages/torch/hub.py", line 555, in load
    repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, trust_repo, "load",
  File "/opt/conda/lib/python3.9/site-packages/torch/hub.py", line 199, in _get_cache_or_reload
    repo_owner, repo_name, ref = _parse_repo_info(github)
  File "/opt/conda/lib/python3.9/site-packages/torch/hub.py", line 142, in _parse_repo_info
    with urlopen(f"https://github.com/{repo_owner}/{repo_name}/tree/main/"):
  File "/opt/conda/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/conda/lib/python3.9/urllib/request.py", line 517, in open
    response = self._open(req, data)
  File "/opt/conda/lib/python3.9/urllib/request.py", line 534, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/opt/conda/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/opt/conda/lib/python3.9/urllib/request.py", line 1389, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/opt/conda/lib/python3.9/urllib/request.py", line 1350, in do_open
    r = h.getresponse()
  File "/opt/conda/lib/python3.9/http/client.py", line 1377, in getresponse
    response.begin()
  File "/opt/conda/lib/python3.9/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/opt/conda/lib/python3.9/http/client.py", line 289, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

解决方法
使用代理：

设置环境变量：export HTTP_PROXY="http://localhost:10809"

或 开启Clash的 TUN模式


fix: onRequest callback not interrupting requests

Fixes #395
The response type coming back from plugin.onRequest(req, ctx) is
const response: void | {
    response: Response;
} | {
    request: Request;
}

I suspect that because of that union type, we were returning response although it is not an actual Fetch Response. For this reason, the request was actually not interrupted.
This fix is a pretty simple solution, I also considered using a type guard, let me know what you think :)
function hasResponseInterruptor(response: void | { response: Response } | { request: Request }): response is { response: Response } {
	return response !== undefined && typeof response === 'object' && 'response' in response;
}

Yeah, I think this should work. it looks good to me.


fix: allow object literals without _isBignumber flag

Fixes Rehydration after structural cloning #317.
An obj { s: 1, e: -2, c: [ 50 ] }  is not a BigNumber, hence BigNumber.isBigNumber(obj) is false, but you can construct a BigNumber from it: new BigNumber(obj).
This simplifies serialization/deserialization, since BigNumber values can be sent over the wire/inter process communication.
const someFn = (valueThatMightBeSerializedOrNot: BigNumber) => new BigNumber(valueThatMightBeSerializedOrNot).plus(1);
const bnValue = new BigNumber(1);
const fromJsonValue = JSON.parse(JSON.stringify(bnValue);

assert.strictEqual(someFn(bnValue).toString(), someFn(fromJsonValue).toString())

I remain reluctant to replace the _isBigNumber === true test with your suggested typeof triplet on probably the hottest code path in the library (regardless of whether or not it would seem to make any significant difference in performance).
Deserialization after structured cloning is pretty straightforward as it is:
const serialize = bn => JSON.stringify(structuredClone(bn));
const deserialize = json => new BigNumber({ _isBigNumber: true, ...JSON.parse(json) });

const a = new BigNumber('1.23');
const b = deserialize(serialize(a));

console.log(a.eq(b));    // true

I apologise for the late response, and thank you for your efforts.


JPEG-XL support in Fiji/ImageJ

Is your feature request related to a problem? Please describe.
ImageJ, and its helper app Fiji are used extensively in microscopy, the backbone of biology research. Researchers generally store images from microscope cameras in .tiff format, but there are a lot of little image manipulations necessary to even view these images. For instance, in epifluorescence microscopy, there will be multiple color channels that are imaged separately using a filter wheel, and contrast is not at all normalized. This happens to also apply to astrophotography imaging. Fiji allows scientists to look at these raw tiff images before putting them through an extensive image correction pipeline. Often, scientists save these images right out of Fiji, and don't need the heavy lifting of registration, background subtraction, and the like that comes with these pipelines. The amount of data that is being collected in .tiff is unsustainable without some form of fundemental technological leap in disk storage, and labs spend millions of dollars buying hundreds of petabytes of on-site storage because they cannot afford the costs of cloud solutions. In astronomy, this data is often stored on magnetic tape, and then physically trucked offsite, because the high-throughput data transfer pipelines that exist are insufficient for the volume of data they are collecting.
Describe the solution you'd like
Implement a JPEG-XL plugin for ImageJ and bundle with Fiji.
Describe alternatives you've considered
Currently, we have engineering integrating the conversion in the imaging pipeline itself. We keep an eye on the other actively-maintained, free, open source, and platform-agnostic solutions. We also have an ML-based compression that we're using concurrently. Until the adoption of JPEG-XL is more complete, and more labs are courageous enough to publish with compressed images, we still have to maintain the original .tiff images. Nothing else out there beats ImageJ through Fiji.
Additional context
There are a lot of imaging pipelines built on ImageJ because it can be used locally on developer and scientist MacBooks, but then also published out to local on-site and cloud infrastructure. Cloud offerings have support for containers, like Docker, but educational institutions and private labs still run almost exclusively on bare-metal and VMs. Operation teams and engineering teams in these institutions are understaffed and overwhelmed because the draw to tech companies and the compensation they can afford is beyond what they can compete with. Most labs affiliated with universities have access to a combination of old-guard engineers and bright-eyed recent college grads. Tools that are mature, free, widely adopted, flexible and have low overhead are the bread and butter of these institutions. But the exponential growth of data is forcing early-adoption of new technologies like JPEG-XL, and they are being shoe-horned in to backend pipelines without front-end support for the scientists. The hope is that this is a win/win, a single change that can both power the back-end and also power the front-end.

The closest to a Java implementation currently is JxLatte, which only supports decoding unfortunately. It may be worth keeping an eye on though

Yeah, and I definitely think it could be done piecemeal. Being able to view the files is more important than being able to convert within ImageJ/Fiji. That can be left up to the imaging pipeline, which often run in language-agnostic or python-based bioinformatics workflow managers, Jupyter notebooks, etc.

There is also a JNI wrapper included in libjxl that could be used for this purpose.


Classification

I believe that there are currently no classification methods (despite being present on the docs- https://pytaxize.readthedocs.io/en/latest/modules/classification.html)

Its in master branch - did you pull down latest changes?


test: walk_back and walk_range

This PR adds a test for the ReverseWalker created using walk_back. This also adds a missing case in the walk_range tests.

@MegaRedHand could u also add a check for invalid ranges (e.g. 3..1, 3..=2)

Sure! An empty range like 3..1 currently produces a walker with a single element (3). Should we change it so it creates an empty iterator? Or should we use an assert / return an error?

Let's return an error in walk_range "if start bound less than end bound throw"

Added the check along with the tests, although I'm not sure what the error should be 🤔 . I left it as an Error::Read(2) for now, but I am open to suggestions.

Codecov Report

Merging #1407 (6eda8a4) into main (804d8bf) will decrease coverage by 29.28%.
The diff coverage is 8.33%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@             Coverage Diff             @@
##             main    #1407       +/-   ##
===========================================
- Coverage   76.64%   47.36%   -29.28%
===========================================
  Files         355      355
  Lines       40463    40532       +69
===========================================
- Hits        31011    19200    -11811
- Misses       9452    21332    +11880

Flag
Coverage Δ

integration-tests
22.52% <0.00%> (-0.10%)
:arrow_down:

unit-tests
37.37% <8.33%> (-33.46%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

crates/storage/db/src/implementation/mdbx/mod.rs
24.35% <0.00%> (-74.76%)
:arrow_down:

...rates/storage/db/src/implementation/mdbx/cursor.rs
58.50% <60.00%> (-19.20%)
:arrow_down:

crates/stages/src/pipeline/event.rs
0.00% <0.00%> (-100.00%)
:arrow_down:

crates/interfaces/src/p2p/priority.rs
0.00% <0.00%> (-100.00%)
:arrow_down:

crates/net/network-api/src/reputation.rs
0.00% <0.00%> (-100.00%)
:arrow_down:

crates/rpc/rpc/src/layers/auth_layer.rs
0.00% <0.00%> (-99.21%)
:arrow_down:

crates/storage/libmdbx-rs/src/lib.rs
4.54% <0.00%> (-95.46%)
:arrow_down:

crates/executor/src/execution_result.rs
3.75% <0.00%> (-95.00%)
:arrow_down:

crates/stages/src/stages/execution.rs
0.00% <0.00%> (-92.45%)
:arrow_down:

...storage/provider/src/providers/state/historical.rs
0.00% <0.00%> (-91.90%)
:arrow_down:

... and 168 more

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


Meta-Schema validaten fails when files are not referenced with .json

Hi,
when creating a meta schema like...:
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://json-schema.org/draft/2020-12/schema",
  "$vocabulary": {
    "https://json-schema.org/draft/2020-12/vocab/core": true
  },
  "allOf" : [
    { "$ref": "meta/core" }
  ],
  // ...
}

... the validation fails with error loading file:///<path_to_schema>/meta/core: No such file or directory (os error 2) if the file ending is ".json" (for ./meta/core.json), whereas...:
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://json-schema.org/draft/2020-12/schema",
  "$vocabulary": {
    "https://json-schema.org/draft/2020-12/vocab/core": true
  },
  "allOf" : [
    { "$ref": "meta/core.json" } // differs from json-schema
  ],
  // ...
}

... works as expected. This behavior differs from the original json schema and should be fixed.
Kind regards.

I have tried two compile following schema, and it compiles without any error:
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://json-schema.org/draft/2020-12/schema",
  "$vocabulary": {
    "https://json-schema.org/draft/2020-12/vocab/core": true
  },
  "allOf" : [
    { "$ref": "meta/core" }
  ]
}

all schema files from json-schema.org are baked into binary, so it should be able to load them from binary;
if you can reproduce the issue from your end, please attach a simple test case to reproduce.

Here is a simple test case:
dev/projects/boon
at 12:28:16 ➜  boon 2020-12.json
schema 2020-12.json: failed
error loading file:///home/chris/dev/projects/boon/meta/core: No such file or directory (os error 2)

boon.tar.gz

I checked your files. This is not bug. you should use:
"$ref": "https://json-schema.org/draft/2020-12/meta/core"

instead of:
"$ref": "meta/core"

see how sample metaschema look like from here
in the schema I tested it worked fine because it has $id property on top root object, which is used to resolve the relative references.

That's me misunderstanding the documentation, then. Thank you for the explanation.


Update provenance info for SIGNOR data

The provenance for results coming from SIGNOR should reflect the source, e.g. as for CTD: #479

This branch has the SIGNOR and CTD data in the pipeline: https://github.com/NCATS-Tangerine/cam-pipeline/pull/72

As a starting point, verify SIGNOR data are properly loaded and queryable.

[ ] Check if any SIGNOR data is in camdev
[ ] Find a query that returns SIGNOR data
[ ] Write a test that checks whether it has the provenance information we expect (it won't)
[ ] Modify code the API code passes

Waiting on https://github.com/ExposuresProvider/cam-pipeline/issues/76


fix: UI: Support importing kafka connect schema

Fixes: #3234

resubmitted - see https://github.com/atlasmap/atlasmap/pull/3746


NIFI-6510 [WIP] - Analytics framework

Description of PR
Currently NiFi has lots of metrics available for areas including jvm and flow component usage (via component status) as well as provenance data which NiFi makes available either through the UI or reporting tasks (for consumption by other systems). Past discussions in the community cite users shipping this data to applications such as Prometheus, ELK stacks, or Ambari metrics for further analysis in order to capture/review performance issues, detect anomalies, and send alerts or notifications. These systems are efficient in capturing and helping to analyze these metrics however it requires customization work and knowledge of NiFi operations to provide meaningful analytics within a flow context.

In speaking with Matt Burgess and Andy Christianson on this topic we feel that there is an opportunity to introduce an analytics framework that could provide users reasonable predictions on key performance indicators for flows, such as back pressure and flow rate, to help administrators improve operational management of NiFi clusters. This framework could offer several key features:

- Provide a flexible internal analytics engine and model api which supports the addition of or enhancement to onboard models
- Support integration of remote or cloud based ML models
- Support both traditional and online (incremental) learning methods
- Provide support for model caching (perhaps later inclusion into a model repository or registry)
- UI enhancements to display prediction information either in existing summary data, new data visualizations, or directly within the flow/canvas (where applicable)

For an initial target we thought that back pressure prediction would be a good starting point for this initiative, given that back pressure detection is a key indicator of flow performance and many of the metrics currently available would provide enough data points to create a reasonable performing model. We have some ideas on how this could be achieved however we wanted to discuss this more with the community to get thoughts about tackling this work, especially if there are specific use cases or other factors that should be considered

This closes NIFI-6510.

For all changes:

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

[ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

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

[ ] Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

[ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
[ ] Have you written or updated unit tests to verify your changes?
[ ] Have you verified that the full build is successful on both JDK 8 and JDK 11?
[ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
[ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
[ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
[ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered?

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.

Relabeling this PR as WIP due to newer commit to support enable/disable of feature (with disable being the default).  @rfellows this will require an update to the UI to ensure that user can determine if predictions are enabled vs available. Once that commit is available I'll remove WIP from heading.

Extracted out predictions into their own ConnectionStatusPredictionsSnapshotDTO. @rfellows the UI field is now just predictions and will be null if predictions are not available. The fields within predictions are exactly the same, just encapsulated within their own object now.
@markap14 @YolandaMDavis @mattyb149

Thanks guys. All of my major concerns are addressed at this point, I think. I'm a +1 to merge.


Performence issue

I've tried to do a simple stress test.
I opened a websocket from client to server and sent frames of 4096 bytes.
On my computer I got to ~50Mbps.
Increasing the frame size to 40960 didn't seem to change much.
Using a profiler I was able to find a possible issue.
The utils.apply_mask seems to use all of my CPU.

I have raised a question on how to improve the performance in stackoverflow:
I applied the fix and now it is, at least, 3 times faster...

Would it be worth adding the stress test to the repo for future reference? Are benchmarks already being stored somewhere?

So you are using the pure Python version of apply_mask, did you try the C version? BTW, there are binary wheels for them.

Just for clarity: I'm running this on a Linux machine, I'm using python 3.5 and websockets version 3.4
@messense Not intentionally, but yes, my program seems to be using the pure python version of apply_mask. I did not do anything other that installing websockets using pip.
I was not aware of that pull request (that could have saved me some time :-)

@chookapp Try upgrade your pip to latest version (pip install -U pip) then reinstall websockets (might need to clean pip cache first, usually located at ~/.cache/pip), it should use the binary wheel automatically.

Thanks.
Apparently my pip was indeed old.
After re-installing the websockets I was able to push ~850mbps which is also my network capacity.


Categorise the various compilers by licence.

Organised the compilers into closed/open source and by which licence if any. This might clear up some of the issues new users have regarding GNAT.

Hi, you merged too early, I just pushed some other commits to this branch to merge.


KOGITO-6449: [DMN Designer] Regression for setting name/dataType for BKM nodes, after KOGITO-4195

I found out another issue during the development of this ticket, but it requires more time so I decided to create another ticket:
Undo/Redo does not work for BKM nodes..

The (build) kogito-tooling-stunner-editors check has failed. Please check the logs.

The (build) kogito-tooling-stunner-editors check has failed. Please check the logs.

@jomarko Rebased.

@danielzhe please have a look on my additional test https://github.com/danielzhe/kogito-tooling/pull/1. Once it is merged into #771 and CI is green I can approve.

The (build) kogito-tooling-stunner-editors check has failed. Please check the logs.

@danielzhe one more thing, sonar reports some unused private field https://sonarcloud.io/project/issues?id=org.kie.kogito%3Akogito-tooling&pullRequest=771&resolved=false&sinceLeakPeriod=true&types=CODE_SMELL would you mind to remove it please?

Yes, I think I lost it in the merge. Thank you, already cherry-picked it! Waiting for the green now, @jomarko

@jomarko The same tests failed here: https://github.com/kiegroup/kogito-tooling/pull/783

@yesamer hello, #783 failed test is different. It is also PMML test but not the same as #771. I will try to have a look on both locally.

@jomarko Thus, we can merge this PR or should we wait until we clarify/fix that failing test?

I think merge is fine.

@tiagobento Can you please merge it? About the failed test please read above ^

@danielzhe Please disable the tests that are failing randomly and let's get this PR to be green. Also, please make sure to report the disabled tests on https://issues.redhat.com/browse/KOGITO-6643.

The (build) kie-tools-stunner-editors check has failed. Please check the logs.

@danielzhe just a friendly reminder, report disabled test into https://issues.redhat.com/browse/KOGITO-6643

Yes, I'm waiting to see if I get a green before report. Thank you, @jomarko

The (build) kie-tools-stunner-editors check has failed. Please check the logs.

@jomarko Can you please finalize this? thx u!


Propagate varied gravity to AEOLUS

Currently gravity acceleration is not propagated to SOCRATES as input parameter; needs adaption of AEOLUS and testing.

According to Nathan Mayne, the regular version of SOCRATES does not have a nice way to handle this - in the UM adaption of SOCRATES they've changed how planetary parameters are passed around. We'd need to implement surface gravity as an input parameter ourselves. I'm checking with some other people to see if they've tried this before.
The alternative is to simply change the the value of grav_acc in the code and recompile SOCRATES every time. This isn't ideal but it something to consider if other options are unfeasible.

According to James Manners, an upcoming update to SOCRATES will allow planetary parameters to be passed in via a namelist file. This change will be merged into the main branch of SOCRATES "fairly soon".
It's addressed in this ticket which is the same one which will simplify the spectral file tools. This change also relates to this issue in the AEOLUS repository.
There's an example namelist file for Mars here.

Ok, seems like recompiling the code will be way to go for the time being. Is the recently updated SOCRATES version then truly the best bet?


Need to have some studies about what attributes are copied by ltfs_ordered_copy

Is your feature request related to a problem? Please describe.
At this time, I don't have any studies about what attribute is copied by ltfs_ordered_copy program.
It uses shutils.copy() by default and shutils.copy2() when -p, --preserve is specified. But there is no specification what attributes are copied exactly.
Describe the solution you'd like

Need to study what shutils.copy() and shutils.copy2() copy to destination
Support same functionality of cp -p and cp -a into ltfs_ordered_copy

Additional context
May be shutils.copy() and shutils.copy2()doesn't copy extended attribute at all. Extended attribute shall be copied when -a option is specified.

Hi @ruixiaoLee,
Feel free to use this issue if you want to make a PR to this project.

cp -p copies mode,ownership and timestamps; cp -a copies all the attributes including mode,ownership,timestamps,context, links, xattr(according to man page)
shutil.copy() copies mode(permission bits)
shutil.copy2() copies mode, last access time, last modification time, and flags
Neither shutil.copy() nor shutil.copy2() can copy xattr and ownership
Now ,ltfs_ordered_copy -a can copy mode,timestamps and xattr , which is slightly different from cp -a because ownership and links are not considered
Now , ltfs_ordered_copy -p can copy mode and timestamps which is slightly different from cp -p because ownership and links are not considered

shutil.copy()
shutil.copy2()
cp -a
cp -p
ltfs_ordered_copy -a
ltfs_ordered_copy -p

mode
O
O
O
O
O
O

timestamps
X
O
O
O
O
O

ownership
X
X
O
O
X
X

xattr
X
X
O
X
O
X

links
?
?
O
X
?
?

HI,
Thank you very much for your contribution. It looks great!


accept array of classes in noPanClassName

Context
Sometimes we do not have control over the library we use inside a node and cannot add the nopan class everywhere.
The workaround is to fork the library and add the nopan ourselves but this increases maintenance burden & cost
Ask
Could noPanClassName on ReactFlow component accept an array of selectors or an array of classes instead of just a string?

Can you elaborate a little more on you case? How it is not possible to add the noPan class to certain elements?

The elements are inside a library I do not own

I'm not quite sure if this wouldn't introduced new problems though.
Let's say I use some library for a table and I want to set nopan on a table-cell that uses the class name cell.
Now I pass an array of class names to noPanClassName
<ReactFlow noPanClassName={['nopan', 'cell']} ...>

What would happen is that every element (nodes and edges) would receive two class names now since all elements receive the noPanClassName as well
// wrapNode.tsx - this is an internal ReactFlow component wrapper for nodes

// ... some code

return (
  <div
    className={cc([
      'react-flow__node',
      `react-flow__node-${type}`,
      {
        // this is overwritable by passing `nopan` as a class name
        [noPanClassName]: isDraggable, // <--- this would now end up being multiple class names
      },
      className,
      {
        selected,
        selectable: isSelectable,
        parent: isParent,
        dragging,
      },
    ])}
// more code

So your node suddenly would receive styles that are applied to the cell class name, which obviously isn't what you intended to do - the intention was that any element with the cell class name would also just be ignored by panning.
I don't know if a new prop should be introduced for this, if there's really enough use-cases to warrant that or not but I believe you should be able to do this yourself without the new to pass an array of class names.
// let's query the elements that should have the `nopan` class name and add it ourselves
useEffect(() => {
    // select all elements with the `cell` class name
    const cells = document.querySelectorAll('.cell');

    cells.forEach(cell => {
	  // add the `nopan` class name
      cell.classList.add('nopan');
    });
}, [])

I agree with @bcakmakoglu here. I think there are plenty of possibilities to achieve what you are trying to do. Adding the nopan class to the elements you "don't control" programmatically sounds like a cleaner solution.

indeed bcakmakoglu has a good point regarding classes that could possibly be targeted when developer do not want them to be targeted. However, document.querySelectorAll doesn't seem like an optimal solution. It is not available at server side rendering


feat: support incremental build when composite is true

Summary
Related Links

Checklist

[ ] Tests updated (or not required).
[ ] Documentation updated (or not required).

Damn! It's really hard to align buildinfo behaviour with tsc command line


Auto Full screen draggable view on screen rotation?

i want to show video view in full screen using draggable view when we rotate to landscape mode.
but i am having some problem . please help me to solve this problem

#49 the same opened implementation.

i want to use this same as youtube.... when in portrait work as default but  when landscape video is full screen.
thank you

Take a fork! I will not do it for you now.

please guide me a little bit... i dont know what to do..

@ppamorim  is this issue duplicated?

@pedrovgs Yes. This feature (rotate to fullscreen) need to be implemented out of box. But use the same ideia/methods of #49.

@bilalilyas90
if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
draggablePanel.setTopViewHeight(draggablePanel.getHeight());
draggablePanel.initializeView();
		Toast.makeText(getActivity(),"landscape",Toast.LENGTH_SHORT).show();
	}
	else if(getResources().getConfiguration().orientation == Configuration
			.ORIENTATION_PORTRAIT) {
		Toast.makeText(getActivity(), "portraite", Toast.LENGTH_SHORT)
		     .show();

		Resources r = getResources();
		int px = (int) TypedValue.applyDimension(
				TypedValue.COMPLEX_UNIT_DIP, 200, r.getDisplayMetrics()
		);
		draggablePanel.setTopViewHeight(px);
		draggablePanel.initializeView();

	}

this will give sort of full screen, but need to fix problem when comming back:)

@frakc
thanks... This works great but when in landscape mode , when i click on top view it goes to minimize..
and in layout i even used this draggable_view:enable_click_to_minimize_view="false"  but still it goes to minize view... can u help me here ?

@bilalilyas90  try this tweak
https://github.com/pedrovgs/DraggablePanel/issues/29
I did not tested it by myself but i hope it will help

@frakc
thank you alot.... this tweak helped me... :)

one more thing... i am using vitamio player in my app with draggable panel draggableview and when I minimize the dragview the screen of video goes to white in minimized view but is good in maximized view... can u help me here too??

@bilalilyas90  try to replace your player with standart videoview. If behaviour consistent - it sum internal bug, if not - contact your payer developers as it might be part of player protection ( like in youtube, which stops when view overlaping is detected)

@frakc
I am using vitamio player library.... sometimes video comes correct in minimized view and sometimes when I am in minimized state(at end of screen) screen goes white but when in maximized state and while dragging it is working fine... please help me.. screenshots are attached
http://prntscr.com/69yge2 (while dragging)
http://prntscr.com/69yfpa (in minimized state)

@bilalilyas90 sorry i am unexpirienced with draggablepanel and vitamio,  I simply dont have any idea

@frakc no problem... and by the way thanks for the help..

@frakc Vitamio Player use SurfaceView. SurfaceView has problems with resize and transform operation. You need use TextureView for it. I'll report to Vitamio dev...
The problem is here:
https://github.com/yixia/VitamioBundle/blob/master/vitamio/src/io/vov/vitamio/widget/VideoView.java

Please, study this branch:
https://github.com/ppamorim/DraggablePanel/tree/textureViewSample

@frakc when I add the onConfigurationChanged code you added above the video goes to landscape as expected. However, when I go to portrait after this, minimize the video, maximize it again and then rotate the device to go portrait again, the landscape video is not the correct width.
Is this the same for anyone else?

@ninja-tortoise
yes I am also having same problem :(

dear  pedrovgs why after added the configuration code above on click the video minimize?? any help plz

@HagerMagdy
Its because of minimise check
if(slideOffset > MIN_SLIDE_OFFSET && !isClosed() && isMaximized()) {
			minimize();
		}

you can ither edit way of minimise check or check orientation to perform or not perform some actions
if(getResources().getConfiguration().orientation == Configuration .ORIENTATION_PORTRAIT)


XAML compiler generates invalid C++/WinRT code for bound hstring property

Describe the bug
The code generated to read an hstring property in an x:Bind is missing boxing, and is causing the following error:
error C2679: binary '=': no operator found which takes a right-hand operand of type 'winrt::hstring' (or there is no acceptable conversion)
Steps to reproduce the bug

Create a C++/WinRT UWP project
Define a page and a view model with this IDL:

interface IViewModel
{
    String Name{ get; };
};

[bindable]
[default_interface]
runtimeclass ViewModel : IViewModel
{
    ViewModel();
}

// MainPage.idl
[default_interface]
runtimeclass MainPage : Windows.UI.Xaml.Controls.Page
{
    MainPage();

    static Windows.UI.Xaml.DependencyProperty ViewModelProperty{ get; };
    IViewModel ViewModel;
    Boolean IsReady{ get; };
}

Implement the corresponding C++ code
Add the following xaml; make sure x:Load is present, the error doesn't appear without it:

<!--  MainPage.xaml  -->
<Button
    x:Name="myButton"
    x:Load="{x:Bind IsReady, Mode=OneWay}"
    ToolTipService.ToolTip="{x:Bind ViewModel.Name, Mode=OneWay}">
    Click Me
</Button>

Compile the project; compilation will fail with
...\Generated Files\MainPage.xaml.g.hpp(259,21): error C2679: binary '=': no operator found which takes a right-hand operand of type 'winrt::hstring' (or there is no acceptable conversion)
at

void Update_ViewModel_Name(::winrt::hstring obj, int32_t phase)
{
    if((phase & ((1 << 0) | NOT_PHASED | DATA_CHANGED)) != 0)
    {
        // MainPage.xaml line 14
        if (obj2)
        {
            // obj is properly boxed here
            Set_Windows_UI_Xaml_Controls_ToolTipService_ToolTip(obj2, ::winrt::box_value(obj), std::nullopt);
        }
        else
        {
            // obj is not boxed here
            obj2ToolTipDeferredValue = obj;
        }
    }
}

Expected behavior
This code compiles the string property is properly bound.
Screenshots
No response
NuGet package version
None
Windows version
Windows 11 (22H2): Build 22621, Windows 11 (21H2): Build 22000
Additional context
Workarounds:

The issue doesn't repro without x:Load. If using Visibility instead is acceptable, the code will compile and work.
Manually box the string property:

// BindingHelpers.idl
[default_interface]
static runtimeclass BindingHelpers
{
    static IInspectable ToObject(String value);
}

<!--  MainPage.xaml  -->
<Button
    x:Name="myButton"
    x:Load="{x:Bind IsReady, Mode=OneWay}"
    ToolTipService.ToolTip="{x:Bind local:BindingHelpers.ToObject(ViewModel.Name), Mode=OneWay}">
    Click Me
</Button>

Does this also repro in WinUI 3?

Duplicate of neglected old issue: #4787.


Add logo to README [SAME VERSION]

What this PR does / why we need it:
We have a logo! Let's show it off.
Special notes for your reviewer:
Also, removed some image files that appear to be duplicates.

@flynnduism Are the images I removed here indeed duplicates/ old versions?

@flynnduism Are the images I removed here indeed duplicates/ old versions?

@edrickwong what do you think?

@edrickwong what do you think?

Smaller logo looks good to me. Hoping GitHub will support light/dark mode in readmes soon.

Smaller logo looks good to me. Hoping GitHub will support light/dark mode in readmes soon.


ln: use UResult

Related to #2464

Sorry, some changes happened and it needs rebasing
could you please have a look? thanks

This branch got little bit messy, there is a new PR from a new branch #2540.


While provisioning rke2 custom cluster, taints have invalid format

Using rancher master-head commit id c7f3cce
While provisioning rke2 custom cluster on AWS/DO, taints fail to be applied on the cluster due to invalid format stored in config
Follow the steps to reproduce to create the cluster.
Value stored in config
"node-taint": [
    "key1=value1=NoSchedule:"
  ],

Logs:
Jun 24 20:49:54 shyubu rke2[1375]: E0624 20:49:54.440717    1375 server.go:156] "Failed to parse kubelet flag" err="invalid argument \"key1=value1=NoSchedule:\" for \"--register-with-taints\" flag: invalid t
aint effect: , unsupported taint effect"

Format when taint is applied on a standalone rke2 node as seen in logs is as below
--register-with-taints=key1=value1:NoSchedule

Reproduction:
Not required.
Validation Successful:
Rancher version: master-head b39523882 8/2/21
Rancher cluster type: single-node docker
Docker version: 19.03
Downstream cluster type: rancher-provisioned rke2 custom cluster
Downstream K8s version: v1.21.3-rc1+rke2r2
Validation steps:

Provision an rke2 custom cluster in the dashboard UI. Create a separate pool for workers with a taint on it.

During this process, I observed no issues in the UI or in the rancher server logs as reported originally in the issue (issue appears fixed so far).

Once the cluster is ready, inspect the tainted worker node in the UI.
I noticed that the node yaml appears correct (snippet below):

metadata:
  annotations:
    rke.cattle.io/taints: '[{"key":"testtaint","value":"true","effect":"PreferNoSchedule"}]'
  creationTimestamp: "2021-08-03T18:22:04Z"

I also checked the node in the UI and the taint was successfully applied.
Last, I checked the rke2.io/node-args annotation on the worker in this pool with this taint and it looks correct:
[
  "agent",
  "--node-label",
  "rke.cattle.io/machine=76a86ae5-439a-42ac-a9aa-7d192f7cfe06",
  "--node-taint",
  "testtaint=true:PreferNoSchedule",
  "--server",
  "https://REDACTED:9345",
  "--token",
  "********"
]

Reopening. This is not the proper way to test rke2 custom clusters -- At the time I had closed this I had mistook and rke2 node driver for an rke2 custom cluster :)
I will re-check appropriately this time and then close out if this passes my checks.

Reproduction:
Not required.
Validation Successful:
Rancher version: v2.6-head 7b9a232ac 8/6/21 2:12pm Pacific
Rancher cluster type: single-node rancher server in docker container
Docker version: 19.03
Downstream cluster type: Custom cluster - rke2
Downstream K8s version: v1.21.3-rc4+rke2r2
Validation steps:

Provision an rke2 custom cluster in the dashboard UI. On the 2nd step, click on "Advanced Options" and you'll see the fields for node labels and taints.

Set some labels and taints, provision the custom node(s). SSH in and cat /etc/rancher/rke2/config.yaml.d/50-rancher.yaml we can see that the node labels and taints specified took as per my specifications in the UI:

"node-label": [
    "apples=drool",
    "cattle.io/os=linux",
    "rke.cattle.io/machine=6592aaab-eca1-4111-ae2a-2fe6c880a9de",
    "tacos=rule"
  ],

"node-taint": [
    "bye=byebye:NoSchedule",
    "hi=ohai:NoSchedule",
    "tacos=yesplease:NoSchedule"
  ],


Errenous RequestDuration measurement using ETW

I have been trying to measure per-request response time under KVM as seen from Windows using the methodology described here. The disk is passed through using virtio-scsi to the VM, but the "RequestDuration" value returned by the ETW is always 0. Exact same disk generates correct results when I boot directly from it. I am using Fedora virtio drivers.
Is this because of the fundamental design virtio-scsi driver? Or is the driver not initializing a data structure, flipping a bit, etc?
Thanks for all the efforts!

Hi all,
I tried to reproduce this issue on rhel8.3.1 host, reproduce step was similar with comment#0, I can reproduce this issue.
I tested with a qemu simulated raw file,  did not test with a virtio-scsi passthrough disk. Tried with virtio-blk(viostor) and virtio-scsi(vioscsi) driver, both reproduced this issue, the "RequestDuration" value returned by the ETW is always 0.
Qemu commands:
For virtio-scsi:
-device virtio-scsi-pci,id=scsi0,bus=root2.0, -blockdev driver=file,cache.direct=off,cache.no-flush=on,filename=192SCS126435AWK_test.raw,node-name=my_scsi -blockdev driver=raw,node-name=myscsi,file=my_scsi -device scsi-hd,bus=scsi0.0,drive=myscsi,id=scsi-disk0,serial=whql_test
For virtio-blk:
-blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/win8-64-virtio.qcow2,cache.direct=on,cache.no-flush=off
-blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3
-device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,write-cache=on,bus=pcie-root-port-2,addr=0x0 \
Used version:
kernel-4.18.0-240.11.1.el8_3.x86_64
qemu-kvm-5.1.0-17.module+el8.3.1+9213+7ace09c3.x86_64
seabios-bin-1.14.0-1.module+el8.3.0+7638+07cf13d2.noarch
virtio-win-prewhql-192
Best Regards~
Peixiu

Hi all,
I tried to reproduce this issue on rhel8.3.1 host, reproduce step was similar with comment#0, I can reproduce this issue.
I tested with a qemu simulated raw file,  did not test with a virtio-scsi passthrough disk. Tried with virtio-blk(viostor) and virtio-scsi(vioscsi) driver, both reproduced this issue, the "RequestDuration" value returned by the ETW is always 0.
Qemu commands:
For virtio-scsi:
-device virtio-scsi-pci,id=scsi0,bus=root2.0, -blockdev driver=file,cache.direct=off,cache.no-flush=on,filename=192SCS126435AWK_test.raw,node-name=my_scsi -blockdev driver=raw,node-name=myscsi,file=my_scsi -device scsi-hd,bus=scsi0.0,drive=myscsi,id=scsi-disk0,serial=whql_test
For virtio-blk:
-blockdev node-name=file_image1,driver=file,auto-read-only=on,discard=unmap,aio=threads,filename=/home/kvm_autotest_root/images/win8-64-virtio.qcow2,cache.direct=on,cache.no-flush=off
-blockdev node-name=drive_image1,driver=qcow2,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3
-device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,write-cache=on,bus=pcie-root-port-2,addr=0x0 \
Used version:
kernel-4.18.0-240.11.1.el8_3.x86_64
qemu-kvm-5.1.0-17.module+el8.3.1+9213+7ace09c3.x86_64
seabios-bin-1.14.0-1.module+el8.3.0+7638+07cf13d2.noarch
virtio-win-prewhql-192
Best Regards~
Peixiu

I do have some patch set to deal with IoTargetRequestServiceTime notification
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/nf-storport-storportnotification
Honestly, I didn't find it very useful for tracing performance issues, mostly because the same results can be obtained
by checking the difference between two time stamps - when a particular SRB was completed and when it was issued.
However, I can submit my patches if you think that it still can be useful.
Cheers,
Vadim

I do have some patch set to deal with IoTargetRequestServiceTime notification
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/nf-storport-storportnotification
Honestly, I didn't find it very useful for tracing performance issues, mostly because the same results can be obtained
by checking the difference between two time stamps - when a particular SRB was completed and when it was issued.
However, I can submit my patches if you think that it still can be useful.
Cheers,
Vadim

I do have some patch set to deal with IoTargetRequestServiceTime notification
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/nf-storport-storportnotification
Honestly, I didn't find it very useful for tracing performance issues, mostly because the same results can be obtained
by checking the difference between two time stamps - when a particular SRB was completed and when it was issued.
However, I can submit my patches if you think that it still can be useful.

Thanks for your explanation, I got it, and I agree to close this issue.
Best Regards~
Peixiu

I do have some patch set to deal with IoTargetRequestServiceTime notification
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/storport/nf-storport-storportnotification
Honestly, I didn't find it very useful for tracing performance issues, mostly because the same results can be obtained
by checking the difference between two time stamps - when a particular SRB was completed and when it was issued.
However, I can submit my patches if you think that it still can be useful.

Thanks for your explanation, I got it, and I agree to close this issue.
Best Regards~
Peixiu


Improve drives dashboard

This is an improvement of rearranging the stats as suggested in other posts.

Thank you!


archetypes nexus repo hasn't been updated for almost two years

Check out:
https://repo.adobe.com/nexus/content/groups/public/com/adobe/granite/archetypes/aem-project-archetype/
As a result, you get an almost two years old version of aem archetypes if you use following command:
mvn archetype:generate

+1

Well, there hasn't been an update that we released so there is no error here :-) Is there anything in particular that  you are missing?


New feature: Display multiple fields for relationships

Description:
I'm trying to allow to display more than just one field for relationships and for lookups in insert and update operations.
I made some progress but i need some help in completing the integration with voyager.
See here:
https://github.com/banh-gao/voyager/tree/feat.multicol-rel-display

This should be made as a pull request.

This will be possible in a future release. There has been significant progress already made.  Not saying you need to stop your progress, but just don't want you to waste your time.  No expected release date at this time

Good, but I needed it now :)
Can you give me a reference on where to look and maybe to contribute on it?

It's part of a major reorganization we're doing for 2.0, so we're keeping a fairly tight leash on it right now.  Once the overall reorg is more concrete and we have documentation in place, we'll open it up for community contribution.

Ok, I understand. Looking forward for 2.0.


Organize flask server into modules; This prepares splitting routes fr…

…om main.py

thanks! this is a great start, i think we can split them down more so it's all functionally grouped, e.g. group kg, gni, chart api related code together.

Yep, that's my plan for today. Organize the routes as blueprints. Made some update on script. Can you take a look again. Thanks


Allow customization and removal of version prefixes.

Gentlemen; imagine, if you will, a simpler world. A world unfettered by superfluous clutter. A cleaner, articulate, more eloquent way of being. That world is here and now.
This PR removes (by default) the v prefix for all version type shields. It also allows configuration of custom prefixes by way of the GET parameter prefix.
Think about it, why would you want FILTHY old this:

When you could have AMAZING new this:

Or even GLORIOUS this:

What is this sorcery? I'll let zero-time Academy Award® winner, Leonardo DiCaprio tell you in his own words:

L-Dizzle is right, and you know it. A merge for this PR is a merge for the future. Not just your future, but for your children's futures. The future of the human race as we know it.
Merge today!

Haha! Thanks.
I like succinctness, but having the v at the start was a conscious decision. For the example badge you give, the meaning is obvious. However, some badges would look like hackage: 3. The added v guarantees that we understand it to be a version.
Maybe we could make it so that if there are two dots, we don't put the v? It would make it a bit inconsistent, and I would prefer asking people.
As for the ?prefix= parameter, I try to ensure that all query parameters have meaning for any badge, to avoid an explosion of parameters and simplify the cache system.

@ezzatron I like your style! :)
I prefer sticking with the v though, as it’s clearer.

No worries, I figured it would be a bit controversial. I'm happy to re-submit with v still being the default, but allowing removal via &prefix= if that would be preferred?

@ezzatron Unfortunately, there wasn't an overwhelming majority in favour of that change.
As for the ?prefix= parameter, I try to ensure that all query parameters have meaning for any badge, to avoid an explosion of parameters and simplify the cache system.


Thanks for sharing the code, but I recommend the new readers to carefully make decision on using this repo.

Since I found many errors in this version of re-implementation. It took me way much time on debugging this repo than just re-writing everything myself.

did you remember how to train this project?


Incorrect cursor over popup in IE11 if map cursor changed

If I change map cursor with css rule
.leaflet-container {
    cursor: crosshair
}

then this 'crosshair' cursor is also shown above popup. You can check this on tutorial page: http://leafletjs.com/examples/quick-start-example.html
Tested on IE11 + IE8-10 in emulation mode. OS Win7.
The problem exists for 0.7.5 and 1.0.0-b1
Can this be fixed without setting css cursor value for each element inside the popup pane (I have a form inside the popup)?

.leaflet-container { cursor:crosshair; }
.leaflet-popup-pane { cursor:default; }

Seems to work for me. Leaflet 7.7.0, Tested on IE7/8/9, firefox 42, chrome 46

This combination seems to work for me as well, even for 0.7.5. Hmm... probably I was applying popup styling to a wrong element.

The problem with setting .leaflet-popup-pane { cursor: default; } is that it overrides cursors for text and interactive elements inside the popup. It seems that IE neither supports cursor: auto nor cursor: initial, which is perhaps why this bug exists.
Is there still interest in solving this bug, or is it time to close this issue?

Closing this issue as we have decided to drop support for Internet Explorer in a future version of Leaflet (see #6136).


Tree shaking not working

Tree shaking not working when running application using remix-fastify.
https://github.com/ziimakc/remix_tree_shaking
Steps to reproduce:

run pnpm i
run pnpm build
run pnpm start
open browser network tab and check for ~1mb package
run pnpm start:works
open browser network tab and see that tree shaking works as expected with no packages more than ~0.1mb of size

try setting NODE_ENV to production

@mcansh thanks, it works

Y


Error

I get this error:
Warning: require(C:\xampp\htdocs\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\bootstrap\autoload.php on line 17
I am using XAMPP with Technic solder

Windows Isn't supported and you will not get help.


Missing docstring for increment_index and duplicate docstring for ids

Just started playing with Chroma. Pretty easy to get started. I'll open a couple of issues for rough edges as I see them.
First off: looks like you're missing a docstring entry increment_index. Likely a copy/paste error since ids are not optional?
https://github.com/chroma-core/chroma/blob/ce0bc897776f9bcdd5df4397e6ce5e7bd695f986/chromadb/api/models/Collection.py#L79
# Collection.py
...
    def add(
        self,
        ids: OneOrMany[ID],
        embeddings: Optional[OneOrMany[Embedding]] = None,
        metadatas: Optional[OneOrMany[Metadata]] = None,
        documents: Optional[OneOrMany[Document]] = None,
        increment_index: bool = True,
    ):
        """Add embeddings to the data store.
        Args:
            ids: The ids of the embeddings you wish to add
            embedding: The embeddings to add. If None, embeddings will be computed based on the documents using the embedding_function set for the Collection. Optional.
            metadata: The metadata to associate with the embeddings. When querying, you can filter on this metadata. Optional.
            documents: The documents to associate with the embeddings. Optional.
            ids: The ids to associate with the embeddings. Optional. <-- Update this?
        """

Also in chromadb/api/init.py
@abstractmethod
    def _add(
        self,
        ids: IDs,
        collection_name: Union[str, Sequence[str]],
        embedding: Optional[Embeddings],
        metadata: Optional[Metadatas] = None,
        documents: Optional[Documents] = None,
        increment_index: bool = True,
    ):
        """Add embeddings to the data store. This is the most general way to add embeddings to the database.
        ⚠ It is recommended to use the more specific methods below when possible.

        Args:
            collection_name (Union[str, Sequence[str]]): The model space(s) to add the embeddings to
            embedding (Sequence[Sequence[float]]): The sequence of embeddings to add
            metadata (Optional[Union[Dict, Sequence[Dict]]], optional): The metadata to associate with the embeddings. Defaults to None.
            documents (Optional[Union[str, Sequence[str]]], optional): The documents to associate with the embeddings. Defaults to None.
            ids (Optional[Union[str, Sequence[str]]], optional): The ids to associate with the embeddings. Defaults to None. <-- Change required
        """
        pass

ids does not default to none and I guess it is not optional as mentioned in docstring.

we are deprecating increment_index so im closing this issue


import/export

import/export keyboard keys positions, style and other settings

done

Hi there, are there future plans to add import and export of key labels?

actually yeah it could be nice feature, i just didnt think about it at the time. ill make a new ticket for this but not sure when ill work on this but im open to reviewing merge request.


Self Edges need to be a larger loop

This is a self-loop
http://cl.ly/2V0i1R2z3o0Z02020G39
It should be larger and not just an arrow to myself

I'd also really like to see self edge support, e.g.
graph.addEdge "kiwi", "kiwi",  { label: "still a kiwi", directed: true }

As of now, I don't plan to implement this anytime soon... but it's on the list of ideas. PRs are welcome though.


Need clarification and better documentation on socket_timeout, socket_connect_timeout, and blocking commands

Version: 2.10.6 but thinking about upgrading to 3.3.11 to hopefully address this and need clarification
Platform: Ubuntu 16.04 on Python 3.7
Description: We've having an issue that is making us consider upgrading our stack to 3.3.11, but we need some clarification on some things that are insufficiently documented and that I've been unable to determine from reading through the code.
The issue at hand is that, when Sentinel fails over due to a hard failed master, the clients will block for many minutes hoping to receive some response from the now-dead master, and then the Sentinel client doesn't appear to load new master info as far as I can tell. We think what we need to employ here is some socket timeouts (socket_connect_timeout and/or socket_timeout) and possibly also the new health_check_interval parameter added to 3.3.x.
But I have some concerns around these issues because the documentation doesn't really explain what the three arguments in question do. So here are my two questions that I'm hoping to get quick answers for and also hoping that the documentation can be updated to reflect.

Is health_check_interval only useful when socket_timeout is also set? Or socket_connect_timeout? Or can it be useful with either and more useful with both? Basically, how do these three options interact?
I get that socket_connect_timeout is about timing out the connection-establishment process and socket_timeout is about send and receive, but what isn't clear to me is how socket_timeout deals with blocking Redis commands like BLPOP. When we call commands like LLEN or RPUSH, we would like those to time out very quickly (say, ~2-3 seconds). However, we also make BLPOP calls, and for those we use anything from timeout=2 to timeout=120 (depending on the use case) to wait for data to be available on the list. So, given  that, if we have socket_timeout set to 5 seconds and we call BLPOP with timeout=120, will it timeout in 5 seconds (bad) or 120 seconds (intended)? If 5 seconds, can the blocking commands be modified so that their timeouts override socket_timeout if higher than socket_timeout?

health_check_interval can be useful even when socket_timeout is not set. When health checks are enabled by setting health_check_interval, a connection that has been idle for >= health_check_interval seconds will attempt a roundtrip ping/pong check to the Redis server just before sending a command. If the ping/pong fails, the socket connection is closed and re-established. Assuming the post-reconnection ping/pong is successful, the actual command is then executed and its response returned. The goal of health checks is to make it safe for redis-py to handle various types of connection errors without the user needing to try/except around every call to Redis in their code.
socket_timeout can be used in conjunction with this. If you're running in an environment where TCP connections can become stalled (often due to various networking hardware between the client and server), socket_timeout will prevent any command, including the health check ping/pong, from waiting more than socket_timeout seconds.
socket_timeout knows nothing about Redis commands that are blocking like BLPOP. The timeout argument to BLPOP (and a handful of other commands) instructs the Redis server to return a null reply after timeout seconds if the list(s) are still empty. If you're using socket_timeout, then you should be specifying a timeout to BLPOP that is less than the socket_timeout value. The strategy below works well:
r = redis.Redis(..., socket_timeout=5)

while True:
    response = r.blpop('my-list', timeout=3)
    if response is not None:
        break
# do stuff with response here...

All of that information is very helpful. I think you could just copy and paste most of that into the documentation with a bit of cleanup and it would satisfy the underlying issue of this bug report (missing documentation).
I would like to explore the socket_timeout relationship with blocking commands a bit more, though. I spent some more time this morning reading through some of the code in redis-py and had already came to the same conclusion myself, but I wonder if this is something we can improve. It would require adding a timeout kwarg to several methods in the stack between the command method (e.g., blpop) and the socket (which AFAICT is Client.execute_command [already has **options we can use], Client.parse_response [already has **options we can use], Connection.read_response, PythonParser.read_response, and finally SocketBuffer.readline [SocketBuffer._read_from_socket already has a custom_timeout argument]).
I'm thinking along the lines of this: Blocking commands that accept a timeout currently merge that timeout into the arguments sent with the command. The change I'm suggesting is that these commands also send that timeout to execute_command. It pops the timeout (if it exists) off its **options (so as not to  pass them elsewhere) and sends it to parse_response, which pops it of its **options and sends it to read_response and then read_response and then readline and then _read_from_socket. Then, at this point, _read_from_socket already has logic in place to temporarily  override and then restore the timeout.
This is a simplification, it would be a bit more complicated than this, because there are two different parsers, etc., but I think you get the gist of what I'm suggesting.
 If so, would you prefer to implement it yourself, or is a pull request the quickest way to knock out something like this?

If such an improvement was made, we would need to pad the override to socket_timeout slightly. For example, r.blpop('my-list', timeout=5) would want to send timeout=5 to Redis but would want to override socket_timeout to something > 5. If both were set to 5, the client's overridden socket_timeout would in general be triggered first and you might lose a valid value from the server that came in at the 4.9 second mark.
And I could see a desire for that padding to be controllable by users. There are some edge cases where folks use redis-py in a client application to talk to a remote Redis server over the internet. In such a case you'd probably want a multi-second padding on socket_timeout to account for random internet latency. For the more typical use case of having a Redis server in close proximity to the client, you might want to only pad 1 second (or perhaps a fraction of a second) to the timeout.
I do agree with you that it would be nice for developers to be able to reliably use BLPOP with a timeout without having to know or care about how the socket_timeout is configured in various environments outside of their control.
Perhaps an easier way (both for redis-py and for users to reason about) might be to make the while loop strategy above more convenient. We could build a helper that encapsulated the while loop and specified a timeout value that was somehow based on the client's socket_timeout configuration. Such a helper could accept a jitter value (I'm not sold on the name) with a reasonable default (say 1 for this example). It would then compute the timeout value to pass to Redis using socket_timeout - jitter.
r = redis.Redis(..., socket_timeout=5)

def helper(client, command_func, keys, jitter=1):
    command_timeout = None
    socket_timeout = client.connection_pool.connection_kwargs.get('socket_timeout', None)
    if socket_timeout is not None:
        command_timeout = int(socket_timeout - jitter)
        # avoid negative timeouts. also avoid timeout = 0 as that will eat CPU time
        if command_timeout <= 0:
            command_timeout = 1  #??? or maybe 0.5?
    while True:
        response = command_func(keys, timeout=command_timeout)
        if response is not None:
            return response

# and use the helper func
item = helper(r, r.blpop, ['my-keys'])

After writing this, I'm left uncertain whether this is too magical or not.


docs: Fix spelling

Use "an" instead of "a" for ".env file" and use the correct tense.

An environment file or a dot-env file? 😆

True xD


fixing args / directives order according to gql specs

Hello,
We noticed an error while using your lib. Your directives should always be declared after your arguments according to gql specs.
Find more information here.
Hope you can merge this soon :dancers:
Best regards

Thanks for the PR @MorganDbs . That sounds correct at-least from the GraphQL specs.
I will merge the PR and release new version.

Thanks you :)

@vkolgi Hello, sorry to be insistent but will you publish the new version soon ?

@MorganDbs Sorry about that ! I published the new version now.


Add CodeQL Workflow for Code Security Analysis

Summary
This pull request introduces a CodeQL workflow to enhance the security analysis of this repository.
What is CodeQL
CodeQL is a static analysis tool that helps identify and mitigate security vulnerabilities. It is primarily intra-function but does provide some support for inter-function analysis. By integrating CodeQL into a GitHub Actions workflow, it can proactively identify and address potential issues before they become security threats.
For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/).
What this PR does
We added a new CodeQL workflow file (.github/workflows/codeql.yml) that

Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience).
Runs daily.
Excludes queries with a high false positive rate or low-severity findings.
Does not display results for git submodules, focusing only on our own codebase.

Validation
To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code.
Using the workflow results
If this pull request is merged, the CodeQL workflow will be automatically run on every push to the main branch and on every pull request to the main branch. To view the results of these code scans, follow these steps:

Under the repository name, click on the Security tab.
In the left sidebar, click Code scanning alerts.

Is this a good idea?
We are researchers at Purdue University in the USA. We are studying the potential benefits and costs of using CodeQL on open-source repositories of embedded software.
We wrote up a report of our findings so far. The TL;DR is “CodeQL outperforms the other freely-available static analysis tools, with fairly low false positive rates and lots of real defects”. You can read about the report here: https://arxiv.org/abs/2310.00205
Review of engineering hazards
License: see the license at https://github.com/github/codeql-cli-binaries/blob/main/LICENSE.md:
Here's what you may also do with the Software, but only with an Open Source Codebase and subject to the License Restrictions provisions below:

Perform analysis on the Open Source Codebase.

If the Open Source Codebase is hosted and maintained on GitHub.com, generate CodeQL databases for or during automated analysis, CI, or CD.

False positives: We find that around 20% of errors are false positives, but that these FPs are polarized and only a few rules contribute to most FPs. We find that the top rules contributing to FPs are: cpp/uninitialized-local, cpp/missing-check-scanf, cpp/suspicious-pointer-scaling, cpp/unbounded-write, cpp/constant-comparison, and cpp/inconsistent-null-check. Adding a filter to filter out certain rules that contribute to a high FP rate can be done simply in the workflow file.

@decidedlygray Pinging to check in on a possible followup to this PR?

If you've been able to run codeql on this independently and can give me some idea of what kind of findings it's producing that would help
I'd like to have some idea what I'm getting into before merging this PR. I don't want to merge and then the first time it runs it produces a bunch of false positives or other things I'm not able to fix.

@zcutlip Thanks for your comments. We've already gone through a 'data collection' phase where we run CodeQL on >250 repositories, analyzed what kind of bugs show up, and how to avoid this. At this point, we are reaching out to devs with the configurations that we used so that they may personally benefit from a tool that has already been set up for them.

Also note this project is explicitly intended to build and run on MIPS and Arm embedded Linux systems (though in theory it should be fairly portable) and your GitHub workflow doesn't seem to take that into account.

CodeQL is a static analysis tool, and only analyzes source code. You can think of this as a glorified linter to preemptively

If you've been able to run codeql on this independently and can give me some idea of what kind of findings it's producing that would help
I'd like to have some idea what I'm getting into before merging this PR.

Firstly I want to point out that any CodeQL query that results in too many false positives can be filtered out in the workflow:
    # Filter out rules with low severity or high false positve rate
    # Also filter out warnings in third-party code
    - name: Filter out unwanted errors and warnings
      uses: advanced-security/filter-sarif@v1
      with:
        patterns: |
          -**:cpp/path-injection
          -**:cpp/world-writable-file-creation
          -**:cpp/poorly-documented-function
          -**:cpp/potentially-dangerous-function
          -**:cpp/use-of-goto
          -**:cpp/integer-multiplication-cast-to-long
          -**:cpp/comparison-with-wider-type
          -**:cpp/leap-year/*
          -**:cpp/ambiguously-signed-bit-field
          -**:cpp/suspicious-pointer-scaling
          -**:cpp/suspicious-pointer-scaling-void
          -**:cpp/unsigned-comparison-zero
          -**/cmake*/Modules/**
        input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
        output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif

As for example output from our fork: (looks like there have been no bugs found!)

On another repository...

With these bugs, you can dismiss them for any reason:

(or again, just simply filter out a rule)
I want to say that you can even open the Security tab on this repo and under Code scanning it should show the results of the run from the PR. I could be wrong here; from past experience some devs I've been in touch with have been able to and some haven't.
If you're interested enough, I'll point you to the manuscript again: https://arxiv.org/abs/2310.00205, we go a lot more in detail there.


Some suggestion

First, This extension is so good, Thanks for you put it open source.
Next, If you can add a tag name Untag , which to put untag star in it, it must be great.

@harryzjm thanks for the kind words.
Unfortunately, what you're asking for is currently technically not possible given the current backend architecture as I am relying on explicit tagging saved via chrome.storage.sync.
In other words, this doesn't use the github API at all, so I don't have a way to know all of your starred repos. It's only when you add tag to a starred repo that it is linked and saved via chrome.storage.sync.
I will close this now.


API request to enable/disable extensions

I work with several differnt technologies, sometimes react sometimes flutter... If I install new extensions for flutter they are enabled when I switch to a workspace from a react project. My list of extensions is growing so I thought about making an extension that enables/disables extensions based on the technology used but I'm not sure this is possible with the current api. Is there a way to do this? If not can you add it?

@sketchbuch

I thought about making an extension that enables/disables extensions based on the technology

Can you elaborate or give an example one how you would leverage this API and enable/disable an extension based on the 'technology'?

Hi,
My plan would be to allow users to associate technologies used in a workspace (React, Flutter, Flowtype, Typescript, etc.) and specify which plugins should be enabled/disabled for that type of worksapce using those technolgies.
I have 30+ react workspaces, some using Typescript some using Flowtype, PHP workspaces, many Flutter workspaces and I want an extension that enables/disables the extensions that I have installed already so that for example all Flutter relevent extensions are disabled in the workspace if the workspace is associated with React. All typescript related extensions are disabled if the workspace is not Flowtype based. I would also have a group of extensions that should be enabled in every workspace - like line sorting plugins, syntax highlighters and so on.
My plan wouldn't be to install new extensions, just enable/disable existing intalled extensions on a workspace basis so that as many useless (for that workspace) extensions are switched off as possible. I think I have the user specify for each installed extension what type of worksapce it is for rather automating this by relying on tags in the extension as

1: Not everyone tags their extesions
2: Some people use the wrong tags


Copy image pids to oracle-pid.properties.

Fix build error on develop branch.
develop branch uses pids in oracle-pid.properties for testing, we should copy image pids to this file.

The file oracle-pid.properties has been deleted.


apple_dns: Add DNS query trace

This PR adds trace info in the DNS resolution details by setting the envoy.enable_dfp_dns_trace runtime flag to true. This can be useful for debugging issues, such as debugging resolve timeout issues.
Risk Level: low (only enabled with enable_dfp_dns_trace runtime flag)
Testing: unit tests
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: dynamic forward proxy, apple dns

/assign @alyssawilk

/retest

/retest


fix: update documentation

Improve README.md
Add missing jsdoc comments
Fix small spelling error

:tada: This PR is included in version 1.0.3 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add Bottom-to-Top Toast Message Animation for Enhanced User Experience

A toast message should smoothly appear from the bottom of the user interface, slide up to a specific position (e.g., 30px from the bottom), and then slide back down before disappearing, enhancing the user experience and providing visual feedback.

Not required for now. Will recreate if needed


Support authentication on .NET Framework application

This package requires .Net below 4.5, but the other package requires 4.5 to function, as far as I can tell - Am I doing something horrendously wrong?

Indeed, I am unable to install gitter-api-pcl nuget package on a Windows 10 Application.
What type of project are you working on ? I suppose it's a target compatibility issue.

Ok, I found the issue. On a W10 App, you need to install first Microsoft.NET.Http package. The dependency is set for W8.1, WP8.1 but not for W10. I am sorry. I'll fix it asap.

Thank you!
On Fri, Nov 18, 2016, 8:17 AM David Bottiau<EMAIL_ADDRESS>wrote:

Ok, I found the issue. On a W10 App, you need to install first
Microsoft.NET.Http package. The dependency is set for W8.1, WP8.1 but not
for W10. I am sorry. I'll fix it asap.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Odonno/gitter-api-auth/issues/4#issuecomment-261529389,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADw0QugvH_kv5YrKco_K2f0nu4aqy620ks5q_aV6gaJpZM4K2K-r
.

Hi @PFCKrutonium
I may have misunderstood your problem. Are you trying to install gitter-api-auth inside a .NET framework application (like WinForms or WPF) ? If that's the case, it is normal that you can't install the package because the only platforms supported by this package are Windows 8.1 and Windows Phone 8.1 store apps (Windows 10 store apps also supported).

I'm actually trying to use it in a C# console application. How do I set all this up if I cant use this.

Well, it depends on what you want. If you want to try the API for yourself, you can request an authorization token from https://developer.gitter.im/docs/
If you want any user to use your console application, you have to create an OAuth login process. I don't know if it's possible because to do that you have to open a webview. If that's what you need, I will try to find a solution.

@PFCKrutonium That should be done. Can you try the 1.4.0 package and tell me if that works for you ?
The package now works for .NET Framework 4.5 and later. Moreover, you can look at the source code and see that a new sample project has been created, it shows you how to use the package with a C# Console Application.

@PFCKrutonium Any news ?

Sorry, got pulled away for other things - I'll give it a shot in a couple of hours! Will update with news.

I tried to copy your example, but I ended up with this:

(After I logged in)
Any ideas?

Well I fixed that (New OAuth stuff with the Redirect URI set to http://localhost), but it never returns the token.

@PFCKrutonium Oh, that's not good. I tried it many times and everything works fine. The redirect URI should be http://localhost exactly.
I'll try again asap to see if I can reproduce the bug.
The default behavior would be not to show you the localhost page but to return to the app with the retrieved token.

I saw that I do not ended the Browser window the first moment we receive the event to go to the localhost page.
Can you try the latest version of the package and see if there is any change ?


Add imports

Depends on #77
Current limitations (todo):

No support for absolute paths when calling a function
Import symbol renaming

See: https://github.com/lambdaclass/concrete/issues/73
The following compiles:
mod Simple {
    import Other.{hello1};
    import Other.Deep.{hello2};

    fn main() -> i64 {
        return hello1(2) + hello2(2);
    }
}

mod Other {
    pub fn hello1(x: i64) -> i64 {
        return x * 2;
    }

    mod Deep {
        pub fn hello2(x: i64) -> i64 {
            return x * 4;
        }
    }
}

Codecov Report
Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (4f68ec5) 68.74% compared to head (68423e9) 68.75%.

Files
Patch %
Lines

crates/concrete_codegen_mlir/src/ast_helper.rs
65.00%
28 Missing :warning:

crates/concrete_codegen_mlir/src/codegen.rs
77.04%
14 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   68.74%   68.75%   +0.01%
==========================================
  Files          27       28       +1
  Lines        1187     1309     +122
==========================================
+ Hits          816      900      +84
- Misses        371      409      +38

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Visualizing class activation maps with tflite weights

I am able to visualize Grad-CAM using keras weights(H5). I am not able to find to visualize last CNN layer using tflite weights.

https://pyimagesearch.com/2020/03/09/grad-cam-visualize-class-activation-maps-with-keras-tensorflow-and-deep-learning/
https://medium.com/analytics-vidhya/visualizing-activation-heatmaps-using-tensorflow-5bdba018f759

Found a related link on TF discussion forum mentioning that this is not possible as of 2021.

https://discuss.tensorflow.org/t/applying-grad-cam-to-a-model-that-was-converted-to-tensorflow-lite/3810/7

Can you please provide a sample code to execute this
OR guide me with a suitable documentation.

To model.summary() equivalent for tflite
Code to visualize last CNN feature map

I think that you could try to post directly in that forum thread.

Hi @ra9hur !
You can see the model details of lite model using netron web app. To print all tensor details, you need to invoke the interpreter with respective TFlite model and get the tensor details by index of respective tensor.
On GradCam Visualization perspective, You can use @tf.function and tape gradient according to  On device training documentation in this thread.
Please post on the same TF Forum  thread if you are looking for more insights on the implementation.
Thank you!

@mohantym
Thanks for the suggestion. Haven't got a chance to try it out, will revert for any help.
Thanks again !!

Sure, thanks again !!

@ra9hur !
Moving this to resolved status then.
Thank you!


CB-14120 Re-enabling certificate renewal tests for 7.2.12

7.2.12 images are built.
Tested end-to-end in mow-dev.

This reverts commit 4f4130737965c7705c1102fad0347206da1686fb.

still not working on qa so waiting for a new image build


Pyright Python became flaky in Docker-based CI since 1.1.296

Since we upgraded to v1.1.296 (which AFAIK changed something about how node is packaged), Pyright became flaky in our Docker-based CI. I would estimate that maybe 1 in 10-20 PRs end with an error as below:

Many runs end with this error
This is what often happens when we run pyright backend script tests (the dirs with our Python code) inside a Docker container:
WARNING: there is a new pyright version available (v1.1.296 -> v1.1.301).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`

/app/.venv/lib/python3.11/site-packages/nodeenv.py:26: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
  import pipes
 * Install prebuilt node (19.8.1) .Incomplete read while readingfrom https://nodejs.org/download/release/v19.8.1/node-v19.8.1-linux-x64.tar.gz
.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/app/.venv/lib/python3.11/site-packages/nodeenv.py", line 1519, in <module>
    main()
  File "/app/.venv/lib/python3.11/site-packages/nodeenv.py", line 1[10](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:11)4, in main
    create_environment(env_dir, args)
  File "/app/.venv/lib/python3.[11](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:12)/site-packages/nodeenv.py", line 980, in create_environment
    install_node(env_dir, src_dir, args)
  File "/app/.venv/lib/python3.11/site-packages/nodeenv.py", line 739, in install_node
    install_node_wrapped(env_dir, src_dir, args)
  File "/app/.venv/lib/python3.11/site-packages/nodeenv.py", line 762, in install_node_wrapped
    download_node_src(node_url, src_dir, args)
  File "/app/.venv/lib/python3.11/site-packages/nodeenv.py", line 602, in download_node_src
    with ctx as archive:
  File "/usr/local/lib/python3.11/contextlib.py", line [13](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:14)7, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/nodeenv.py", line 573, in tarfile_open
    tf = tarfile.open(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/tarfile.py", line [16](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:17)30, in open
    saved_pos = fileobj.tell()
                ^^^^^^^^^^^^
AttributeError: 'bytes' object has no attribute 'tell'
Traceback (most recent call last):
  File "/app/.venv/bin/pyright", line 8, in <module>
    sys.exit(entrypoint())
             ^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/pyright/cli.py", line 34, in entrypoint
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/pyright/cli.py", line [19](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:20), in main
    return run(*args, **kwargs).returncode
           ^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/pyright/cli.py", line [25](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:26), in run
    pkg_dir = install_pyright(args, quiet=None)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/pyright/_utils.py", line 61, in install_pyright
    node.run(
  File "/app/.venv/lib/python3.11/site-packages/pyright/node.py", line 98, in run
    binary = _ensure_available(target)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/pyright/node.py", line [37](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:38), in _ensure_available
    return Binary(path=_ensure_node_env(target), strategy=Strategy.NODEENV)
                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.11/site-packages/pyright/node.py", line 64, in _ensure_node_env
    _install_node_env()
  File "/app/.venv/lib/python3.11/site-packages/pyright/node.py", line 91, in _install_node_env
    subprocess.run(args, check=True)
  File "/usr/local/lib/python3.11/subprocess.py", line [57](https://github.com/exponential-hq/isometric/actions/runs/4553000054/jobs/8029070958#step:4:58)1, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/app/.venv/bin/python', '-m', 'nodeenv', '/github/home/.cache/pyright-python/nodeenv']' returned non-zero exit status 1.

Here's the Dockerfile for reference
pyright-python is a dev group dependency in the pyproject.toml file:
# These values should be overriden at image build time
ARG COMMIT_HASH=dev-docker

FROM python:3.11.1 as python
ENV PYTHONUNBUFFERED=true
WORKDIR /app

FROM python:3.11.1-slim AS python-slim
ENV PYTHONUNBUFFERED=true
WORKDIR /app

# Base environment with Poetry
FROM python AS poetry
# Install Poetry using the official install script, to isolate it from application dependencies
ENV POETRY_VERSION=1.4.0
ENV POETRY_HOME=/opt/poetry
RUN curl -sSL https://install.python-poetry.org | python - --version $POETRY_VERSION
ENV PATH="$POETRY_HOME/bin:$PATH"
# Install the virtualenv inside the project to make it easy to copy over the dependencies later
ENV POETRY_VIRTUALENVS_IN_PROJECT=true

# Stage to build a virtual environment with Python production dependencies
FROM poetry AS prod-venv
# Install the main dependencies (before any source code files are copied)
COPY pyproject.toml poetry.lock poetry.toml ./
RUN poetry install -vvv --no-interaction --no-ansi --no-root --only=main

# Environment for running various development actions (tests, migrations, etc.)
FROM prod-venv AS dev
# Additionally install the dev dependencies (before any source code files are copied)
RUN poetry install -vvv --no-interaction --no-ansi --no-root
# Print the version to actually install Pyright, as the pyright-python project does a lazy installation
RUN poetry run pyright --version
# Copy source code files and folders necessary for running static checks
COPY alembic.ini schema.graphql ./
COPY backend ./backend
COPY scripts ./scripts
COPY tests ./tests
# Install the application itself properly (to make sure that 'backend' is in the path)
RUN poetry install -vvv --no-interaction --no-ansi
# Make the entrypoint to this stage running a Poetry task
ENTRYPOINT ["poetry", "run", "task"]

I am not sure if it's good or bad, but the Docker image itself seems to be fine. I.e. if we retry running Pyright using the same image, it might just work!
Any ideas for what could be causing this @RobertCraigie ? Or is there anything else I can do to help debug this?

Just looking through the CI logs, I also found instances where the operation just timed out (total CI run reached 15 minutes):

Interesting, I have seen that AttributeError: 'bytes' object has no attribute 'tell' error before but it was very rare so I assumed it was an ephemeral network issue, but if you're encountering this frequently there must be something else going on...
I do remember seeing this error before v1.1.296 so I'm not sure it's related but it's weird that it only started happening recently for you.
Maybe you could try installing nodejs-bin beforehand as an alternative node.js installer?
pip install 'nodejs-bin[cmd]'

I'm planning on adding native support for nodejs-bin as well.

Thanks, will give it a try.
(Maybe it happened before too, it just felt like something that started recently.)
FWIW GitHub workflows do have network issues occasionally.
Note that these problem happened at runtime, not build time. And I do print the version of Pyright at image build time -- to ensure that node is baked into the image. So it is odd that a retry with the same image usually fixes it

I have this issue too. I think it is a network failure, even if you already initialised pre-commit. I think the issue is that the pre-commit install hook doesn't actually install Pyright. So it is downloaded every time you run pre-commit.
I guess a workaround would be to run it once as part of the Docker build but it would be nice if this was fixed.
Also it appears to access the network to check for a newer version of Pyright even if it is already installed. From the code it looks like you can export PYRIGHT_PYTHON_IGNORE_WARNINGS=1 to avoid that.

I am also suffering from this intermittent issue. I have some symptom detail to add.

I can reproduce the failure 70% of attempts. For test convenience, I am using a docker container based on python:3.9-slim running in windows WSL2. I am using poetry to lock down my dev dependency versions including pyright.
It does appear to be a slow/unresponsive repository server when the lazy install of node/pyright.js is taking place. Looking at the network graph I can predict when its going to fail long before the network timeout. I suspect there are multiple remote servers to choose from and few are giving a generous bandwidth or connection at all. But the lazy installer is simplistic and not hunting round for the best server.

  from pkg_resources import parse_version
 * Install prebuilt node (20.5.0)

I am now doubting the convenient installation of pyright via poetry or pip is the right option for a CI pipeline as it needs to be reliable. I would rather it fail at the install of pyright rather than when its first used to test my app. I have considered basing my CI build image on node to make pyright more reliable and then add my python stuff on top but this is also not how I want my CI.

@beaumsc I completely agree with your considerations. Have you found a solution you liked?

Any updates on this? I'm also facing an issue where my pyright command times out while installing pyright with poetry works fine.
#22 152.2 Traceback (most recent call last):
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 1344, in do_open
#22 152.2     h.request(req.get_method(), req.selector, req.data, headers,
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 1327, in request
#22 152.2     self._send_request(method, url, body, headers, encode_chunked)
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 1373, in _send_request
#22 152.2     self.endheaders(body, encode_chunked=encode_chunked)
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 1322, in endheaders
#22 152.2     self._send_output(message_body, encode_chunked=encode_chunked)
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 1081, in _send_output
#22 152.2     self.send(msg)
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 1025, in send
#22 152.2     self.connect()
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 1461, in connect
#22 152.2     super().connect()
#22 152.2   File "/usr/local/lib/python3.12/http/client.py", line 991, in connect
#22 152.2     self.sock = self._create_connection(
#22 152.2                 ^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/socket.py", line 852, in create_connection
#22 152.2     raise exceptions[0]
#22 152.2   File "/usr/local/lib/python3.12/socket.py", line 837, in create_connection
#22 152.2     sock.connect(sa)
#22 152.2 OSError: [Errno 99] Cannot assign requested address
#22 152.2
#22 152.2 During handling of the above exception, another exception occurred:
#22 152.2
#22 152.2 Traceback (most recent call last):
#22 152.2   File "<frozen runpy>", line 198, in _run_module_as_main
#22 152.2   File "<frozen runpy>", line 88, in _run_code
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/nodeenv.py", line 1548, in <module>
#22 152.2     main()
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/nodeenv.py", line 1119, in main
#22 152.2     args.node = get_last_stable_node_version()
#22 152.2                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/nodeenv.py", line 1052, in get_last_stable_node_version
#22 152.2     return _get_versions_json()[0]['version'].lstrip('v')
#22 152.2            ^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/nodeenv.py", line 1028, in _get_versions_json
#22 152.2     response = urlopen('%s/index.json' % src_base_url)
#22 152.2                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/nodeenv.py", line 652, in urlopen
#22 152.2     return urllib2.urlopen(req)
#22 152.2            ^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 215, in urlopen
#22 152.2     return opener.open(url, data, timeout)
#22 152.2            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 515, in open
#22 152.2     response = self._open(req, data)
#22 152.2                ^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 532, in _open
#22 152.2     result = self._call_chain(self.handle_open, protocol, protocol +
#22 152.2              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 492, in _call_chain
#22 152.2     result = func(*args)
#22 152.2              ^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 1392, in https_open
#22 152.2     return self.do_open(http.client.HTTPSConnection, req,
#22 152.2            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/usr/local/lib/python3.12/urllib/request.py", line 1347, in do_open
#22 152.2     raise URLError(err)
#22 152.2 urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>
#22 152.2 Traceback (most recent call last):
#22 152.2   File "/app/.venv/bin/pyright", line 8, in <module>
#22 152.2     sys.exit(entrypoint())
#22 152.2              ^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/cli.py", line 34, in entrypoint
#22 152.2     sys.exit(main(sys.argv[1:]))
#22 152.2              ^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/cli.py", line 19, in main
#22 152.2     return run(*args, **kwargs).returncode
#22 152.2            ^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/cli.py", line 25, in run
#22 152.2     pkg_dir = install_pyright(args, quiet=None)
#22 152.2               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/_utils.py", line 64, in install_pyright
#22 152.2     node.run(
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 105, in run
#22 152.2     binary = _ensure_available(target)
#22 152.2              ^^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 38, in _ensure_available
#22 152.2     return Binary(path=_ensure_node_env(target), strategy=Strategy.NODEENV)
#22 152.2                        ^^^^^^^^^^^^^^^^^^^^^^^^
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 65, in _ensure_node_env
#22 152.2     _install_node_env()
#22 152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 98, in _install_node_env
#22 152.2     subprocess.run(args, check=True)
#22 152.2   File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
#22 152.2     raise CalledProcessError(retcode, process.args,
#22 152.2 subprocess.CalledProcessError: Command '['/app/.venv/bin/python', '-m', 'nodeenv', '/root/.cache/pyright-python/nodeenv']' returned non-zero exit status 1.
#22 ERROR: process "/bin/sh -c poetry run pyright" did not complete successfully: exit code: 1
------
 > [tests 8/9] RUN poetry run pyright:
152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 38, in _ensure_available
152.2     return Binary(path=_ensure_node_env(target), strategy=Strategy.NODEENV)
152.2                        ^^^^^^^^^^^^^^^^^^^^^^^^
152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 65, in _ensure_node_env
152.2     _install_node_env()
152.2   File "/app/.venv/lib/python3.12/site-packages/pyright/node.py", line 98, in _install_node_env
152.2     subprocess.run(args, check=True)
152.2   File "/usr/local/lib/python3.12/subprocess.py", line 571, in run
152.2     raise CalledProcessError(retcode, process.args,
152.2 subprocess.CalledProcessError: Command '['/app/.venv/bin/python', '-m', 'nodeenv', '/root/.cache/pyright-python/nodeenv']' returned non-zero exit status 1.

I'm going to close this as the next release will add support for nodejs-wheel as an alternative to nodeenv which should be more reliable and will be the recommended way to use pyright going forward. I believe it will resolve all the flakiness issues encountered in this thread.
You can try it out today with
python -m pip install 'git+https://github.com/RobertCraigie/pyright-python.git#egg=pyright[nodejs]'

When released, it will be
pip install pyright[nodejs]

Please let me know if you run into any issues with this new setup.


Fix realod

better fix for #75

had no chance to test, yet. But am confident.

It works, and appears to solve the problem. Thanks.

It works, and appears to solve the problem. Thanks.


Use OpenAsync on connection

The call has to be moved, since a constructor cannot be async.

Implemented on Async branch


mpd: 0.22.6 -> 0.22.8

Motivation for this change
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 125688 at 2af57b78 run on aarch64-linux 1

2 packages built successfully:

mpd
mpd-small

@ofborg build mpd mpd-small mpdWithFeatures


The order of received messages isn't preserved, doesn't reflect the order in which the messages were created.

How can I make sure, what should I do to preserve the order? Messages are being sent very quickly and sometimes the second message comes before the first one.

Could you describe a little bit more about your user scenarios? Are you using event handlers or are you using subprotocols?

For received messages, where is the message sent from? Is it from the server SDK (or REST API), or from subprotocol client? Messages from one group should have order guaranteed. If you are using REST API and await the response, the order for the same group should be guaranteed too.


fix: Tap session entity into storage api for changes across tabs

Tap session entity into storage event listener for stateful changes across tabs.

Overview

Related Issue(s)

Testing

Do existing tests suffice to test for each of these transition behavior in the session update handler?


"Using the compiler testing framework"

This section should describe how to compiler is tested. Substantial work has been done but there remains more to document:

[ ] discuss bors, travis, platform emulation
[ ] crater: what is it and why is it useful? How do you request a crater run and when should you to do so?
[ ] maybe talk about "perf runs" too
[ ] rustdoc tests (cc @QuietMisdreavus)
[ ] talk about unit tests from libs and things
[ ] Doctests: How to run the doc tests in the standard library.  Other doc testing steps like linkchecker.
[ ] distcheck
[ ] mention that tests also get run for individual packages, such as bootstrap, cargo, rls, rustfmt, miri, clippy, cargotest.

See #47 and #53

@QuietMisdreavus #47 has landed :)