Generic Foreign Key "the results could not be loaded"

Hi there,
I have been trying to get a model with 2 Generic Foreign Key fields to work in the Admin with autocomplete...but no luck; I get the error NotImplementedError: QuerySequence does not implement get_compiler() in the terminal. The right saved instance is showing up in Admin but none of the others. Any help greatly appreciated.

my model:
class Relation(Owner):
    second_class = models.ForeignKey(ContentType, editable=False, related_name='second_class', on_delete=models.CASCADE, null=True, blank=True,)
    second_id = models.PositiveIntegerField(null=True, blank=True, editable=False,)
    second = GenericForeignKey('second_class', 'second_id') # when 2 objects are involved: values go here, or group persons
    first_class = models.ForeignKey(ContentType, editable=False, related_name='first_class', on_delete=models.CASCADE)
    first_id = models.PositiveIntegerField(editable=False,)
    first = GenericForeignKey('first_class', 'first_id')
    rank = models.IntegerField(null=True, blank=True,)

my form:
class RelationAutoForm(autocomplete.FutureModelForm):
    second = autocomplete.QuerySetSequenceModelField(
        queryset=autocomplete.QuerySetSequence(
            Value.objects.all(),
            Definition.objects.all(),
        ),
        required=False,
        widget=autocomplete.QuerySetSequenceSelect2('selectValue_gfk'),
    )
    first = autocomplete.QuerySetSequenceModelField(
        queryset=autocomplete.QuerySetSequence(
            City.objects.all(),
        ),
        required=True,
        widget=autocomplete.QuerySetSequenceSelect2('selectCity_gfk'),
    )
    class Meta:
        model = Relation

my urls:
url(
        '^selectCity-gfk/$',
        autocomplete.Select2QuerySetSequenceView.as_view(
            queryset=autocomplete.QuerySetSequence(
                City.objects.all(),
            )
        ),
        name='selectCity_gfk',
    ),
    url(
        '^selectValue-gfk/$',
        autocomplete.Select2QuerySetSequenceView.as_view(
            queryset=autocomplete.QuerySetSequence(
                Value.objects.all(),
                Definition.objects.all(),
            )
        ),
        name='selectValue_gfk',
    ),

We need the complete traceback.
What are you expecting the view to do by default with your queryset ?
Any reason you didn't want to follow the manual ?
http://django-autocomplete-light.readthedocs.io/en/master/gfk.html#view-example-for-querysetsequence-and-select2

thanks jpic! I feel like you should be getting paid for this ... in this capitalist system 👎 .
I followed the example in the demo and which the example in Select2QuerySetSequenceView gives:
    Example usage::

        url(
            '^your-generic-autocomplete/$',
            autocomplete.Select2QuerySetSequenceView.as_view(
                queryset=autocomplete.QuerySetSequence(
                    Group.objects.all(),
                    TestModel.objects.all(),
                )
            ),
            name='your-generic-autocomplete',
        )

I also tried a simple custom view:
class RelationAutocompleteView(Select2QuerySetSequenceView):
    def get_queryset(self):
        cities = City.objects.all()

        qs = QuerySetSequence(cities)

        return qs

and changed the urls appropriately:
url(
        '^selectCity-gfk/$',
        RelationAutocompleteView.as_view(
            queryset=autocomplete.QuerySetSequence(
                City.objects.all(),
            )
        ),
        name='selectCity_gfk',
    ),

but to no avail...
I tested QuerySetSequence in the shell and this seems to be next lead in the error  NotImplementedError: QuerySequence does not implement get_compiler()
Oh, I also had some problems earlier with QuerySequence (couldn't find module error) wherever I imported it, until I upgraded django-querysetsequence.
Any more ideas?

Don't worry, I'm currently building an ecologic town where everything is open source even the "system" itself with a badass hackerspace, I'm leaving the individualist/capitalist system, I'm not compatible with it, I can't live in a system that's not open source it's like being in a mental prison hahaha
No idea about the get_compiler error, can you post the full traceback please ?
We've got another report of the get_compiler error in #855, i wonder if we need to raise this to django-querysetsequence developers.

thanks for getting back again! good luck to your ecologic town...have you heard of the Zeitgeist movement? some interesting ideas...
Here's the traceback:
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 226, in __repr__
    data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 250, in __iter__
    self._fetch_all()
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 1105, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 50, in __iter__
    compiler = queryset.query.get_compiler(using=db)
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\queryset_sequence\_inheritance.py", line 43, in not_impl
    (name, attr))
NotImplementedError: QuerySequence does not implement get_compiler()

What's the code you executed in console exactly pleas ?
I'd like to reproduce this.

here you go! sorry!
(InteractiveConsole)
>>> from queryset_sequence import QuerySetSequence
>>> from .models import *
>>> cities = City.objects.all()
>>> qs = QuerySetSequence(cities)
>>> qs
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 226, in __repr__
    data = list(self[:REPR_OUTPUT_SIZE + 1])
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 250, in __iter__
    self._fetch_all()
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 1105, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\django\db\models\query.py", line 50, in __iter__
    compiler = queryset.query.get_compiler(using=db)
  File "C:\Users\Areopagitics\Development\env-dev\lib\site-packages\queryset_sequence\_inheritance.py", line 43, in not_impl
    (name, attr))
NotImplementedError: QuerySequence does not implement get_compiler()

Can you report this on https://github.com/jpic/django-querysetsequence/ please ?
Thanks !

One thing I noticed about installing django-autocomplete-light is that it doesn't have django-querysetsequence as a required module; is there maybe some other module that I am missing for the get_compiler()?

Problem solved with Django 1.10! Issue #26 in QuerySequence also has a similar problem.


Update fs2-core, fs2-reactive-streams to 3.2.12

Updates

co.fs2:fs2-core
co.fs2:fs2-reactive-streams

from 3.1.3 to 3.2.12.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "co.fs2" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "co.fs2" }
}]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #402.


Incorrect SVD using jax.linalg.svd

I have a code that uses singular value decomposition (SVD) to obtain an operator and then compute the Jacobian for it using jacfwd. But I was getting NaNs so I tried to test the implementation of SVD in Jax for complex matrices. The following snippet shows one instance where the Jax implementation of SVD fails with errors of order 1e-7. With the suggestion by @hawkinsp I tried using 64-bit precision and still see an error. This error somehow depends on the singular values and it is possible to get larger errors in some cases.
import numpy as np
from scipy.stats import unitary_group

from jax.config import config
from jax import numpy as jnp
import jax

print("Jax version", jax.__version__)
config.update("jax_enable_x64", True)

np.random.seed(42)

N = 15

# Construct an operator using two random Unitaries
U = unitary_group.rvs(N)
V = unitary_group.rvs(N)
S = np.zeros((N, N))
np.fill_diagonal(S, np.random.uniform(0.5, 1., size = (N, N)))

op = np.dot(U*S, jnp.conjugate(V).T).astype(jnp.complex128)

u, s, v = jnp.linalg.svd(op)
assert(np.allclose(op, jnp.dot(u*s, v)))

which results in
Jax version 0.1.70
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-79-babe60e251fc> in <module>
     25
     26 u, s, v = jnp.linalg.svd(op)
---> 27 assert(np.allclose(op, jnp.dot(u*s, v)))

AssertionError:

Numpy however gives the correct decomposition with
u, s, v = np.linalg.svd(op)
np.allclose(op, np.dot(u*s, v))

If I compare the error in the reconstructed matrix after SVD, it is of the order 1e-7 using Jax:

Numpy however gives a much better result with errors of the order 1e-16:

Is it possible to test the svd function better (or with lower tolerances) since right now the tests are with tol=1e-4 and rtol=1e-4 in https://github.com/google/jax/blob/master/tests/linalg_test.py#L584
@hawkinsp makes a comment that the tests are very loose. I am wondering if this is leading to issues in my code since I have a forward function that takes SVD and then removes negative singular values and computes a Jacobian for the resulting matrix. I get NaNs for such a computation.

Your test passes for me exactly as written at head, on CPU.
Can you please (a) use an up to date JAX (0.2.9 is current), (b) describe what hardware platform you are using, and (c) give a test case that fails?
An error of 1e-7 sounds an awful lot like you are still using single precision. The jax.config.update call must be one of the first things you do when calling JAX; if you are using something like using Colab or Jupyter, make sure to restart the kernel and try again.

Thanks @hawkinsp. You are right, I am on an older version and should have restarted the kernel. I tried it now on Colab and it works if my matrix is of type complex128!
However, if I am using complex64, I get errors with the following code on Colab:
import numpy as np
from scipy.stats import unitary_group

from jax.config import config
from jax import numpy as jnp
import jax

print("Jax version", jax.__version__)
config.update("jax_enable_x64", True)

np.random.seed(42)

N = 53

# Construct an operator using two random Unitaries

U = unitary_group.rvs(N)
V = unitary_group.rvs(N)
S = np.zeros((N, N))
np.fill_diagonal(S, np.random.uniform(-10, 10., size = (N, N)))

op = np.dot(U*S, jnp.conjugate(V).T).astype(jnp.complex64)

u, s, v = jnp.linalg.svd(op)
assert(np.allclose(op, jnp.dot(u*s, v)))

I guess it is just due to some issue with precision that I am not so familiar with and should understand more.

My guess is that NumPy may be computing with 64-bit precision internally.
I computed the norm of the difference between the two matrices and found it was around 4e-6. I think that's all we can  really expect for single-precision computation. If you want more precision, use double precision!
I hope that helps!

Thank you so much. It helps a lot and I will read up more about the issue now.


fix: opening a new tab from favorites in sidebar

Hi,
I've implemented two things:

opening a new tab is now also possible from favorites or recent files (solves #68)
middle mouse button click on a page ref will no longer start scrolling

Please use semantic commit messages that start with fix:  or feat: .

Please use semantic commit messages that start with fix:  or feat: . Otherwise the github action will ignore the commit and not issue new releases.

sorry, I was not aware. First pull request...

@dansseg I am merging the pr. If no new release is being created, I will cut one manually.


[FEAT] Add Release drafter to make releases easier

Describe the feature
Release Drafter
Additional Context
No response

fixed in #13


Discord Server List is flickering every now and then

That's because the member list is being updated. Let me know how I could make it not flicker.

No, they're not. Sorry, I misread.

It still happens when switching between servers, etc.


Add parser support for PEP 696

Ruff's parser does not support the new syntax introduced by PEP 696:
def f[T=int](): pass

I noticed because I'm adding this syntax to CPython and Ruff started failing in CI :).
I saw that you recently switched to a handwritten parser. I'm interested in taking a look at that parser, so I'd like to try to implement this myself.

Thank you for notifying us about the new syntax!

I saw that you recently switched to a handwritten parser. I'm interested in taking a look at that parser, so I'd like to try to implement this myself.

Yes, of course! Although the parser crate (ruff_python_parser) lacks a bit of public-facing documentation, specifically a README and an updated CONTRIBUTING guidelines, it shouldn't black you as I can assist with the implementation. That said, I'll be working on the documentation this week.
I'll need to go through the PEP to list the work items needed to complete this, but for reference, there's the PEP 701 issue and PEP 695 issue.
At a high level, this will impact all of the major areas: the AST, parser, linter, and formatter. If you're solely interested in updating the AST and parser, that's perfectly fine; either I or someone else from the team can handle implementing the changes in the linter and formatter.

Thanks! I'll take a look myself first and let you know if I run into any issues. I expect the PEP 695 issue will provide a good reference as mechanically the new syntax is very similar to the bound syntax in PEP 695.

#11120 implements support in all the places I could find in the Ruff codebase. Rust's ADTs were very nice here; the compiler basically told me almost all the places I had to update. There's a test failure that I'll look into soon.
At runtime this sort of thing is an error:
>>> type X[T = int, U] = str
  File "<stdin>-0", line 1
SyntaxError: non-default type parameter 'U' follows default type parameter

Since Ruff doesn't detect a few similar cases in the existing syntax (#11118, #11119), I left these error checks out of the PEP 696 support too. It might make sense to add a new lint rule checking for these and similar issues, but that can wait for a different PR.

At runtime this sort of thing is an error:
>>> type X[T = int, U] = str
  File "<stdin>-0", line 1
SyntaxError: non-default type parameter 'U' follows default type parameter

We do detect this specific case for function parameters. For reference:
https://github.com/astral-sh/ruff/blob/f5c7a62aa65decb9e286bd65ba17f1a3bd1f91e6/crates/ruff_python_parser/src/parser/statement.rs#L3055-L3070


Switch to JDBI 3

Hi there. Thank you for the contribution. At present, I'm trying to get the repository merged upstream.
https://github.com/dropwizard/dropwizard-jdbi/pull/50
If successful, I'll try merging your contribution to Jdbi 3 (via dropwizard-jdbi3) which lives in a separate repo.


"no matching creation rules found" for helm-secrets version 2.0.0

I run helm plugin update secrets and got version 2.0.0 earlier today.
This newer version produces this error where version 1.3.1 worked fine:
$ helm secrets enc kubernetes/charts/apps/xxx/values/xxx/secrets.yaml
Encrypting kubernetes/charts/apps/xxx/values/xxx/secrets.yaml
error loading config: no matching creation rules found
Error: plugin "secrets" exited with error

I noticed there is no 2.0.0 release on Github. What's the deal?

The fix:
helm plugin remove secrets
helm plugin install --version 1.3.1 https://github.com/futuresimple/helm-secrets

same here with version 2.0.1.
dir structure:
.
├── .sops.yaml
├── mysubdirectory
│   ├── secrets.yaml
│   ├── secrets.yaml.dec

.sops.yaml
---
creation_rules:
- path_regex: mysubdirectory/secrets.yaml
  kms: 'arn:aws:kms:eu-west-1:my-kms-key-redacted'

helm secrets dec  mysubdirectory/secrets.yaml   (works OK)
helm secrets dec  mysubdirectory/secrets.yaml
Encrypting mysubdirectory/secrets.yaml
error loading config: no matching creation rules found
Error: plugin "secrets" exited with error```

and original mysubdirectory/secrets.yaml is destroyed (emptied)

Just merged #117  which seems to solve the issue. Please let me know if you experience any problems if using master.

@mateuszzawisza I think your change may have caused a regression. See my reasoning in https://github.com/futuresimple/helm-secrets/issues/121#issuecomment-505027232.

There are some issues with sops path_regex:
mozilla/sops#465
mozilla/sops#480
The first issue was fixed in the latest sops 3.3.1. Using that sops version the creation rules above work for me without #117.


Not working after latest core update.

Logger: pyalarmdotcomajax
Source: /usr/local/lib/python3.9/site-packages/pyalarmdotcomajax/init.py:955
First occurred: 08:40:59 (1 occurrences)
Last logged: 08:40:59
Unable to extract ajax key from Alarm.com. Response: <ClientResponse(https://www.alarm.com/web/DetermineLandingPage.aspx) [503 Service Unavailable]> <CIMultiDictProxy('Content-Type': 'text/html', 'Server': 'Microsoft-IIS/10.0', 'P3P': 'policyref="/w3c/p3p.xml",CP="OUR SAMa ADM UNI BUS ALL CUR DSP TAI COR IND STA"', 'Access-Control-Allow-Origin': '*', 'X-Content-Type-Options': 'nosniff', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-UA-Compatible': 'IE=edge', 'Date': 'Mon, 25 Apr 2022 14:40:58 GMT', 'Content-Length': '27')>

2022-04-25 08:45:18 ERROR (MainThread) [custom_components.alarmdotcom.controller] custom_components.alarmdotcom.controller: Error logging in:
2022-04-25 08:45:18 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Brinks Home™:[my_accout_email] for alarmdotcom
Traceback (most recent call last):
File "/config/custom_components/alarmdotcom/controller.py", line 87, in async_login
login_result = await self._alarm.async_login()
File "/usr/local/lib/python3.9/site-packages/pyalarmdotcomajax/init.py", line 178, in async_login
await self._async_login_and_get_key()
File "/usr/local/lib/python3.9/site-packages/pyalarmdotcomajax/init.py", line 921, in _async_login_and_get_key
async with self._websession.post(
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 559, in _request
await resp.start(conn)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 898, in start
message, payload = await protocol.read()  # type: ignore[union-attr]
File "/usr/local/lib/python3.9/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/alarmdotcom/init.py", line 48, in async_setup_entry
if not await controller.async_setup():
File "/config/custom_components/alarmdotcom/controller.py", line 131, in async_setup
await self.async_login(
File "/config/custom_components/alarmdotcom/controller.py", line 89, in async_login
return login_result
File "/usr/local/lib/python3.9/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.9/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

This error originated from a custom integration.
Logger: custom_components.alarmdotcom.controller
Source: custom_components/alarmdotcom/controller.py:101
Integration: Alarm.com (documentation, issues)
First occurred: 08:53:39 (1 occurrences)
Last logged: 08:53:39
custom_components.alarmdotcom.controller: Error logging in:

Looks like a timeout that occurred because of slowness on boot. v0.2.7-beta.2 attempts to address this. Would you mind upgrading to see if this fixes the problem?

@elahd The beta update resolved the issue for me. Thank you!


get_delete_permission is dropped

Getting this in django 1.7.7:
../site/lib/filer/admin/patched/admin_utils.py:51: RemovedInDjango18Warning: `Options.get_delete_permission` has been deprecated in favor of `django.contrib.auth.get_permission_codename`.
  opts.get_delete_permission())

Hi @radzhome Do you still have this problem with current filer version 1.2.0 ? Thank you for your feedback.


Add new lucide icon set

This matches the Icon PR here: https://github.com/blade-ui-kit/blade-icons/pull/169

Thanks!


An error occurred during upscaling ESRGAN pytorch and ncnn

Hello, whenever I try to use ESRGAN pytorch or ncnn it will give me an error and all it says is that an error occurred during upscaling is there anyway I can fix this?
specs: ryzen 7 3750h, rtx 2060 and 16gb ram
Thanks! :)

solved I checked the session log with gear and found out to reinstall pytorch with cuda enabled


All Libcamera-vid parameter

Does anyone know where I could find or look up all the parameters for the -vid app?
For example I found These online, but I don’t know how I would have found them in the documentation or in the GitHub code.
libcamera-vid -t 0 --inline --listen -o tcp://<IP_ADDRESS>:12345 --nopreview

libcamera-vid --help
got it, I’m a dummy 😅


Trying to lift...

Hi,
Maybe I'm just missing something obvious, but I'm not able to get the "lift" part of the tutorial working. I'd really like to use it! I've tried on Julia 0.3.8/10 and 0.4-dev
#40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015
$ ./julia-dev
...
Version 0.4.0-dev+5696 (2015-06-29 15:30 UTC)
Commit 1544e4e* (0 days old master)
x86_64-unknown-linux-gnu
julia> Pkg.add("Reactive")
INFO: Initializing package repository /home/dehann/.julia/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
INFO: Installing Compat v0.4.6
INFO: Installing FactCheck v0.2.8
INFO: Installing Reactive v0.2.2
INFO: Package database updated
julia> using Reactive
julia> x = Input(0)
0
julia> xsqr = lift(a -> a*a, Int, x)
ERROR: MethodError: consume has no method matching consume(::Function, ::Type{Int64}, ::Reactive.Input{Int64})
Closest candidates are:
consume(::Task, ::Any...)
consume(::Union{DataType,Function}, ::Reactive.Signal{T}...)
consume(::Union{DataType,Function}, ::Reactive.SignalSource...)
in lift at /home/dehann/.julia/v0.4/Reactive/src/Reactive.jl:362
Thanks,
Dehann

This is a documentation bug. Sorry about that. You should be good if you use xsqr = lift(a -> a*a, x, typ=Int) instead

Ah, got it thanks!


EKS managed nodegroup autoscaling

Unless I'm doing something wrong or misunderstanding, there seems to be an issue with the EKS autoscaling.
I deployed a test environment using the karpenter example.
https://github.com/terraform-aws-modules/terraform-aws-eks/tree/v20.30.1/examples/karpenter
The only thing I changed was:
In the  eks_managed_node_groups I change the instance_types.
instance_types = ["t3.medium"]

In resource "kubectl_manifest" "karpenter_node_pool", I changed the requirements.
requirements:
	- key: "node.kubernetes.io/instance-type"
	operator: In
	values: ["t3.medium"]
	- key: "kubernetes.io/arch"
	operator: In
	values: ["amd64"]
	- key: "karpenter.sh/capacity-type"
	operator: In
	values: ["on-demand"]

I also removed resource "kubectl_manifest" "karpenter_example_deployment" due to an issue with the amount of connections.
After deploying I can could see the running nodes
$kubectl get nodes
NAME                                        STATUS   ROLES    AGE   VERSION
ip-10-0-17-174.eu-west-1.compute.internal   Ready    <none>   62m   v1.31.2-eks-94953ac
ip-10-0-43-58.eu-west-1.compute.internal    Ready    <none>   62m   v1.31.2-eks-94953ac

I created a test deployment using nginx and could see karpenter created a new node.
$kubectl get nodes
NAME                                        STATUS   ROLES    AGE     VERSION
ip-10-0-17-174.eu-west-1.compute.internal   Ready    <none>   69m     v1.31.2-eks-94953ac
ip-10-0-19-9.eu-west-1.compute.internal     Ready    <none>   2m44s   v1.31.2-eks-94953ac
ip-10-0-43-58.eu-west-1.compute.internal    Ready    <none>   69m     v1.31.2-eks-94953ac

Scaled the deployment to 3 pods and can see additional nodes created.
$kubectl get nodes
NAME                                        STATUS   ROLES    AGE     VERSION
ip-10-0-12-122.eu-west-1.compute.internal   Ready    <none>   3m47s   v1.31.2-eks-94953ac
ip-10-0-17-174.eu-west-1.compute.internal   Ready    <none>   80m     v1.31.2-eks-94953ac
ip-10-0-19-9.eu-west-1.compute.internal     Ready    <none>   13m     v1.31.2-eks-94953ac
ip-10-0-37-52.eu-west-1.compute.internal    Ready    <none>   3m48s   v1.31.2-eks-94953ac
ip-10-0-43-58.eu-west-1.compute.internal    Ready    <none>   80m     v1.31.2-eks-94953ac

To me, this looks to work as expected.
Next I wanted to try and scale the managed node group.
I expected that, if I deploy enough containers which are allowed in this group by the taint, everntually I should see the managed node group scale from 2 to 3.
  min_size     = 2
  max_size     = 3
  desired_size = 2

I deleted the nginx deployment and karpenter eventually removed the extra nodes created.
kubectl get nodes
NAME                                        STATUS   ROLES    AGE   VERSION
ip-10-0-17-174.eu-west-1.compute.internal   Ready    <none>   88m   v1.31.2-eks-94953ac
ip-10-0-43-58.eu-west-1.compute.internal    Ready    <none>   88m   v1.31.2-eks-94953ac

I remove the pod and node affinity details from the coredns deployment and could see the pods were recreated.
I still had the same issue if I never updated these details but, the controller logs would warn me about the affinity.
kube-system   coredns-66fb7cfb6d-94n2v       1/1     Running   0          49s
kube-system   coredns-66fb7cfb6d-xlskt       1/1     Running   0          49s

I then scaled the coredns deployment
kubectl -n kube-system scale deployment coredns --replicas 12
deployment.apps/coredns scaled

I could see coredns was scaled over the two nodes
kube-system   coredns-66fb7cfb6d-5c8q4       1/1     Running   0          97s     <IP_ADDRESS>    ip-10-0-17-174.eu-west-1.compute.internal   <none>           <none>
kube-system   coredns-66fb7cfb6d-8j8rw       1/1     Running   0          97s     <IP_ADDRESS>   ip-10-0-17-174.eu-west-1.compute.internal   <none>           <none>
kube-system   coredns-66fb7cfb6d-94n2v       1/1     Running   0          3m46s   <IP_ADDRESS>    ip-10-0-43-58.eu-west-1.compute.internal    <none>           <none>
kube-system   coredns-66fb7cfb6d-hvbr4       1/1     Running   0          97s     <IP_ADDRESS>   ip-10-0-43-58.eu-west-1.compute.internal    <none>           <none>
kube-system   coredns-66fb7cfb6d-jdjfm       1/1     Running   0          97s     <IP_ADDRESS>   ip-10-0-43-58.eu-west-1.compute.internal    <none>           <none>
kube-system   coredns-66fb7cfb6d-q6d2k       1/1     Running   0          97s     <IP_ADDRESS>    ip-10-0-17-174.eu-west-1.compute.internal   <none>           <none>
kube-system   coredns-66fb7cfb6d-q7c49       1/1     Running   0          97s     <IP_ADDRESS>    ip-10-0-43-58.eu-west-1.compute.internal    <none>           <none>
kube-system   coredns-66fb7cfb6d-slqbn       1/1     Running   0          97s     <IP_ADDRESS>   ip-10-0-17-174.eu-west-1.compute.internal   <none>           <none>
kube-system   coredns-66fb7cfb6d-sr4tm       1/1     Running   0          97s     <IP_ADDRESS>   ip-10-0-17-174.eu-west-1.compute.internal   <none>           <none>
kube-system   coredns-66fb7cfb6d-tbpbl       1/1     Running   0          97s     <IP_ADDRESS>   ip-10-0-43-58.eu-west-1.compute.internal    <none>           <none>
kube-system   coredns-66fb7cfb6d-v78rv       1/1     Running   0          97s     <IP_ADDRESS>    ip-10-0-17-174.eu-west-1.compute.internal   <none>           <none>
kube-system   coredns-66fb7cfb6d-xlskt       1/1     Running   0          3m46s   <IP_ADDRESS>    ip-10-0-43-58.eu-west-1.compute.internal    <none>           <none>

I kept scaling until I could see an additional node created.
kubectl get nodes
NAME                                        STATUS   ROLES    AGE    VERSION
ip-10-0-17-174.eu-west-1.compute.internal   Ready    <none>   133m   v1.31.2-eks-94953ac
ip-10-0-43-58.eu-west-1.compute.internal    Ready    <none>   133m   v1.31.2-eks-94953ac
ip-10-0-5-97.eu-west-1.compute.internal     Ready    <none>   105s   v1.31.2-eks-94953ac

If I check my managed node group, I see only 2.
kubectl get nodes -l eks.amazonaws.com/nodegroup=karpenter-2024112711053719860000001f --no-headers | wc -l
2
Does this mean my eks managed node group scaling is not working as expected? I expected the new node would be part of his node group.
Is this expected or am I doing something wrong and there is a better way to test this?

an autoscaling group does not automatically scale on its own - it provides the means for something to tell it to scale up or down. Typically, you would deploy cluster-autoscaler which would control the desired capacity field of the ASG
closing since this is not a module issue


[FR] distutils: support os.PathLike

What's the problem this feature will solve?
I prefer to use pathlib.Path objects, but helpers like distutils.Command.make_file only accept strings: https://github.com/pypa/setuptools/blob/1b25c061e54714dbea68c5194b74f09191ce6381/setuptools/_distutils/cmd.py#L387-L391
Describe the solution you'd like
Filing this issue before I go in and make a PR to change these to os.PathLike checks. Any issues with that approach?
Alternative Solutions
No response
Additional context
Directed here from CPython: https://github.com/python/cpython/issues/92687
Code of Conduct

[X] I agree to follow the PSF Code of Conduct

Hi @taralx, thank you very much for opening this issue to discuss.
I agree with you that expanding line 387 to also accept os.PathLike would be nice.
The way setuptools works, though is by periodically bundling the updated version of distutils from https://github.com/pypa/distutils into setuptools/_distutils, instead of directly changing the code in that folder.
So the best would be asking pypa/distutils if they are interested in the change.
However for the sake of backward compatibility (there is still people running SETUPTOOLS_USE_DISTUTILS=stdlib), they might want to wait until Python 3.12 is the main used version (and distutils is completely adopted by setuptools).


Fix FunctionClauseError in Inspect.Algebra.container_each/6

Fixes an error introduced in Elixir 1.11.0 when they reworked the guards on the Inspect.Algebra.container_each/6 function.
Reported error (PID varies with usage, so is omitted):
[error] Process #PID<...> raised an exception
** (FunctionClauseError) no function clause matching in Inspect.Algebra.container_each/6

Fixes #47

Coverage remained the same at 95.484% when pulling 3963c8f869ba0f60b5179f0d8244163a9d627fd7 on peek-travel:master into 00b7bd9f38370543bb46ce99257c312cd6eda8a8 on nietaki:master.

Coverage remained the same at 95.484% when pulling 3963c8f869ba0f60b5179f0d8244163a9d627fd7 on peek-travel:master into 00b7bd9f38370543bb46ce99257c312cd6eda8a8 on nietaki:master.

@nietaki Could you please take a look? This is really annoying bug.

Hey @dolfinus, thanks for pinging me, I didn't notice the PR.
I'll take a look tomorrow morning and most likely merge it, @bryanhuntesl's review is a good sign.

Looks great @vanvoljg, thanks for coding up the fix and updating the test matrix and .tool-versions - it's much appreciated :bow:
I'll merge it in now, take a look at the other PR that's up and make a minor release today :)

Hey @dolfinus, @bryanhuntesl, I just released Rexbug v1.0.5, please have a look if it's better now.
This was an important issue and it has been raised a long time ago - sorry for not noticing it until someone pinged me. I have updated my Github notification settings to make such a situation less likely in the future. Regardless, don't hesitate to ping me if I'm not responding.

Thanks!


[Accessibility] Fixed an issue related to the tutorial

Fixed an issue where when we were jumping to a step of the tutorial without using the Next button, the focus trap was not working.
The reason why is that when clicking on a bullet at the top of the UI, it was not calling "nextTutorialStep" so the variable used to ask to reset the focus trap was not in the good state.

@veler,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Backport creation of /dev/shm in the sandbox to bst-1

See original merge request on GitLab
In GitLab by [Gitlab user @coldtom] on Jan 17, 2020, 21:29
Backport of !1694
I'd like to use the bazel_build plugin in 1.4.x too, but unfortunately it requires this change. If this is deemed unsuitable to backport, I can handle it in the plugin. However doing so means we will mount in the host /dev/shm, which is a bit sad.

In GitLab by [Gitlab user @juergbi] on Jan 18, 2020, 12:11
I consider this a bugfix, however, it may still affect builds of existing projects (e.g., a configure check for shm would presumably fail right now in 1.4) and thus, there is a risk of breaking repeatability or reproducibility of those projects.
A safer option could be to add a flag to SandboxFlags for SHM support and mount /dev/shm only if that flag is set. The new bazel_build plugin could set this flag. The main downside would be that this bugfix could not be made available for existing element plugins (unless they add a backward-compatible config option of their own).

In GitLab by [Gitlab user @coldtom] on Feb 2, 2020, 13:27
added 1 commit
a15bb6ab - _sandboxbwrap.py: Create /dev/shm in the sandbox
Compare with previous version

In GitLab by [Gitlab user @coldtom] on Feb 2, 2020, 14:32
added 1 commit
33234e0d - _sandboxbwrap.py: Create /dev/shm in the sandbox
Compare with previous version

In GitLab by [Gitlab user @jjardon] on Apr 8, 2020, 16:27
changed the description

In GitLab by [Gitlab user @jjardon] on Apr 8, 2020, 16:29
added 26 commits
33234e0d...ec4a9fe9 - 25 commits from branch bst-14cc77eac - _sandboxbwrap.py: Create /dev/shm in the sandbox
Compare with previous version

@juergbi I suggest this is pulled in to bst1.7 since it looks like bst2 shows no signs of itself. If this indeed breaks reproducibility, can be handled as bug fixes

Closing in favor of #1533 where I'm adding some additional support and tests.


Migration to spine 0.8

Summary of changes:

Dependencies between BoundedContex, repositories and enrichers are unleashed;
BoundedContext definition moved to the separate class;
Tests are reworked according to the Junit5 features;
TaskAggregate is separated into parts;
Created TaskAggregateRoot;
Created separate module for the testutil data.

@armiol PTAL.

@IlliaShepilov please fix the typos in the description.

@armiol PTAL.

@armiol PTAL.

@IlliaShepilov Spine is a title. Please fix in the PR.

@IlliaShepilov also, as to the PR description. If you are using a bulleted list and delimit the items with a semicolon, then the next item should not start with a capital letter.
E.g. (wrong)

First;
Second;
Third.

(correct)

first;
second;
third.

(or — correct)

First.
Second.
Third.

@armiol PTAL.

@armiol PTAL.

@armiol PTAL.


stable releases?

The wiki implies

tar -xf tethex-x.y.z-Source.tar.gz

that there are releases, but this is not the case.
I see that this is a small project, but i think it would still be good to introduce at least 1.0 release. Also it would be good to state the requirement for gmsh version (if any).

Hi Denis,
This project used to be hosted on GoogleCode, where I uploaded the archives of the sources in that tethex-x.y.z-Source.tar.gz format. The wiki was also written at that time. I'll update it.
As for the version of gmsh - as long as the input mesh is in ASCII 2.x format, tethex should be able to read it, so it's not quite related to the gmsh version.
Thanks,
Mikhail

This project used to be hosted on GoogleCode, where I uploaded the archives of the sources in that tethex-x.y.z-Source.tar.gz format. The wiki was also written at that time. I'll update it.

I see... would you mind tagging releases here on GitHub, similar to what is done for deal.II: https://github.com/dealii/dealii/releases?
I would like to add tethex to a Spack package manager https://github.com/LLNL/spack to have under the same roof deal.II suite, Gmsh and this utility. To that end it would be better if your project has some releases.

Hi Denis,
Please, check this out: http://github.com/martemyev/tethex/releases
Also, I updated the wiki.
Cheers,
Mikhail

great, thanks! see https://github.com/LLNL/spack/pull/1991


Optimizer powerup fix

I noticed my Pokemons werent upgraded at all.
After look into this, I saw the stardust calculation subtracted the would-be used
dust always! But when we determin the Pokemon cant be upgraded, we didnt use the dust
This will "refund" this dust for the calculations and determin if the following mon
can be upgraded

👍

merged #6012


Allow a file to be used as the indicator of whether the cache (item) should change

Instead of using a fingerprint, optionally, a specific file can be specified as the cache fingerprint "source".
E.g. cocoapods: Podfile.lock could be the indicator file. If it's the same then even if a file was modified the cache should still be valid.
In this mode use a file content checksum instead of a file attribs fingerprint!!
AppVeyor has a similar feature: http://www.appveyor.com/docs/build-cache
Format
Ideas:

/indicator/file/path -> /cached/dir/path
/indicator/file/path:/cached/dir/path
/cached/dir/path:/indicator/file/path
/cached/dir/path <- indicator/file/path
/cached/dir/path (indicator/file/path)

Prefer a character which can't be part of the file path normally.

Done


Visualizations: Consistent styling of "no data" representations

In scatter, we use a gray 'x' which is a different marker entirely from the other points.
Currently, when a bar plot shows a 'no data' bar, it is styled just like the other bars but is gray in its (filled) color. To be more consistent with the scatter representation of no data and prevent accessibility issues, perhaps we should change the style of the 'no data' bar to a gray outline and empty fill, or a hashed fill.
Additionally, we should check that our choice for the 'no data' bar also generalizes to the other visualizations that will ever show no data.
To dos before implementation

[ ] Get a final list of all plot types that will ever represent 'no data'. (I'll do)
[ ] Make mockups of different ways of styling 'no data' representations that could generalize across viz types. (I'll do)
[ ] Get feedback and decide on strategy

Reviewing the implementation cost...
Our plot components library is only set up for providing a custom color in the data structure.  We would either have to add a new fill prop or pass a magic value to the color prop and then handle this somehow.  I prefer the former.
Because this has to be implemented for each plot component, it's more than low cost, but it's not a massive deal.

Great thank you! I'll gather the list of vizs this affects today, make mockups tomorrow, share with you to make sure they're doable, and then ask for mockup review from the rest of the group.

The below is the current suggestion for how to handle the no data visual representation across vizs. See slack thread for full discussion.

Sadly, doing this the easy way in Plotly is ugly.
We wouldn't want black outlines for the other overlay, categories would we?

Though this is what it looks like with dark grey lines for everything

Here's a histogram with more default bins

Another option for consideration

Same as above but with a lighter grey

And something with wider bins

Discussed in 9/13/2021 EDA WG meeting.
Everyone likes the solution using the light grey outlines for no data, this is a good compromise

i dont love this, but i suppose can live w it.. histograms to me ideally should be able to support both reads of length of the individual bars, as well as the area of all bars of a particular overlay color. but i agree of the options here presented by bob the last one is far better than the first..

i dont love this, but i suppose can live w it.. histograms to me ideally should be able to support both reads of length of the individual bars, as well as the area of all bars of a particular overlay color. but i agree of the options here presented by bob the last one is far better than the first..

Hi @d-callan - could you elaborate on how you think the user can't read the bar length or area of all bars of a particular overlay color?  Is it because of the white?

It still supports bar length well, but area less so because of the white. It's workable though, and the least bad option of what I've seen.

@SheenaTomko  please resolve as required

Checked with WASHb Kenya, using Bruising during last 7 days, caregiver report as the overlay variable
Styling of "no data" for the overlay variable looks good for these visualizations:

Scatter plot
Box plot
Bar plot (because x-axis variable can only have 10 or fewer values, we don't see the issue noted for histograms, below)

There are issues with these visualizations:

Histogram: when the bin width is narrow, the trace is obviously outside of the "no data" bar and looks strange

GEMS1A example

This is potentially fixed in https://github.com/VEuPathDB/web-components/pull/217
It's in a different repo, so we'll have to close this manually.

@bobular this still doesn't look fixed to me, have the changes been pushed to the qa sites?

looks good enough


Remove newWindow flag, allow Atom to decide window

Remove the new window flag which causes Atom to always use a new window. Allow Atom to intelligently decide which window to reuse or open new.
See issue https://github.com/danielbrodin/atom-project-manager/issues/395

Thanks for the help :)


Client.Commit: Fix issue that "commit" command line with tag

Current hyperctl commit will get error if command line has tag.
The reason is tag should be moved out as a special commit option from
repo in hyperctl.
Update Client.Commit to handle the issue.
Signed-off-by: Hui Zhu<EMAIL_ADDRESS>

@gnawux I tried to use the docker/distribution/reference when I made the patch.  But the docker/distribution/reference that is included by hyperd doesn't have proper code to handle the issue.
There are too many private elements around it.

alright, merge it firstly


introduce pkgsets

Encourage composition over overlays by passing a set of attrsets.

I wonder: is there a blog post about pkgsets? (I immediately wonder how they differ from inputs straight)

@blaggacao I may be going out on a limb here, but it sure sounds like this:
https://zimbatm.com/notes/1000-instances-of-nixpkgs

Definitely, but in addition it chooses to hoist the package scope of inputs, which is an extremely common scope in the nix community.
But I still look at it as "primus inter pares", since the utility of flakes doesn't stop with the package scope.
So the plot here is inputs vs inouts.packages.
Jonas might have additional conceptualization, but that's how far I can grasp it.

Sorry to bikeshed a bit over naming conventions, especially as a late-comer to this PR, but I'd like to propose using "channels" rather than "pkgsets", since this is a convention already used by flake-utils-plus, and is likely already familiar to a number of flake users

@zimbatm why was this closed :thinking: lack of interest? or maybe there is a better alternative being worked on somewhere?


Add kitty support and update to node 16

In an attempt to add support for the kitty terminal, I ended up also updating dependencies and related code to work with node 16. As I am not very familiar with the JS ecosystem, it is quite possible this pull request features some major errors, in which class I will do my best to fix them as necessary.

iss been 2 years can this b pulled i want kitty support

So real

You can clone the fork, do npm install, npm start and go to localhost:8000


Fix not really cached but cache blocks size increase

What changes are proposed in this pull request?
Fix not really cached but cache blocks size increase.
Why are the changes needed?
Please clarify why the changes are needed. For instance,
The metric Worker.CacheBlocksSize is not correct.
Does this PR introduce any user facing changes?
Please list the user-facing changes introduced by your change, including
no

@flaming-archer Thanks for your contribution. Do you mind create an issue to explain a little bit more about why exactly is wrong? Thanks!

@jja725 Take a look at the change? Since the file was modified by you last time.

Enum is a good idea, I have changed it.

alluxio-bot, merge this please


feat(router): add db interface for /relay

Type of Change

[ ] Bugfix
[x] New feature
[ ] Enhancement
[ ] Refactoring
[ ] Dependency updates
[ ] Documentation
[ ] CI/CD

Description

/relay is a api that will be used to just forward the request sent by merchant without performing any application logic on it. In this pr the changes is particular to support the refunds for the payments that was directly performed with the connector (example stripe) with out hyperswitch involved during the payment flow.
Flow

Merchant performs payment directly with processor and stores the payment reference id associated with it.
Merchant tiggers the refund through hyperswitch using the processor reference id for the payment.

Additional Changes

[ ] This PR modifies the API contract
[x] This PR modifies the database schema
[ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

-> Create a merchant connector account
-> Make a refund request with invalid connector_resource_id
curl --location 'http://localhost:8080/relay' \
--header 'Content-Type: application/json' \
--header 'X-Profile-Id: pro_Pwvl4mcL0CmLR1YbIXnq' \
--header 'api-key: dev_y6s7DJZguBHxS66AneCCoJUgO3aTjcdafjJ5x1JiBtOJFofp5AchFIC4oxTxd8oa' \
--data '{
  "connector_id": "mca_M3pxBGmzJeOPHBhBxOoH",
  "connector_resource_id": "X445D84NZ22WQT65",
  "data": {
    "amount": 50,
    "currency": "USD"
  },
  "type": "refund"
}'

{
    "id": "relay_XiAMJo3ifbyhYaQ7AyW9",
    "status": "failure",
    "connector_resource_id": "X445D84NZ22WQT65",
    "error": {
        "code": "resource_missing",
        "message": "resource_missing"
    },
    "connector_reference_id": null,
    "connector_id": "mca_M3pxBGmzJeOPHBhBxOoH",
    "profile_id": "pro_Pwvl4mcL0CmLR1YbIXnq",
    "type": "refund",
    "data": {
        "amount": 50,
        "currency": "USD",
        "reason": null
    }
}

-> Make a refund request with valid connector_resource_id
curl --location 'http://localhost:8080/relay' \
--header 'Content-Type: application/json' \
--header 'X-Profile-Id: pro_vb2ZGypHwTIhL1xpi7cV' \
--header 'api-key: dev_yOa9A8G8VyF3rDcy8KUylUsSZxXwGYIQOVo10YEPFhVvouztwHhVmpOkqsbPVKKJ' \
--data '{
  "connector_id": "mca_qjU8mTdWzr7uKhm99WON",
  "connector_resource_id": "7348595224296247904953",
  "data": {
      "refund": {
    "amount": 50,
    "currency": "USD"
  }},
  "type": "refund"
}'

{
    "id": "relay_5sEV785aXJs1ZQwpMmO5",
    "status": "pending",
    "connector_resource_id": "7348595224296247904953",
    "error": null,
    "connector_reference_id": "7348601752236522904951",
    "connector_id": "mca_qjU8mTdWzr7uKhm99WON",
    "profile_id": "pro_vb2ZGypHwTIhL1xpi7cV",
    "type": "refund",
    "data": {
        "refund": {
            "amount": 50,
            "currency": "USD",
            "reason": null
        }
    }
}

Checklist

[x] I formatted the code cargo +nightly fmt --all
[x] I addressed lints thrown by cargo clippy
[x] I reviewed the submitted code
[ ] I added unit tests for my changes where possible

@SanchithHegde as this is a priority pr, can I address all of your comments in my next pr ?

The above resolved comments are addressed in https://github.com/juspay/hyperswitch/pull/6954


No tool tips for Histogram with time x_scale

Wave SDK Version, OS
h2o_wave 0.22.0
Actual behavior
tool tip hover for linear scale

no tool tip hover for time scale ( I can make a gif as needed since it's not really showing that my curser is on the plot...)

Expected behavior
Tool tip to work for all scale times
Please note I did not test other x_scale types or other plot types with time scale
Steps To Reproduce
from h2o_wave import main, app, Q, ui, data

@app('/')
async def serve(q: Q):
    q.page['ex1'] = ui.plot_card(
        box='1 1 4 3',
        title='Dates',
        data=data('low high price', 3, rows=[
            ("2022-01-01", "2022-01-31", 100),
            ("2022-02-01", "2022-02-28", 150),
            ("2022-03-01", "2022-03-31", 200),
        ]),
        plot=ui.plot([ui.mark(
            type='interval',
            y='=price', y_min=0,
            x1='=low', x2='=high', x_scale="time"
        )])
    )
    q.page['ex2'] = ui.plot_card(
        box='1 4 4 3',
        title='Numbers',
        data=data('low high price', 3, rows=[
            (1, 2, 100),
            (2, 3, 150),
            (3, 4, 200),
        ]),
        plot=ui.plot([ui.mark(
            type='interval',
            y='=price', y_min=0,
            x1='=low', x2='=high', x_scale="linear"
        )])
    )

    await q.page.save()

The problem lies in tooltip.ts:L98 in titleScale.getText(originData[titleField]) where
originData: {
  high: "2022-03-31"
  low: "2022-03-01"
  low - high: ['2022-03-01', '2022-03-31']
  price: 200
}

and titleField: "low - high".
When x_scale="time" the data are treated as a date objects. In our ranged low - high data an array is passed to the G2 date parsing function and it throws error as seen on the picture below:

However, in the second example there is no x_scale specified and therefore the data are not passed to date parsing function and therefore there is no error while showing the tooltip.
originData: {
  high: 4
  low: 3
  low - high: (2) [3, 4]
  price: 200
}

Looking on the G2 examples and API I couldn't find a direct support for histogram ranged data. Probably we need to find a different way how to refactor data passed to chart.
@lo5 you are an expert here. How do you think we should proceed?
cc @mturoci

@marek-mihok one way to fix this is providing our own string for the tooltip title instead of having it computed by G2. This can basically be any string since we overwrite the tooltip with our custom React component without a title anyway. Wdyt?
Solution:
          chart.tooltip({
            title: 'Ignore', // HACK: Ignore tooltip title computation by G2 since we overwrite it anyway.
            showCrosshairs: true,
            crosshairs: { type: 'xy' },
            ...
          )}

Thanks @mturoci. That's a perfect idea!


Sync EnvTest version with k8s version

/test infra-operator-build-deploy-kuttl

recheck

we need https://github.com/openstack-k8s-operators/infra-operator/pull/172 first


Got an error on first attempt

I am scraping 2000 urls and some of them got Cloudflare's page. I started my scraper and once I got Cloudflare's page, an error occurred:
Unhandled rejection StatusCodeError: 429 - "<!DOCTYPE HTML>\n\n\n  <meta charset=\"UTF-8\" />\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\" />\n  <meta name=\"robots\" content=\"noindex, nofollow\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1\" />\n  <title>Just a moment...</title>\n  \n\n    \n\n\n\n\n
\n
\n      \n
\n
Please turn JavaScript on and reload the page.
\n
\n    \n
\n

\n

\n

\n
\n
Checking your browser before accessing coinmarketcap.com.
\n    \n
This process is automatic. Your browser will redirect to your requested content shortly.
\n
Please allow up to 5 seconds…
\n
\n   \n  <form id=\"challenge-form\" action=\"/cdn-cgi/l/chk_jschl\" method=\"get\">\n    <input type=\"hidden\" name=\"s\" value=\"d341f3ce070cdcebd4a2f66166ae27fc5b1817fb-1553589396-1800-AYyUBxmsc2D+SJcJIdDh1Xg1WxDUxhFrYTD53N9o++dluuXCBGXzEdNruJwaA1fvm3HWVySlnt6uAwvvR/wlQ6bT1DLvvsSU08MRLdYKSjWOqBwuj4DDvMoN4Mk2Xlz9FKBS1o6QfdNaORff8LeeUtVgUUBphbKoXbfPnT64zQ9Z\"></input>\n    <input type=\"hidden\" name=\"jschl_vc\" value=\"1fa554b4b911a7f4faa8c23c0848ba78\"/>\n    <input type=\"hidden\" name=\"pass\" value=\"1553589400.048-AY+6BjyyjV\"/>\n    <input type=\"hidden\" id=\"jschl-answer\" name=\"jschl_answer\"/>\n  </form>\n
\n\n          \n
\n            DDoS protection by Cloudflare\n
\n            Ray ID: 4bd7cc3d4f486373\n
\n      	\n     \n
\n
\n  \n\n\n"
    at new StatusCodeError (/my-app/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/my-app/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/my-app/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/my-app/node_modules/request/request.js:185:22)
    at processResponseBody (/my-app/node_modules/cloudscraper/index.js:344:3)
    at processRequestResponse (/my-app/node_modules/cloudscraper/index.js:162:12)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/my-app/node_modules/request/request.js:1161:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (/my-app/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
From previous event:
    at Request.plumbing.init (/my-app/node_modules/request-promise-core/lib/plumbing.js:36:28)
    at Request.RP$initInterceptor [as init] (/my-app/node_modules/request-promise-core/configure/request2.js:41:27)
    at new Request (/my-app/node_modules/request/request.js:127:8)
    at request (/my-app/node_modules/request/index.js:53:10)
    at performRequest (/my-app/node_modules/cloudscraper/index.js:94:17)
    at /my-app/node_modules/cloudscraper/index.js:41:14
    at Function.get (/my-app/node_modules/request/index.js:100:12)
    at Promise (/my-app/app/utils/scraping.js:88:26)
    at new Promise (<anonymous>)
    at scrapeSinglePage (/my-app/app/utils/scraping.js:79:12)
    at scrapeCurrencyPage (/my-app/app/services/coinMarketCap/scrapeCurrenciesUrls.js:39:31)
    at currencies.map (/my-app/app/services/coinMarketCap/scrapeCurrenciesUrls.js:82:35)
    at <anonymous>

Any idea what's wrong?

hi @naorye . Are you sure that this was your first request? 429 sounds like you made some prior requests from that IP.
Could you also please post the response headers for further investigation?

Hi @codemanki, I am sorry, wasn't clear.
I meant that I tried cloudscraper for the first time and it threw an error.
I performed 100 GET requests, the 7th requests got cloudflare's page and that error was thrown.
...
When I am thinking about that, there is a possibility that previous requests also got cloudflare's page and it did work.
What causes this exception?

@naorye There was a very slim chance that the Cloudflare page could be returned. I raised that issue in #162 and @codemanki closed/fixed it with #163.
The status code error happens whenever the status code is not 200 OK. If that should not be an error, you may pass the simple: false option to cloudscraper.
cloudcraper.get({ uri, simple: false}).then(console.log);

For more information on the simple option, see request-promise's docs: https://github.com/request/request-promise#migration-from-v2-to-v3

@pro-src Is there a chance that cloudflare returns 429 code along with it's error page?

@naorye Yes but the challenge is always sent with 503 status so that error is mysterious. I ran the following test for a count of 50 and it didn't error at all. I can't reproduce this on the master branch so maybe we've already fixed it.
set -xe
for num in {1..50}
do
  node test.js
done

// test.js
var cloudscraper = require('cloudscraper');
cloudscraper.get('http://coinmarketcap.com').then(console.log, error => {
  console.error(error);
  process.exit(1);
});

@naorye What version of cloudscraper are you using? Can you test with the master branch of this repository?
rm -rf node_modules/cloudscraper
npm install --save 'https://github.com/codemanki/cloudscraper

@pro-src Tried with simple: false but then when I got cloudflares page, it doesn't manage to get to the page behind the protection. I am using "cloudscraper": "^3.3.0".
I'll try to install directly from github.

@naorye btw, thanks for reporting this. Can you please provide a minimal test case?

I'll try to create a reproduction.

Running the following threw an error on the 15th scrape. It might take longer.
const cloudscraper = require('cloudscraper');

const urls = [
    'https://coinmarketcap.com/currencies/bitcoin/',
    'https://coinmarketcap.com/currencies/ethereum/',
    'https://coinmarketcap.com/currencies/ripple/',
    'https://coinmarketcap.com/currencies/litecoin/',
    'https://coinmarketcap.com/currencies/eos/',
    'https://coinmarketcap.com/currencies/bitcoin-cash/',
    'https://coinmarketcap.com/currencies/binance-coin/',
    'https://coinmarketcap.com/currencies/tether/',
    'https://coinmarketcap.com/currencies/stellar/',
    'https://coinmarketcap.com/currencies/cardano/',
    'https://coinmarketcap.com/currencies/tron/',
    'https://coinmarketcap.com/currencies/bitcoin-sv/',
    'https://coinmarketcap.com/currencies/monero/',
    'https://coinmarketcap.com/currencies/iota/',
    'https://coinmarketcap.com/currencies/dash/',
    'https://coinmarketcap.com/currencies/maker/',
    'https://coinmarketcap.com/currencies/neo/',
    'https://coinmarketcap.com/currencies/ontology/',
    'https://coinmarketcap.com/currencies/ethereum-classic/',
    'https://coinmarketcap.com/currencies/tezos/',
    'https://coinmarketcap.com/currencies/nem/',
    'https://coinmarketcap.com/currencies/zcash/',
    'https://coinmarketcap.com/currencies/vechain/',
    'https://coinmarketcap.com/currencies/basic-attention-token/',
    'https://coinmarketcap.com/currencies/waves/',
    'https://coinmarketcap.com/currencies/usd-coin/',
    'https://coinmarketcap.com/currencies/dogecoin/',
    'https://coinmarketcap.com/currencies/omisego/',
    'https://coinmarketcap.com/currencies/qtum/',
    'https://coinmarketcap.com/currencies/crypto-com-chain/',
    'https://coinmarketcap.com/currencies/bitcoin-gold/',
    'https://coinmarketcap.com/currencies/trueusd/',
    'https://coinmarketcap.com/currencies/decred/',
    'https://coinmarketcap.com/currencies/lisk/',
    'https://coinmarketcap.com/currencies/0x/',
    'https://coinmarketcap.com/currencies/augur/',
    'https://coinmarketcap.com/currencies/chainlink/',
    'https://coinmarketcap.com/currencies/zilliqa/',
    'https://coinmarketcap.com/currencies/bitshares/',
    'https://coinmarketcap.com/currencies/maximine-coin/',
    'https://coinmarketcap.com/currencies/ravencoin/',
    'https://coinmarketcap.com/currencies/icon/',
    'https://coinmarketcap.com/currencies/holo/',
    'https://coinmarketcap.com/currencies/digibyte/',
    'https://coinmarketcap.com/currencies/bytecoin-bcn/',
    'https://coinmarketcap.com/currencies/steem/',
    'https://coinmarketcap.com/currencies/bittorrent/',
    'https://coinmarketcap.com/currencies/nano/',
    'https://coinmarketcap.com/currencies/bitcoin-diamond/',
    'https://coinmarketcap.com/currencies/enjin-coin/',
    'https://coinmarketcap.com/currencies/huobi-token/',
    'https://coinmarketcap.com/currencies/paxos-standard-token/',
    'https://coinmarketcap.com/currencies/kucoin-shares/',
    'https://coinmarketcap.com/currencies/aeternity/',
    'https://coinmarketcap.com/currencies/verge/',
    'https://coinmarketcap.com/currencies/komodo/',
    'https://coinmarketcap.com/currencies/pundi-x/',
    'https://coinmarketcap.com/currencies/bytom/',
    'https://coinmarketcap.com/currencies/siacoin/',
    'https://coinmarketcap.com/currencies/iostoken/',
    'https://coinmarketcap.com/currencies/aurora/',
    'https://coinmarketcap.com/currencies/theta/',
    'https://coinmarketcap.com/currencies/abbc-coin/',
    'https://coinmarketcap.com/currencies/stratis/',
    'https://coinmarketcap.com/currencies/dai/',
    'https://coinmarketcap.com/currencies/insight-chain/',
    'https://coinmarketcap.com/currencies/golem-network-tokens/',
    'https://coinmarketcap.com/currencies/status/',
    'https://coinmarketcap.com/currencies/populous/',
    'https://coinmarketcap.com/currencies/ardor/',
    'https://coinmarketcap.com/currencies/project-pai/',
    'https://coinmarketcap.com/currencies/ark/',
    'https://coinmarketcap.com/currencies/revain/',
    'https://coinmarketcap.com/currencies/mixin/',
    'https://coinmarketcap.com/currencies/cryptonex/',
    'https://coinmarketcap.com/currencies/gemini-dollar/',
    'https://coinmarketcap.com/currencies/gxchain/',
    'https://coinmarketcap.com/currencies/hypercash/',
    'https://coinmarketcap.com/currencies/digitex-futures/',
    'https://coinmarketcap.com/currencies/factom/',
    'https://coinmarketcap.com/currencies/maidsafecoin/',
    'https://coinmarketcap.com/currencies/electroneum/',
    'https://coinmarketcap.com/currencies/wax/',
    'https://coinmarketcap.com/currencies/decentraland/',
    'https://coinmarketcap.com/currencies/loom-network/',
    'https://coinmarketcap.com/currencies/waltonchain/',
    'https://coinmarketcap.com/currencies/crypto-com/',
    'https://coinmarketcap.com/currencies/qash/',
    'https://coinmarketcap.com/currencies/loopring/',
    'https://coinmarketcap.com/currencies/pivx/',
    'https://coinmarketcap.com/currencies/zcoin/',
    'https://coinmarketcap.com/currencies/aelf/',
    'https://coinmarketcap.com/currencies/waykichain/',
    'https://coinmarketcap.com/currencies/thorecoin/',
    'https://coinmarketcap.com/currencies/qubitica/',
    'https://coinmarketcap.com/currencies/moac/',
    'https://coinmarketcap.com/currencies/repo/',
    'https://coinmarketcap.com/currencies/power-ledger/',
    'https://coinmarketcap.com/currencies/kyber-network/',
    'https://coinmarketcap.com/currencies/wanchain/',
];

function scrapePage(url) {
    return new Promise((resolve, reject) => {
        cloudscraper.get(url, (err, resp, html) => {
            if (!err) {
                resolve(html);
            } else {
                reject(err);
            }
        });
    });
}

urls.reduce(async (promise, url, index) => {
    await promise;
    await scrapePage(url);
    console.log(index);
}, Promise.resolve());

@naorye I was able to reproduce this and we'll have a fix for this soon.
@codemanki I think we should handle the case of 429 Too Many Requests by respecting the Retry-After header and partially revert #163 to re-include the isChallengePresent check irrespective of statusCode but only if isCloudflare === true. This may have been the one and only exception but to be safe...

@naorye The fix in #165 successfully scrapes all 100 of them. Can you confirm?
npm install git://github.com/pro-src/cloudscraper.git#164_too_many_requests

Actually I have 2000 :)
I'll check it in two hours and will update.
Thanks!

@naorye I just thought to mention that your test case can be simplified by replacing:
function scrapePage(url) {
    return new Promise((resolve, reject) => {
        cloudscraper.get(url, (err, resp, html) => {
            if (!err) {
                resolve(html);
            } else {
                reject(err);
            }
        });
    });
}

With it's equivalent:
function scrapePage(url) {
    return cloudscraper.get(url);
}

Scraping 2128/2128 [============================================================] 100%
Done successfully!
Thanks!!
When do you plan to merge it to master branch?

Awesome! Once the PR is reviewed and if everything is good. (Probably less than 24H until a new NPM release) Thanks for your contribution!!!

You are awesome! 🥇

Thank you guys for taking care of this. I will look through the PR tomorrow morning and will release a new version :)

Done! 3.4.0 has been just published. Thank you @pro-src :)


First Issue - Running the Script

Hi,
Not sure if this is the right forum for this, but was hoping someone could help. I am hoping you run the script in CMD, I have installed GIT desktop and JDK, however when I run the script I am getting 2 errors,

Have I done something wrong? The user instructions, make is seems so simple. Am I over complicating things?

Hey @IsaacCoulter ! Actually the error you found is because you need to compile the code before you can run it. I honestly didn't think that anybody would use this program, so I didn't bother, but I'll add a binary version with more detailed instructions for you as soon as possible.

Actually I've already updated it, so you should now be able to run it! Let me know if you find any more troubles and have a nice day!


[Chore][Compile] fix compile fail on clang

Proposed changes
Issue Number: close #xxx
Problem Summary:
Describe the overview of changes.
Checklist(Required)

Does it affect the original behavior: (Yes/No/I Don't know)
Has unit tests been added: (Yes/No/No Need)
Has document been added or modified: (Yes/No/No Need)
Does it need to update dependencies: (Yes/No)
Are there any changes that cannot be rolled back: (Yes/No)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

Due to the update in cast_to_string, P0 regression will fail when table has BIGINT field. A solution is:

fixed on https://github.com/apache/doris/pull/10913


How to use Cocoapods for Swift 2.0

Hi,
I'm impressive with this effect and found the Swift 2.0 branch which can run the example. However, the current pod "LiquidLoader" is not for Swift 2.0. Is there any way I can use it?

You can specify git branch.
pod "LiquidLoader", :git => 'https://github.com/yoavlt/LiquidLoader.git', :branch => 'swift-2.0'
https://guides.cocoapods.org/using/the-podfile.html


Remove workaround for OpenCover

In PR #162 we implemented a workaround for a know issue in OpenCover (specifically: run open cover with the -oldstyle parameter). This workaround is for OpenCover 4.6.519 but it will no longer be necessary when the next version of OpenCover is released.

@Jericho thanks for adding this!

I missed the annoucement but evidently there was a new version of OpenCover published in February (after almost 3 years!!!). I'll investigate if we can remove the workaround.

I could be wrong, but I believe I tested out right after that release came out, and found the need to use -oldstyle was still there.

Sadly, it looks like @AdmiringWorm is right. I have been trying to run opencover on my project with out the -oldstyle switch and I am getting errors like:
System.MissingMethodException : Method not found: 'Void System.CannotUnloadAppDomainException.SafeVisited(Int32)'.

Having said that, it looks like OpenCover now support Portable PDBs. It used to require Full PDB but I switched one of my projects and, so far, coverage is being calculated correctly.

On the bright side, it looks like OpenCover now support Portable PDBs.

Well, at least there are 1 silver lining then. 1 Benefit is better than none.

@Jericho is this still an issue?

@gep13 there hasn't been a new release of OpenCover since I last tested therefore this is still an issue.


Intellisense

Alternative approaches discussed here in the VS Code extension repo: https://github.com/evidence-dev/evidence-vscode/issues/120

@csjh has a rough POC here: https://github.com/csjh/language-tools/pull/1/files
Current thinking is we'll publish the above as a language server extension, and make that a dependency of the vs code extension.
Potentially use the isEvidenceProject flag in the existing VS code extension to prevent this from firing on non-evidence markdown files.
This has a fair amount of jank. Unclear how well this works inside a monorepo structure etc.


Publish RFCs to github pages

Now that we have an RFCs repo once we start merging RFCs we need to have a place to host them. We should add hosting via github pages so we can see the rendered output of the RFCs.

I think having RFC in qiskit.org (maybe as part of the documentation?) it would be good.


[Dependents] Investigate query performance issue

We shipped the package dependents feature to PROD but noticed high query times. After some conversations with the SQL Server team this is related to the query plan that is being selected via parameter sniffing.
We got into a situation in PROD where there are at least two wildly different query plans that are appropriate for their respective parameter values. For example, the query plan of sniffed from Newtonsoft.Json looks totally different from BaseTestPackage. The performance when the query plans get mixed up is unacceptable. For example, using a BaseTestPackage parameter value for the Newtonsoft.Json query plan results in a query that takes longer than 30 seconds.
Some options:

Use OPTION ( OPTIMIZE FOR UNKNOWN ) - this will cause very depended upon packages like Newtonsoft.Json to take 1-3 seconds per query. Maybe this okay with caching.
Use OPTION ( RECOMPILE ) and allow every parameter value and query execution to evaluate its own query plan.
Investigate other options with the SQL Server team (perhaps there are new options coming out or we are missing something)

My vote is to try option 2 in PROD and verify DB and App Service resource utilization is nominal.
There are extensions to Entity Framework that allow you to put OPTION ( ... ) in then generated SQL:
https://stackoverflow.com/a/40387038
https://stackoverflow.com/a/10918838
Query plans:  query-plans.zip
Top 5 query
Optimal for small packages:

Optimal for Newtonsoft.Json:

Total count query
Optimal for small packages:

Optimal for Newtonsoft.Json:

The final approach taken was to use OPTIMIZE FOR UNKNOWN by default but have a configurable list of package IDs that use RECOMPILE. At the time of this comment, the package IDs in the configurable list are: Newtonsoft.Json, NETStandard.Library, and AWSSDK.Core.


RelayConnection type naming and extension

Two requests regarding the relay connection extension (https://github.com/prisma/nexus/blob/develop/src/extensions/relayConnection.ts):

Remove "Relay" prefix from type names and/or make prefix configurable
Expose connection definition object (https://github.com/prisma/nexus/blob/develop/src/extensions/relayConnection.ts#L42) to allow arbitrary fields, i.e. total.

Yep, now that plugins are possible this is something we can do, making configurable type-safe abstractions like those needed for connections. Closing in favor of #314, pretty excited about what the API looks like for this so far, should have something in a PR soon.


Ability to disable logging completely

Currently we keep logging events even if we set app mode to release. While this is good for debugging we should allow rerouting all loggers to no-op logger.

During release we don't pollute console anyway. Considering that we are not targeting the best performance / memory use, I think the best way is to keep silent logging, at least for now anyway


Add flashing script in this repo

Hello,
It could be great if you can add your batch script in this repo
I'm on GNU/Linux and fork your script to use bash
I think it can be more useful to update if you make change ;-)
I can also make a pr with my script.

Hey, it's quite a simple script, it just uses fastboot flash commands, I've just added some extra commands for logging and updating the console window. The main issue is that we need specific drivers for this device on Windows, on Linux I'm not sure if that is required.
Here are the flashing scripts anyway:
EraseUserData.bat.txt
FlashPartitions.bat.txt

just fork your repo and add it
https://github.com/poc-sm/GammaOS/blob/main/FlashPartitions.sh
I create this issue because if you change something I'll need to report it ;-)

Thank you! If you can create a PR and I'll get that merged in, and will include in future releases. LGTM!

Actually I have merged it just now, thank you for your contribution.


Doesn't work with Flutter 3.10.0

Hey just wanted to let you know that this package does not work with Flutter 3.10.0 :/

@Myzel394 Post more context and examples? Does it not compile?

What is the error? I just tested this locally.

I am getting:
../../../.pub-cache/hosted/pub.dev/cupertino_list_tile-0.2.1+1/lib/src/list_tile.dart:342:7: Error: The non-abstract class '_ListTileElement' is missing implementations for these members:
 - RenderObjectElement.moveRenderObjectChild
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class _ListTileElement extends RenderObjectElement {
      ^^^^^^^^^^^^^^^^
../../../dev/bin/flutter/packages/flutter/lib/src/widgets/framework.dart:6309:8: Context: 'RenderObjectElement.moveRenderObjectChild' is defined here.

Sorry for the late cleanup, this has been resolved long ago.


🔧 Update Ingress to use new non-shared type

clone of https://github.com/ministryofjustice/manage-hmpps-auth-accounts/pull/43/files


Adds a GetFileReader function to client/pfs

This was needed for v1.4 migration.

@derekchiang whenever you have a chance

This turned out not to be a workable direction for migration (which I originally wrote this for) and because I made the same change in v1.4 I'd get a merge conflict if I merged this... so I'm going to not do that.


More typing

Description:
More typing improvements.
Switch to using mypy.ini for flexibility
Add warn_return_any check except in homeassistant.util.yaml that does typing hacks. Fix some type annotations as resulting from this check and ignore others were fixing is hard.
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass

not sure if you're aware btw, but you could use MonkeyType to help find types for code.

Thanks, I'll try MonkeyType.


Make sure jumps to anchors are not sudden when a page is opened for the first time

When we navigate to a URL that contains a link to a section (e.g. https://vellum-staging.docs.dev.buildwithfern.com/api-reference/generate#generate-request-deployment_id) we want to make sure that the jump to that section is handled smoothly (i.e. no flickering/flashing). The ideal experience should resemble navigating to a Stripe page section https://stripe.com/docs/api/customers/update#update_customer-description

Moving this ticket to linear


Add new option "stripLeadingZeros" to the numeric extension

Leading zeros are always stripped. Add new option stripLeadingZeros with default value true to the numeric extension.
Here we can add an option stripLeadingZeros check and skip leading zeros stripping if it false.

Hi @olegbaturin,
Done!  (finally)


How to add --inspect-brk to ng e2e so we can debug protractor tests while using node 8?

In order to debug protractor tests with node 8 and above, the protractor docs suggest adding --inspect-brk when running tests.
node --inspect-brk bin/protractor <config_file>

How do we add that option when running ng e2e?

The protractor docs seem aimed mainly at AngularJS applications... some clarity would be nice here

After some experimentation I managed to get this to work, using the following (disgusting) command:
node --inspect-brk ./node_modules/\@angular/cli/bin/ng e2e  ./protractor.conf.js
I ran this in the root of my Angular 6 application, after which my terminal spat this out:

And nothing appeared to happen... until I opened a chrome tab on: chrome://inspect/#devices:

Clicking inspect above opens an instance of DevTools and immediately breaks the code at the top of the ng module. Hit continue in your debugger to run your e2e tests, and hit any debugger statements in your code!
Happy e2e-ing :)

@hevans90
If don't want it to break on the first line change inspect-brk to inspect
Anyway, I can't get it to work. I need to add --protractor-config (and the path because my conf file is in ./e2e/)
node --inspect-brk  ./node_modules/\@angular/cli/bin/ng e2e --protractor-config ./e2e/protractor.conf.js
The error I then get is:

I tried to specify a different host:
node --inspect-brk=9222  ./node_modules/\@angular/cli/bin/ng e2e --protractor-config ./e2e/protractor.conf.js
and
node --inspect-brk=9222  ./node_modules/\@angular/cli/bin/ng e2e --protractor-config ./e2e/protractor.conf.js --host=9223
The first would give exactly the same error as the screenshot, the second gives:

Some help would be appreciated :-(
An off-the-shelve solution in angular-cli would be appreciated too!

The following did the trick for me:
node --inspect-brk ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js

The --inspect*** options get stripped by the CLI.
https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/utils/run-module-as-observable-fork.ts#L25-L30
But I modified those lines, first to ignore --inspect=0, then to just explicitly add --inspect-brk, and neither one worked, so something else seems to be going on here.  I even tried adding NODE_OPTIONS: '--inspect--brk=0' to the env forkOptions.
In the mean time you can use this to manually launch protractor in debug mode:
NODE_OPTIONS=--inspect-brk node_modules/.bin/protractor e2e/protractor.conf.js --baseUrl=http://localhost:4200/
You will have to run ng serve separately

The following did the trick for me:
node --inspect-brk ./node_modules/protractor/bin/protractor ./e2e/protractor.conf.js

This one is the only solution that worked for me! Thanks!

After some experimentation I managed to get this to work, using the following (disgusting) command:
node --inspect-brk ./node_modules/\@angular/cli/bin/ng e2e ./protractor.conf.js
I ran this in the root of my Angular 6 application, after which my terminal spat this out:

And nothing appeared to happen... until I opened a chrome tab on: chrome://inspect/#devices:

Clicking inspect above opens an instance of DevTools and immediately breaks the code at the top of the ng module. Hit continue in your debugger to run your e2e tests, and hit any debugger statements in your code!
Happy e2e-ing :)

Hi, I am little confused, this command need to hit along with ng test?

for me it was
node --inspect-brk ./node_modules/\@angular/cli/bin/ng e2e
or when starting my own instance
node --inspect-brk ./node_modules/\@angular/cli/bin/ng e2e --dev-server-target

node --inspect-brk

how can i use the ng e2e command with 'options' like below ?
"e2e-debug": "node --inspect-brk .\\node_modules\\@angular\\cli\\bin\\ng e2e -c=integration --suite e2e --webdriverUpdate=false .\\e2e\\protractor.conf.js"
I get

Unknown option: '.\e2e\protractor.conf.js'

error and test doesn't resume after hitting first line of ng.
if I remove .\e2e\protractor.conf.js from above command, test resumes after hitting first line of ng, but doesn't stop at any place where debugger is added in spec file.

Duplicate of #16683


Update README.md

Fixes
Description of the changes:

Fixed Typo in Readme.md

Before submitting a Pull Request:

[ ] I reviewed CONTRIBUTING.md
[ ] I built my changes locally
[ ] I ran the unit tests
[ ] I ran the functional tests with a device
[ ] I ran the performance tests with a device

I tested changes on:

[X] Windows
[ ] Linux

/azp run


[BUG] camera doesn't connect on boot usbfs: usb_submit_urb returned -19

Describe the bug
My OAK-D PRO W doesn't connect on boot. If I disconnect and re-connect the cable it works. But I need it to work on boot.
I am using x86 computer. I have 2 other OAK-D PRO W cameras that work without this issue on the same system, in the same USB port with the same cable.
Expected behavior
Camera works on boot.
Attach system log
[http://autodiscovery.co.uk:8088/index.php/s/aRNSkKNNzTQGeYd]
Additional context
Here is the dmesg output:
[ 26.485963] audit: type=1107 audit(1685173493.427:50): pid=554 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.4" pid=1753 label="snap.snap-store.snap-store" peer_pid=577 peer_label="unconfined"  exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[ 26.486343] audit: type=1107 audit(1685173493.427:51): pid=554 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" member="CheckAuthorization" mask="send" name=":1.4" pid=1753 label="snap.snap-store.snap-store" peer_pid=577 peer_label="unconfined" exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[ 26.488982] audit: type=1107 audit(1685173493.431:52): pid=554 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.4" pid=1753 label="snap.snap-store.snap-store" peer_pid=577 peer_label="unconfined" exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[ 26.489270] audit: type=1107 audit(1685173493.431:53): pid=554 uid=103 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call" bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" member="CheckAuthorization" mask="send" name=":1.4" pid=1753 label="snap.snap-store.snap-store" peer_pid=577 peer_label="unconfined" exe="/usr/bin/dbus-daemon" sauid=103 hostname=? addr=? terminal=?'
[ 26.914258] audit: type=1400 audit(1685173493.855:54): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/etc/PackageKit/Vendor.conf" pid=1753 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 27.320213] audit: type=1400 audit(1685173494.259:55): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/etc/appstream.conf" pid=1753 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 484.277285] usb 1-2: USB disconnect, device number 3
[ 484.895258] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
[ 484.916496] usb 2-2: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 484916509] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 484.916516] usb 2-2: Product: Luxonis Device
[ 484.916520] usb 2-2: Manufacturer: Intel Corporation
[ 484.916525] usb 2-2: SerialNumber:<PHONE_NUMBER>FD840E00
[ 485.265924] usb 1-1: USB disconnect, device number 2
[ 485.979268] usb 2-1: new SuperSpeed USB device number 4 using xhci_hcd
[ 486.003985] usb 2-1: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[ 486.004022] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 486.004028] usb 2-1: Product: Luxonis Device
[ 486.004033] usb 2-1: Manufacturer: Intel Corporation
[ 486.004038] usb 2-1: SerialNumber: 18443010E1F3930F00
[ 486.699109] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[ 486.847795] usb 1-2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[ 486.847813] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 486.847819] usb 1-2: Product: Movidius MyriadX
[ 486.847824] usb 1-2: Manufacturer: Movidius Ltd.
[ 486.847828] usb 1-2: SerialNumber: 03e72485
[ 486.975217] usb 2-2: USB disconnect, device number 3
[ 489.248674] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.248854] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.249032] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.249210] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.249397] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.249581] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.249769] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.249949] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.250127] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.250310] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.250489] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.250672] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.250861] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.251074] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.251266] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.251462] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.251652] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.251812] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.252001] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.252181] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.252360] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.252540] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.252719] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.252906] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.253088] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.253265] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.253442] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.253620] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.253798] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.253983] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.254164] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.254342] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.254519] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.254697] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.254882] usb 2-1: usbfs: usb_submit_urb returned -19
[ 489.255061] usb 2-1: usbfs: usb_submit_urb returned -19

@kisdia
What state is the device when you plug it in? (dmesg output)
[ 486.847819] usb 1-2: Product: Movidius MyriadX

This?
Can you delimit the dmesg timestamps based on the action you took? (Initial run of some script upon reboot, then connect/disconnect of cable, then run of some script again when its supposed to work)
Can you also showcase the same for the other device where this procedure works?

Clean boot, 3 cameras plugged in I am using the depthai-experiments gen2-multiple-devices example.
2 of the cameras always works no problem. They work in any of the 3 ports with any of the 3 cables. The 3rd one not detected on boot. dmesg as per above. But if I disconnect the cable and re-connect it works.
I unpluged the camera that doesn't work (it is always the same, regardless of cable and socket used), and re-connected it. dmesg shows:
[  526.269926] usb 2-2: SerialNumber:<PHONE_NUMBER>FD840E00
[  526.985230] usb 1-2: new high-speed USB device number 13 using xhci_hcd
[  527.137881] usb 1-2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[  527.137889] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  527.137891] usb 1-2: Product: Movidius MyriadX
[  527.137892] usb 1-2: Manufacturer: Movidius Ltd.
[  527.137893] usb 1-2: SerialNumber: 03e72485
[  527.241240] usb 2-2: USB disconnect, device number 5
To trace back the same serial was detected during boot:
[  340.838705] usb 1-2: USB disconnect, device number 3
[  341.519951] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
[  341.544734] usb 2-2: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[  341.544741] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  341.544743] usb 2-2: Product: Luxonis Device
[  341.544744] usb 2-2: Manufacturer: Intel Corporation
[  341.544746] usb 2-2: SerialNumber:<PHONE_NUMBER>FD840E00
But then this happens:
[  349.238732] usb 2-2: usbfs: usb_submit_urb returned -19
[  349.238892] usb 2-2: usbfs: usb_submit_urb returned -19
[  349.252373] usb 1-2: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[  349.252380] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  349.252382] usb 1-2: Product: Movidius MyriadX
[  349.252384] usb 1-2: Manufacturer: Movidius Ltd.
[  349.252385] usb 1-2: SerialNumber: 03e72485
[  349.375783] usb 2-2: USB disconnect, device number 3
[  370.340369] loop16: detected capacity change from 0 to 943224

@kisdia we just received your device - it works as expected. We tried on Windows, latest depthai version.

Thank you for the assistance.
I have received the replacement, unfortunately the issue persists but now with a different camera.
I don't think it is the camera, it must be related to USB or boot process, or the computer. I will test a different computer.

Mitigated the issue by running a usb-reset before starting the script. Something must be not correct during boot...
`#!/usr/bin/env bash
USB 3.1 Only
for port in $(lspci | grep xHCI | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 5;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 5;
done
All USB
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 5;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
sleep 5;
done`


Zsh crashes before exporting env vars because of the bash isms for returns

Resolved by https://github.com/rogusdev/aws-cli-mfa/commit/2266f1be833bd0c6cd981f9156a2a027a87399e5


Fix: typo in README.md

aha? In zig 0.11, b.addModule  is used to expose the package to the outside world.
exe.addModule is used to import packages to exe

aha? In zig 0.11, b.addModule is used to expose the package to the outside world. exe.addModule is used to import packages to exe

Sorry, I forgot, I'm using 0.12 :D


DVC remove

Can you please share an example of DVC remove. I could be missing something in its command.

dvc remove removes outputs of the specified dvc file. Example:
echo foo > file
dvc add file
dvc remove file.dvc # Equivalent to `rm file` in this particular case

The usefulness in more obvious when your stage has multiple of outputs.

Thanks I was hoping that if we could have something like dvc destroy which would be opposite to dvc init. Currently if i were to clean up my project of dvc, I have to remove all files manually.

Ah, I see. Not going to lie, didn't even think of such feature until now :smiley: Turning this issue into feature request.


SMAA bug on tiny geo.

Description of the bug
On tiny geo shows hard edges and pixels.
To Reproduce
const smaaImageLoader = new SMAAImageLoader()
    smaaImageLoader.load( (e) => {
        const smaaEffect = new SMAAEffect( e[0], e[1])
        smaaEffect.preset = SMAAPreset.ULTRA
        smaaEffect.edgeDetectionMode = EdgeDetectionMode.DEPTH
        smaaEffect.edgeDetectionMaterial.setEdgeDetectionThreshold(0.02)
        const smaaPass = new EffectPass(camera, smaaEffect)
        composer.addPass(smaaPass)
    })

Expected behavior
Not that weird behaviour. Pixels shows awkard like without antialiasing.
Screenshots

Library versions used

Three: 124
Post Processing: 6.21.3

Desktop

OS: [e.g. Windows 10]
Browser [e.g. Chrome <IP_ADDRESS>]
Graphics hardware: [e.g. NVIDIA GTX 1050]

Mobile

Device: [e.g. iPhone6]
OS: [e.g. Android 10]
Browser [e.g. Firefox 68.11.0]

Is there any way to use another antialiasing system? FXAA or any other?

Have you tried EdgeDetectionMode.COLOR? That should work much better with your scene.
You can also use MSAA, but this feature requires WebGL 2:
const renderer = composer.getRenderer();

if(renderer.capabilities.isWebGL2) {

	const context = renderer.getContext();
	composer.multisampling = Math.min(8, context.getParameter(context.MAX_SAMPLES));

}

Alternatively, you could create a custom FXAA effect as shown in this example.

I just noticed that you're not setting the edge detection mode correctly. Instead of
smaaEffect.preset = SMAAPreset.ULTRA
smaaEffect.edgeDetectionMode = EdgeDetectionMode.DEPTH

you should do this:
smaaEffect.applyPreset(SMAAPreset.ULTRA);
smaaEffect.edgeDetectionMaterial.setEdgeDetectionMode(EdgeDetectionMode.DEPTH);

i had good result for this with https://threejs.org/docs/#api/en/materials/Material.alphaToCoverage on Material side

Have you tried EdgeDetectionMode.COLOR? That should work much better with your scene.

smaaEffect.applyPreset(SMAAPreset.ULTRA);
smaaEffect.edgeDetectionMaterial.setEdgeDetectionMode(EdgeDetectionMode.DEPTH);

Both gives me the same results as I have actually.
Keep having those hard pixels wich are no present, for example, with antialiasing of renderer (without post).
My "solution" was change the geometry to make thicker this filaments.

My "solution" was change the geometry to make thicker this filaments.

That's a reasonable solution 👍
FYI: MSAA has access to more fine-grained depth information and would probably manage to antialias these thin polygons. SMAA, on the other hand, operates at a later stage, so if the input colors are already jumbled and broken, then there's nothing that can be done to bring the information back.


DDC is broken by removal of element summaries

this happened in a recent Analyzer CL.
DDC needs to emit summaries for command line users, as well as for its own build SDK step. We're currently broken until this is fixed.

@scheglov @stereotype441

CC @vsmenon @scheglov @stereotype441
I'm trying to fix it but I haven't gotten it working yet.
Here is my progress: https://codereview.chromium.org/2353133004

It looks like the summaryDataStore being null isn't supported, I'll have to study further what changed. There must be a way to get it working since it works in Analyzer CLI...

If there are no input summaries, you should be able to just construct a SummaryDataStore passing it an empty list for summaryPaths.

awesome thanks for the help, I'm getting closer for sure...

I think I got past most of it. The problem I have now is trying to figure out how to get DDC's build of its own SDK working.

If you mean the summary of DDC's SDK, then you might want to look at analyzer's implementation.
https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/lib/src/summary/summary_file_builder.dart

ah I think I got that part working.

@scheglov it's tricky because we treat the SDK more or less like a normal input to DDC, so it runs through the same summarization. Kind of like if you replaced that script with normal analyzer_cli "build mode".
... but yeah it does seem to work now. I had to be careful about not adding the SDK bundle when we're compiling the SDK itself.

https://codereview.chromium.org/2353133004/

thanks so much everyone for helping me on this 🎉