cargo-workspace plugin cannot handle dependency cycles in dev-dependencies

Thanks for stopping by to let us know something could be better!
~PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.~

Is this a client library issue or a product issue?
~This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the  Support page to reach the most relevant engineers.~

It is a library issue.

Did someone already solve this?

Search the issues already opened: https://github.com/googleapis/release-please/issues: Couldn't find anything.
Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node: Couldn't find anything.
Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js: I don't think this applies here.

Do you have a support contract?
~Please create an issue in the support console to ensure a timely response.~

If the support paths suggested above still do not result in a resolution, please provide the following details.
Environment details

OS: Manjaro Linux
Node.js version: 18.8.0
npm version: 8.19.1
release-please version: 14.7.2

Steps to reproduce

Have a cargo workspace that has dependency cycles with dev dependencies.
Try to use the cargo-workspace plugin of release-please.

Cargo supports dependency cycles in the form of A -dep-> B -dev-dep-> A. In other words, I can have a crate A that depends on B but B can depend on A again in its dev-dependencies. release-please doesn't seem to allow this which I think is an unnecessary restriction. Version bumping of dev-dependencies should not impact the version of a package so perhaps dev-dependencies should just be ignored here: https://github.com/googleapis/release-please/blob/main/src/updaters/rust/common.ts#L71
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!

Sorry, for the super late response to this one.
It looks like there's 2 issues:

release-please throws an error on circular dependencies which could be valid
you'd like an option for a dev-dependency version bump not forcing a patch bump

Sorry, for the super late response to this one.
It looks like there's 2 issues:
1. release-please throws an error on circular dependencies which could be valid

2. you'd like an option for a dev-dependency version bump not forcing a patch bump

Correct. We've resolved (1) on our end by getting rid of circular dependencies. That had other positive impacts.
I think (2) is still an issue. Bumping a dev-dependency should not warrant a version bump because it is not user facing.

I found a workaround by renaming dependencies:
[dev-dependencies]
my-lib-dev = { path = "../my-lib", package = "my-lib" }

Then you can extern crate my_lib_dev as my_lib so that you can use ::my_lib other than ::my_lib_dev.
The cargo-workspace plugin is not smart enough to find out my-lib-dev is actually my-lib. Thus, cycle dependencies won't be reported.


sole() needs implemented

Looking to get involved in some open source projects and wondering if it would be beneficial for me to take a crack at implementing these last few that were not yet implemented from Laravel, starting with containsStrict()?
"The contains method uses "loose" comparisons when checking item values, meaning a string with an integer value will be considered equal to an integer of the same value. Use the containsStrict method to filter using "strict" comparisons."

Hi, @michaellburchett
Great that you want to contribute! In collect.js all methods are strict by default, meaning that contains() is already strict and removes the need for containsStric(). You can see which methods and why we've chosen this approach here; https://github.com/ecrmnn/collect.js#strictness-and-comparisons
If you want to contribute here are a few methods you could implement
Some methods that are currently missing;

sole https://laravel.com/docs/8.x/collections#method-sole
chunckWhile https://laravel.com/docs/8.x/collections#method-chunkwhile

@ecrmnn  Ok, sounds good. I can close this one and volunteer to take up .sole() then. Thanks!

@ecrmnn Ok, sounds good. I can close this one and volunteer to take up .sole() then. Thanks!

PR has been submitted: https://github.com/ecrmnn/collect.js/pull/280

Merged, https://github.com/ecrmnn/collect.js/commit/53483311b63db6dde31cf1d13e9aae612a72c734


space available - disable button until limits load

data->single side staking
expected: "stake and protect" call to action should be default to disabled
actual: until limits load, i am able to proceed with the stake even if the amount i am trying to stake is above the limits.

updated.


Adds command spo listitem retentionlabel record lock, Closes #4237

This PR adds command spo listitem retentionlabel record lock, which locks a list item record.
Closes #4237

Well done @nicodecleyre!
We'll try to review it ASAP!

Hi @nicodecleyre, great work! Small comment in advance: it should be spo listitem record lock, check the issue specs


Prepare for wasmi 0.15 release

Codecov Report

Merging #414 (164e3ea) into master (c0df344) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 164e3ea differs from pull request most recent head 2fd2213. Consider uploading reports for the commit 2fd2213 to get more accurate results

@@           Coverage Diff           @@
##           master     #414   +/-   ##
=======================================
  Coverage   76.97%   76.97%
=======================================
  Files          71       71
  Lines        6826     6826
=======================================
  Hits         5254     5254
  Misses       1572     1572

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


upgrade dependents

Cherry-picks:

https://github.com/open-cluster-management-io/governance-policy-propagator/pull/103

(cherry picked from commit 67cf84a174d325f94f8d8ea53392ccd9ea5ae4b7)
Closes #368

/hold to investigate leaving controller-runtime at its current level to support 3.11


Docs refactor

Update docblocks on many public methods
Add travis testing of PHP 7.0 and 7.1
Small refactoring

Codecov Report

Merging #89 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
- Coverage   89.39%   89.38%   -0.01%
==========================================
  Files          31       32       +1
  Lines        2159     2157       -2
==========================================
- Hits         1930     1928       -2
  Misses        229      229

Impacted Files
Coverage Δ

src/Page.php
98.07% <ø> (ø)
:arrow_up:

src/PagedListResponse.php
97.91% <ø> (ø)
:arrow_up:

src/PathTemplate.php
100% <ø> (ø)
:arrow_up:

src/Serializer.php
91.5% <ø> (ø)
:arrow_up:

src/Parser.php
100% <ø> (ø)
:arrow_up:

src/GrpcConstants.php
81.39% <ø> (ø)
:arrow_up:

src/ApiCallable.php
89.28% <ø> (-0.3%)
:arrow_down:

src/GrpcCredentialsHelper.php
100% <ø> (ø)
:arrow_up:

src/ServerStream.php
100% <ø> (ø)
:arrow_up:

src/FixedSizeCollection.php
82.53% <ø> (ø)
:arrow_up:

... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74e33a8...8d029cb. Read the comment docs.


Max file size limit reached

 tried using giving project path get this error and file is not generated.
steps to reproduce:

pip install gitingest

gitingest path/to/project

This depends on the size of the repo being used as the file limit (MAX_FILES) has been set to 10000. See src/gitingest/ingest_from_query.py. Can you verify the size of the repo or if there are some untracked dependencies being included in the ingestion.

Thanks, I'll look into it.
On Sat, Dec 28, 2024, 2:01 AM rafe @.***> wrote:

This depends on the size of the repo being used as the file limit
(MAX_FILES) has been set to 10000. See src/gitingest/ingest_from_query.py.
Can you verify the size of the repo or if there are some untracked
dependencies being included in the ingestion.
—
Reply to this email directly, view it on GitHub
https://github.com/cyclotruc/gitingest/issues/62#issuecomment-2564029176,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJTZH3PJA2B3DTU5F4IBIHD2HW53LAVCNFSM6AAAAABUJCSGMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRUGAZDSMJXGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

https://github.com/cyclotruc/gitingest/pull/72
i have fixed here

#72 problem .git not add to final_ignore_patterns i have fixed

The referenced PR has been closed. Is this still a problem or can this issue be closed? @phamhung075 @mahrozeshahid

It's fixed!
On Wed, Jan 1, 2025, 5:24 AM Filip Christiansen @.***>
wrote:

#72 https://github.com/cyclotruc/gitingest/pull/72 problem .git not add
to final_ignore_patterns i have fixed
The referenced PR has been closed. Is this still a problem or can this
issue be closed? @phamhung075 https://github.com/phamhung075
@mahrozeshahid https://github.com/mahrozeshahid
—
Reply to this email directly, view it on GitHub
https://github.com/cyclotruc/gitingest/issues/62#issuecomment-2566769262,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJTZH3ICCIWLANKPXNWYD2L2IMYSBAVCNFSM6AAAAABUJCSGMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRWG43DSMRWGI
.
You are receiving this because you were mentioned.Message ID:
@.***>


added  custom widget

Hello Sir,
I have added custom widget code, this is tested by me, Please merge if you want to. also this merge solves #6

there can be some issues , please test the code first


New release?

Would it be possible to cut a release for the new features? especially APIGatewayCustomAuthorizerRequestTypeRequest from #62 would be helpful

Tagged 4d30d0ff60440c2d0480a15747c96ee71c3c53d4 as v1.2.0

thanks @bmoffatt !


JavaPackage is not callable - pays-ark

hi,
I followed your guideline and got:
iforest = IForest(contamination=0.3, maxDepth=2)
Traceback (most recent call last):
File "/Users/htayeb/miniconda2/envs/cs/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2878, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
iforest = IForest(contamination=0.3, maxDepth=2)
File "/Users/htayeb/miniconda2/envs/cs/lib/python2.7/site-packages/pyspark/init.py", line 110, in wrapper
return func(self, **kwargs)
File "/Users/htayeb/miniconda2/envs/cs/lib/python2.7/site-packages/pyspark_iforest/ml/iforest.py", line 245, in init
self._java_obj = self._new_java_obj("org.apache.spark.ml.iforest.IForest", self.uid)
File "/Users/htayeb/miniconda2/envs/cs/lib/python2.7/site-packages/pyspark/ml/wrapper.py", line 67, in _new_java_obj
return java_obj(*java_args)
TypeError: 'JavaPackage' object is not callable
any idea why?
I am using python 2.7 and the spark context is alive.

It hasn't been tested on python 2.  Try with python 3.6.x.

Exactly what I am doing now.
Will let you know.
On 27 Jun 2019, 16:11 +0300, Yang, Fangzhou<EMAIL_ADDRESS>wrote:

It hasn't been tested on python 2. Try with python 3.6.x.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Same problem.
On 27 Jun 2019, 16:11 +0300, Yang, Fangzhou<EMAIL_ADDRESS>wrote:

It hasn't been tested on python 2. Try with python 3.6.x.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Not sure. Does it work for you with python 3.6?
I think some pyspark api is not compatible with python 2.7.   I will look into this problem later.

I also tried with python 3, it didn't work.
On 28 Jun 2019, 10:51 +0300, Yang, Fangzhou<EMAIL_ADDRESS>wrote:

Not sure. Does it work for you with python 3.6?
I think some pyspark api is not compatible with python 2.7. I will look into this problem later.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Does your pyspark work? Check if you have installed and setup your pyspark correctly.

Pyspark and vectors work. Thanks for your help!
On 28 Jun 2019, 11:35 +0300, Yang, Fangzhou<EMAIL_ADDRESS>wrote:

Does your pyspark work? Check if you have installed and setup your pyspark correctly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Could you try kmeans example in pyspark to see if it works

Hi and again, thanks so much for your support.
I ran the following code:
from pyspark.conf import SparkConf
from pyspark.sql import SparkSession
from pyspark.ml.linalg import Vectors
spark = SparkSession
.builder.master("local[*]")
.appName("IForestExample")
.getOrCreate()
data2 = [(Vectors.dense([0.0, 0.0]),), (Vectors.dense([7.0, 9.0]),),(Vectors.dense([9.0, 8.0]),), (Vectors.dense([8.0, 9.0]),)]
df = spark.createDataFrame(data2, ["features"])
df.show()
from pyspark.ml.clustering import KMeans
from pyspark.ml.evaluation import ClusteringEvaluator
kmeans = KMeans().setK(2)
model = kmeans.fit(df)
predictions = model.transform(df)
predictions.show()
from pyspark_iforest.ml.iforest import *
iforest = IForest(contamination=0.3, maxDepth=2)
cls = IsolationForest(behaviour='new',
max_samples=100,
contamination=0.1,
)
The K-Mean part works well and output on predictions.show():
+---------+—————+
| features|prediction|
+---------+—————+
|[0.0,0.0]| 1|
|[7.0,9.0]| 0|
|[9.0,8.0]| 0|
|[8.0,9.0]| 0|
+---------+—————+
But again. On the initiation of Iforest: a.k.
iforest = IForest(contamination=0.3, maxDepth=2)
It fails with:
Traceback (most recent call last):
  File "/Users/htayeb/miniconda2/envs/ML3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "", line 1, in
    iforest = IForest(contamination=0.3, maxDepth=2)
  File "/Users/htayeb/miniconda2/envs/ML3/lib/python3.7/site-packages/pyspark/init.py", line 110, in wrapper
    return func(self, **kwargs)
  File "/Users/htayeb/miniconda2/envs/ML3/lib/python3.7/site-packages/pyspark_iforest/ml/iforest.py", line 245, in init
    self._java_obj = self._new_java_obj("org.apache.spark.ml.iforest.IForest", self.uid)
  File "/Users/htayeb/miniconda2/envs/ML3/lib/python3.7/site-packages/pyspark/ml/wrapper.py", line 67, in _new_java_obj
    return java_obj(*java_args)
TypeError: 'JavaPackage' object is not callable
I am running python 3.7 and pyspark 2.4
Thanks a lot again!
On 28 Jun 2019, 12:26 +0300, Yang, Fangzhou<EMAIL_ADDRESS>wrote:

Could you try kmeans example in pyspark to see if it works
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

It looks like that you havent deploy iforest jar pkg into your spark java class path. You can follow the guide https://github.com/titicaca/spark-iforest/blob/master/python/README.md

Ok.
So I redid the deployment of the jar file in my spark dictionary and it didn't work.
I did though found the solution and thought it might help someone else, so here is what I did.
I left PyCharm and tried to run it all from the shell. running it from there made the magic. it worked.
Now since I do my work on PyCharm I was looking for a solution.
I ended up adding the "config" line to my spark creation:
spark = SparkSession
.builder.master("local[*]")
.appName("IForestExample")
.config('spark.driver.extraClassPath', '/usr/local/Cellar/apache-spark/2.4.0/libexec/jars/spark-iforest-2.4.0.jar')
.getOrCreate()
which made it work also in PyCharm.
Pay attention that I did check that the pip install worked and that the jar was properly implemented.
even with these two things, for some reason, for PyCharm it wasn't enough.
Thanks for the support.


GROOVY-6831: Access to private static fields from within inner classes i...

...s inconsistent

So should we fix the dynamic behavior or would a fix to the CompileStatic part cover both cases in the long run?


Inconsistent handling of invalid image dimensions in upload flows

When attempting to upload a 0.99MiB WEBP area map I was thwarted because it was 4176x600. However, this was only communicated via an "Uncaught (in promise)" exception in the console, rather than any visible error message:
method: "call.core.char.[character ID].ctrl.setAreaImage"
params:
 areaId: "[area ID]"
 uploadId: "...07lg"
 [[Prototype]]: Object
 rid: "core.char.[character ID].ctrl"
 _code: "file.dimensionsTooLarge"
 _data: {maxHeight: 4096, maxWidth: 4096}
 _message: "Image must not be larger than {maxWidth} × {maxHeight} pixels."

I expected this to have a popup box explaining the restriction, similar to the one that appears if you upload a file above 1MiB:

...or to be presented with a formatted message, as done in the Edit Character image flow which states on the Crop Image step:

Image must not be larger than 4096 × 4096 pixels.

There's also a discrepancy in what you get in Crop Image of the Edit Character Profile page:

Internal error: failed to create file core.char.img.[character ID]: Image must not be larger than {maxWidth} × {maxHeight} pixels.

The original image is 8352x1200 but only ~3.6MB as WebP, since it is just 235 colours (intended for the 256-colour era of 1996) so could have been uploaded without scaling concerns if a) supporter and b) the limit were 16 MegaPixels rather than 4096x4096. (On the plus side, I found some interesting details about WebP compression presets tuning the reduced-size version.)

That is a bug. Uncaught in promise shouldn't really be showing up.
The difference in process is that Area images doesn't do the cropping step. So I must have missed handling the error there.
Thanks for the report! I'll fix it.
Also; the current limit of 4096 x 4096 was sort of arbitrarily set to what seemed to be a reasonable limit.
But I agree that we might want to have a different limit for area maps.

Yeah, I get the resource concerns, especially in a virtual environment - I've wondered if the occasional pauses when busy could be due to image scaling - was just thinking they might be better represented by the total number of pixels. And perhaps runtime.LockOSThread + syscall.SetPriority to a lower priority group for image processing routines? Though this is really a separate issue, and it's probably something else like lots of messages sent when chains of people go into a new area instead.


multi proc groupby

TODO: figure out how to measure memory footprint so that CPUs don't intercept on the memory footprint.

@realratchet - the better solution is probably just to implement this in nim.


Fix test_time test.

Sometimes sleep() may return a bit earlier than expected, again,
due to scheduling reasons. This should be accounted for as well.
For example, on my machine I had this:
# **** Solo5 standalone test_time ****
#
# Overhead of solo5_yield(): 12518 ns
# [5] Sleeping for one second...
# [5] Slept for 999995014 ns
# [5] ERROR: slept too little (expected at least<PHONE_NUMBER> ns)
# [4] Sleeping for one second...
# [4] Slept for<PHONE_NUMBER> ns
# [3] Sleeping for one second...
# [3] Slept for<PHONE_NUMBER> ns
# [2] Sleeping for one second...
# [2] Slept for<PHONE_NUMBER> ns
# [1] Sleeping for one second...
# [1] Slept for<PHONE_NUMBER> ns
# Solo5: solo5_exit(1) called

Could it depend on hardware, perchance?

I will merge this PR but it seems that the initial error hiddens something bigger than what we expect. I will probably adds fews comments and create an issue from this unexpected behavior. Currently, this PR concerns only tests so that's fine to merge it and release it. Thanks!

@greydot do you know on which platform you observed this? Was it spt, hvt, virtio, ...?

@greydot do you know on which platform you observed this? Was it spt, hvt, virtio, ...?

It was spt. Though, I didn't check the others. I'll re-check later.


TrainCarts Sign & Attachment Issues

BkCommonLib version: 1.12.2
TrainCarts version: 1.12.2
Spigot version: 1.12.2

Problem or bug: When a regular minecart is spawned, it is then stationed automatically, and dispatched at a certain time according to a station sign. When I spawn a 3-D Model attachment, all it does is sit stagnate.
Expected behaviour: Spawn, than move.
Steps to reproduce:

Can you provide screenshots or videos to show exactly what setup you have?

Is your setup consist of a spawner sign which spawns the train, and then a station sign ahead with a set delay time? If not, would you mind providing screenshot as @bbayu123 said and exact text written on the signs ?

Is this issue resolved yet?


Replace IRC since mostly unused + Freenode fiasco

Thanks to @jstrassb for finding this one.

Pull request acceptance prerequisites:

[x] Signed the CLA (if not already signed)
[x] Rebased/up-to-date with base branch
[ ] Tests pass
[ ] Updated CHANGELOG.md with patch notes (if necessary)
[ ] Updated CONTRIBUTORS (if attribution is requested)

This is managed by VP so it should use our contact info.

@xeraa +1 for splitting
The info in the footer of https://voxpupuli.org/ should be fine I think.

we did the cleanup in https://github.com/voxpupuli/puppet-elasticsearch/pull/1143

Thank you!


Add cancel() method to streams

I'm unfortunately somewhat rusty in this regard, but I think this adds the possibility of canceling an infinite response as requested by me in #203 (and maybe as requested in #95).
This would add a cancel() that at least somewhat mimics the browser's ReadableStream.cancel(). To fully mimic it would probably have to return a Promise, but as there's no callback to the message.destroy() in node.js it would have to just be a Promise.resolve() then.
Thoughts on this approach? Good or bad?
Quickly looking at v2 it seems like this could be easily forward ported to that version.

Current coverage is 99.69% (diff: 50.00%)

No coverage report found for master at d708acf.

Powered by Codecov. Last update d708acf...5f3738d

Actually... cancel() is something that is part of the ReadableStream api not fetch per say...
The cancel method should actually do a little bit more then simply call res.destroy() It should only cancel the stream if there is nothing else that is consuming the stream (aka if it's locked to something else).
The stream gets consumed/locked when you call .blob(),  .arrayBuffer(),  .text() or .body.getReader()
var body = new Response('abc').body
var reader = body.getReader()
console.log(body.locked) // true
// The reason i think it return's a promise is cuz it can throw a error (Perhaps they thought it's nicer if it silence reject then throwing and making the rest crash)
body.cancel() // Uncaught TypeError: ReadableStreamReader constructor can only accept readable streams that are not yet locked to a reader

What needs to be done is
var body = new Response('abc').body
var reader = body.getReader()
reader.releaseLock() // Release the lock so no stream are using it
console.log(body.locked) // false
body.cancel() // now it will cancel

But the ReadableStream API are different then the Node stream Api
I'm not sure where we stand on implementing ReadableStream api in v2... The hole node eco system is built around node-streams so what would be the benefit of having ReadableStream api if you can't pipe it to a file?

@jimmywarting I'm mostly just trying to figure out a solution to #203, this might not be it, but the ability to cancel a never-ending infinite response is something I need no matter what kind of streams model it would be modeled around. Suggestion on how to do this with node streams?

Yea, I agree, something is needed. We may need some differentiation in node-fetch since it's built on node-stream
i don't know if it's possible to detect if a stream has been locked to something
if you where to example do
body = new Response('abc').body
body.pipe(new fs.createWriteStream('cache.bin'))
// Do we know if there is something that is consuming the stream?
// ideally `body.locked` should return true and therefore cancel should not work

I would be fine with a less stricter api and allow canceling a response even if that means something else is consuming the stream. After all it's two different streaming api

I might be wrong as I haven't used this personally.

The original cancel() is really intended to be used when you don't care about the result at all. And as far as I know, this won't be added to spec.
The new approach appear to be cancel token, see proposal-cancelable-promises and an implementation from axios, though it was not clear how they handle streaming and cancelling.

So to sum up the current status quo:

If you want to abort and discard the body, cancel token can help.
But if you want to stop the stream somehow, this is really a Node.js problem.

I don't think we should add res.body.cancel() because it confuses people, but if the case for real-time JSON streaming is really popular, we might consider adding an extension to allow developers to control termination of underlying http request...

The cancel() is already in the spec as part of the ReadableStream interface. However I'm not convinced we should augment a Node.js ReadableStream object with WHATWG ReadableStream semantics -- doing so might trick the user into thinking the res.body we provide is actually a WHATWG ReadableStream, which is not the case.
I wouldn't mind adding support for Promise-based cancelation, but I don't think we should have our own implementation of CancelToken either. Nor is there any standalone polyfill for CancelToken available on npm AFAICT.
I'd agree with exposing the original ClientRequest object. I think it can be beneficial to Node.js users in general to have access to that object.

@TimothyGu I haven't tried this, but does calling destroy() on a custom agent passed to node-fetch works? If so, we might not need to expose ClientRequest (I think 99% use case of Fetch is to avoid dealing with http.request directly?).

I'm aware of cancelable promises, so just to be clear: This and #203 is not about cancelable requests, it's about fully resolved requests where one wants to cancel the response.
An example of a properly fulfilled request where the response needs to be canceled:
fetch('http://example.com/infinite-response').then(res => {
  // The request is done, but now I want to abort the response
});

This type of streaming through an infinite responses is rather common and was in the form of newline delimited JSON popularised by Twitter's streaming API and is made easy in Node.js through packages like ndjson.
It all works great with node-fetch – apart from the fact that the response  can't ever be destroyed.
Abusing HTTP agents to ensure that the response is destroyed feels wrong to me. HTTP agents are responsible for many other things, including keep-alive, which may be useful for also this type of request.
It's also not enough to just stop the stream – the response also needs to be destroyed so that the http connection is released or destroyed.
The simplest way of ensuring that the response is destroyed would be to let the one who knows that the request should be destroyed also be the one who destroys it.
Therefore a .cancel() (perhaps with another name) would probably be the easiest solution to this problem.

@voxpelli
I believe status quo is:

WHATWG stream cancel() can't be used when you are actively piping to something.
NODE stream doesn't have a cancel(), however HTTP request do have destroy() and abort().

I don't think res.destroy() is more clean than agent.destroy(). And by that I mean they both forcefully close the socket, see socket.destroy() doc.
request.abort() is nicer, it just throw away any remaining data and then close socket. Not sure if it works for your case though.
@TimothyGu

I'd agree with exposing the original ClientRequest object. I think it can be beneficial to Node.js users in general to have access to that object.

How do you propose we expose this object? Through event like got?

What I had on my mind was as a property on the Response object:
fetch('...').then(res => res.clientRequest.cancel());

it just throw away any remaining data and then close socket. Not sure if it works for your case though.

Don't see a reason why it wouldn't...

The suggestion of @TimothyGu would work for me, I updated the PR to match that with the one exception that I named the property clientResponse as it's a response object rather than the request object that's exposed.
This way one can do:
fetch('...').then(res => res.clientResponse.destroy());

@TimothyGu this was closed without being merged?


feat(richtext-lexical): granular control over link node population depth

Description

[ ] I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

[ ] Chore (non-breaking change which does not add functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Change to the templates directory (does not affect core functionality)
[ ] Change to the examples directory (does not affect core functionality)
[ ] This change requires a documentation update

Checklist:

[ ] I have added tests that prove my fix is effective or that my feature works
[ ] Existing test suite passes locally with my changes
[ ] I have made corresponding changes to the documentation

Closed in favor of #6242


More advanced input filtering?

Right now input files get assigned to build processors based solely on file extension.
This might be too limiting, and I'm wondering if it would be worth using a more advanced filtering system. A nice alternative might be wildcard-based search patterns. That way builders can be associated with specific file extensions, folders, naming conventions, etc.

TBH I think switching over to DirectoryInfo.GetFiles would be a really nice low-effort way to do this. Would even simplify the directory recursion logic I have in place right now I think

Implemented as of 2c9d0c718fa94cb5667e82ef9a982dea8ab144b8


clean up forms.py/viz.py once form config is all on frontend

figure out what vis configuration the back end really needs, and find way to share with front end, then delete duplicated configuration code.

closing in favor of https://github.com/airbnb/superset/issues/2018


Resilient witness tables use method descriptors

One nice consequence of this is that protocol method descriptors no longer have to reference the dispatch thunk.

@swift-ci Please smoke test

@rjmccall Do you mind taking a quick look at this?

@rjmccall we do not. In fact most of the resilience stuff is not documented at all. I should do that at some point.


feat(map_tf_generator): accelerate the 'viewer' coordinate calculation

Description
Accelerated the 'viewer' tf calculation by randomly sampling map points
I found that all map points are used to calculate the tf viewer coordinate so I randomly sampled only a few points from the map for faster calculation

Related links

Tests performed
Tested the random sampling function
The test checks

if the random index range is within [0, point size)
if the random index vector has the expected length

Notes for reviewers

Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.

[x] I've confirmed the contribution guidelines.
[x] The PR follows the pull request guidelines.

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

[x] The PR follows the pull request guidelines.
[x] The PR has been properly tested.
[ ] The PR has been reviewed by the code owners.

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

[ ] There are no open discussions or they are tracked via tickets.
[ ] The PR is ready for merge.

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

Anything more to fix?

Maybe not so much, I'll re-check it tonight.

For example,
Step = Pointcloud size / sampling number
for (i) {
  pointcloud.at(Step * i)
}

I think it's good!
https://github.com/autowarefoundation/autoware.universe/pull/890#issuecomment-1125093948

@yukkysaito How about fixing the random seed?

@IshitaTakeshi It's ok :+1:

@yukkysaito How about this?
I set the random seed in the point cloud callback function, not inside of 'UniformRandom'.
It is because if the random seed is set inside of 'UniformRandom' and the function is reused in some other modules it will always generate the same random vector.
https://github.com/autowarefoundation/autoware.universe/pull/890/commits/b659ccd53e2761017f593beb9fece1632489fb03

Curious question.
Why 3939?

@yukkysaito It's MikuMiku. My favorite number

People might think it because it may have the special meaning.
If it is a strong suggestion by you, I will approve it.

@yukkysaito I added a comment
https://github.com/autowarefoundation/autoware.universe/pull/890/commits/2556d32e396af7076bff08336b30e52587fb3d5c


RJX-1: Improve text before eventually doing better widget stuff.

Totally won't break any tests.

:star: PR built and available in a preview environment go2group-widget-web-app-pr-1 here

:star: PR built and available in a preview environment go2group-widget-web-app-pr-1 here

:star: PR built and available in a preview environment go2group-widget-web-app-pr-1 here

:star: PR built and available in a preview environment go2group-widget-web-app-pr-1 here


Could NOT find XCB_UTIL error on Ubuntu 18.04

Build Process
Describe how you build polybar, list the exact commands you are using:
mkdir build
cmake ..
If you build polybar directly from this repository:

Output of git describe --tags:
3.4.0-111-gbe64da3

If you use some other way (like the AUR):
List exactly where you are building from and which version you are building.
building at the tip
Build Log
Post everything that is output to the terminal while building polybar below. This HAS to include the output of the cmake and make commands, if you used them.
-- Trying to enable ccache
-- Couldn't locate ccache, disabling ccache...
-- The CXX compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type specified; using Release
-- Using supported compiler GNU-7.5.0
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Checking for module 'cairo-fc'
--   Found cairo-fc, version 1.15.10
-- Checking for module 'alsa'
--   Found alsa, version 1.1.3
-- Checking for module 'libpulse'
--   Found libpulse, version 11.1
-- Checking for module 'xcb-composite'
--   Found xcb-composite, version 1.13
-- Checking for module 'xcb-randr'
--   Found xcb-randr, version 1.13
-- Checking for module 'xcb-randr>=1.12'
--   Found xcb-randr, version 1.13
-- Checking for module 'xcb-xrm'
--   Found xcb-xrm, version 1.0
-- Checking for module 'xcb-cursor'
--   Found xcb-cursor, version 0.1.1
--  Build:
--    Version: 3.4.0-111-gbe64da3
--    Type: Release
--    CXX: /usr/bin/c++  -Wall -Wextra -Wpedantic -O3 -DNDEBUG
--    LD: /usr/bin/ld
--  Install Paths:
--    PREFIX:  /usr/local
--    BINDIR:  /usr/local/bin
--    DATADIR: /usr/local/share
--    DOCDIR:  /usr/local/share/doc/polybar
--    MANDIR:  /usr/local/share/man
--  Targets:                                                                                [4/10291]
-- [X]   polybar-msg
-- [ ]   testsuite
-- [ ]   documentation
--  Module support:
-- [X]   alsa (1.1.3)
-- [ ]   curl
-- [ ]   i3
-- [ ]   mpd
-- [ ]   network (wireless-tools)
-- [X]   pulseaudio (11.1)
-- [ ]   xkeyboard
--  X extensions:
-- [X]   xcb-randr (1.13)
-- [X]   xcb-randr (monitor support) (1.13)
-- [X]   xcb-composite (1.13)
-- [ ]   xcb-xkb
-- [X]   xcb-xrm (1.0)
-- [X]   xcb-cursor (0.1.1)
--  Log options:
-- [X]   Trace logging
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking for module 'xcb-proto'
--   Found xcb-proto, version 1.13
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.9", minimum required is "3.5")
-- XCB[XCB]: Found component XCB
-- Found XCB_XCB: /usr/lib/x86_64-linux-gnu/libxcb.so
-- XCB[ICCCM]: Found component ICCCM
-- Found XCB_ICCCM: /usr/lib/x86_64-linux-gnu/libxcb-icccm.so
-- XCB[EWMH]: Found component EWMH
-- Found XCB_EWMH: /usr/lib/x86_64-linux-gnu/libxcb-ewmh.so
-- Could NOT find XCB_UTIL (missing: XCB_UTIL_LIBRARY)
-- Could NOT find XCB_IMAGE (missing: XCB_IMAGE_LIBRARY)
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find XCB (missing: XCB_UTIL_FOUND XCB_IMAGE_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  lib/xpp/cmake/FindXCB.cmake:249 (find_package_handle_standard_args)
  lib/xpp/CMakeLists.txt:28 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/dinesh/Downloads/polybar/build/CMakeFiles/CMakeOutput.log".
See also "/home/dinesh/Downloads/polybar/build/CMakeFiles/CMakeError.log".

Environment:

Distro (with Version):
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

Additional context
CMakeOutput.log
Add any other context that you think is necessary about the problem here.

Did you install all dependencies listed here?
In particular libxcb-util0-dev and libxcb-image0-dev?

I used synaptic for installing the dependencies, it installed x86 packages, when I used the apt install it amd64 packages, now it is installed. Thanks

use apt install for installing dependencies, synaptic did not install the x86_64 packages on Ubuntu


is it possible to reject keyboard input from others

One of my players is using a keyboard to controller remapper and is sending both keyboard and controller inputs.
Is it possible to reject the keyboard inputs?

Wouldn't be easier to use a program that Block the keyboard input by itself or as a option?

Wouldn't be easier to use a program that Block the keyboard input by itself or as a option?

Can't find one that lets windows see it but not parsec

Theres keyboard splinter,you can emulate the keyboard and block its inputs

Yeah, I did a video on Keyboard Splitter some time ago. Awesome app Kofiz showed me. 🙂
Video - How to remap your keyboard into gamepads
P.S.: Technically this is a client side issue, since the guest is sending multiple inputs.


Create supported versions extension struct

Please note that while we are transitioning from travis-ci to AWS CodeBuild, some tests are run on each platform. Non-AWS contributors will temporarily be unable to see CodeBuild results. We apologize for the inconvenience.
Issue # (if available): https://github.com/awslabs/s2n/issues/1817
Description of changes:
First set of new extension structures.
I left the old send/recv methods in, but they just reference the structure's send/recv methods. This means that we don't have to update all the current extension logic.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #1843 into master will decrease coverage by 10.53%.
The diff coverage is 65.78%.

@@             Coverage Diff             @@
##           master    #1843       +/-   ##
===========================================
- Coverage   81.46%   70.92%   -10.54%
===========================================
  Files         227      226        -1
  Lines       16879    16811       -68
===========================================
- Hits        13751    11924     -1827
- Misses       3128     4887     +1759


Trino VARBINARY columns should scan to []byte slices instead of strings.

Trino columns that are VARBINARY type are base64 encoded before being sent via HTTP to the go client.  The current client implementation scans the data into a 'string' type without base64 decoding the values, forcing the user of the driver to do an extra non-intuitive base64 decode to get the original binary data back.
It would be better to have the driver perform the base64 decode and return a []byte slice.
For example, if an IP address or MAC address is stored as a varbinary column in trino, the client could return a []byte type which could be used to create a net.IP or net.HardwareAddr directly.

use from_utf8({varbinary_data}) function can return base64 decode data


Fix exercise ⊍×-Implies-×⊍

Should the assumption and claim be swapped in this? I also modified the name and text accordingly

I believe this shows that the exercise is impossible? The direction I put to the pull request was straightforward.
⊥× : ∀ {A : Set} → ⊥ × A → ⊥
⊥× ⟨ () , x₁ ⟩

×⊥ : ∀ {A : Set} → A × ⊥ → ⊥
×⊥ ⟨ x , () ⟩

⊤×⊥⊎⊥×⊤-Implies-⊥ : (⊤ × ⊥) ⊎ (⊥ × ⊤) → ⊥
⊤×⊥⊎⊥×⊤-Implies-⊥ (inj₁ x) = ×⊥ x
⊤×⊥⊎⊥×⊤-Implies-⊥ (inj₂ x) = ⊥× x

×⊎-Implies-×⊎-impossible : (∀ (A B C D : Set) → (A ⊎ B) × (C ⊎ D) → (A × C) ⊎ (B × D)) → ⊥
×⊎-Implies-×⊎-impossible thm =  ⊤×⊥⊎⊥×⊤-Implies-⊥ (thm ⊤ ⊥ ⊥ ⊤ ⟨ inj₁ tt , inj₂ tt ⟩)


Custom styling

While black on white, 400px columns are great and all, I should really consider some custom styling to make my garden visually distinct. Maybe some custom typography too.
I'm thinking of using the calming yellow from https://travisbriggs.com, maybe the blue on yellow color scheme from that website?

Should think about this in terms of #3

I tried the yellow from travisbriggs.com, but Abby hated it and I kind of hated it too. Just widened the column a bit for now.


DVC-7709 [fix]: generate types command excludes archived variables

dvc generate types will NOT include archived variables in the type definition

Current dependencies on/for this PR:

main

PR #147   👈

This comment was auto-generated by Graphite.


Update qgis tutorial to 3.x

QGIS 3.0 has much nicer COG support. It would be great to update http://www.cogeo.org/qgis-tutorial.html to be the 3.x support (and rename the current one to QGIS 2.x tutorial, and link to it)

dones in #26


Sort profile in tab drop-down by config filed.

Description of the new feature/enhancement
Sort profile in tab drop-down by config filed.
When profiles count increase to large, sort the profile in the list field is hard to operate.
Hope to provide configurable fields to determine the order in the drop-down menu

Proposed technical implementation details (optional)
{
  "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
  "hidden": true,
  "name": "Windows PowerShell",
  "commandline": "powershell.exe" ,
  "weight": 1, // eg. 1-999, If the weights are the same, the order is determined by the actual sorting in the list
 },

Thanks for the suggestion! Please make sure to search for duplicates when filing new issues. This is already being tracked by another issue on our repo - please refer to #1571 for more discussion.
/dup #1571
I'd also check out #5888, which has got a spec in progress for this feature 😄


Update header links profile and favorites

Description
Added links to icons in header to profile page , favorites and logout option.
Fixes #231 #234
How to test?
npm run dev
Checklist

[x] I have performed a self-review of my own code
[x] I have followed the name conventions for CSS Classnames and filenames, Components names and filenames, Style filenames, if you are in doubt check the the project README.MD and here https://github.com/HackYourFuture-CPH/curriculum/blob/master/review/review-checklist.md
[x] I have commented my code, particularly in hard-to-understand areas, if you code was simple enough mark the box anyway
[x] I have made corresponding changes to the documentation, if you code was simple enough mark the box anyway
[x] This PR is ready to be merged and not breaking any other functionality

It is working good


invalid socket address syntax

Hello,
I'm getting this error when trying to connect via a ipvanish proxy.
error: invalid value 'ams.socks.ipvanish.com:1080' for '--socks-address <SOCKS_ADDRESS>': invalid socket address syntax

Hi @Coquelicots
I think i have not added support for DNS resolution. Please try to use IP instead .
I will try to add DNS resolution soon enough.

Okay, thank you very much for your help. 👍


update faq vac cert invalid

No surprises in the press conference.
https://www.youtube.com/watch?v=jd5mYXWVaU8

@Ein-Tim yes, the index is incomplete. I will update that one as well.

@dsarkar
I have a couple of further grammar corrections for the English language part. Should I do a separate PR?


Incorrect links to resources when using ->tenantDomain() on a panel

Package
filament/filament
Package Version
v3.2.58
Laravel Version
v11.0
Livewire Version
No response
PHP Version
8.3.0
Problem description
This is a folllow on from this issue: https://github.com/filamentphp/filament/issues/11896
Since the issue was resolved, I've noticed that links under any panel that has the ->tenantDomain set will have the links all generate incorrectly. It seems to be using the ID of the tenant as the base URL:

It looks like this issue is on the base resource class:
    public static function getUrl(string $name = 'index', array $parameters = [], bool $isAbsolute = true, ?string $panel = null, ?Model $tenant = null): string
    {
        if (blank($panel) || Filament::getPanel($panel)->hasTenancy()) {
            $parameters['tenant'] ??= ($tenant ?? Filament::getTenant());
        }

        $routeBaseName = static::getRouteBaseName(panel: $panel);

        return route("{$routeBaseName}.{$name}", $parameters, $isAbsolute);
    }

Expected behavior
Links to generate with the base URL of the panel you are currently on
Steps to reproduce
Pull the example repository
Copy the .env.example to .env
Run the database migrations + seed
Add the following you your hosts file for testing:
<IP_ADDRESS> site-1.inform-ehr.local
<IP_ADDRESS> site-2.inform-ehr.local
<IP_ADDRESS> site-3.inform-ehr.local
Go to site-1.inform-ehr.local and try to login with<EMAIL_ADDRESS>/ password
Click the link to the Users resource, your browser will go to http://1/users
Reproduction repository
https://github.com/andy3471/filament-tenant-domain
Relevant log output
No response

Does it work with {tenant:domain} instead of {tenant}?

@danharrin  If I set it to tenant:domain, I get the original issue (#11896) again.

#12008 should fix that, if you use the :domain too


Improve page about contributing to reference docs

It is kind of confusing that in the upper section there is a bullet point linking to the quickstart and in the lower section, there is also a link to the quick start. I would suggest the following.

From the upper section remove: "To build the reference documentation, see the following guide: Generating Reference Documentation Quickstart"
In the lower section make sure that the Link to Quickstart is at the first, not second position.

@iamNoah1, what's the URL of the page that isn't right?

@sftim it's https://kubernetes.io/docs/contribute/generate-ref-docs/. Guess this will be moved to https://k8s.dev/docs/ as well?!

/retitle Improve page about contributing to reference docs
/language en
/remove-lifecycle rotten

I wouldn't move that page into https://k8s.dev/docs/ as it is specific to work on the Kubernetes website
Part of this page is automatically generated. We could replace that automatically generated text with our own, manually managed text.
I think it would be better to:

edit the title of https://kubernetes.io/docs/contribute/generate-ref-docs/quickstart/
add a description to each page under https://kubernetes.io/docs/contribute/generate-ref-docs/
remove the text from https://kubernetes.io/docs/contribute/generate-ref-docs/ and rely on those newly added descriptions

@iamNoah1 does that sound OK?

@sftim yes, that sounds fair :) Thanks

/remove-lifecycle rotten
/assign


AMBARI-23080. Log Search: use comositeId instead of implicit routing by default for collections.

What changes were proposed in this pull request?
Use compositeId by default for logsearch Solr collections (in order for better data balance between shards)
How was this patch tested?
Related UTs passed.
FT: with docker env (collections were created with shard names: shard1,shard2 and not with shard0,shard1 as with implicit routing)
Please review @zeroflag @adoroszlai @swagle @kasakrisz @g-boros

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1580/
Test FAILed.
Test FAILured.


bump up test dependencies

Bump up kluent, spek and jacoco

Codecov Report

Merging #25 into master will increase coverage by 3.39%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master      #25      +/-   ##
============================================
+ Coverage     92.59%   95.98%   +3.39%
  Complexity        8        8
============================================
  Files             2        2
  Lines           324      324
  Branches         34       22      -12
============================================
+ Hits            300      311      +11
  Misses            6        6
+ Partials         18        7      -11

Impacted Files
Coverage Δ
Complexity Δ

...test/java/com/mercari/remotedata/RemoteDataTest.kt
99.63% <0%> (+3.3%)
1% <0%> (ø)
:arrow_down:

...src/main/java/com/mercari/remotedata/RemoteData.kt
76.92% <0%> (+3.84%)
7% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fab3ebf...4485e3b. Read the comment docs.


Helper methods to propagate trace headers

Add helper methods to propagate trace headers from an incoming invoke request or pub sub message to an outgoing invocation or pub sub message.

I order to make my scenario work, I had to create an alternative implementation of the pubsub client that allows the trace headers to be set.

Hi @danielgerlag ! Thank you for opening a ticket, seeing that you created an alternative implementation, would you have some time to share what you did? Maybe through a PR?

Would this be as easy as having an optional headers parameter for all the clients? That could then be passed to the base class execute method. There is already code in HTTPClient.ts to read the headers if they are provided.


change status of bitnob on providers section in website

under the providers section, Bitnob is currently indicated coming soon. Lightning address feature has been rolled out on Bitnob, so i want to change the status to "download wallet".

Resolved


Stream Google Nest (WebRTC) from homeassistant to youtube

Hi,
I am trying to stream a google nest cam to a youtube live stream (birdhouse project).
I can see the stream on the go2rtc gui fint (via homeassistant, as its impossible to configure otherwise).
However, Youtube dont detect the published stream. I have tested with an rtsp campera as input and that works.
I guess i need to re-encode the stream to h264 - correct?
hass:
  config: "/home/haas/"

streams:
  cam1:
    - hass://<IP_ADDRESS>:8123?entity_id=camera.kamera&token=<redacted>
publish:
    legehus: rtmp://x.rtmp.youtube.com/live2/<redacted>

What I have attempted to reencode:
hass:
  config: "/home/haas/"

streams:
  cam1:
    - hass://<IP_ADDRESS>:8123?entity_id=camera.kamera&token=<redacted>
    - "ffmpeg:back#video=h264#audio=aac"
publish:
    legehus: rtmp://x.rtmp.youtube.com/live2/<redacted>

Log:
root@zoneminder:/opt/go2rtc# ./go2rtc_linux_amd64
21:53:49.735 INF go2rtc version 1.9.0 linux/amd64
21:53:49.738 INF [rtsp] listen addr=:8554
21:53:49.745 INF [webrtc] listen addr=:8555
21:53:49.748 INF [api] listen addr=:1984
21:53:52.228 DBG [exec] run cmd="ffmpeg -hide_banner -v error -re -i back -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -c:a aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/bc63f1735c9aafddff245d734dacd92a" url="exec:ffmpeg -hide_banner -v error -re -i back -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -c:a aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
back: No such file or directory
21:53:53.257 DBG [streams] can't stop none producer
21:53:53.258 DBG [streams] start producer url=hass://<IP_ADDRESS>:8123?entity_id=camera.kamera&token=redacted

Help wanted :-)

You don't get "stream name" idea.

ffmpeg:back#video=h264#audio=aac - transcode stream "back", but you don't have it
legehus: rtmp:// - publishing stream "legehus", but you don't have it
Transcoding H264 to H264 in same stream - useless. Because clients will always use first (not transcoded) source.

Thanks for the update. I have tried to update the config to reflect the idea:
`
streams:
legehus:
- hass://<IP_ADDRESS>:8123?entity_id=camera.kamera&token=
- "ffmpeg:legehus#video=h264#audio=aac"
publish:
legehus: rtmp://x.rtmp.youtube.com/live2/
`
Logs from running:
root@zoneminder:/opt/go2rtc# ./go2rtc_linux_amd64 09:42:38.472 INF go2rtc version 1.9.1 linux/amd64 09:42:38.474 INF [rtsp] listen addr=:8554 09:42:38.475 INF [webrtc] listen addr=:8555 09:42:38.476 INF [api] listen addr=:1984 09:42:41.451 DBG [exec] run cmd="ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://<IP_ADDRESS>:8554/legehus?video&audio -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -c:a aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/a9cd7676f930cce0c6e831fbd4b3b00c" url="exec:ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://<IP_ADDRESS>:8554/legehus?video&audio -c:v libx264 -g 50 -profile:v high -level:v 4.1 -preset:v superfast -tune:v zerolatency -pix_fmt:v yuv420p -c:a aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://<IP_ADDRESS>:8554/a9cd7676f930cce0c6e831fbd4b3b00c" [rtsp @ 0x559ef31e4ec0] Unable to open RTSP for listening rtsp://<IP_ADDRESS>:8554/legehus?video&audio: Address already in use 09:42:42.924 DBG [streams] start producer url=hass://<IP_ADDRESS>:8123?entity_id=camera.kamera&token=<redacted>
I have managed to run restreamer, consuming the rtsp stream from go2rtc and forward to youtube live, but its very unstable and I hope to get go2rtc working.
Btw, Very nice job!

Unable to open RTSP for listening means you using very outdated ffmpeg version


Why is the first part of encrypted text always the same? I still know of NO GOOD reason and I've been watching for years. There's something FISHY here.

What are MAGIC BYTES?
They've been the same forever and haven't changed. Have you ever actually explained what they mean? What's their significance? They aren't encrypted, so the main annoyance is all our cipher text is immediacy identifiable as Triplesec encryption. And it wastes space.
4 bytes for the version?
Excuse me, you have 255 vales in a single byte. Yet you need 4 of them?
Has ANYONE heard a good explanation for this crap? I've been watching this project with love for years waiting for it to "click" and make sense.
It doesn't make sense. No other encryption suite would do this.
I do use Triplesec, but if anyone could actually SEE multiple cipher texts, there's no way. It looks unprofessional to to have repeating characters over and over... THEN THEY WILL QUESTION YOUR COMPETENCE FOR WASTING SPACE.
There's a million ways to do this, so why do it like this?
The only thing I can think of is that it's a highly noticeable degrading indicator when using Triplesec. But why put such an obvious indicator in your security product unless you are trying to communicate something? And why make it so annoying and unbeneficial?
What is this crap? What are the Magic Bytes? Please tell me. You've been hand-waving it away for almost a decade.

The magic bytes are used in order for the software to know that the file that you try to decrypt follow the triplesec format. As far as I know, they have no other meaning. It is very common for software to have a magic marker. You could find some information about magic markers on a Wikipedia article: https://en.wikipedia.org/wiki/File_format#Magic_number
PNG files start with eight bytes including "PNG" https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_header
PDF files start with "%PDF" https://en.wikipedia.org/wiki/PDF#File_format
If you don't need compatibility with the default triplesec client and prefer removing the header, you could just remove the eight first bytes yourself and readd it before decrypting. You could fork the project and remove the header by editing the source code. You could also use a script to edit the files or edit them manually.

The magic bytes are used in order for the software to know that the file that you try to decrypt follow the triplesec format. As far as I know, they have no other meaning.

So you're telling me they are ARBITRARY? That doesn't raise red flags to anyone in the security field? FOUR WHOLE BYTES with NO EXPLANATION. That is by the stupidest thing I've ever heard. FOUR BYTES? Couldn't they make do with 1 for version? Why do you need ANYTHING "ARBITRARY" if you have a version byte and a structured format. This is what EVERY OTHER SECURITY FORMAT DOES.
You don't even need ANY bytes, you can  just attempt the parse the structure. Lots of security software does this too.
Where are the Block Ciphers with arbitrary bytes? Where are the KDF functions with arbitrary bytes? NOBODY DOES THIS. It's ridiculous.  Wasting our precious space in all our cipher texts without offering any explanation. How many gigabytes of data do you think are  wasted in databases all around the world storing multiple copies of these 8 useless bytes?

It is very common for software to have a magic marker.

NO IT'S NOT!!
 This is a huge red flag and I would encourage people to do their own homework on what this type of poor security practice might mean.
"MAGIC BYTES" are not ARBITRARY. They are there for a reason which you aren't aware of or are unwilling to discuss. This is obvious deception.

PNG files start with eight bytes including "PNG" https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_header
PDF files start with "%PDF" https://en.wikipedia.org/wiki/PDF#File_format

FILE FORMATS are not ENCRYPTION SCHEMES. This is childish reasoning, comparing apples to oranges. For all I know those 4 magic bytes offer some unknown weakness into the algorithm. If you can't explain your reasoning as to what those values mean, then you're HIDING SOMETHING.. You can't pretend they mean nothing.

If you don't need compatibility with the default triplesec client and prefer removing the header, you could just remove the eight first bytes yourself and readd it before decrypting. You could fork the project and remove the header by editing the source code. You could also use a script to edit the files or edit them manually.

Yes I sure could, but I wouldn't waste my time unless I understood what they are DOING THERE in the first place. WHY are they there, and if forking and removing them would even fix the problem.
It's a baffling mystery and I posit that this is CLEAR UNDENIABLE EVIDENCE that there is something scandalous going on with "Triplesec" we do not understand.


ip-reconciler: fix for duplicate IP allocation due

This change fetches the ip reservations first before fetching the pod
list for finding the stale reservations. This will help to overcome the
scenario where a new whereabout pod gets created between the time
reconciler fetches the pod and the reservations and ends up deleting the
reservation, eventually leading to duplicate IP.
#207

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 5 (0.0%)  changed or added relevant lines in 1 file are covered.
14 unchanged lines in 1 file lost coverage.
Overall coverage remained the same at 40.494%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/reconciler/iploop.go
0
5
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/reconciler/iploop.go
14
23.7%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
443

Relevant Lines:
1094

💛  - Coveralls

/cc @maiqueb


Make app available for users with foreign Google Play account

I temporarily live in Germany but cannot install the app because my Google Play Account is a foreign account. Switching the Google Play account to Germany would prevent me from switching back for a full year. Please change the app settings in Google Play to allow international users to install it as well (as it is the case for the majority of apps in Google Play). The goal should be to make the app available to everyone who is currently located in Germany, not just to users with a German Google account.

See this thread: https://github.com/corona-warn-app/cwa-backlog/issues/9
You can upvote your countries wishlist entry or if it doesn't have one yet, create a new one: https://github.com/corona-warn-app/cwa-backlog/issues/9#issuecomment-648745301


Interrelating Kubernetes Resources: Identifying relationships between all standard and custom resources

Description: The OpenAPI specifications for Kubernetes provides taxonomy, but augmenting a graph data model with formalized ontologies enables any number of capabilities, one of the more straightforward is the inferencing requisite for natural language processing, and consequently, a human-centric query / response interaction becomes becomes possible. More importantly, more advanced systems can be built when a graph data model of connected systems is upgraded to be a knowledge semantic graph.
Expected Outcome:

YAML-formatted definition of one or more relationships per Kubernetes resource.
Documentation of each relationship - per component.
Development of new types of genealogies - new types of ways in which resources relate to one another and how these relationships might be visualized.
Verification of functional relationships

Recommended Skills: DevOps, Kubernetes Administration, Light familiarity with all of the CNCF projects and a desire to study each project and their operators/resources.
Mentor(s):

Mentor Name: Uzair Shaikh (@muzairs15, muzair.shaikh810@gmail.com), Lee Calcote (@leecalcote, leecalcote@gmail.com),

Just wanted to confirm whether the focus should be exclusively on Kubernetes resources, or should also include related CNCF projects like Istio, argo, and others that integrate with Kubernetes?

Hey everyone,
I’m wanted to share my latest project on integrating Kubernetes resource relationships using Neo4j. This project aims to visualize and analyze Kubernetes resources through a semantic graph model, leveraging Neo4j for advanced graph data management.
Project Overview:
The project focuses on creating a semantic graph that represents relationships between Kubernetes Deployments and Pods. The primary goal is to use Neo4j to map and visualize these relationships, providing valuable insights into the Kubernetes environment.
Repository Details:
You can explore the project repository here:
https://github.com/SumangalChhetri/K8s-Ontology-and-Semantic-Graph-Integration/tree/master
Implementation:
Data Preparation:
The relationships.csv file contains data on Kubernetes Deployments and Pods, formatted for easy import into Neo4j.
Neo4j Setup:
Instructions for installing Neo4j and setting up the environment are provided.
Data is loaded into Neo4j using Cypher queries to create nodes and relationships.
Visualization:
The Neo4j Browser provides a visual representation of the Kubernetes resource relationships, facilitating in-depth analysis and exploration.
Seeking Feedback:
I would greatly appreciate feedback from the community on the following aspects:
Data Modeling:
Are there any suggestions for improving the semantic graph model for Kubernetes resources? I’m interested in ensuring that the graph accurately reflects the complex relationships within Kubernetes environments.
Neo4j Usage:
Any recommendations for optimizing the performance of Neo4j when handling large datasets? Tips on best practices for managing and querying graph data in Neo4j would be valuable.
Visualization Enhancements:
How can the visual representation of the graph be enhanced for better clarity and insight? Feedback on the current visualization approach and suggestions for improvements would be appreciated.
Thank you for your time and any insights you can provide!

Hey everyone!
I'm Nihit, a pre-final year student from the Indian Institute of Information Technology, Gwalior, majoring in Information Technology. I'm a tech enthusiast with a strong passion for open-source. I've applied for this project and have been working on this issue for some time now. I would greatly appreciate any guidance or clarity on how best to approach this issue. I'm really looking forward to solving this problem and contributing to the project as much as possible.

@SumangalChhetri, this is great! For my part, I missed your notification until today. We discussed it a bit on the TAG Network meeting today - https://www.youtube.com/watch?v=IymegZzTI9E
We're ramping up our effort here. I encourage you to reach out in the #tag-network channel, so that we can catch up and get you involved in the project.


meiotic drive

Hello GO,
Here's a fun one for you!
For a community-curated paper on some of the aptly named wtf genes in pombe, we could do with a term for the fascinating phenomenon of meiotic drive. Though weird, it does occur naturally and therefore is "normal" in at least that sense.
id: GO:new
name: meiotic drive
def: A biological process that results in the unequal transmission of alleles, haplotypes, or chromosomes from a parental genome to gametes.
is_a: ???
optional "gloss" for definition: In the absence of meiotic drive, the two copies of each gene or chromosome in a diploid organism are transmitted to offspring with equal probability.
(or edit to make less specific for haploid/diploid)
Possible references include PMIDs 26920473, 29499907, and 29322557 (the last is mostly specific to the fission yeast wtf drivers). It's quite likely that my suggested definition could be improved if someone can devote a bit of time to it.
We only have an immediate need for a general term; if you want to include terms for some or all of the various types of meiotic drive known, we would use one for "poison-antidote", as opposed to "killer-target" or any others; the reviews should provide definitions.
As hinted in the obo stanza, parentage is where I'm struggling the most. It might be a type of reproductive process, or regulation of reproduction? Maybe specifically gametogenesis, or regulation thereof?
I've really just skimmed the surface of this topic (and the text of the reviews I've cited). We can put you in touch with some of the people working on meiotic drive in fission yeast if that would help; less sure what we might contribute w.r.t. other drive mechanisms should you want to go there. So if you've got any questions, don't hesitate to ask - but be warned, the initial response is likely to be "I have no idea".

https://en.wikipedia.org/wiki/Meiotic_drive

Note there are different mechanisms for drive, and some  "meiotic drive" is really post-meiotic
https://en.wikipedia.org/wiki/Intragenomic_conflict

Fraternicide is not uncommon... Typically I guess to reduce competition for resources (birds?). But also bees (queen bees related? And male bees being reduced in numbers by siblings in some species (not many of them needed)).  Meiotic drive is slightly different in that if you are really closely related then you are spared, whereas if you are slightly different genetically then you are killed.
There’s also cannibalistic tadpoles that (unlike the majority of tadpoles in that frog species) are born with teeth...they then gobble up all tadpoles that aren’t at least their siblings, or cousins

Note there are different mechanisms for drive, and some "meiotic drive" is really post-meiotic

From the reviews I've looked at, I gather that the phrase "meiotic drive" has come to be used for mechanisms that don't act directly on the meiotic divisions as well as those that do.
For example, from PMID:29499907 "There are two general classes of meiotic drivers [9]. Class one drivers, sometimes called ‘true meiotic drivers’ (see Glossary), act during the meiotic chromosome divisions. ... The second class of driver is the ‘killer meiotic drivers’ ... [that act] by sabotaging otherwise viable meiotic products that do not inherit the selfish allele."
and PMID:29322557 has "The term meiotic drive was coined 60 years ago to specifically describe biased segregation into the one gamete made during asymmetric (female) meiosis (Sandler & Novitski, 1957). ... The term meiotic drive is also widely used to describe the actions of other selfish alleles that act to bias their own transmission into gametes without directly affecting chromosome segregation in meiosis (Lindholm et al., 2016; Zimmering, Sandler, & Nicoletti, 1970). These drivers act by causing the death or malfunction of gametes that fail to inherit them and can thus be called ‘gamete‐killers’ or ‘killers.’ "
The unifying feature is that alleles are unequally represented (i.e. the "driver" is overrepresented) among the surviving products of meiosis. Maybe that should be made more explicit in the term def, to avoid confusion with phenomena such as the examples Antonia listed. None of them is considered meiotic drive, because they don't alter which alleles make it into surviving gametes; they act at other stages of the organisms' life cycles. (The thing with bees is that workers share 3/4 of their genes on average, instead of the usual sibling 1/2, largely because of the haplodiploid sex determination system found in Hymenoptera - https://en.wikipedia.org/wiki/Haplodiploidy.)

Yes, this is a really fascinating topic!
For now, I propose that we add a general term, 'meiotic drive' as an is_a child of 'reproductive process'.
I'll use the definition and references you suggest above, @mah11 .
When we find that we need more specific terms to distinguish different mechanisms, we can add them and perhaps refine their placement in the ontology.
Sound okay?


Minimum requirements in README?

We don't specify the minimum requirements required for preact-cli anywhere in the README.
Right now, the only way a user can come to know is, after installing node_modules when the check.js gets triggered.
Will it be worth adding the requirements to the README (probably on the top)
or
Find a badge which can specify the minimum node version?

Don't think we need to. It's declared in our engines and in .travis.yml ...  and we throw early via your check.js.

I feel that we have to move the check.js from postinstall script to preinstall script. What do you think?

@reznord How about we run the check everytime user run the cli? And exit immediately if the requirements don't pass. Since the cost of the operation is very small, it doesn't matter

We are currently! here

Since we are using chalk we can't do it in postinstall script.


Oni does not respect arguments on linux

Currently oni does not open a file when called with the file path as an argument on linux.
I'll try to take a look into this.
@bryphe Can you provide the specification on how the arguments should be parsed?

Thanks for opening this issue, @badosu ! Made me realize I missed the thread in #645
The screenshot you posted helps:

In development builds, for this scenario, you usually see three arguments - the electron prebuilt binary, main.js, and the file.
However, for packaged builds, the main.js is baked in the executable file, so you only see two arguments as in your screenshot.
Accounting for this is handled here: https://github.com/bryphe/oni/blob/735985dd8e934ad4de389af82a2047dc269ef7bc/main/src/main.ts#L159
But today only OSX and Windows are handled. I think we need to add an additional case for linux, something like:
    const linuxOpenWith = platform === "linux" && args[0].indexOf("opt/oni") >= 0

    if (windowsOpenWith || macOpenWith || linuxOpenWith) {
        createWindow(args.slice(1), workingDirectory)
    } else {
        createWindow(args.slice(2), workingDirectory)
    }

Is there a reason for checking the executable path?
This will be troublesome for linking oni or installing it on non-opt directories (which should be the case).
I am fixing this at the moment and can't output any logs for debugging since it's a step before spawning the process, I tried Log.info but no dice, any idea?

This will be troublesome for linking oni or installing it in non-opt directories (which should be the case). I think it would be better to check if we are on a development build or not before compiling oni and setting a variable that can be captured there, what do you think?

Yes, this is a good point. I was thinking about this and it might be worth inverting the condition - we could check if this is using the prebuilt electron, by checking for the presence of node_modules/electron in the first argument. If node_modules/electron is present in the path, we should use the 3 arg strategy, otherwise use the 2 args strategy.
This has the advantage that it works the same across all platforms, and would be more resilient in the case of alternative paths. The only downside is if someone happened to install Oni in a path containing node_modules/electron, it would break, but I imagine that is unlikely..
An alternative strategy would be to set an environment variable when the development build of Oni is launched (by modifying the script in cli/oni). This would be deterministic, since it is used by npm link in all platforms, but is not used in the packaged builds.

I am fixing this at the moment and can't output any logs for debugging since it's a step before spawning the process, I tried Log.info but no dice, any idea?

Ah yes, there's an undocumented way to get the logs from the main process from the debug window in the renderer process. You can run this command: require("electron").remote.getGlobal("getLogs")().
Here's what it looks like on my machine:

Mine has dist/electron instead of node_modules/electron since I am testing the distribution build.
Would checking if it's terminated in electron be a bad idea?

I very much prefer the deterministic approach but I'm not sure of all the edge cases and how to send this state down the stack.

Would checking if it's terminated in electron be a bad idea?

Actually that seems reasonable. The only corner-case here is that you'd need to check for electron.exe on Windows, but that is still straightforward and deterministic. I like this approach!
If we decided to use an environment variable to gate this, we could do something like:
processOptions.env = Object.assign({}, process.env, {
    "LOCAL_ONI": 1,
})

(This preserves all the existing environment variables, and tacks on the LOCAL_ONI one... not sure if that is the best name for it...)
To:
https://github.com/bryphe/oni/blob/fe7f2d89a69662574316ef4f1c35f9261422a6ae/cli/oni#L10
Then, in main.ts, we'd update the logic to gate on that environment variable, instead of trying to infer from the path:
    const isLocalBuild = process.env["LOCAL_ONI"]
    if (!isLocalBuild) {
        createWindow(args.slice(1), workingDirectory)
    } else {
        createWindow(args.slice(2), workingDirectory)
    }

But checking if the first argument is terminated in electron (or electron.exe for Windows), per your suggestion, seems simpler to me!

@bryphe See the PR referenced, I preferred to use the environment variable to make Oni more platform agnostic and also it's way simpler. I used the LOCAL_ONI name as it make the purpose self-explanatory.

As soon as you release a new version this will fix the expected behaviour on linux, so keep that in mind for the release notes.


polytracker: fixes for the linter

pulls out @hbrodin's mypy lint fixes into a separate PR so they can be merged soonest since the linters fail on the plain main branch right now
experimented with additional changes to make the flake8 errors I was also seeing on init.py go away, but oddly flake8 and mypy seem to be nondeterministically fighting over what is "ok" here. Perhaps flake8's not finding implicit dependencies on things imported in init correctly?

Thanks @ESultanik !


NoFall not applying in circumstances of disabling Fly (Forge 1.18.2 Version 0.10)

Replication:
Step 1: Enable Fly
Step 2: Fly upwards a large enough arbitrary number (~10)
Step 3: Descend with crouch key most of the way
Step 4: Disable Fly
Result: Fall damage likely equivalent to the sum of distance traveled downwards.
Note: Fall damage is not negated by NoFall
Another interesting phenomenon is that you will die immediately even if NoFall is enabled, and you are above an ocean provided you have built up enough "potential energy". You die before even touching the ocean in mid air as well.
This bug can result in instadeath if Fly is not used carefully. Pretty sure this is a common bug with fly hacks and likely a difficult fix.

Is this vanilla server behavior? I cannot reproduce this in singleplayer 1.18, but I can in 1.19.
From code perspective fly hack is pretty simple. I just set flag in player abilities that is responsible to flying. Client thinks server allowed it to fly. This is how very first version of fly hack worked. After testing this on some server I noticed as soon as I touch surface (with fly still enabled) I receive a ton of damage. I fixed this by adjusting MovePlayerPacket. It has flag onGround. I added code to always send onGround=false while fly hack is enabled. This fixed instadeath when touching surface.
No Fall messes up with the same packet, and with the same onGround flag. If you are moving downwards faster than 0.5 blocks/tick, it sets onGround=true in all packets. I think this 2 modules can conflict with each other, and if you are descending while in fly, No Fall module can set onGround=true and custom server can skip actual check for block on your feet and just calculate fall damage. Did you override fly speed? If yes, what its value?
I think I can disable No Fall while fly hack is enabled.  Not sure if this will fix all cases. As you can see, if you fly high enough, move down, and disable fly hack close to surface, you are not getting enough fall speed for No Fall module to turn on.

I did some research:

you should better disable no fall while using fly for now (I will do this automatically in next versions)
if you want to negate fall damage before exiting fly: fly to the surface, fly up a bit (even half a block is enough), turn off fly.

When server sees you are moving upwards it sets fall distance to zero. I was trying to automate this by constantly performing micro-jumps in background (for 0.0001 height), but for some reasons it doesn't work reliably

I have been being careful with Fly but I haven't been using it with NoFall and there hasn't been any issues. You are wonderful.


Implement limiting by total stat value

Implements: #68
Feedback welcome!

Thanks! Would have just merged this, but you wanted some feedback, so I looked a bit deeper:

You should always cargo +nightly fmt code to make sure it complies with a repos .rustfmt.toml format guidelines. Line width of 80 in this case
([u32].iter().sum::<u32>() as f32 * 1.2) as u32 could overflow in two places, which would panic (in debug builds). Better sum to f32 and clamp the result to u32. I do not do this myself though, so...
const DEFAULT_ATTRIBUTE_FACTOR in the impl seemed a bit overkill for a literal, that only gets used in one place. Pretty sure that is a valid OO way of doing it, but I just personally prefer having it all in one place
999999 max_attributes limit might not actually be enough for the top players on older servers, I might increase the limit at some point

I pushed my suggestions, if you want to have a look, but yeah, this was pretty solid as is. Yet again, thank you for this PR, this has been a heavily requested feature!

@the-marenga Thanks a lot for taking the time to give me feedback!
I will try to incorporate this into future contributions :)


Possible custom string resolver node

Motivation
Within the application I'm currently developing we encounter some strings that are dependent on a count parameter but do not strictly adhere the pluralization structure as Slang is using it. Take the following example into account:
"streak_banner": {
      "l_one": "The algorithm favors active people",
      "l_two": "Amazing to see your enthusiasm",
      "l_three": "Your daily response improves matchmaking",
      "l_four": "We're putting a spotlight on your profile!",
      "l_five": "You're really here to take it offline!",
      "l_six": "One more day makes a week",
      "l_seven": "You're taking matters in your own hands",
      "l_eight": "Every day, we get to know your taste better",
      "l_nine": "Good to see you again!",
      "l_ten": "People who respond daily get shown more to others",
      "l_eleven": "Increased chances of finding a fun date",
      "l_twelve": "Our algorithm is in love with your activity",
      "l_thirteen": "Almost at the two-week mark",
      "l_fourteen": "You're on a roll, keep it up!"
    }

In this example above we're defining a set of strings that should be called based on the input parameter. Rather than defining custom conditions in the code I would prefer calling with the parameter, whereinafter slang decides on the correct key to use. This feature should support scenarios where the pluralization doesn't suffice.
Developer Experience
In my fork I've implemented this by allowing the node to include parameters, and a resolver attribute, as the following:
"resolver_example(resolver=numericResolver, params=languageCount)": {
params is a comma splitted string representing the arguments that can be used to determine the key that should be picked. Instead of the returning a string an enum representing the possible keys could also be used.
String? numericResolver({required Object languageCount}) {
  if (languageCount == 1) {
    return 'l_one';
  } else if (languageCount == 2) {
    return 'l_two';
  } else {
    return 'l_other';
  }
}

I'm curious about opinions about this potential feature, if in favor of implementing this I can submit a PR for this with my current implementation.

Hello, the plural system is actually standardized (see https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html)
Since, you mentioned that enums, have you considered the Enums Feature of slang?
In this example, you would have an enum like
enum StreakLevel {
  one,
  two,
  // ...
  fourteen,
}

Hi, Thanks for the quick response!
I indeed looked into the enums feature as well, but the enum feature requires the group to have every enum and cannot exclude certain keys.
In my example I'm using all the keys, but I would like to have the possibility to leave out certain keys and dynamically based on the input arguments select the key / enum and have some flexibility here.


Syntax highlighting

As per our discussion on Twitter https://twitter.com/rgbkrk/status/702172656657764352.
Lets chat more here. Cc: @hellendag @vjeux @rgbkrk

Sweet, thanks for starting this.
I hacked Prism into a decorator class, and got a decent code editor working. Since Prism is built for one-time parsing and highlighting of static content, though, it wasn't really ideal for quickly decorating on the fly. The entire ContentState had to be parsed on every change, so as the file grew, the editor got slower.
IIRC, an approach more similar to CodeMirror, with parsing context on a per-line basis, would allow for minimal analysis on each change. It's been a while since I last looked into this, though. :)

Great! Thanks for moving it over here. Since my current use case ends up being lots of individual editor views (that are currently CodeMirror in a React environment), this could end up working out ok. Especially if we're only rendering the editor component that is in view. To be more concrete, the use case is an open source literate coding notebook (backed by Jupyter/IPython):

Swapping out the markdown area to be a draft-js editor is currently on my "scope it out" list.
I'm assuming I'd need to try out your first approach before I could even start thinking about the per-line parsing context.

@rgbkrk Awesome. Just to clarify: is your goal to remove the markdown CM in favor of a Draft WYSWIYG editor, or to use Draft for direct markdown editing?

My goal is to remove the markdown CM in favor of a Draft WYSIWYG editor and entertain the possiblity of switching the code editors out for Draft.

Our underlying model (the notebook document) relies on Markdown underneath for those. The one in the spec lists marked while the demo above is using commonmark. That's merely the on disk format though.

I'm in a pretty similar situation as @rgbkrk, currently using CM for Markdown editing but thinking about switching to Draft.js for WYSIWYG. If anyone dives more into this, would love to hear about good solution patterns :)

@jorilallo We're currently also using CM for Markdown editing, but working on switching to Draft:

markup-t Markdown parser to generate draft's contentState, or markdown from draft's contentState
react-markup-editor Editor built on top of Draft with table editing, etc (it requires #216).

The hard parts are tables, lists and blockquotes, since they are trees in the markdown AST. react-markup-editor abstracts this with its own state and handle deep draft editor inside draft editor.
The goal is also to supports syntax highlighting for code blocks.

@hellendag Can you share your decorator class example? I'm trying to build a highlighter of a toy language I built, and If I had the example, I could get this done much quicker! 😄

@SamyPesse Interesting, this is pretty much what I was looking for as I'm building a sideproject in the similar space (big fan of Gitbook!). I'll take another look when I get to rebuilding with Draft.js

For those interested, here is an example of using Prism to highlight code block in a Rich text editor: https://gist.github.com/SamyPesse/0690602631c19aedcfa0a28feabb9d2b
And here is a gif of the result:

I've published it as a node module: https://github.com/SamyPesse/draftjs-prism
We are probably going to use it for the GitBook Editor, and I think some perf optimizations can be done for large code blocks.

I've also followed a similar approach powered by something other than Prism, but as @hellendag noted things get slower as the content size increases.
I'd love to hear how a more incremental approach can be achieved. My sense is that it's not using the decorator approach.

Hi, I'm using a similar approach to @SamyPesse parsing the content in getDecorations and using the retuned AST to set the decorations. It works, but it seems out of place (for the reasons mentioned in the thread).
I tried another approach which is to create entities, but I quickly run into problems. It seems that modifying the editorState in the onChange event is not a good idea.
My use case is to use draft for a formula editor. As the user types I parse the formula, and based on the AST I apply styles + add some interactivity (like clicking in a function shows some help).
Apart from using decorators, is there any other approach to tokenize an input?

I'm doing the same thing with a lexer and parser. I'm using a decorator at the moment but have been trying to figure out #453 so I can use onChange.

Just thought I'd throw in https://typora.io - it's source isn't published, but its editing between markdown, code, and rendered content is seamless

https://github.com/typora/typora-issues/issues/315#issuecomment-272718643 can also serve a summary of the state of markdown / syntax highlighting / content across different editors from the different sources that I've found

@rgbkrk is the code behind that gif that you posted open-source?

Yup! You found the right one!

I think it's save to assume that this issue doesn't need to stay open any longer. Feel free to continue adding comments however :+1:


"tests" should be an absolute path

Problem
If you pass tests: "test/index.html", the URL generated is:

https://470827b6.ngrok.iotest/index.html

Solution
Leverage url module to format the URL accordingly from the ngrok hostname and provided path.

Seems reasonable. I'll add logic to add a leading slash if one doesn't exist.


[QUESTION] JSON output reordered by pydantic @validator

This isn't a big problem, but I'm wondering if it's possible to keep the JSON output key ordering unaffected by the presence of a Pydantic @validator(...)? I like consistency. 🤷♂
I have this pydantic model structure:
class IngredientBase(BaseIngredientMixin):
    name: str = None
    unit: str = None
    unit_price: decimal.Decimal = None
    flavour_warning: bool = None

    @validator('unit')
    def valid_units_only(cls, v):
        choices = set(SingleIngredientTable.unit_choices.keys())
        if v and v not in choices:
            raise ValueError(f'must be one of {choices}')
        return v

class IngredientIn(IngredientBase):
    pass

class IngredientNew(IngredientIn):
    name: str = ...
    unit: str = ...
    unit_price: decimal.Decimal = ...

class IngredientOut(IngredientBase, TestModelMixin, TimestampModelMixin, IDModelMixin):
    pass

This will produce:
{
  "unit": "IU",
  "id": "sing_qOYSyqZhfOcJKHsfVz7tnfP6M",
  "created":<PHONE_NUMBER>,
  "updated":<PHONE_NUMBER>,
  "is_test": false,
  "name": "Vitamin C",
  "unit_price": 10.568536363534536,
  "flavour_warning": false
}

Without the validator, it produces what I would expect:
{
  "id": "sing_qOYSyqZhfOcJKHsfVz7tnfP6M",
  "created":<PHONE_NUMBER>,
  "updated":<PHONE_NUMBER>,
  "is_test": false,
  "name": "Vitamin C",
  "unit": "IU",
  "unit_price": 10.568536363534536,
  "flavour_warning": false
}

How can I continue to use @validators and maintain the expected JSON key ordering?
Edit: I can pull out the validator into a 'mixin' class that I apply ONLY to the IngredientIn and IngredientNew models (leaving IngredientOut untouched). But is that my only path here?

@samuelcolvin, @dmontagu mentioned that I should pose this question to you? Might I ask you to weigh in? Thank you!

I don't see how validators could effect output order, but I could be wrong.
Could you create a minimal example of the problem and ask on pydantic?
There are numerous fields referenced here that aren't in the example, and there's a complicated inheritance landscape that makes working out what's happening very complicated.

@samuelcolvin if you look in BaseModel._iter, it is iterating over self.__dict__, which I believe is built up incrementally during the validation process. I thought having a pre=True validator could result in the key getting set earlier than it might otherwise, and then since dicts get iterated over in the order keys were added, that would explain the ordering change.
The example here doesn’t use pre=True but I figured something related might be going on.

Maybe I'm being dumb, but I don't think validators effect the order of __fields__.

@samuelcolvin Yep, looking through the code I don't see an obvious way this could happen. Thanks for checking.
@jaddison If you can produce a (small) self-contained reproducible example, I can look into this more.

@dmontagu @samuelcolvin - thank you for looking into this.
It isn't (directly) pydantic-related - I replicated my model structure separately and could not reproduce. However...
Instead, it is related to the response_model parameter; it must force a different method of validation?
To be specific:

if I remove the response_model parameter from the endpoint and return just an instance of that same pydantic model from the endpoint, the key ordering is as I would expect
reintroducing the response_model param manifests the key mis-ordering

Tiny sample, demonstrating the issue:
from fastapi import FastAPI
from pydantic import BaseModel, validator

app = FastAPI()

class ValidatedModel(BaseModel):
    one: str = None
    two: str = None
    three: str = None

    @validator('two')
    def validate_two(cls, v):
        if v is '1':
            raise ValueError
        return v

# @app.get("/")
@app.get("/", response_model=ValidatedModel)
async def get():
    return {
        "one": "one",
        "two": "two",
        "three": "three"
    }

Not that I am on Python 3.7.4.

Confirmed the issue, and that the problem doesn't occur for pydantic.json() calls. It looks like this is related to the creation of the secured cloned model; if you drop the response_model argument to the decorator the order is correct:

Yep, I found the problem -- it is in fastapi.utils:
def create_cloned_field(field: Field) -> Field:
    original_type = field.type_
    if is_dataclass(original_type) and hasattr(original_type, "__pydantic_model__"):
        original_type = original_type.__pydantic_model__  # type: ignore
    use_type = original_type
    if lenient_issubclass(original_type, BaseModel):
        original_type = cast(Type[BaseModel], original_type)
        use_type = create_model(
            original_type.__name__,
            __config__=original_type.__config__,
            __validators__=original_type.__validators__,  # type: ignore
        )
        for f in original_type.__fields__.values():
            use_type.__fields__[f.name] = f
    ...

It passes the validator fields first, then tacks on the non-validator fields.
The PR I linked above should help do away with the cloned field, which will address this issue.
It should be a relatively simple fix to get the field ordering right, and you could create a PR doing that if you really cared; that could probably be merged more quickly.

Thanks @jaddison , @dmontagu , and @samuelcolvin for the discussion and debugging here!
I'm looking forward to the much better implementation from Pydantic itself in @dmontagu's PR :tada: :rocket:


DataView error when using windows

The following command in Windows command prompt: node cli/ts2wasm.js --opt=3 mandelbrot.ts -o out.wasm  =>
Error: Error: Error: Cannot find the idenentifier "DataView"
at buildExpression (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/expression_builder.js:1940:15)
at buildIfStatement (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/statement_builder.js:194:21)
at buildStatement (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/statement_builder.js:346:23)
at buildStatements (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:46:23)
at generateFunctionScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:360:24)
at generateScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:382:13)
at foreachScopeChildren (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:289:9)
at generateClassScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:367:5)
at generateScopeNodes (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:385:13)
at foreachScopeChildren (file:///C:/Users/louis/projecten/wasmnizer-ts/build/src/semantics/index.js:289:9)

Hi @louisvangeldrop  Thanks for reporting this, we use cp command in npm run build to copy some builtin lib files, but this command is not available on Windows, we will fix it and reply here.

Hi @louisvangeldrop This issue has been fixed in https://github.com/intel/Wasmnizer-ts/pull/118, could you please try again?

Thx, it works now.


Bug fixed in upstream k-rail chart

Hi 👋  @funkypenguin
Could the upstream k-rail be merged into the charts please? There was a bug that has been fixed and merged in: https://github.com/cruise-automation/k-rail/pull/71
Thanks 🐧

Hey @js-timbirkett!
Done 🍔 s! Commit which updated the chart repo is https://github.com/geek-cookbook/helm-k-rail/commit/774d2a6c75b69ad42da70e58174b304be66fbf12
Cheers!
D


comment out docker group check

Signed-off-by: Lee Calcote<EMAIL_ADDRESS>Notes for Reviewers
This PR fixes #
Signed commits

[ ] Yes, I signed my commits.

@zakisk, I am commenting out this section until the larger issue is addressed. Please open a new GH issue with the details from our discussion.