Register JerseyViolationExceptionMapper only if not overriden in ResourceTestRule

Right now inside ResourceTestResourceConfig inside ResourceTestRule, it is hardcoded to always register JerseyViolationException. This breaks in cases where we have our own ExceptionMapper for JerseyViolationException, and want to test the response from that as the default exception mapper will always have priority.
A better behaviour is to check if any exception mappers already exist for JerseyViolationException and only add the ExceptionMapper if it does not exist already.
The line is found here:
https://github.com/dropwizard/dropwizard/blob/master/dropwizard-testing/src/main/java/io/dropwizard/testing/junit/ResourceTestRule.java#L158

Thanks for trying out 1.0! It looks like this problem arose because of my misunderstanding that registering exception mappers non-deterministic which one is used. There was a pull request to revert registering exception mappers (#1148) in a test resource, but it looks like JerseyViolationExceptionMapper is a hold out.
Other related commits and pull requests that show how this non-determinism really threw me off :blush:
fc9025cd
#1125
#1144
#1129

(Thinking out loud here). I think the best approach may be a registerDefaultExceptionMappers in the ResourceTestRuleBuilder, which by default is enabled, and will register all the default exception mappers like the registerDefaultExceptionMappers yaml setting (which is also true by default).
How does that sound?

That sounds like a fine solution if you want resource test to work out of
the box. Would it be possible to check if exception mappers are already
registered and to only register them if nothing of that type is already
registered?
Bests,
Ling
On Dec 14, 2015 3:38 PM, "Nick Babcock"<EMAIL_ADDRESS>wrote:

(Thinking out loud here). I think the best approach may be a
registerDefaultExceptionMappers in the ResourceTestRuleBuilder, which by
default is enabled, and will register all the default exception mappers
like the registerDefaultExceptionMappers yaml setting (which is also true
by default).
How does that sound?
—
Reply to this email directly or view it on GitHub
https://github.com/dropwizard/dropwizard/issues/1381#issuecomment-164416277
.

Not to my knowledge :cry:
ResourceConfig config = /*...*/;
config.register((ExceptionMapper<JerseyViolationException>) exception -> Response.ok().build());
Class<ExceptionMapper<JerseyViolationException>> clazz = (Class) ExceptionMapper.class;
config.isRegistered(clazz); /* returns false! */

Closed by #1387.
Call setRegisterDefaultExceptionMappers(false) when you're building the a TestResourceRule


when opening php file chrome downloads it

opening the php file but when write the url like localhost:8000/php/a.php the file gets downloaded ... using browsersync also

Hi @tanishbaansal  I'm not able to reproduce. From this cloned repo, can you please try adding a.php inside "examples/simple/" with <?php echo "You are viewing a.php :)"; ?> in it.
Then cd example/simple && npm i gulp
Once npm loads the local gulp, run gulp then go to your browser and visit localhost:8000/a.php.


C-ares: Fix for CVE-2017-1000381

Motivation for this change
C-ares: Fix for CVE-2017-1000381
Causes quite a large rebuild
Things done

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

[x] NixOS
[ ] macOS
[x] Linux

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

Thank you for the PR! Applied to 17.03: 0c1c07e1a78f94626478c218e9b0080a9fef3ff3

Unfortunately staging is currently broken but otherwise this should have gone through staging (>13000 rebuilds although some may be from 2fb3cc1e6d0df4b973e22d5b104dcd13716cccca).

I've always skipped staging for mass-rebuild inducing security patches when the issue is scored medium-or-above, especially when access complexity is low / no user interaction is needed. I'd be happy to reevaluate this personal policy (or maybe even document it somewhere other than right here :P) if you believe I shouldn't do that.

Perhaps it would be good to have a discussion on this topic some time. What I wrote is also more of my own policy.


Truth baseline vcf

Hi,
my name is Jordi and I want to use the file svpop-truth-baseline.vcf.gz from https://s3-us-west-2.amazonaws.com/human-pangenomics/index.html?prefix=vgsv2019/vcfs/
But I dont know how it has been done.... From where you download this data?? I'm asking about that, because you put the genotypes of each sample, but I'm not able to find the same file in the audano paper... they send us to a FTP, where all variants are detected, but without genotype.
So my question is about how do you do this file with genotypes??? Or Where you get it??
Thanks for your help ant time
Jordi

Sorry for another question... It is correct that all variants reported in this file are heterozygous? 0/1
Because I make a fast review of the data, and all genotypes are 0/1....
my apologise
Jordi

The VCF is made as described at the top here:  https://github.com/vgteam/sv-genotyping-paper/tree/master/human/svpop
There is only presence/absence information for these variants.  We used the convention of 0/0 genotype = present , 0/1 genotype = absent.  These aren't real genotypes, but they allowed us to use our comparison pipeline on the VCFs directly.  You'll note in the paper that there is no genotype comparison for this dataset, only presence/absence.

Oops, I meant 0/0=absent 0/1=present!

when I run 'vcfkeepinfo EEE_SV-Pop_1.ALL.sites.20181204.vcf.gz SVTYPE | vcffixup - | bgzip > EEE_SV-Pop_1.ALL.sites.20181204.fix.vcf.gz',I can't get the corresponding answer. Is this a command


Javascript now reads as Plain Text

Update to v. 1.5.1 leaves auto detect not detecting js files. Other files work fine.

@idavidson12 Can you share your file associations if any in your settings?

A number of days has past without answer on the questions asked. I am thereby going to close this issue to clean up our backlog of issues. Once you can answer on the questions, the issue can be reopened again. Thanks for understanding this process!


Comments not properly highlighted.

I'm not sure if some other plugin could be interfering, but for me the syntax highlighting is incorrect for multiline comments.
See screenshot:

I ran :PluginUpdate to make sure I have the most recent version of elm-vim.

Hi jottr,
I'm not able to reproduce this with latest elm-vim. Could you tell me if you're still experiencing the issue if you run vim with the following config (using -u flag):
set nocompatible
set encoding=utf-8
syntax enable

call plug#begin('~/.vim/plugged')
Plug 'ElmCast/elm-vim'
call plug#end()

If comment syntax highlighting is correct with this config then it is most likely another plugin interfering somehow. Try commenting out potential offenders in your vimrc to find which one it might be.

Thank you @rohanorton, I just checked with your config as suggested, and you were right, it must be some other plugin interfering with the highlighting.

Had this same problem, kien/rainbow_parentheses was the problem.


use numpy 1.22.2

mitigate  https://www.cve.org/CVERecord?id=CVE-2021-41495 and https://www.cve.org/CVERecord?id=CVE-2021-41496
buffer overflow and NPE fixes
These are corner cases - to exploit either fix, you need to be a priveleged user anyway

Thanks for the pull request, John. As the Numpy version is unspecified right now, using pip install would always get the updated package automatically. What is your use-case to specify this version specifically?


404 not working on sub routes

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[X] I have tried the npm run clear or yarn clear command.
[X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[X] I have tried creating a repro with https://new.docusaurus.io.
[X] I have read the console error message carefully (if applicable).

Description
Follow-up of discussion #9664.
It seems that swizzled 404 are resolved when a root URL is accessed but, not when a sub-route is loaded.
e.g.
http://localhost:3000/unknown -> custom 404
http://localhost:3000/docs/unknown -> default 404 (or custom 404 for a milli seconds and default afterwards)
Reproducible demo
No response
Steps to reproduce
git clone https://github.com/peterpeterparker/docusaurus-404
cd docusaurus-404
npm ci
npm run start
try various unknown routes
Expected behavior
Custom 404 displayed for any 404 regardless of the (sub)route.
Actual behavior
As described in the details.
Your environment
No response
Self-service

[ ] I'd be willing to fix this bug myself.

Looks like only for the docs route, the 404 content comes from NotFoundContent. As the DocRoot 404 is having this - https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/DocRoot/index.tsx#L24
This was added to fix double layout issue for 404 in docs - https://github.com/facebook/docusaurus/pull/7966/commits/ca177b358d9be189c81f78f2c1841fb02f0f246e
Maybe we have to update swizzle plugin to emit or wrap NotFoundContent component instead of NotFound. Instead of this docusaurus swizzle "@docusaurus/theme-classic" "NotFound" it should be changed to docusaurus swizzle "@docusaurus/theme-classic" "NotFoundContent".
Or else we have to move the content from NotFound.js to NotFoundContent.js, that should fix this issue and somehow make sure this is documented.


allow Docker::Image to be refreshed

I introduced another "exec" so that the "$image_install" can be triggered by external resources. The new "exec" checks if the image already exists and triggers the install if necessary. So the image is built if it does not exist or if it is refreshed externally.
With this change I can specify a "Dockerfile" resource that triggers the image on change.

@daniellawrence nice idea. I noticed that this fails the unit tests. If you could update those to describe the behaviour that would be great.
This also sounds like something that would be useful to document in the README. Maybe add a quick example of how you're using it?
And thanks for the suggestion. Much appreciated.

The failing tests were just about the no-op command "true" which seems puppet lint interprets as a quoted boolean value. I changed it to 'echo > /dev/null' and added a paragraph to the README.

@garethr ready to be pulled


Unexpected behavior in tf.scatter_update

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac OS X 10.12.3
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 1.2.0
Python version: 2.7.10
Bazel version (if compiling from source):
CUDA/cuDNN version: CPU
GPU model and memory: CPU
Exact command to reproduce:

>>> import tensorflow as tf
>>> sess = tf.Session()
>>> dim = 10
>>> probs = tf.Variable(tf.ones(dim), trainable=False)
>>> dist = tf.contrib.distributions.Categorical(probs=probs)
>>> mask = tf.Variable(tf.ones(dim), trainable=False)
>>> b = dist.sample([2])
>>> mask = tf.scatter_update(mask, b, [3,3])
>>> sess.run(tf.global_variables_initializer())
>>> print(mask.eval(session=sess))
[ 1.  1.  3.  3.  1.  1.  1.  1.  1.  1.]  # first call
>>> c = dist.sample([3])
>>> mask = tf.scatter_update(mask, c, [5,5,5])
>>> print(mask.eval(session=sess))
[ 3.  1.  3.  5.  3.  5.  5.  1.  1.  1.]  # second call

Describe the problem
I am trying to update mask at indices sampled by dist, and I need past updates to persist as I add more updates to mask. That is, I would expect the second call to be [ 1.  1.  3.  5.  1.  5.  5.  1.  1.  1.]. Since tf.scatter_update mutates mask, I would expect the updates to persist, but it seems like the the updates are made anew every time I call mask.eval().
Furthermore, perhaps I'm missing something, but the output of the second call is further unexpected in the sense that I see three 3's in mask, even when I never assigned three 3's to mask, only two. Is there an explanation for this?
If this is not a bug, then could we add a feature to allow for consistent and persistent updates?
Source code / logs
Please see above.

This question is better asked on  StackOverflow since it is not a  bug or feature request. There is also a larger community that reads questions there. Thanks!
Anyway, to answer the question, the issue is that in the line
mask = tf.scatter_update(mask, b, [3,3])

you set mask to the result of an update op. After that line, whenever you evaluate mask, you do another scatter_update to it, which sets more elements to 3. Later, the line
mask = tf.scatter_update(mask, c, [5,5,5])

applies another update on top of the original update. So, after that point, whenever mask is evaluated, it does two updates: one which sets two 3s, and another which sets three 5s. The first mask.eval(...) only applies the original update, and the second applies both updates. Therefore, a total of four 3s and three 5s are set (some updates may overwrite others).
To apply each update once, try removing the first mask.eval(...). Alternatively, do not assign mask to the return value of tf.scatter_update, but instead do something like
update1 = tf.scatter_update(mask, b, [3,3])
sess.run(tf.global_variables_initializer())
print(update1.eval(session=sess))
c = dist.sample([3])
update2 = tf.scatter_update(mask, c, [5,5,5])
print(update2.eval(session=sess))


Fix max_num and display selection counter for MultipleChooserPanel

Fixes #11561
this PR may solve this issue in two way:

make the selections input disabled when the user reach to maximum number.
display counter for the choices of the user.

as shown below:

but when the user submit the forms become less than the maximum number by one so if max_num = 3 , and
the user select all of them  the forms only show two and if max_num = 5 , the forms only show 4 and so on.
additionally this PR  solve this issue also as shown below:

and also the user can select the maximum number in more than one time like this:

I have not read through this but looks like we could leverage the bulk-actions or counts controller here for better management of counting elements / changing behaviour based on counts and showing those values to the user.

welcome  @lb- again ,  I will see the bulk-actions or counts controller  as you suggest ,but can you please tell me  all the
defects of my code , and why bulk-actions  instead this approach ,  this help me when I rewrite the code again.
and also , I'm thinking to apply for gsoc with Wagtail ,but I don ,t make sure may apply or not, and the idea I choose
to apply unfortunately removed so I choose other idea and this idea ,I am unfamiliar with  and also I am unfamiliar in writing proposal ,so it will take me much time to write its proposal and also I am busy with other things , I just say that because I will return to this PR after completion  its proposal after may be some week , if you have any idea
how to write a good and fast proposal , please let me know ,Thanks.

Hey @elhussienalmasri - I've added a comment on the issue about a potentially different approach to.this PR.
https://github.com/wagtail/wagtail/issues/11561#issuecomment-2002196259
Best to chat on Slack about your GSoC question.

I will continue working on this PR soon , but I have another PR , if and when you have time @lb- , please give feedback on
this PR #11809 , Thanks.

@lb- While I understand the migration to stimulus is important, I feel like it shouldn't block fixing bugs in the current UI components.  From a selfish perspective this is affecting my users, and preventing me from upgrading from inlinechoosers to multichooserpanels. Maybe the stimulus update is a good fast follow?

@dopry  I have not really had a chance to look at this PR in full, my initial comment was more of a drive by.
I am not sure I will have a chance to review this PR in full for some time but have it on my radar, maybe others in the core team may have a look.
My original comment appears to be still valid though, there's a lot of manual handling of DOM selection and state tracking in this PR that is very prone to error. That could be handled by just adding a few data attributes (for the count tallying) and not too much additional code for the disabling of additional selections. My main concern is less about the migration to Stimulus but more about we have 70% of this functionality already in other code, and using that instead of re-writing it in the chooser modal code is worth looking into.
I guess if we do this PR we would need maybe want to bolster it a bit with some unit tests, in this area of code we do not have TypeScript to fall back on for simple errors either.
Maybe it's worth pinging @elhussienalmasri  and seeing if you are still up for tackling this PR (or a fresh version of it).

What approach did you end up with @lb- ?
if you are still determined to  CountController (w-count) approach, then there are two issues:

the submitted or previous forms count as I said, and find a solution to this issue, just by calculating it and attached it as an attribute to openModalButton (Not Recommended as @ gasman mentioned in my other PR), the second solution is to send it ( count of previous forms) to the server side. as I did in my other PR.
we will need to modify w-count, or make another logic as it does not count the dynamic selection, the count of it is always zero in this case as I test it, (if the test is incorrect let me know)here:

wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html
<form action="{{ chosen_multiple_url }}" method="GET" data-multiple-choice-form data-controller="w-count" data-action="w-coun#count" data-w-count-find-value="input:checked" data-w-count-container-value="[data-multiple-choice-form]">

Even if change the data-w-count-find-value="input:disabled"  ,change the attribute from checked to disable to know what I mean, you will notice the count does not change after selecting checkbox , it supposed after the selection checkbox the input with disabled attribute to be removed so the count must change and decrease by one but it remains the same, so w-count
only count fixed elements as I test so it must be updated or make a new logic to count dynamic elements. I don,t have much experience with stimulus but I will try to update it if the approach is selected. and if you have any idea about this issue pleas let me know.
in addition to that the UI  will not have a Counter. but in this PR, it will have.
but if we end up with the solution in this PR  it will be Counter in the UI and yes I agree with you this code needs to be updated,

there's a lot of manual handling of DOM selection and state tracking in this PR that is very prone to error. That could be handled by just adding a few data attributes (for the count tallying) and not too much additional code for the disabling of additional selections.

and I think if it has any issue it will be easy to solve. and if this solution is selected and if you have any notes or feedback about this solution please let me and I will update it ASAP.
so please let me know what approach you end up with.

Thanks @elhussienalmasri  yes, I ran into similar items. Have a look at my comments on https://github.com/wagtail/wagtail/issues/11561 and hopefully that will help a bit. Especially with a bit of a more constrained scope.

Although this PR Fixes the issue by disabling items, adding a counter, and disabling items (Not Recommended)  as mentioned, this PR may solved just be by the counter. But this new PR #12443 has improvements.
I opened a new PR because the new PR has more changes and it's better to make it separately, instead of completing in this PR. so when you have time @lb-, please give feedback on this new PR #12443.
I will close this PR, and if anyone needs it, they can reopen it.

Thank you @elhussienalmasri


acl is undefined

I have a test catalog which is getting errors on loading every table or view I try with recordset.
The page loads and displays content but then dies with the terminal error shown below.
Example URL: https://synapse-dev.isrd.isi.edu/chaise/recordset/#2/Chaise:Table Access
acl is undefined
   Reference.prototype._checkPermissions@https://synapse-dev.isrd.isi.edu/ermrestjs/ermrest.js?v=8c39d379cad4516e9dee24922f309321:6634:29
   get canCreate@https://synapse-dev.isrd.isi.edu/ermrestjs/ermrest.js?v=8c39d379cad4516e9dee24922f309321:6551:63
   anonymous/fn@https://synapse-dev.isrd.isi.edu/chaise/scripts/vendor/angular.js?v=ea03e809effc2b87cc7bd368e1740e84 line 14432 > Function:2:159
   $RootScopeProvider/this.$get</Scope.prototype.$digest@https://synapse-dev.isrd.isi.edu/chaise/scripts/vendor/angular.js?v=ea03e809effc2b87cc7bd368e1740e84:17064:34
   $RootScopeProvider/this.$get</Scope.prototype.$apply@https://synapse-dev.isrd.isi.edu/chaise/scripts/vendor/angular.js?v=ea03e809effc2b87cc7bd368e1740e84:17337:13
   done@https://synapse-dev.isrd.isi.edu/chaise/scripts/vendor/angular.js?v=ea03e809effc2b87cc7bd368e1740e84:11572:36
   completeRequest@https://synapse-dev.isrd.isi.edu/chaise/scripts/vendor/angular.js?v=ea03e809effc2b87cc7bd368e1740e84:11778:7
   requestLoaded@https://synapse-dev.isrd.isi.edu/chaise/scripts/vendor/angular.js?v=ea03e809effc2b87cc7bd368e1740e84:11711:9

The only two things I think are unusual about this catalog are:

I use a new column type inet on some tables (but it also fails on views w/o this column)
I have fewer permissions set in the /ermrest/meta API

Without digging into the code too much for this issue (the checkPermissions function), it looks like the permission that is being looked for is returning an empty set. If ._meta[permission] is undefined, it will break the _checkPermissions(permission) function.
So if you are trying to check the write_user ACL and that ACL was not set, it will be trying to look through undefined instead of an array. Maybe if the ACL is not set, we need to still populate the _meta_ object properly at introspection.

Right, the current ermrest/master will not return an empty list for
acl types in the /meta/ API.  It only has a list if at least one
member is configured.  It would be good to make the consumer more
defensive in this case.
This stuff will change when we finally merge the new fine-grained ACL
support, as we'll abandon the /meta/ API and check permissions on
individual tables via a different mechanism...

Reassigning this to @karlcz to verify it has been fixed.

This looks like it is working now.


doc: Documented pitfall with NS labels in CNPs

I wanted to document a potential pitfall for users who are trying to do advanced things using CNPs.
For example, this doesn't work:
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
  name: "default-egress"
  namespace: internal
spec:
  endpointSelector: {}
  ingress:
  - {}
  egress:
  - toEndpoints:
    - matchLabels:
        k8s:io.cilium.k8s.namespace.labels.exposed-public: "true"

Traffic will be denied:
k exec -it -n kube-system cilium-h6qdb -c cilium-agent -- hubble observe -n internal -f
Jun  9 21:02:24.314: internal/tshoot:41832 (ID:1836) <> public/nginx:80 (ID:2277) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Jun  9 21:02:24.314: internal/tshoot:41832 (ID:1836) <> public/nginx:80 (ID:2277) Policy denied DROPPED (TCP Flags: SYN)
Jun  9 21:02:25.364: internal/tshoot:41832 (ID:1836) <> public/nginx:80 (ID:2277) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Jun  9 21:02:25.364: internal/tshoot:41832 (ID:1836) <> public/nginx:80 (ID:2277) Policy denied DROPPED (TCP Flags: SYN)

Testing setup details
Namespaces:
k get ns --show-labels
NAME              STATUS   AGE    LABELS
default           Active   120d   kubernetes.io/metadata.name=default
kube-system       Active   120d   kubernetes.io/metadata.name=kube-system
kube-public       Active   120d   kubernetes.io/metadata.name=kube-public
kube-node-lease   Active   120d   kubernetes.io/metadata.name=kube-node-lease
public            Active   21m    exposed-public=true,kubernetes.io/metadata.name=public
internal          Active   20m    kubernetes.io/metadata.name=internal

The pods:
$ kgp -o wide -n internal
NAME     READY   STATUS    RESTARTS   AGE   IP           NODE                   NOMINATED NODE   READINESS GATES
tshoot   1/1     Running   0          20m   <IP_ADDRESS>   lima-rancher-desktop   <none>           <none>
$ kgp -o wide -n public
NAME    READY   STATUS    RESTARTS   AGE   IP           NODE                   NOMINATED NODE   READINESS GATES
nginx   1/1     Running   0          21m   <IP_ADDRESS>   lima-rancher-desktop   <none>           <none>

My testing command from inside internal/tshoot:
tshoot:~# curl <IP_ADDRESS>

… and finally the cilium endpoint list:
root@lima-rancher-desktop:/home/cilium# cilium endpoint list
ENDPOINT   POLICY (ingress)   POLICY (egress)   IDENTITY   LABELS (source:key[=value])                                                      IPv6   IPv4         STATUS
           ENFORCEMENT        ENFORCEMENT
426        Enabled            Enabled           1836       k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=internal                 <IP_ADDRESS>   ready
                                                           k8s:io.cilium.k8s.policy.cluster=default
                                                           k8s:io.cilium.k8s.policy.serviceaccount=default
                                                           k8s:io.kubernetes.pod.namespace=internal
                                                           k8s:run=tshoot
508        Disabled           Disabled          2277       k8s:io.cilium.k8s.namespace.labels.exposed-public=true                                  <IP_ADDRESS>   ready
                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=public
                                                           k8s:io.cilium.k8s.policy.cluster=default
                                                           k8s:io.cilium.k8s.policy.serviceaccount=default
                                                           k8s:io.kubernetes.pod.namespace=public
                                                           k8s:run=nginx

Turns out, the following CCNP works:
apiVersion: "cilium.io/v2"
kind: CiliumClusterwideNetworkPolicy
metadata:
  name: "default-egress"
spec:
  endpointSelector:
    matchExpressions:
    - key: k8s:io.kubernetes.pod.namespace
      operator: NotIn
      values:
      - kube-system
  egress:
  - toEndpoints:
    - matchLabels:
        k8s:io.cilium.k8s.namespace.labels.exposed-public: "true"

This is how it looks:

Please ensure your pull request adheres to the following guidelines:

[X] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[X] All commits are signed off. See the section Developer’s Certificate of Origin
[X] Provide a title or release-note blurb suitable for the release notes.

doc: Documented pitfall with NS labels in CNPs

@zacharysarah Thanks for all your suggestions. I've applied those and squashed all commits into 1. Hence, I think this PR is ready to be merged. It looks like this:

@aditighag Anything left you would like to change? If not, I think we could merge it. (By "we", I actually mean "you" - I don't have the permissions to do so 😁).

Only documentation changes, doesn't need a full CI run.


Add notice when JavaScript is disabled

So the user don't stare for five minutes before he realizes it will not work.

This seems to be bigger problem than I thought… :(


Hi

@conor42
I also added the flzma2 algorithm to the p7zip. Can you add a description of the p7zip project to readme?
Or  I can provide a PR about it.
Thank you!

Nice 👍
Added a link.


Feature/target tracking, landmark msg & action

Landmark msg and action for use in the landmark server
Also includes some msgs for the target tracking visualization. I am unsure of whether they are used or should be deleted.
Closes #3
Closes #2

I removed the messages in CMakeLists.txt as well. Also removed the comment since it is not used.
I don't know anything about the Parameter message. So, @jorgenfj du you know, if we need this?


add ProteinBERT and restructure the tools directory

This PR includes:

[x] include toolbox repo into a plex monorepo in /tools/containers
[x] add a new tool ProteinBERT for protein sequences
[x] add helper .sh script to build containers and push them to ECR

decision to split this one up


Command Backtic doesn't work anymore

Hello,
I had Installed Karabiner recently, but after installation the Combination key  Cmd + `  (= "cycle through windows") doesn't work anymore ( with any program like Finder, Google Chrome, Firefox, etc.). So I uninstalled it and now the combination key works fine again. It seems like this is a bug. Of course I'd like Karabiner to work well without having this problem. Does anyone recognize this problem and more important does anyone have a solution?
MacOs 10.13.3 High Sierra
Karabiner-Elements 11.6.0
iMac
Apple Magic Keyboard

Did you have any rules that were overriding the placement of ` ? Any shortcuts using that key combo?

No, I did not have any rules that were overriding the placement of ` .No shortcuts.


Help Wanted

Token Address
e.g: https://scan.tomochain.com/address/0xa2fb8cb5f7cfb8fc99fb6c19d9a609fcc59dd96d
Token Symbol
e.g: Trx
Token Name
e.g: Trx Pro
Token Logo

Token Description
Same as Trx
Website
tron.org
Social links
e.g tron.org

use Tron info is not allowed


Add editor setting to stop the bottom panel from switching to the Stack Trace

Closes https://github.com/godotengine/godot-proposals/issues/11134

The Debugger's bottom panel switches to the Stack Tree every time it hits a breakpoint or steps. This behavior doesn't go well with panels you want to focus on like the evaluator.
This PR adds debugger/auto_switch_to_stack_trace to the editor settings so we have control over it.

This behavior doesn't go well with panels you want to focus on like the evaluator.

This makes me think whether we should have a special case by default and never switch to the stack trace if we're currently on the Evaluator tab.


Update eval_percep.py and train.py

cfg is already a dictionary no need to pass it to vars() on line 55 of eval_percep.py
line 189 of train.py , self.perceptual_model needs to be first passed to get_peft_model() along with lora_config

@atharvadeore999 Did you get the training or evaluation working? Can you please share you env details or pip freeze outout.

Hey ,sorry for late reply .I have attached the list of dependencies file. I have tried the evaluation code and made some changes in the code as mentioned above.I am going to try the training code asap. Will let you know if any issues are there in the code
requirements11.txt

You're very welcome

Hi, thanks for the PR! Could you provide some more details about the errors you were getting with the original training script that prompted the model-loading change?
The current model-loading code seems to work for me for both save_mode='all' and 'adapter_only' (so I can reproduce the validation accuracy when running eval_percep.py), with the packages in requirements.txt installed.
We were able to simplify some of the model-loading code (which originally had to explicitly call LoraConfig and get_peft_model) with the new PEFT setup, so we shouldn't need this extra code anymore.

I am using dreamsim v0.2.1 & peft==0.13.2.Here is my environment file
requirements11.txt
ERROR 1:
Seed set to 1234
Traceback (most recent call last):
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/./evaluation/eval_percep.py", line 144, in
run(args, device)
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/./evaluation/eval_percep.py", line 130, in run
eval_model, preprocess = load_dreamsim_model(args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/./evaluation/eval_percep.py", line 56, in load_dreamsim_model
model_cfg = vars(cfg)
^^^^^^^^^
TypeError: vars() argument must have dict attribute
SOLUTION 1:
model_cfg = cfg
ERROR 2:
Seed set to 1234
Using cache found in ./models/facebookresearch_dino_main
/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/anaconda3/envs/ds/lib/python3.12/site-packages/torch/nn/utils/weight_norm.py:28: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
Total params: 92623105 | Trainable params: 6822401 | % Trainable: 7.365765809729656
Traceback (most recent call last):
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/./evaluation/eval_percep.py", line 143, in
run(args, device)
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/./evaluation/eval_percep.py", line 129, in run
eval_model, preprocess = load_dreamsim_model(args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/./evaluation/eval_percep.py", line 58, in load_dreamsim_model
model.load_lora_weights(args.eval_checkpoint)
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/new/dreamsim/evaluation/training/train.py", line 196, in load_lora_weights
self.perceptual_model = PeftModel.from_pretrained(self.perceptual_model.base_model.model, checkpoint_root).to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/emsg/2d46715b-293d-4478-acd4-5f000d443896/anaconda3/envs/ds/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1709, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'PerceptualModel' object has no attribute 'base_model'
SOLUTION 2:
def load_lora_weights(self, checkpoint_root, epoch_load=None):
if self.save_mode in {'adapter_only', 'all'}:
if epoch_load is not None:
checkpoint_root = os.path.join(checkpoint_root, f'epoch_{epoch_load}')
        with open(os.path.join(checkpoint_root, 'adapter_config.json'), 'r') as f:
            adapter_config = json.load(f)
        lora_keys = ['r', 'lora_alpha', 'lora_dropout', 'bias', 'target_modules']
        lora_config = LoraConfig(**{k: adapter_config[k] for k in lora_keys})
        self.perceptual_model = get_peft_model(self.perceptual_model, lora_config)

        logging.info(f'Loading adapter weights from {checkpoint_root}')
        self.perceptual_model = PeftModel.from_pretrained(self.perceptual_model.base_model.model, checkpoint_root).to(self.device)
    else:
        logging.info(f'Loading entire model from {checkpoint_root}')
        sd = torch.load(os.path.join(checkpoint_root, f'epoch={epoch_load:02d}.ckpt'))['state_dict']
        self.load_state_dict(sd, strict=True)

Hey @stephanie-fu , can you please tell how to solve the above errors without adding any extra code ?


latin_ipa_forward set to en_us pronounces "is" as "aɪz" rather than "ɪz"

Tried swapping out the default phonemizer in ForwardTacotron for DeepPhonemizer and noticed the model was very hesitant to learn attention. Took a look at the actual output and it was using "aɪz" instead of "ɪz". I have since switched to the cmudict version which does not have this issue, but it would be nice to have this fixed, especially for such a common word. Looking at the actual wikipron dataset I see that the phonemes for "is" are correct, so I'm not sure what's causing this.

I just noticed the same thing using that pretrained model. If you look at the entries in lang_phenome_dict (which by default Phonemizer will use before running inference) "is" is mapped to "aiz" so presumably the training data for that model needs to be fixed and the model needs to be retrained.


Cannot use DateTime, getting error: Provided Json, expected DateTime

Hi I have a following model:
model BpmnProcessInstance {
  dateStarted   DateTime
}

When trying to create a new record with
await photon.bpmnProcessInstances.create({
      data: {
        dateStarted: new Date(),
      }
})

I am receiving this error:
Argument dateStarted: Got invalid value {} on photon.createOneBpmnProcessInstance. Provided Json, expected DateTime.

How can I use dates in my app?

The only way I found this to work was to send date in strng format:
await photon.bpmnProcessInstances.create({
data: {
dateStarted: new Date().toISOString(),
}
})

I can't reproduce this with<EMAIL_ADDRESS>binary version: 237b46b97773f5018e336550e4285e2a78c38483

This was fixed in https://github.com/prisma/photonjs/commit/218b74906a2ee146976082ce30bd9111432301ec
Can you please try again in the latest version?

Hi, I am using the version 015 and I am still getting this error.

FYI: my date fields are created by Photon as following: date?: Date | string | null;

Can you please make sure you have run prisma2 dev after you have updated your prisma2 version.
I still can't reproduce this:

Some DateTime issue occurs on my side also.
I have a seenAt DateTime[] array in my schema and when I query for that, it returns { seenAt: Invalid Date } with no records for it, instead of an empty array [].
The primsa2 version is 015.

The workaround for this is to check if the result is an array, and if is not to initialise it to be an array:
if(Array.isArray(seenAt) == false) {
    seenAt = [];
}

I must be doing something wrong but I am receiving the error.
Version
<EMAIL_ADDRESS>binary version: 20b6dc13949cccccfef5be07c0be7a3d7c858abe

Model:
model Data {
  id         String  @default(cuid()) @id
  createdAt         DateTime?         @default(now())
  updatedAt         DateTime?         @updatedAt
  version           DateTime?
}

code
await ctx.db.data.create({
  data: {
    version: new Date()
  }
});

Result:
Invalid `photon.data.create()` invocation in ./src/resolvers/bpmn_task_instance/task_instance_resolver.js:102:53

    {
      data: {
        version: {}
        ~~~~~~~
      }
    }

Argument version: Got invalid value {} on photon.createOneData. Provided Json, expected DateTime.

I did delete the '@generatedfolder and re-runyarn prisma2 generate`
Any advice?

Maybe you can point me to some code in the generated files to see whether it is all generated correctly?

Hi, this was really blocking me so I found the culprit, which unfortunately is a "bug" in your code. Sometimes the dates get somehow mangled and your condition for if (value instanceof Date) in getGraphQLType function becomes unstable (e.g. when passed across frame boundaries.).
Thus the safest way to test this is to do if (Object.prototype.toString.call(value) === '[object Date]'
After this all worked ... I did a PR prisma/photonjs#285

Thanks for the PR. I have @timsuchanek to review it.
I am still unable to reproduce this though even after pasting the exact code that you have shared. Can you please tell me the node js version that you are using?

Hi, it is 12.0.8.
This issue was a bit puzzling. This kept happening when used with Wallaby.js.
On first test run the correct date was passed. On second test run the Date was not passed as instance of Date. It is a bit difficult situation to explain, but overall the solution should lead to a bit more stable state.

Did you try executing the script instead of executing it via wallaby? Otherwise might be a bug in wallaby.

Thanks a lot for looking into this @tomitrescak !
Fixed in latest alpha by https://github.com/prisma/photonjs/pull/285.
You can try it out with npm i -g prisma2@alpha.

I seem to be getting the same behaviour with Prisma 4.12.
This breaks:
prisma.deed.upsert({
        create: { someDate: new Date() },
        update: someData,
        where: {...},
      }
    )

While changing it to new Date().toISOString() fixes it.


Avoid importing AWSJobStore without AWS extra installed (resolves #1115)

Backports 8e5fd0feca3c75fd44ccd71339340656198a4d1b to 3.3.x

Jenkins, test this please.

Jenkins, test this please.

Jenkins, test this please

@hannes-ucsc ready for review


Prevent clean-tooltip directive warning to spam through the tests

Describe
Console error as warning is printed multiple times while running tests.
[Vue warn]: Failed to resolve directive: clean-tooltip

Context
Run all the tests to return the warnings. Issue should be evaluate solved accordingly, related to the relevance of the function itself. E.g. it can be mocked/imported globally or it has to be added for single cases.
This specific warning makes it not possible to read unit test reports from CI, unless raw file is opened.

Solved with https://github.com/rancher/dashboard/issues/9108


Fix MONGODB_URI environment variable in README.

The README mentions MONGODB_URL, but the server expects MONGODB_URI.

That was fast 🚀


Appstudio update mvp-test-component

Pipelines as Code configuration proposal

Pipelines as Code CI/mvp-test-component-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
5 seconds
init

✅ Succeeded
12 seconds
clone-repository

✅ Succeeded
1 minute
build-container

✅ Succeeded
15 seconds
clair-scan

✅ Succeeded
12 seconds
sanity-inspect-image

✅ Succeeded
10 seconds
sbom-json-check

✅ Succeeded
9 seconds
deprecated-base-image-check

✅ Succeeded
57 seconds
clamav-scan

✅ Succeeded
15 seconds
sanity-label-check

✅ Succeeded
15 seconds
sanity-optional-label-check

✅ Succeeded
4 seconds
show-summary


Remove Experimental Tag From Search Comparison Tool

What/Why
What are you proposing?
I believe that the comparison tool is stable and have no immediate plans to make changes to it. IMO, we should remove the experimental tag from the tool in an upcoming release.
What problems are you trying to solve?
We should try to minimize the amount of time anything is considered experimental.
What is the developer experience going to be?
None
Are there any security considerations?
No
Are there any breaking changes to the API
No
What is the user experience going to be?
I believe the "Experimental Feature" label should be removed, but the box it's in with the description, link to documentation, and forum should remain. https://searchapps.playground.opensearch.org/app/searchRelevance#/.

Are there breaking changes to the User Experience?
No
Why should it be built? Any reason not to?
Experimental features are meant for features that are not ready for production due to potential API changes or performance concerns. This feature has neither of those concerns.
What will it take to execute?

[ ] Replace the title attribute for the EuiCallOut component in public/components/common/header.tsx with "Description" or something else. Make sure the tests pass.
[ ] Update documentation to remove the experimental status https://opensearch.org/docs/latest/search-plugins/search-relevance/index/

What do you think? @dagneyb @elfisher @lauralexis @dblock @macrakis

This is the approach we're going to take. Moving this into "Next" in the project and removed "Proposal".

We're delaying removal of the experimental tag until a later date.

Wanted to clarify the original issue description

I believe the "Experimental Feature" label should be removed, but the box it's in with the description, link to documentation, and forum should remain.

@noCharger made a good point in this comment on my previous attempt, EuiCallout may not be a consistent component to use to hold the description for the Search Comparison Tool.
For example, VizBuilder, another experimental OpenSearch Dashboards feature, uses EuiCallout to communicate to the user that the feature is experimental.

Any suggestions/ideas on what to use for displaying the tool description, if at all? Is EuiCallout the conventional component to indicate experimental status in OpenSearch Dashboards?
cc: @kgcreative

Thanks y'all.
My recommendation would be to move the content to a paragraph under the title. I believe Laura's design for beyond P0 accounts for this:

I like the clarity of explicitly linking to documentation and forums.


version 3.1.1 Loader bug

on html5 target
3.1.1 Loader can not load image with the function load and loadBytes
must be BackgroundWorker can't dispatch complete event
neko and windows target  is ok

Thank you! I'm sorry for the regression, this change in Lime has just fixed the issue:
https://github.com/openfl/lime/commit/233447d6c0b7ce2e6b3d9f7f13c18db387cc1871
I'll have to think more about whether there should be an "auto-complete" behavior in BackgroundWorker (for simplicity) or not. In cases like Loader, though, it obviously can't assume it's complete until the data is finished downloading :smile:
Thanks!


libunwind tests link to .libs/libunwind-x86_64.a and to .libs/libunwind.a but don't use the interface library

It's strange, see the graph:

We should probably have libunwindtest-support link the correct one transitively.

@mikbras Do you have any historical context?

/cc @CodeMonkeyLeet

Hi Andy. The tests were written by VVDN. I'm not sure what they are doing or are suppose to do.
What is the "interface library"?

Ah, it is not an interface library, it's a static library: libunwindtest-support (but its interface still can/should be used to link the right library).
What is "VVDN"?

These are the confusing lines, they were last edited by you and "arjunvnambiar":
    target_link_libraries(libunwindtest-${NAME}_enc libunwindtest-support)
    target_link_libraries(libunwindtest-${NAME}_enc ${LIBUNWIND_LIB_DIR}/libunwind-x86_64.a ${LIBUNWIND_LIB_DIR}/libunwind.a)
    target_link_libraries(libunwindtest-${NAME}_enc oelibc oelibcxx oeenclave)

I'm closing this in favor of #1128, as that will require this to be fixed.


No Plugin Options

Describe the bug
Following the warning I began a new vault to test this, I installed the plugin and activated but the options do not appear (see screenshot). Is there a dependency I'm not aware of?
Steps to reproduce

Setup new Vault
Go to Community Plugins, search and install Things Logbook
Activate plugin and look for settings tab

Expected behavior
I assumed I would have found a Things Logbook just as I did when I installed into my primary personal vault.
Screenshots

Environment (please specify)
OS
Mac OS X: Big Sur 11.5.2
Obsidian Version (e.g. v0.10.6)
v0.12.12
Theme (if applicable):
None

Very strange! There is a check to make sure you're on a Mac, but that shouldn't be failing. I just tested on macOS 11.3.X, 11.4.X, and 11.5.X in case Apple changed something on their end.
From your screenshot, it looks like there are more settings in the sidebar if you scroll down. Could you just confirm that it's not hidden below Command palette and daily notes?


Static property references (and static methods) from Dart namespace are garbled, ':' character, bad function name

Static references (looks like particularly ones from the dart namespace) are getting garbled by the transpiler. For example:
https://github.com/JeroMiya/xamarin.flutter/blob/master/FlutterSDK/src/Animation/Animationcontroller.cs#L438
            else if (target == Value)
            {
                simulationDuration = Dart:coreDefaultClass.Duration.Zero;
            }

Here's the equivalent dart code:
    } else if (target == value) {
      // Already at target, don't animate.
      simulationDuration = Duration.zero;
    }

At least partial fix in https://github.com/JeroMiya/xamarin.flutter/pull/52


pg_notify listener support

Does the listener module support pg_notify? I assumed so when I first read about it. But it's unclear based on the example and I don't see any reference in the code.

If you want to send a notification you merely need to execute a NOTIFY <channel name>, '<payload>'; statement, as shown here: https://github.com/launchbadge/sqlx/blob/master/examples/postgres/listen/src/main.rs#L58-L60
Unfortunately, NOTIFY can't be part of a prepared statement so binding channel names or payloads is not possible, so format!() is used instead. We don't recommend doing this with untrusted user input because it introduces a possible SQL injection exploit.

If you were asking about invoking the pg_notify function, you should be able to do this from sqlx::query(), which does give you the ability to bind parameters:
sqlx::query("SELECT pg_notify($1, $2)")
    .bind("<channel>")
    .bind("<payload>")
    .execute(connection);

Sorry for the poor description. No, I'm asking about listening to pg_notify. Here's how I do it with rust-postgres for reference:
            let mut client = Client::connect(&conn_str, NoTls)?;
            client.batch_execute("LISTEN my_channel;")?;
            let mut notifications = client.notifications();

That's implemented by the PgListener type. Usage is shown in the example I linked above. You can either call .listen() with a single channel name or .listen_all() with a list of channel names, and then call .recv() to get the next notification.


[Feature Request]: Navigate to Home Page on Clicking the logo

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
I want to work on it again as the website has completely changed
The logo and the text should redirect to the homepage of the website
Please assign this to me under hactoberfest and gssoc.
I would like to work on it
Use Case
Makes navigation to homepage easier.
Benefits
This would help to directly and easily go to the homepage without scrolling down to get to the homepage button
Priority
High
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

@mansiruhil13 Please assign this to me
I would like to work on it

@mansiruhil13  Please assign this to me
I would like to work on it


papercut(autocad/civil): null applicationId causes exception preventing conversion

Issue encountered receiving data into AutoCAD 22 in 'update' receive mode. We've seen an edge case where an object's applicationId was null, which caused an exception on checking for an existing object in the model.
I think more ideal behaviour could be either of the following:

Add a null or empty check on applicationId. If null, return empty list of existing objects and allow the object to be created as new.
Catch the exception in a lower level of the conversion so just the specific object conversion fails (somewhere here), and other objects will convert/receive successfully.

These are just my initial thoughts, so happy to continue discussion!

Taking a look at this now - we are checking for null applicationIds here but in your case the string may have been empty rather than null. Pushing a fix for that soon, the behavior will be as described in your first bullet point ✌


[Access Request] codeunit 6501 "Item Tracking Data Collection" RetreiveTempGlobalEntrySummary

Is it possible to get a procedure in codeunit 6501 "Item Tracking Data Collection" to retrieve TempGlobalEntrySummary after calling procedure RetrieveLookupData? Or a new procedure also called RetrieveLookupData with an extra parameter?
Example of usage:
ItemTrackingDataCollection.RetrieveLookupData(TrackingSpecification, true);
ItemTrackingDataCollection.GetTempGlobalEntrySummary(TempGlobalEntrySummary);

New procedure ex 1:
procedure GetTempGlobalEntrySummary(var TempGlobalEntrySummary2: Record "Entry Summary" temporary)
begin
    TempGlobalEntrySummary2.Copy(TempGlobalEntrySummary, true);
end;

New procedure ex 2:
procedure RetrieveLookupData(var TempGlobalEntrySummary2: Record "Entry Summary" temporary; var TempTrackingSpecification: Record "Tracking Specification" temporary; FullDataSet: Boolean)
begin
    RetrieveLookupData(TempTrackingSpecification, FullDataSet);
    TempGlobalEntrySummary2.Copy(TempGlobalEntrySummary, true);
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Adding custom cursor, matching website theme

Is your feature request related to a problem? Please describe.
Adding a custom animated curser, which matches the theme
Describe the solution you'd like
The current curser, which is system's default one, looks pretty below par.

Hi @Atishyy27  not planned this one!


define location of configuration "application.yaml" as env variable

Hi
at the moment the location is fixed coded to the directory of the application.
A more flexible approach would help in the kubernetes enviroment.
We want to use a config-map and mount them into the docker container. But for this
we need a way to name the location of the application.yaml in a more dynamic way.

// Default returns the default environment configuration to be loaded from application.yml
func Default(envPrefix string) *viperEnv {
	configFile := &ConfigFile{
		Path:   ".",
		Name:   "application",
		Format: "yml",
	}
	return New(configFile, envPrefix)
}

maybe something like this
viper.AddConfigPath("$SERVICE_BROKER_PROXY_CONF")

location and name of application.yml can now be configured with pflags (recommended) or env vars. Also everything that can  be defined inside application.yml can also be configured via pflags and env vars


DNSEnpoint CRD: the server could not find the requested resource

When using the new DNSEndpoint CRD, external-dns continuously logs the server could not find the requested resource. The DNS records defined in the CRDs are correctly created.
Full logs:
time="2018-09-13T10:28:52Z" level=info msg="config: {Master: KubeConfig: RequestTimeout:30s IstioIngressGateway:istio-system/istio-ingressgateway Sources:[crd] Namespace: AnnotationFilter: FQDNTemplate: CombineFQDNAndAnnotation:false Compatibility: PublishInternal:false PublishHostIP:false ConnectorSourceServer:localhost:8080 Provider:inmemory GoogleProject: DomainFilter:[] ZoneIDFilter:[] AlibabaCloudConfigFile:/etc/kubernetes/alibaba-cloud.json AlibabaCloudZoneType: AWSZoneType: AWSAssumeRole: AWSMaxChangeCount:4000 AWSEvaluateTargetHealth:true AzureConfigFile:/etc/kubernetes/azure.json AzureResourceGroup: CloudflareProxied:false InfobloxGridHost: InfobloxWapiPort:443 InfobloxWapiUsername:admin InfobloxWapiPassword: InfobloxWapiVersion:2.3.1 InfobloxSSLVerify:true DynCustomerName: DynUsername: DynPassword: DynMinTTLSeconds:0 OCIConfigFile:/etc/kubernetes/oci.yaml InMemoryZones:[] PDNSServer:http://localhost:8081 PDNSAPIKey: PDNSTLSEnabled:false TLSCA: TLSClientCert: TLSClientCertKey: Policy:upsert-only Registry:txt TXTOwnerID:testing-crd TXTPrefix: Interval:1m0s Once:false DryRun:false LogFormat:text MetricsAddress::7979 LogLevel:debug TXTCacheInterval:0s ExoscaleEndpoint:https://api.exoscale.ch/dns ExoscaleAPIKey: ExoscaleAPISecret: CRDSourceAPIVersion:externaldns.k8s.io/v1alpha1 CRDSourceKind:DNSEndpoint ServiceTypeFilter:[]}"
time="2018-09-13T10:28:52Z" level=info msg="Created Kubernetes client https://<IP_ADDRESS>:443"
time="2018-09-13T10:28:52Z" level=warning msg="Could not update ObservedGeneration of the CRD: the server could not find the requested resource (put dnsendpoints.externaldns.k8s.io examplednsrecord)"
time="2018-09-13T10:28:52Z" level=info msg="CREATE: hello.example.com 180 IN A <IP_ADDRESS>"
time="2018-09-13T10:28:52Z" level=info msg="CREATE: hello.example.com 0 IN TXT \"heritage=external-dns,external-dns/owner=testing-crd\""
time="2018-09-13T10:29:52Z" level=warning msg="Could not update ObservedGeneration of the CRD: the server could not find the requested resource (put dnsendpoints.externaldns.k8s.io examplednsrecord)"
time="2018-09-13T10:29:52Z" level=info msg="CREATE: hello.example.com 180 IN A <IP_ADDRESS>"
time="2018-09-13T10:29:52Z" level=info msg="CREATE: hello.example.com 0 IN TXT \"heritage=external-dns,external-dns/owner=testing-crd\""

Using minikube version v0.28.2 (default configuration). The cluster is set up with the following configuration:
RBAC yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: external-dns
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: external-dns
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: external-dns
subjects:
  - kind: ServiceAccount
    name: external-dns
    namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
 labels:
   app: external-dns
   heritage: Tiller
   release: external-dns
   chart: external-dns-0.7.6
 name: external-dns
rules:
 - apiGroups:
     - ""
     - extensions
   resources:
     - ingresses
     - services
     - pods
     - nodes
   verbs:
     - get
     - list
     - watch
 - apiGroups:
     - externaldns.k8s.io
   resources:
     - '*'
   verbs:
     - get
     - list
     - watch
 - apiGroups:
     - externaldns.k8s.io
   resources:
     - dnsendpoints/status
   verbs:
     - '*'

DNSEndpoint custom resource definition yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
 name: dnsendpoints.externaldns.k8s.io
 labels:
   api: externaldns
spec:
 version: v1alpha1
 group: externaldns.k8s.io
 names:
   kind: DNSEndpoint
   plural: dnsendpoints
 scope: Namespaced
 subresources:
   status: {}
 validation:
   openAPIV3Schema:
     properties:
       apiVersion:
         type: string
       kind:
         type: string
       metadata:
         type: object
       spec:
         type: object
         properties:
           endpoints:
             type: array
             items:
               type: object
               properties:
                 dnsName:
                   type: string
                 labels:
                   type: object
                 providerSpecific:
                   type: object
                 recordTTL:
                   type: integer
                   format: int64
                 recordType:
                   type: string
                 targets:
                   type: array
                   items:
                     type: string
       status:
         type: object
         properties:
           observedGeneration:
             format: int64
             type: integer

DNSEndpoint example record yaml
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: examplednsrecord
spec:
  endpoints:
  - dnsName: hello.example.com
    recordTTL: 180
    recordType: A
    targets:
    - <IP_ADDRESS>

external-dns is installed using helm with the following values:
Helm values yaml
provider: inmemory
sources:
  - crd
extraArgs:
  crd-source-apiversion: externaldns.k8s.io/v1alpha1
rbac:
  create: false
  serviceAccountName: external-dns
txtOwnerId: testing-crd
logLevel: debug

@bartelsielski I ran into the same issue as you. Did you figure out a workaround?
/cc @shashidharatd

@danehans As far as I've tested (which isn't that far), DNS records defined in the CRDs still get created. The status field of the CRD object just won't get updated. So a possible workaround could be to just ignore the warning (I haven't done any in depth testing so this might not be a viable workaround in the long run).

In my case, I also ran into this issue, and I found that "CustomResourceSubresources" feature gate was set to default ("false") in my cluster.
I set this to "true" and re-created CRD, then created CR again, then everything works.

minikube v0.28.2 still deploys kubernets v1.10. Try:
minikube start --kubernetes-version v1.11.3

So I verified both solutions mentioned above:

enabling the CustomResourceSubresources feature gate in Kubernetes v1.10
using Kubernetes v1.11 (the CustomResourceSubresources feature gate is enabled by default in this version)

Thanks for the help guys.


Error on fresh install of blendid 4.0.0-rc.12

Current version: 4.0.0-rc.12
The Problem?
path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1211:7)
    at Object.<anonymous> (/Users/xavianaxw/Code/xavianetti/node_modules/blendid/gulpfile.js/lib/task-defaults.js:58:20)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

How to replicate?
yarn add blendid
yarn run blendid -- init
How to solve this?
As what the error message implicates, it seems that it is pointing to this line of code under the ghPages section of node_modules/blendid/gulpfile.js/lib/task-defaults.js
cacheDir: path.join(os.tmpdir(), pkg.name)
I did a simple console.log on both os.tmpdir() and pkg.name and realized that pkg.name was undefined.
Enter name property in package.json, so change from
{
  "dependencies": {
    "blendid": "^4.0.0-rc.12"
  }
}

to this
{
  "name": "xavianetti",
  "dependencies": {
    "blendid": "^4.0.0-rc.12"
  }
}

Enter your init command: yarn run blendid -- init and you're good to go
Or
Just run npm init and set up your package.json with the setup helper and run yarn run blendid -- init after you're done with that
and you end up with something like this
{
  "dependencies": {
    "blendid": "^4.0.0-rc.12"
  },
  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "description": ""
}

Not much of an issue on blendid's part but just thought might be helpful for anyone who comes across this problem, since this wasn't a problem in previous install of blendid (early February)
Have a great weekend y'all!

JUST ran into this myself. Pushed up rc.13 with the fix. I added the yarn init step back to the quickstart section of the README, as well as provided a fallback for pkg.name.
Thanks!

No worries! @greypants keep up the good work!


Enable golanci-lint, add rule for testing and fix lints

Enable and add initial golangci-lint rules
fix lints
add make test rule and prow job: https://github.com/kubernetes/test-infra/pull/22217

Fixes: https://github.com/kubernetes-sigs/e2e-framework/issues/10
/assign @vladimirvivien @spiffxp

/hold need https://github.com/kubernetes/test-infra/pull/22217

@vladimirvivien @spiffxp lets merge this https://github.com/kubernetes-sigs/e2e-framework/pull/12

@spiffxp before merging this i would lile to have the test-infra pr merged then can validate with the changes here :-)

/hold cancel

/lgtm
/approve


Missing capture method on transaction

Is this method missing for a reason?

Nope, no reason. It's added now though :)

Great! Thank you for the fast response :)


FEAT: Fieldplot folder settings class

Full control on field plot settings. Existing methods offer a very partial support.

thank you lorenzo for this feature :)


add supported for ws in reverse proxy

This should address #81.
Some things worth noting:

I dug through the nginx source and it appears they make the change for a WebSocket connection by the status code, so I opted for the same thing.

For testing, I went ahead and ran the autobahn fuzzing server behind the proxy and used the testeeclient to exercise it. All the test passed successfully. I can share those results and commands used in slack if that would be helpful.

I also setup a regular http server behind the proxy to verify that still worked. It did.

Also as noted in the issue, you need to make sure your proxy directives include Connection and Upgrade like so:

proxy / localhost:8080 {
    policy round_robin
    proxy_header Connection {>Connection}
    proxy_header Upgrade {>Upgrade}
}

Let me know if I missed anything or what you would like to see changed.

This is pretty cool. It didn't look much needed to change either - how long does the connection last? indefinitely?
I think the best option would be to have a websocket on or similar directive. That would be easier to explain in the docs and to others rather than the esoteric proxy_header Connection directives. The websocket option directive could handle that. (And then in the future, that same directive can have options for timeouts and such).
Secondly with the websocket directive, you can use that to control whether or not you want to hijack the Status 101 response. Currently if someone, for whatever reason had their backend return a 101 and didn't have websockets enabled, they might be in for a nasty bug.
That said - 👍 on the PR.

Yes. The connection last until either the client or server disconnects it. I also tested to make sure that if the client/server abruptly or abnormally closed that it still properly closed. Looking over the Nginx code again, it looks like it actually checks both the Upgrade header and status when processing the headers:
if (u->headers_in.status_n == NGX_HTTP_SWITCHING_PROTOCOLS) {
    u->keepalive = 0;

    if (r->headers_in.upgrade) {
        u->upgrade = 1;
     }
}

https://github.com/nginx/nginx/blob/2db2346e9858b0e2bc441fe293f1581a1b3371ae/src/http/modules/ngx_http_proxy_module.c#L1871-L1877
Maybe we should follow suit?
I agree the websocket directive would be a neat add. Currently, adding the proxy_header directives works pretty much like nginx does as outlined in their blog:
http://nginx.com/blog/websocket-nginx/
I can add the websocket directive tomorrow.

Elegant solution! I also like the idea of a websocket directive. At the risk of sounding a bit pedantic, let's make the directive websocket alone, like gzip, for example:
proxy / localhost:8080 {
    websocket
}

This also aligns well with the fastcgi directive which has "presets" - right now the only one is php but it is so common and takes away a lot of the nitty-gritty cruft.
(As an aside, I love how Go made the two concurrent io.Copy() so easy! Isn't that effectively a TCP proxy at that point? Just happens to be websocket data in our case...)

:+1:

+1

I added the websocket directive and Upgrade comparison. I agree, Go's std lib made this really easy. Yeah it is just a TCP proxy at this point, but at the same time WebSockets are basically just a TCP connection with a simple framing protocol. :smile:

Looking great!
We should probably add at least one test to make sure it stays working properly. I might be able to get around to it this weekend, in which case I can merge the PR and write the test(s), or anyone else is welcome to do it.

I'm nearly finished with a test for this feature -- just noticed a few things along the way, including a question or two that I need better understanding of in order to finish the tests. We're almost there!

@mholt. Awesome! I just pushed those changes. Anything else, let me know.

Thank you for your patience and effort on this feature! Can't wait to use it on my own site.
I'll be pushing the tests soon.

Certainly. Thanks for your work and writing the tests. :smile:


OTG Test Update - TE 11.2 Loss Pct fix

This is required for the correct packet loss telemetry.
gnmi.Get(t, ate.OTG(), flowPath.LossPct().State()) not yet supported on OTG.
Fixes #646

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1663

Relevant Lines:
2389

💛  - Coveralls

/gcbrun

/gcbrun


Add new release notes scripts for consolidated release notes

Description
Add new release notes scripts for consolidated release notes
Issues Resolved
#3434
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Hi @gaiksaya this is a temp script:

That will be erased later on.
That is by design so that all different types of category names by plugins can all be detected with wildcard after the given text.

Thanks.


Multiple instances trigger same onChange event

Hello,
I'm trying to use 2 instances of ReactTrixRTEInput on the same page, by giving them different IDs, but they trigger the same onChange event, so the content get mixed up when they end up in the state.
Here's a reproduction of the issue:
https://codesandbox.io/s/react-trix-rte-hsxql
My workaround at the moment is to manually check which input triggered the onChange event, but that's not very elegant:
onChange={(e) =>
    e.target.getAttribute("input") === "react-trix-1" && setFirstValue(e.target.value)
}

Have you seen this issue before?
Thank you for your help,
Nicolas

@NSpehler Thanks for reporting the issue ❤ . We have resolved the issue and released new version of the package. Please upgrade to v1.0.16.
You can even test it on Sandbox(shared by you): https://codesandbox.io/s/react-trix-rte-forked-g2gi2?file=/src/index.js

Thank you so much!


can't get IPV4 address

Your environment.

Version: 2.0
Browser: include version
Other Information - stacktraces, related issues, suggestions how to fix, links for us to have context

What did you do?
stun.Dial only tries the first address; for a
double-stack host (IPv4 and IPv6), it willl only return  an IPv6 address,
so how I can get my ipv4 address
What did you expect?
how I can get my ipv4 address
What happened?

I think you can try this https://github.com/pion/stun/issues/96#issuecomment-1208196709

thank you


not an issue - question on  Value 'sm_86' is not defined for option 'gpu-architecture'

https://www.pugetsystems.com/labs/hpc/How-To-Install-TensorFlow-1-15-for-NVIDIA-RTX30-GPUs-without-docker-or-CUDA-install-2005/
when I followed all your steps to get 3090 working on existing  -
I ended up with
nvcc fatal   : Value 'sm_86' is not defined for option 'gpu-architecture'
I activate environment successfully - run the code - but still bump up with
Value 'sm_86' is not defined for option 'gpu-architecture'
(I am running zsh - but did do bash terminal / same results)
if I run pip freeze -
I get the following
I wonder if you could cross reference ? I guess I can do via docker - will post results here later.
absl-py==0.11.0
astor==0.8.1
cached-property==1.5.2
certifi==2020.12.5
chardet==4.0.0
cloudpickle==1.6.0
cycler==0.10.0
dataclasses==0.8
decorator==4.4.2
gast==0.2.2
google-pasta==0.2.0
grpcio==1.34.0
h5py==3.1.0
idna==2.10
imageio==2.9.0
importlib-metadata==3.3.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.3.1
Markdown==3.3.3
matplotlib==3.3.3
mock==4.0.3
networkx==2.5
numpy==1.18.5
nvidia-cublas==<IP_ADDRESS>
nvidia-cuda-cupti==11.1.69
nvidia-cuda-nvcc==11.1.74
nvidia-cuda-nvrtc==11.1.105
nvidia-cuda-runtime==11.1.74
nvidia-cudnn==<IP_ADDRESS>
nvidia-cufft==<IP_ADDRESS>
nvidia-curand==<IP_ADDRESS>
nvidia-cusolver==<IP_ADDRESS>
nvidia-cusparse==<IP_ADDRESS>5
nvidia-dali-cuda110==0.27.0
nvidia-dali-nvtf-plugin==0.27.0+nv20.11
nvidia-horovod==0.20.2+nv20.11
nvidia-nccl==2.8.2
nvidia-tensorboard==1.15.0+nv20.12
nvidia-tensorflow==1.15.4+nv20.11
nvidia-tensorrt==<IP_ADDRESS>
opencv-python-headless==<IP_ADDRESS>
opt-einsum==3.3.0
pandas==1.1.5
Pillow==8.0.1
protobuf==3.14.0
psutil==5.8.0
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2020.5
PyWavelets==1.1.1
PyYAML==5.3.1
requests==2.25.1
scikit-image==0.17.2
scipy==1.5.4
six==1.15.0
tensorboard @ https://pypi.ngc.nvidia.com/tensorboard/tensorboard-1.15.0-py2.py3-none-any.whl
tensorflow-estimator==1.15.1
termcolor==1.1.0
tifffile==2020.9.3
torch==1.7.1
torchsummaryX==1.3.0
torchvision==0.8.2
typing-extensions==<IP_ADDRESS>
urllib3==1.26.2
webencodings==0.5.1
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.4.0

Hi John, sorry I'm late back to you.
I think you have a path problem. It looks like you still have an older cudatoolkit on your path for cuda 10.x (or even 11.0) which doesn't know about the newer RTX30  GPU's. (ie. sm_86/compute_86)  You need to have cudatoolkit 11.1 or greater on your path. (greater is probably better)
I know it's a mess!  This is why I'm so sold on using containers!   I wrote up this post to help folks that cannot for whatever reason use containers. It's the TF build that NVIDIA puts in their container.  It's a messy pip install since their stuff is not on PyPi
The really messy part is that not everything is isolated to the conda env. I'm using that mostly for the Python 3.6. The NVIDIA stuff is unfortunately not on PyPi which is why that index is being installed under $HOME/.local/share ...
If you have other cuda stuff on your PATH or LD_LIBRARY_PATH (even system default stuff) then you need to get the newer stuff "in front of" that.

Hi John, sorry I'm late back to you.
I think you have a path problem. It looks like you still have an older cudatoolkit on your path for cuda 10.x (or even 11.0) which doesn't know about the newer RTX30  GPU's. (ie. sm_86/compute_86)  You need to have cudatoolkit 11.1 or greater on your path. (greater is probably better)
I know it's a mess!  This is why I'm so sold on using containers!   I wrote up this post to help folks that cannot for whatever reason use containers. It's the TF build that NVIDIA puts in their container.  It's a messy pip install since their stuff is not on PyPi
The really messy part is that not everything is isolated to the conda env. I'm using that mostly for the Python 3.6. The NVIDIA stuff is unfortunately not on PyPi which is why that index is being installed under $HOME/.local/share ...
If you have other cuda stuff on your PATH or LD_LIBRARY_PATH (even system default stuff) then you need to get the newer stuff "in front of" that.

I solved this with cuda 11.2 toolkit and 460 driver. Thanks

I solved this with cuda 11.2 toolkit and 460 driver. Thanks


Update swagger-ui - Request CURL output XSS issue

Swashbuckle Ahoy currently uses an old version of swagger-ui which has an XSS issue when displaying the CURL output.
The corrected line can be seen here:
https://github.com/swagger-api/swagger-ui/blob/master/src/main/javascript/view/OperationView.js#L777
The Swashbuckle repository also has this issue so I've raised a separate issue there.
Issue Reproduction
Enter <script>alert(document.domain);</script> into a body parameter of an operation and click "Try it out!", the parameter is output without escaping into the CURL output and an alert box is shown.

updated in master to use 2.2.6

Available with latest pre-release. Note the package rename to "Swashbuckle.AspNetCore.1.0.0-rc1"

@yngndrw-sage Do you have a reference for the swagger-ui XSS issue, other than the quoted line?

@attritionorg I seem to have foolishly quoted a specific line number in the head revision, which has now changed - Oops.
Anyway here's the related pull request in swagger-ui where this was fixed:
https://github.com/swagger-api/swagger-ui/pull/1869
... and the associated issue:
https://github.com/swagger-api/swagger-ui/issues/1863

Ah great, thanks for the links. That is 2016-1000233 for reference =)


Add Linux and Windows target platforms

Description
This PR adds the linux and windows target platform enum values, along with automatically setting the defaultTargetPlatform to the appropriate value on those platforms.
Related Issues

Fixes https://github.com/flutter/flutter/issues/31366

Tests

Modified tests to take new platforms into account.

Breaking Change

[X] No, this is not a breaking change.

/cc @stuartmorgan

This isn't a breaking change?

Hmm.  I guess it could cause new warnings about unhandled switch cases (if that lint is turned on).  OK, I'll go with "breaking change".


Voctree utests

Added voctree unit test (connected to poparteu/openMVG#44)
Also fixes unhandled enumeration value PINHOLE_CAMERA_FISHEYE in switch for createPinholeIntrinsic()

@fabiencastan better wait for travis before merging this one as we might need to trim the parameters of the tests as they are CPU intensive.


dcm2niix windows

Firstly, congratulations for your awesome job, I have installed and run TotalSegmentator in Ubuntu with no issues but in windows there is a problem when looking for dcm2niix.
in dicom_io.py:
def dcm_to_nifti(input_path, output_path, verbose=False):
  ...
  dcm2niix = config_dir / "dcm2niix"
  # It should be substituted with:
  dcm2niix = config_dir / "dcm2niix.exe"

Otherwise it never finds dcm2niix.

Thank you for your kind words and for bringing up the issue with the dcm2niix executable on Windows. You are correct that it requires the .exe extension when running on Windows. I just updated the code accordingly. Thanks again for bringing this to our attention!

My pleasure!

Though I succeeded in the end somehow, I will try this method next time, thanks!

Great prospect in using this amazing program!
I did find some problems when trying to install the package in Python (pycharm) on a windows PC.
First off, the dcm2niix issue aswell.
But later on also a problem in the dcm_to_nifti function where the os.remove(str(output_path)[:-7] + ".json") throws a filenotfounderror. Any suggestions/ideas on how to solve?

Could you post the complete error message?

Thanks for the quick response. This is what I'm experiencing
System cannot  find the given path
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.3\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "", line 1, in
File "C:\Program Files\JetBrains\PyCharm 2022.3\plugins\python\helpers\pydev_pydev_bundle\pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Users\ktorfs5\KU Leuven\Projects Pycharm\segmentationTRIAL\main.py", line 7, in
seg = totalsegmentator(inp, outp)
File "C:\Users\ktorfs5\KU Leuven\Projects Pycharm\segmentationTRIAL\venv\lib\site-packages\totalsegmentator\python_api.py", line 193, in totalsegmentator
seg_img = nnUNet_predict_image(input, output, task_id, model=model, folds=folds,
File "C:\Users\ktorfs5\KU Leuven\Projects Pycharm\segmentationTRIAL\venv\lib\site-packages\totalsegmentator\nnunet.py", line 170, in nnUNet_predict_image
dcm_to_nifti(file_in, tmp_dir / "dcm" / "converted_dcm.nii.gz", verbose=verbose)
File "C:\Users\ktorfs5\KU Leuven\Projects Pycharm\segmentationTRIAL\venv\lib\site-packages\totalsegmentator\dicom_io.py", line 95, in dcm_to_nifti
os.remove(str(output_path)[:-7] + ".json")
FileNotFoundError: [WinError 2] System cannot find the given file: 'C:\Users\ktorfs5\AppData\Local\Temp\nnunet_tmp_rkzpeemh\dcm\converted_dcm.json'

Thanks for putting this great project together! I'm looking forward to getting it up an running.
I'm getting the same error as noted by KwintenTorfs above using Windows 10:
Using 'fast' option: resampling to lower resolution (3mm)
Converting dicom to nifti...
  Downloading dcm2niix...
Traceback (most recent call last):
  File "/code/src/main.py", line 13, in <module>
    main()
  File "/code/src/main.py", line 9, in main
    segmentor.process_segmentation()
  File "/code/src/processing/segmentator.py", line 134, in process_segmentation
    args.force_split, args.output_type, args.quiet, args.verbose, args.test)
  File "/opt/conda/lib/python3.6/site-packages/totalsegmentator/python_api.py", line 208, in totalsegmentator
    quiet=quiet, verbose=verbose, test=test)
  File "/opt/conda/lib/python3.6/site-packages/totalsegmentator/nnunet.py", line 171, in nnUNet_predict_image
    dcm_to_nifti(file_in, tmp_dir / "dcm" / "converted_dcm.nii.gz", verbose=verbose)
  File "/opt/conda/lib/python3.6/site-packages/totalsegmentator/dicom_io.py", line 100, in dcm_to_nifti
    os.remove(str(output_path)[:-7] + ".json")
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/nnunet_tmp_9ll3wdmh/dcm/converted_dcm.json'

Let me know if I can provide any further details.

Which version of TotalSegmentator are you using? Can you try again with the latest version?

I pulled using the latest master branch and rebuild the docker image I'm running. I still get the above error.
So you have a better idea of my setup here is my dockerfile:
FROM nvcr.io/nvidia/pytorch:20.10-py3

ENV TOTAL_SEGMENTATOR_BRANCH master

RUN apt-get update \
&& apt-get install ffmpeg libsm6 libxext6 -y  \
&& apt-get install xvfb -y  \
&& pip install --upgrade pip  \
&& pip install flask gunicorn python-git

RUN git clone --depth 1 -b ${TOTAL_SEGMENTATOR_BRANCH} --single-branch  https://github.com/wasserth/TotalSegmentator.git /TotalSegmentator \
&& pip install /TotalSegmentator \
&& python /TotalSegmentator/totalsegmentator/download_pretrained_weights.py

WORKDIR /app

COPY . /code/src/TotalSegmentator
# my custom code
COPY ./src /code/src

# /dicoms and /segmentations are volumes set by the docker run command
CMD ["python3", "/code/src/main.py", "-i", "/dicoms", "-o", "/segmentations", "--fast"]

And the contents of main.py:
from processing.segmentator import Segmentator

def main():
    segmentor = Segmentator()
    segmentor.process_segmentation()

if __name__ == "__main__":
    main()

When I start run_server.sh I can start the server.  Then docker exec into the running container and run TotalSegmentator -i ct.nii.gz -o segmentations and can see the segmentations in the segmentations dir. It's not clear to me why running the aforementioned command works vs. what I'm doing - both run in a docker container.
Thanks for the quick reply!

I only get this error when running the segmentator on .dcm files the example_ct.nii.gz works with no errors.

@wasserth I was able to generate a .nii file using the --ml flag by making the following changes to https://github.com/wasserth/TotalSegmentator/blob/cef672ba1200a14051c7429f8cc7ecd71ee0c7a4/totalsegmentator/nnunet.py#L173
            file_in = file_in.NamedTemporaryFile(delete = False)
            file_in.close()

It looks like Windows opens a file with a share flag and future open operations pass this share flag. It's not the case with Python.
https://stackoverflow.com/questions/15588314/cant-access-temporary-files-created-with-tempfile
Hope this helps.

Thanks for pointing this out. But I am not sure how exactly you changed the code. Can you share your new lines of code around line 173.

Here is the surrounding code:
 if img_type == "dicom":
            if not quiet: print("Converting dicom to nifti...")
            (tmp_dir / "dcm").mkdir()  # make subdir otherwise this file would be included by nnUNet_predict
            dcm_to_nifti(file_in, tmp_dir / "dcm" / "converted_dcm.nii.gz", verbose=verbose)
            file_in_dcm = file_in
            file_in = tmp_dir / "dcm" / "converted_dcm.nii.gz"

            # ahlaughland added the next two lines:
            file_in = file_in.NamedTemporaryFile(delete = False)
            file_in.close()

            # if not multilabel_image:
            #     shutil.copy(file_in, file_out / "input_file.nii.gz")
            if not quiet: print(f"  found image with shape {nib.load(file_in).shape}")

When I run this I get the error message
AttributeError: 'PosixPath' object has no attribute 'NamedTemporaryFile'

Strange, that you do not get this.

Did you run pip install /app after updating the file?

yes, I did. Maybe this only works on windows? I am running on ubuntu.

yes, I did. Maybe this only works on windows? I am running on ubuntu.

Yes, I bet that's why you get the error -  I am on Windows 10.

Thank you for making this wonderful project!
I also get the [WinError 2] The system cannot find the file specified error of the Temp file. I run it on windows, and I tried the solution of changing the code in the nnunet.py, but this did not change anything. What do you mean with the pip install /app code? I do not know what the /app does.
Thanks!

yes, I did. Maybe this only works on windows? I am running on ubuntu.

Yes, I bet that's why you get the error - I am on Windows 10.
Maybe add:
from sys import platform and check the OS type.

I get AttributeError: 'WindowsPath' object has no attribute 'NamedTemporaryFile'. On Windows 10.

This problem should now be solved in v2.0.0


Tile combination by zoom level

For #3695

Background
While using Deck.gl's TileLayer implementation to render MVT tiles retrieved from our backend, the main issue that we found is that the tile rendering process takes more time than it should to avoid lag and provide a nice user experience while panning and zooming the map.
Understanding Deck.gl's TileLayer behaviour, we found out that the TileLayer is a CompositeLayer that renders N sublayers (GeoJSON layer by default), two for each of the tiles within the viewport at least.
Viewport in a 1080p display at fullscreen contains 24 tiles, excluding the main TileLayer and derived layers from points, lines and polygons, which could make a total of 49 layers (or even almost 2x with polygons and fill and stroke layers) if every tile contains 1 geometry at least.
Performing analysis using Chrome DevTools' performance tool, the rendering process for a dataset with 16k lines takes an avg. of 1062ms taking a sample of 10 executions, which is way more to what it is recommended to avoid lag or hangs when interacting with the content.
This is how the flame chart looks like:

Proposal
We thought of combining all tiles within a single zoom level into a single tile to ease the rendering process and make it faster. This is what changes are about in this PR.
We introduced a new concept called CompositeTile, which is just an abstraction for holding a set of tiles and taking care of all data management so that we only create a single layer in renderLayers method.
That way we would only render 3 or 4 layers at most in each renderLayers cycle, lowering the time that each requestAnimationHandler cycle takes, and improving the performance.
This is how the flame chart looks like:

We created a set of different examples with different geometries to assess our performance improvements. Those examples are here: https://deck-comparisons.glitch.me. You will find there the examples with the dataset specifications.
Performance Improvements
We performed a set of performance comparisons between the production version of Deck.gl and our custom Deck.gl version with those changes applied.
Tests were executed with the same configuration as in the screenshot above (local assets, advanced paint instrumentation enabled, and no CPU throttling). Measures are taken from the latest animation frame where all layers are rendered to avoid flakiness or tests variation due to network fluctuations.
These are the stats that we got:
Points' example - 500k points

Avg.
Median
Max.
Min.
P80

Original
127.42ms
124.89ms
155.85ms
107.26ms
139.57ms

Improved
78.5ms
69.31ms
143.69ms
51.56ms
97.82ms

Percentages of Improvement
38.4%
44.5%
7.81%
51.93%
29.92%

Lines' example - 16k lines

Avg.
Median
Max.
Min.
P80

Original
1062.09ms
993.58ms
1398ms
788.35ms
1319ms

Improved
343.05ms
336.245ms
457.56ms
289.32ms
368.26ms

Percentages of Improvement
67.71%
66.16%
67.28%
63.31%
72.09%

Percentages of improvement seem good in both cases and we would like to know what you think about this approach of combining tiles, and if it is good to go for this approach.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Coverage increased (+2.7%) to 82.673% when pulling 4d56a71ebdbbfd354703390dddc0b71c5ae89247 on CartoDB:aggregate-tiles-by-zoom into e6834f619097362c6c0c4e0a5406165e15bc1b5b on uber:master.

@jesusbotella Thank you for the detailed probe into this issue.
If I understand it correctly, your proposal is to merge all visible tiles into one dataset (layer) per zoom level.
I have some concerns about introducing the new "combined tile" concept:

Depending on the size of data, it may actually cost more to create new attributes every time data is updated.
Not all tile data comes in array format.
Not all data types can be combined then rendered with a single layer, for example this.

I think the root issue in the original approach was that we call renderSubLayer even when nothing has changed for a particular tile. The render and subsequent layer diffing both have perf costs. Instead, we could cache and reuse the rendered layer with the tile. I will put together a proof of concept for you to test.

Thank you for the fast response @pessimistress.
Yours are fair concerns that conflict with this approach of combining all tiles' data into a single tile. Could you please elaborate more on the first issue? I would like to fully understand what it is about.
And thank you very much for putting together that proof of concept, I tested it thoroughly and it dramatically improves the animation frame handler execution times. Would you have plans of developing/merging that improvement to the master branch in the near feature or do you want us to take a further look into it? We're really interested in that improvement.
Our particular interest in combining tiles comes from the use case of rendering MVT tiles as you had in your TileLayer example, and especially when it comes to rendering polygons split into different tiles. Seeing that this approach is not feasible for a general TileLayer, do you think it would make sense to create a more specific MVTTileLayer for that?
The issue with the polygons, as you may imagine, is that as polygons are cut between tiles, the representation is not ideal because of the tile border axis. We came up with a mechanism to merge all the parts into one polygon and then represent it within the "global" layer. But if we don't have a single tile, we would need to link the polygon to a specific tile and then omit it in other tiles.

Could you please elaborate more on the first issue?

If we combine all visible tiles into one layer, then as you pan around and tiles load, that layer needs to recalculate all attributes all the time. The cost of this depends on how much data is visible in one viewport.

Would you have plans of developing/merging that improvement to the master branch in the near feature?

I'm glad that it works well! I will open a PR. Timing is a little awkward given that we are publishing 7.3.0 today. We can discuss whether this change can be justified as a patch.

rendering polygons split into different tiles

That is a fair point that this layer does not properly address right now. I think a dedicated MVTTileLayer might be the best solution. What are you using for decoding?

If we combine all visible tiles into one layer, then as you pan around and tiles load, that layer needs to reprocess all geometries that are visible, instead of those of the newly loaded tile. The cost of this depends on how much data is visible in one viewport.

Yes, sure, it makes sense. I understand your point now.

I'm glad that it works well! I will open a PR. Timing is a little awkward given that we are publishing 7.3.0 today. We can discuss whether this change can be justified as a patch.

Ok, I'll follow that PR to keep in touch with this!

That is a fair point that this layer does not properly address right now. I think a dedicated MVTTileLayer might be the best solution. What are you using for decoding?

I'm using @mapbox/vector-tile to read the protobuf and get a GeoJSON for every feature within the layer.
For the merging approach, I had a features' store and then I was merging polygon vertices grouped by a unique property (defined by the user/developer) shared among features. That was the first approach but we are doing performance reviews and we might change it for a better approach.

Going to close this PR because perfomance improvements have been merged into master. We'll open up a new PR once we have our geometry merge changes ready to be shown and discussed.
Thank you very much!


Option to not show borders

Sometimes the map is more clear without e.g. municipal or state borders.
It would be nice to have the option to hide them from the map.

That's part of the map style (a separate and exchangable file in the repo). While we could have features for dynamically changing it in Mapscii, but it's not something I will prioritize highly for myself any time soon.


Fix startup.sh of runner from exiting Bad file descriptor error

This may fix https://github.com/actions-runner-controller/actions-runner-controller/issues/1557.
The original line sudo tee $dockerd_config_path 1>&- <<<"$dockerd_config" may intent to write string "$dockerd_config"to$dockerd_config_path without echoing to terminal (1>&-). But it doesn't work in the runner pod's bash (bash 5.0.17(1)) because of Bad file descriptorerror for the part of command:1>&-`.
The 1>&- is a special use of bash's redirection that closes 1 (stdout) and I thought it causes the error.
ref: https://www.gnu.org/software/bash/manual/html_node/Redirections.html
To fix the error, I rewrite it to 1>/dev/null.

Is it possible to add a test so that this doesn't happen again?

I think it's difficult now.  To prevent such a degradation, we need somewhat E2E testing.

Wouldn't it be sufficient to just call the startup script in this case?

@kyontan FYI, we've reverted the original change in #1561 but we'd certainly revisit this when we redo #1454. Thanks a lot for the detailed report and your fix! Good job 👍

@mumoshu this is the proper fix for the problem encountered in https://github.com/actions-runner-controller/actions-runner-controller/issues/1557. The 1>&- closes the file handle, but if a program treats the file handle as a file and it is closed it fails. Switching from 1>&- to 1>/dev/null ensures that there is a file handle that can be stated.
What I don't understand is why this was not a problem for anyone of us while testing. But, we all knew that our test coverage for this is not sufficient. We need proper integration tests, nothing else can help here in the future.

@Fleshgrinder Hey! Thanks for sharing your insight. I did try reproducing it with a bash snippet and it did reproduce on my macOS with bash 3.x, but it didn't on my “bash” version 3/4/5 containers on linux(ubuntu 20.04, and I thought our runner images are also based on ubuntu 20.04) . So, I don't really know what kind of integration tests could have caught it. Before coming up with a perfect integration test that covers issues like that, perhaps we'd better have a guideline to write a portable bash script in the first place... or rewrite it in Go which should be more portable(and easy to test).

Btw. it is very common that programs expect stdout to be a proper fd, but are lenient in regards to stderr. So, I would refrain from actually stating that tee is broken, wrong, or anything. It's my fault, I should have known better, and it should have been caught while testing, even if just locally (as illustrated by the simple reproducer).

Thanks for your response!

I don't see how rewriting it in Go would help

The only reason is Go is seemingly more portable. At least, it doesn't fall down like this when we coded a Go program to not forward stdout from child processes.
I'd been sticking with bash-based entrypoint and startup scripts just because it might be easier to maintain, but if it started to look untrue.
Even if we had a comprehensive(it can't be comprehensive btw) integration test, it doesn't justify maintaining advanced bash scripts. We'd better architect it correctly and then integration-test it, rather than integration-testing it to make bad arch ok.

Oh, don't get me wrong, I'm not trying to convince you to not do it in Go. Quite the contrary, the only reason I'm working on the Bash scripts is because they are, well, sorry to be so frank, bad. Hence, if you (the maintainers) feel like you can do it better in Go, please go ahead.
My only concern is that it is always very hard with normal programming languages to do this kind of stuff, without shelling out all the time. We are interacting with a lot of programs here, switching between current and super user, etc. pp. This is simply what Bash was intended for.
Also, imho, there is no reason to panic just because of one bug. There is absolutely no guarantee to not have bugs in any other program without tests. And, well, we do not have tests for this, like, none at all. This particular issue would have been found right away if we would have had a test suite. I am much more concerned about all the MTU stuff we are doing all over the place, this seems more complicated to verify.
😊

This particular issue would have been found right away if we would have had a test suite

True! So the most needed contribution to this area would be to add tests, rather than to make it better... It's sad that I had been short on time to prioritize that. If you think we can keep entrypoint.sh and startup.sh maintainable and testable, that's good, if anyone could contribute tests for startup.sh, that would also be good (because then I don't need to rewrite it in Go)
It's just that I had observed no positive signals to convince me that those scripts are maintainable these days.

I don't want to convince you. It's a question for you, the core maintainers. Happy to think about ways of testing and contributing, also happy to continue supporting with the Bash stuff. But, no matter what, we have to keep it to the absolute minimum. Bash isn't simple.
The entire goal of the improvements is that we can introduce shellcheck and shfmt. These are going to help every contributor to write better scripts.

@Fleshgrinder Thanks for the suggestion and your clarification! Let me say I do agree with the goal. I just wanted to make it crystal clear that I do take the reliability and maintainability of ARC seriously and that I'm willing to do whatever I can to improve it. Bash vs Go is not my goal but an implementation detail/idea.

Couldn't agree more. But, if Bash, good Bash. 😉

+1 on shellcheck and shfmt.

Thank you for raising a PR to fix the broken image, I opted to just do a revert of the PR as that was quicker and sure to "fix" the problem. Since then the scripting has been overhauled so this PR is no longer needed. Thanks again for your work though!.


Fixed github workflows

Closes #196 - fixed linter workflow by adding missing deps,
updated golanci version, fixed workflow paths.

@ivanbukhtiyarov finally, fixed. Can you please check that make and make verify works fine on MaxOs?