K8s SD: Targets are not updated

Bug Report
What did you do?
Scaled new K8s pods up, scaled old ones down.
What did you expect to see?
Old pods disappear from targets, new ones show up.
What did you see instead? Under which circumstances?
Prometheus doesn't see the new pods, tries to scrape the old ones.
Note that a proper target update can be triggered by sending a SIGHUP.
Environment

System information:
Linux 4.4.10+soundcloud x86_64

Prometheus version:
most recently investigated version is revision 2be543e65ac2587ac46d87fef759d80bfb1c68f5 (in the release-2.2 branch). However, the same happened in all 2.2 releases, most notably also before the grand K8s SD refactoring of #4117 .

Prometheus configuration file:

See the various comments below.

This issue is seen in production at SoundCloud. I'm still working on reproducing it with a minimal setup.
In particular, this issue can not be reproduced with the following setup (cf. https://github.com/prometheus/prometheus/pull/4117#issuecomment-384909820 ):
@krasi-georgiev wrote: "using the configs below seems to work as expected with minikube.
When scaling up and down the deployment pods the  targets list get updated properly in the prometheus GUI."
global:
  scrape_interval:     500ms

scrape_configs:
- job_name: 'kubernetes-pods'
  tls_config:
    insecure_skip_verify: true

  kubernetes_sd_configs:
  - api_server: https://<IP_ADDRESS>:8443
    role: pod
    namespaces:
      names:
      - default
    tls_config:
      ca_file: /home/krasi/.minikube/ca.crt
      cert_file: /home/krasi/.minikube/client.crt
      key_file: /home/krasi/.minikube/client.key

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80

Here is the job config that creates the problem:
- job_name: myjob
  kubernetes_sd_configs:
  - api_server: https://api.mycluster.k8s.example.org
    role: pod
    tls_config:
      ca_file: "/srv/prometheus/k8s-certificates/mycluster/ca.crt"
      cert_file: "/srv/prometheus/k8s-certificates/mycluster/client.crt"
      key_file: "/srv/prometheus/k8s-certificates/mycluster/client.key"
  relabel_configs:
  - action: keep
    source_labels:
    - __meta_kubernetes_namespace
    - __meta_kubernetes_pod_annotation_prometheus_io_port
    regex: ".+;(?:[0-9]+,?)+|;"
  - action: keep
    source_labels:
    - __meta_kubernetes_namespace
    - __meta_kubernetes_pod_label_system
    regex: ".+;myjob|;"
  - source_labels:
    - __meta_kubernetes_pod_annotation_prometheus_io_scheme
    target_label: __scheme__
    regex: "(https?)"
  - source_labels:
    - __meta_kubernetes_pod_annotation_prometheus_io_path
    target_label: __metrics_path__
    regex: "(.+)"
  - source_labels:
    - __address__
    - __meta_kubernetes_pod_annotation_prometheus_io_port
    target_label: __address__
    regex: "(.+?)(?::\\d+)?;(\\d+)"
    replacement: "$1:$2"
  - target_label: cluster
    replacement: mycluster
  - source_labels:
    - __meta_kubernetes_pod_label_system
    target_label: system
  - source_labels:
    - __meta_kubernetes_pod_label_env
    target_label: env
  - source_labels:
    - __meta_kubernetes_pod_label_component
    target_label: component
  - source_labels:
    - __meta_kubernetes_pod_label_version
    target_label: version
  - source_labels:
    - __meta_kubernetes_pod_label_track
    target_label: track
  - source_labels:
    - __meta_kubernetes_pod_name
    target_label: instance
  - source_labels:
    - __meta_kubernetes_namespace
    target_label: namespace

My general thoughts:

The config per se seems sane, as it works on 1.8/2.0.
The problem seems to be a missed update, as a SIGHUP gets it unstuck.
Perhaps it makes a difference if the Prometheus server is in-cluster or not (assuming that @krasi-georgiev 's test config uses an in-cluster Prometheus).
Another possible explanation for difficulties to reproduce: Perhaps this is a racey thing (not as in a data race detectable by the Go race detector, but in the more general meaning: it only happens now and then if the timing of events are "right"). @krasi-georgiev what happens if you let your test setup run for a longer time with continues scaling up and down?

my Prometheus is running on the  local machine(bare metal) and the k8s minikube runs in a VM so it is the same as your setup.
Now trying with your config and will try scaling up and down continuously.

here is the minimal deployment that works with this config, but still works as expected on my setup so will keep digging.
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment

spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: nginx
        system: myjob
      annotations:
        prometheus.io/port: "8080"
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9

Just to update current state: This only seems to happen with large K8s clusters. Initial full load works (i.e. after starting Prometheus or after SIGHUP, all is good), but later changes are (partially?) lost.
We couldn't recreate this in a smaller setup. It would be interesting to know if other users of large clusters (~10k pods or more) see similar problems.
I will be off work for the summer, so I cannot work on this from inside SoundCloud.

This is a total blocker for anything involving K8s SD for us. I mark it "only" as P1 assuming that only large-scale K8s users are affected (although those might be the most important users ;-).
On the other hand, as long as nobody else sees the same, this might be some weird cornercase we have accidentally created at SoundCloud.
FTR: Prometheus 2.0.0 works just fine in this regard.

@beorn7 is there anything interesting if you look at the kubernetes_sd metrics? Do the prometheus_sd_kubernetes_events_total counters increase when the service discovery is "stuck"?

@simonpasquier hmm, I sometimes see the missing targets appearing, and then I see "add" events. but only after the pods have been up for quite a while.
Interestingly, we removed some jobs from the server yesterday, and now even the job that was most problematic in terms of SD seems fine. But I'll wait a bit longer before making a call. It just adds to the idea that the SD starts to become flaky from a certain update load on.

Can it be related to broken watch calls in kube client? https://github.com/kubernetes/kubernetes/pull/50102

Update (sorry for still being very high level here, no time to do a proper analysis):
As reported above, about a week ago, we removed a bunch of jobs from our large Prometheus server encountering the K8s SD problems regularly. Ever since we did that, no further problems happened. (The most problematic K8s job is still on the server.) This confirms the vague idea that it is some kind of overload that happens with large clusters and many monitored job or targets. (Our cluster has 375 bare metal nodes with 10k+ pods.)
Dimensions that changed a week ago (before/after):
Jobs: 20/10
Targets: 640/500
Samples/sec: 40k/16k
prometheus_sd_kubernetes_events/sec, events=update: 300/140

Hi, I have similar issue, when I create / delete pods, prometheus still keeps old ones.
It takes about 40s for pod to be fully ready.
I have:

@sta-szek is it the same as @beorn7 reported that reducing the total number of pods fixes the problem?
At the moment without a way to reproduce this the only real clue is this bug
kubernetes/kubernetes#50102

Unfortunately I cannot reduce number of pods, but this:
curl -X POST http://prometheus.et-1.coreinfra.io/-/reload

solves the issue.
A little strange workaround.
Do you think I can add some container to invoke this every 2m? Will it bring any side effect?

reloading touches many parts of the code so I expect that it should have some side effects. You can try as a temporary workaround, but we want to find the real culprit.
Can you think of any way to help us replicate this?

@sta-szek "203 pods across 16 nodes" is a scale that the k8s SD should handle. Can you share your Prometheus configuration file? Which version do you run?
It would be helpful also if you could share the same metrics as in https://github.com/prometheus/prometheus/issues/4124#issuecomment-393527676:

number of jobs, sum(count(up) by (job))
number of targets, count(up)
samples/sec, sum(rate(scrape_samples_scraped[2m]))
k8s events/sec, rate(prometheus_sd_kubernetes_events[2m])

sum(count(up) by (job)): 166
count(up): 166
sum(rate(scrape_samples_scraped[2m])): 11.135617427976747
rate(prometheus_sd_kubernetes_events[2m]): no data
(I'm not sure about this metrics as I am not familiar with prometheus)
Prometheus info
Version 2.1.0
85f23d82a045d103ea7f3c89a91fba4a93e6367a
HEAD
root@6e784304d3ff
20180119-12:01:23
go1.9.2

What I can say more is that we perform deployments using helm tool (2.8.2).
Our k8s provider is AWS.
BTW reloading works for us, for now. No side effects.

@sta-szek thanks for the info! I made a typo and meant rate(prometheus_sd_kubernetes_events_total[2m]).
You may want to try with the latest version of Prometheus (v2.3.0) because it includes an update of the k8s client that could help with your issue (although it didn't work for Björn).

Thanks
rate(prometheus_sd_kubernetes_events_total[2m]):
{event="add",instance="localhost:9090",job="prometheus",role="endpoints"} | 0.5000166672222408
{event="add",instance="localhost:9090",job="prometheus",role="node"} | 0.022222962987655144
{event="add",instance="localhost:9090",job="prometheus",role="pod"} | 6.833561118703956
{event="add",instance="localhost:9090",job="prometheus",role="service"} | 0.2444525928642066
{event="delete",instance="localhost:9090",job="prometheus",role="endpoints"} | 0
{event="delete",instance="localhost:9090",job="prometheus",role="node"} | 0
{event="delete",instance="localhost:9090",job="prometheus",role="pod"} | 0.009683656121870728
{event="delete",instance="localhost:9090",job="prometheus",role="service"} | 0
{event="update",instance="localhost:9090",job="prometheus",role="endpoints"} | 0
{event="update",instance="localhost:9090",job="prometheus",role="node"} | 0.46668222274075805
{event="update",instance="localhost:9090",job="prometheus",role="pod"} | 0.05555740746913786
{event="update",instance="localhost:9090",job="prometheus",role="service"} | 0

I create issue for update and let you know if that helped us or not.

Does anyone think there is an issue in just issuing a reload every 30 seconds or so ?  I have noticed numerous times where the K8s SD discovery misses pods.

Does anyone think there is an issue in just issuing a reload every 30 seconds or so ?

This would be very expensive on big k8s clusters (tens of thousands of pods).

After updating another two dozen of our servers to v2.3.2 (from v2.0.0) we're experiencing this issue every day, on some servers with every deploy. There is a high correlation between number of kubernetes_sd_config jobs per server and the likelihood of the discovery being stuck. We haven't seen the issue on any server with a single kubernetes_sd_config job so far, it's working without issues.
On the other hand, on one of our servers with 14 kubernetes_sd_config jobs we can reliably reproduce the issue every time we change a single pod.

To narrow things down a bit, if you were to start 14 Prometheus servers with one sd each then how does the problem manifest (if at all)?

@grobie are the 14 jobs very similar? or do they select different namespaces?

All 14 jobs use identical kubernetes_sd_configs blocks, the jobs only differ in relabel_configs applied to them. The cluster has ~10k pods.

just an update,
I reduced number of jobs by merging them into one kubernetes-common-pods job and in our case it helped.
I reduced from 40 jobs to 17 only.

Interesting, I've got #3912 to avoid creating multiple SD mechanisms when they are identical. Maybe it can help there?

It sounds like there's a deeper bug here, though that may mitigate.
On Thu 19 Jul 2018, 16:34 Simon Pasquier<EMAIL_ADDRESS>wrote:

Interesting, I've got #3912
https://github.com/prometheus/prometheus/pull/3912 to avoid creating
multiple SD mechanisms when they are identical. Maybe it can help there?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/prometheus/prometheus/issues/4124#issuecomment-406297961,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGyTdi_wSD2WmhK1NGwfWXYajg-ksKhXks5uIJj1gaJpZM4TsivI
.

I'll be gone for the next few days, but will try to find some time to
investigate this further mid/end next week.
On Fri, Jul 20, 2018 at 12:01 AM Brian Brazil<EMAIL_ADDRESS>wrote:

It sounds like there's a deeper bug here, though that may mitigate.
On Thu 19 Jul 2018, 16:34 Simon Pasquier<EMAIL_ADDRESS>wrote:

Interesting, I've got #3912
https://github.com/prometheus/prometheus/pull/3912 to avoid creating
multiple SD mechanisms when they are identical. Maybe it can help there?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<
https://github.com/prometheus/prometheus/issues/4124#issuecomment-406297961
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/AGyTdi_wSD2WmhK1NGwfWXYajg-ksKhXks5uIJj1gaJpZM4TsivI
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/prometheus/prometheus/issues/4124#issuecomment-406427836,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAANaDE4PUPC3b2tRUpJLJuuHSi5HItqks5uIQGdgaJpZM4TsivI
.

I think I may have finally been able to reproduce this to some degree. I created 200 Kubernetes SD entries in my config which discovers one service in a Kubernetes cluster and I scale the monitored service up and down a couple of times from 25 to 12 to 35 pods, and I can see that there are large amounts of timeouts, no route to host, etc. errors. I have yet to debug this more but here are the manifests I used to do this:
prom-sd-load.tar.gz
At first sight this could be something about lock contention, but that's just intuition, we should investigate.

Great I will deploy and troubleshoot.

I deployed @brancz's configuration to my local machine (equivalent of minikube). Even without scaling up/down the pods, I can't get Prometheus to discover all the pods if I start with 4 replicas (x 200 jobs = 800 targets in theory, I reach about 600 in practice). After a few minutes, the number of targets increases slowly but I haven't waited enough to see if it reaches the expected number.
With https://github.com/prometheus/prometheus/pull/3912, all the targets are there immediatly. Will test deeper tomorrow.

@brancz in my case it gets stuck at some point when I change the replicas, but in 2-3mins latter it picks up again. Can you please confirm that in your case it stays stuck even when you leave it for 5-10min?
The SD manager in prom is ok and the delay comes either from the k8s provider or k8s api server so will  keep digging.

I think the back-pressure could come just as easily from the SD infrastructure itself, only profiling will tell, but yes I did see it catch up eventually, but only when I actually stopped scaling up and down, the report from @grobie was in production system, that simply doesn't stop, so I can see how the lag would just become larger and larger and it would seem like it just never changes.

after a long weekend of troubleshooting I finally figured the culprit.
When scaling down or removing targets the receiving channel is blocked untill all old scrape loops are stopped.
https://github.com/prometheus/prometheus/blob/8fbe1b5133c768fbe3be3c5ce57cdadfc9aa80ca/scrape/scrape.go#L197-L208
this also blocks the receiving channel
https://github.com/prometheus/prometheus/blob/8fbe1b5133c768fbe3be3c5ce57cdadfc9aa80ca/discovery/manager.go#L165-L171
and since we keep the m.recentlyUpdatedMtx.Lock() lock than the target update from each provider is also blocked.
https://github.com/prometheus/prometheus/blob/8fbe1b5133c768fbe3be3c5ce57cdadfc9aa80ca/discovery/manager.go#L143-L152
The second problem is that when we process the changes in all targetSets/Jobs we read all targets for all jobs and than try to process each one.The problem is that if in the middle of this processing we get new updates than we are already processing old entries so Prometheus need to run a new loop to stop/start new loops.
I have managed to solve the first problem , but still trying few things for the second one.
My idea is to brake the scrape loop updates in batches so that the Scrape manager can quickly catch up. Instead of reading all jobs updates I am thinking to read one process and than read the next one so that if any changes happened in between that it will already read the most updated data.
I will also look at the old implementation before the refactoring and why it didn't suffer from this problem.


[Bug] https://github.com/NUST-Machine-Intelligence-Laboratory/PKINet

Hi, what's the bug? Feel Free to reopen the issue.


cannot connect to host even when both the host and guest are online

Issue Type: Bug

Accepted incoming join session request.

Extension version: 1.0.1404
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 2904)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_offsurface_control: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.92GB (9.74GB free)

Process Argv

Screen Reader
no

VM
0%

I have the same problem with the lates vscode and extension. Maybe it is because that my host has been online for more than two days? I really don't know.

Thanks for the issue. I'm closing it due to age but if you are still experiencing the issue, please feel free to re-activate and attach logs so we can diagnose!


userEvent.click() fails when used with vi.useFakeTimers(), all available solutions are not working

Describe the bug
I have a React component which is a timer (minimal reproduction), that starts automatically after mounted, and there's a button to RESET the timer.
In the test, I'm using vi.useFakeTimers() and await vi.advanceTimersByTimeAsync(500) to test the timer segmentally.
However, I'm not able to use await user.click() to click the button.
This is a known issue with fake timers, however, none of the existing solutions works.
None of these works
const user = userEvent.setup({
  advanceTimers: vi.advanceTimersByTime,
  // advanceTimers: vi.advanceTimersByTimeAsync
  // advanceTimers: vi.advanceTimersByTime.bind(vi)
  // advanceTimers: vi.advanceTimersByTimeAsync.bind(vi)
  // delay: null,
})

And I cannot use vi.useRealTimers() before clicking button, since it will break the fake timer to further test the component's reset functionality.

Those solutions above are all based on Jest since almost all resources on the internet are for Jest. But since I've never used Jest, so I'm not sure if it's working in Jest, and is this an issue with @testing-library/user-event or Vitest
Reproduction
https://stackblitz.com/edit/vitejs-vite-askvcq?file=src/__tests__/App.test.tsx
System Info
System:
  OS: Windows 10 10.0.22000
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
  Memory: 9.23GB / 31.69GB
Binaries:
  Node: 16.18.0 - C:\Program Files\nodejs\node.EXE
  npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
  Edge: Spartan (44.22000.120.0), Chromium (112.0.1722.39)
  Internet Explorer: 11.0.22000.120
npmPackages:
  @vitejs/plugin-react: ^3.1.0 => 3.1.0
  vite: ^4.2.1 => 4.2.1
  vitest: ^0.30.1 => 0.30.1
  @testing-library/jest-dom: ^5.16.5 => 5.16.5
  @testing-library/react: ^14.0.0 => 14.0.0
  @testing-library/user-event: ^14.4.3 => 14.4.3
  jsdom: ^21.1.1 => 21.1.1
  react: ^18.2.0 => 18.2.0
  react-dom: ^18.2.0 => 18.2.0

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Seems it's not related to vitest, as @testing-library/react is using jest.advanceTimersByTime straight away and it's not testing-framework agnostic.
https://github.com/testing-library/react-testing-library/issues/1197
One workaround could be like this:
import { beforeAll, vi } from 'vitest';

// Temporarily workaround for bug in @testing-library/react when use user-event with `vi.useFakeTimers()`
beforeAll(() => {
  const _jest = globalThis.jest;

  globalThis.jest = {
    ...globalThis.jest,
    advanceTimersByTime: vi.advanceTimersByTime.bind(vi)
  };

  return () => void (globalThis.jest = _jest);
});

Hey @sheremet-va, a simple question here that is not clear in the documentation:
Regarding vi.unstubAllGlobals(), is there any scope for it?
E.g. consider the following code

Are those test suites running one by one? or in parallel?
Will the teardown function for the first suite clear the global value stubbed for the whole file too? (Like is there any scope for this function)

import { beforeAll, vi, describe, it, expect } from 'vitest'

// This applies to the whole file, which is the outer scope
beforeAll(() => {
  vi.stubGlobal('innerWidth', 100)
  return () => void vi.unstubAllGlobals()
})

describe('A test suite, which is a inner scope', () => {
  // This applies only to this test suite
  beforeAll(() => {
    vi.stubGlobal('innerHeight', 200)
    return () => void vi.unstubAllGlobals() // Will this restore `innerWidth` as well?
  })

  it('is a test', () => {
    expect(window.innerHeight).toBe(200) // This is guaranteed to be true
    expect(window.innerWidth).toBe(100) // This is guaranteed to be true as well
  )}
)}

// Is my assumption correct?
describe('Another test suite, which runs after the first one OR NOT?', () => {
  it('is a test', () => {
    // This is guaranteed to be FALSE this it's cleared after the previous test suite has been done
    expect(window.innerHeight).toBe(200)
    // But what about this one? Is `innerWidth` cleared in teardown for the first suite?
    expect(window.innerWidth).toBe(100)
  )}
})


Question: How to [JsonIgnore] properties for some clients and not for others?

I have a big model assembly where ultimately all model classes depend on all others: It's a entity graph with the edges being navigational properties.
There are multiple web applications compiling against it, many of which have an API using some of those model classes and Nswag generated TypeScript clients.
Usually the clients don't need all of the model, but they'll get all of the model as Nswag is recursively finding them all.
There's [JsonIgnore], but sometimes one client needs a property or class and the other doesn't.
Is there a way to ignore properties that doesn't depend on attributes?

NSwag will generate all necessary schemas and properties with the operations being the entry points that cannot be changes...
So you want to dynamically ignore/show properties per API endpoint?

Maybe this might help here: https://blog.rsuter.com//advanced-newtonsoft-json-dynamically-rename-or-ignore-properties-without-changing-the-serialized-class/

I'm only talking about client code generation. The linked material is about how to get Json.NET to ignore properties, but I want Nswag to ignore properties when generating the client (which it does if [JsonIgnore] is on one) - but without having this to be the same properties for different generated clients.

Then I think you need to transform the spec for each client gen run with something like this:
https://github.com/Picturepark/Picturepark.SDK.Playground/blob/master/src/AutoRestTransformer/Program.cs

Ok, fair enough. Thanks for your time!

@RicoSuter I had a closer look and I'm able to chose which properties to include with a custom IContractResolver. It also makes nswag drop all the types that can't be reached any longer due to some omitted properties.
Is something making this a bad idea?

In general this should work as long as each type is static (i.e. they are not different for read/write and depending on where they are used).

For the record, your design decision to use IContractResolver is fantastic.
It's awesome because I can control client generation and serialization with the same code!
Really super-flexible.


Bug with email login

Creating a new account via email you can enter an email such as mrrenter@fake
This should be checked for a .com/org/etc
Also once this account is created it is bricked as well. If you log out of it you cannot log back in because the server says its not a valid email address. There is still an entry in the table
Solution: Update the regex used for email validation

The decision was made to allow this behavior if a user so desired. Unless
Quincy wants to enforce valid emails (through confirmation, not regex imo)
I'm going to close this.

If the user uses this type of email though they will not be able to log back in. This will just fill the database with unusable accounts. If this an accepted format I suggest changing the login to accept this format as well

Ideally we should verify that it conforms to a legal email address pattern. I can't remember why we didn't do this originally (I'm sure we discussed it). I think Angular validation didn't allow for it.

The sign up form checks /api/checkUniqueEmail/[email] to see that the email is unique. If the client side validation doesn't work couldn't we use checkUniqueEmail to validate the email server side?

I've fixed this. It will now send the user back to the form with a flash notification upon submission of an invalid email. I tested it and it will accept good emails.


Remove an incorrect duplicate plugin file

I don't know much about the way the manifest works, but as far as I know, simply deleting the plugin file should be enough. Correct me if I'm wrong.
Seems like the original file was named incorrectly. It's called Nightlight-95af3946-2bfe-49af-a9b6-edffa42ef1d5.json but the id inside is ef3a6ece-ca05-4d4f-92ba-2ff8a67e017b. Update workflow then writes the new file with the correct name, but the old file is still there, causing infinite update notifications.

Thank you.


Eureka starts automatically for the first time and needs to be restarted manually

Search before asking

[X] I searched the issues and found no similar issues.

Linkis Component
linkis-commons
What happened + What you expected to happen
Eureka starts automatically for the first time and needs to be restarted manually
Relevent platform
.
Reproduction script
.
Anything else
This question comes from the QA documentation of the Linkis community
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

A: This is because Eureka doesn't use it when starting a java process

Nohup after the session exits, the task is automatically cleared by the operating system. It is necessary to modify the startup script of Eureka and add nohup:
Refer to PR: https://github.com/WeBankFinTech/Linkis/pull/837/files


Don't import

When I do in routes :
get('lang/{n}', 'LanguageController@lang'); to ONLY return view "home" in controller my app don't import elements from a framework so my app is not stylised WHEREAS is do get('{n}' my app use the import and so my app is beautiful
In all cases if I want to transmit {n} that works in my views

If you mean CSS @import then you should use leading slash, e. g. @import('/css/file.css')`


error while running bloc_flutter

running flutter run --debug in the folder example/bloc_flutter
I am getting this output:
Installing build/app/outputs/apk/app.apk...                  2,2s
E/flutter ( 8583): [ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter ( 8583): NoSuchMethodError: The getter 'updateTodo' was called on null.
E/flutter ( 8583): Receiver: null
E/flutter ( 8583): Tried calling: updateTodo
E/flutter ( 8583): #0      Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:48:5)
E/flutter ( 8583): #1      new TodosListBloc (package:blocs/src/todos_list_bloc.dart:52:53)
E/flutter ( 8583): #2      main (file:///Users/juliocotta/git/flutter_architecture_samples/example/bloc_flutter/lib/main.dart:27:13)
E/flutter ( 8583): #3      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:289:19)
E/flutter ( 8583): #4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
Syncing files to device Android SDK built for x86...         4,1s

Should I be running it in a different way?

Hey there -- sorry about that. I really need to add complete directions to that sample. The bloc examples have two different options:
Local Storage w/ SharedPrefs
flutter run --debug -t lib/main_local_storage.dart

Firebase Version
flutter run --debug -t lib/main_firebase.dart

Yes, `main.dart' should be run in a different way.
'main.dart' expects to be passed an initiator and a repository. The following calls 'main.dart' with the initiator and repository initialized:
flutter run lib/main_local_storage.dart

or
flutter run lib/main_firebase.dart

Good call -- fixed now!


Update BeanProcessor.java

Use classloadercontext in serviceloader. This allows for correct usage when calling this library from within a isolated ClassLoader. A similar change was done in slf4j : https://github.com/qos-ch/slf4j/commit/43a36303e5a2338c22ec9aad5b01a401034eb553

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 62.68%. Comparing base (2ab67d2) to head (669ecd2).
Report is 18 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #250      +/-   ##
============================================
+ Coverage     62.61%   62.68%   +0.07%
- Complexity      412      413       +1
============================================
  Files            39       39
  Lines          1383     1383
  Branches        104      104
============================================
+ Hits            866      867       +1
+ Misses          468      467       -1
  Partials         49       49

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

Is there a test you can write to check if this change does anything where changing the main code back would cause it to fail? Otherwise, this is a regression waiting to happen 😞


Command Does Not Copy EXPIREs

For some reason when I tried using this it didn't copy over the TTLs. I'm not exactly sure why.

@silvamerica I'm not sure either, we have pretty explicit code and coverage around this feature.
https://github.com/reverbdotcom/migr8/blob/master/src/migr8/migrate.go#L35-L50
If you can put together an example, we'd love to take a look.

It doesn't look like there is a test specifically for the TTL, however. I'll do a test right now.

Yup, I noticed we're missing test coverage there as well. Feel free to add a test!

(integer) 113403
[XXX]> PTTL stats_total_201512292216
(integer) 464209
[XXX]> PTTL stats_total_201512292257
(integer) 2918695

2015/12/29 23:13:22 Running migrate with config: {Dest: [YYY] Source:[XXX] Workers:100 Batch:10 Prefix:stats_total_20151229 ClearDest:false DryRun:true}
migrate - 2015/12/29 23:13:22 Starting Scan with keys stats_total_20151229*
migrate - 2015/12/29 23:13:22 Would have restored stats_total_201512292210 with ttl 0
migrate - 2015/12/29 23:13:22 Would have restored stats_total_201512292216 with ttl 0
migrate - 2015/12/29 23:13:22 Would have restored stats_total_201512292257 with ttl 0
...

That certainly looks off, can you supply the redis version you're using?

I just created a pull request with a test. I'm using Redis 2.8.19.

Thanks!

@silvamerica thank you! And please let us know if you see any other issues.


Compatibility issues with multiplayer game

Game version: 1.20.1
Forge version: 47.2.14
Problem mod version：1.2e
Issue details:
The pumpjack couldn't work correctly in multiplayer game.It has animation and sound effects, but it just doesn't work.

did you make sure you built the pumpjack correctly in an oil chunk, with an open output on the copper casing with a pump pulling out of it?
also last time I checked pumpjacks didn't have sound effects (yet)

Sorry, my mistake. What I want to say is actually diesel engines. To be precise, this issue is caused by both this MOD and Mekanism MOD. When I installed both on the server, all types of diesel engines no longer work

Oh so it just doesn't work on the server side as the animation and sounds are on the client side, that's wierd as the fuel types are on the server

When I installed this mod alone, the diesel engine was running normally, but when I installed Mekanism, even the original working diesel engine stopped working.
I use diesel, which is a supported fuel in JEI

I seem to be having the same issue on 1.18.2. haven't checked if Mekanism is the cause, but it is in the pack and this is the exact issue i am facing on a multiplayer server


The export of the video ends suddenly

The export of the video ends suddenly sometimes at 70%, others at 90%.

This is because trdrop starts video at frame 0 and it has not been accounted for the center graph option and videos will end (plot length /2) shorter. I.e 360/2 = 180 frames shorter than original video.

what causes this situation is that when importing the series of images to Premiere, the Footage is accelerated due to the lack of that 30-10% of the file export


Update FP Shipment Document Manager

Changes Unknown when pulling 7deee2d391ea15a2cf6ecd64db930235039431ca on jackyrusly:dev into ** on danliris:dev**.


Conversion of factions

I'm not sure if I am missing unintended side effects, but this is how I would convert alliances into factions (perhaps missing allies of allies, but that's debatable if they should be automatically part of the faction).
Also contains an improvement for the Alliance with... focus, which I hope fixes issue #218.

Mind deleting the commented out code sections in HoI4Events.cpp and HoI4WarCreator.cpp?

Oh, sure, sorry about that. I'll try to think more of cleaning up code after testing in the future.


fix source data format change

... in cases, tests and deaths functions

Looks good, thank you so much!!


Fix warnings in DispatchQueue.sync() implementation when using a comp…

…iler with SE-0176 support.

@swift-ci please test

@swift-ci please test

Seems like a fine fix to me, thanks.

👍🏻


feat: allow zipping hidden files by listing them explicitly in includeSources

I omitted dot: true and didn't touch the default excludeSources (mentioned in https://github.com/wxt-dev/wxt/issues/738#issuecomment-2192251866) to avoid filtering all files inside hidden directories (including those in .git). For example, in my repo:

dot: true filters 4657 files
only 1028 files are filtered with this PR

In theory, there should be no difference for the end user - both approaches will not include files inside the hidden directory if only that directory is specified in includeSources (i.e. to include all files inside .hidden-dir, you should specify .hidden-dir/**, not .hidden-dir). Perhaps this specific aspect should be mentioned somehow in the includeSources JSDoc?

Released in v0.19.5


Update bitnami mysql release to commit 6873aefc791613092f5203362d09c041eef8eb54 (8.0.28-debian-10-r81 release)

@ZCube Please review the PR. Updated the mysql to release 8.0.28-debian-10-r81 release since, there were a few recent fixes in this version. Thanks


Werkzeug 0.11.6 breaks debug functionality on Mac OS X

Running this code:
import flask
app = flask.Flask(__name__)
app.debug = True
app.run()

with Flask 0.10.1 and Werkzeug 0.11.6 breaks on my system (see below). Downgrading to 0.11.5 remediates the issue.
ced@cheliax ~/tmp/debug $ python3 run.py
 * Running on http://<IP_ADDRESS>:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
Traceback (most recent call last):
  File "run.py", line 4, in <module>
    app.run()
  File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 772, in run
    run_simple(host, port, self, **options)
  File "/usr/local/lib/python3.5/site-packages/werkzeug/serving.py", line 633, in run_simple
    application = DebuggedApplication(application, use_evalex)
  File "/usr/local/lib/python3.5/site-packages/werkzeug/debug/__init__.py", line 249, in __init__
    if self.pin is None:
  File "/usr/local/lib/python3.5/site-packages/werkzeug/debug/__init__.py", line 259, in _get_pin
    self._pin, self._pin_cookie = get_pin_and_cookie_name(self.app)
  File "/usr/local/lib/python3.5/site-packages/werkzeug/debug/__init__.py", line 159, in get_pin_and_cookie_name
    get_machine_id(),
  File "/usr/local/lib/python3.5/site-packages/werkzeug/debug/__init__.py", line 94, in get_machine_id
    _machine_id = rv = _generate()
  File "/usr/local/lib/python3.5/site-packages/werkzeug/debug/__init__.py", line 70, in _generate
    match = re.match(r'"serial-number" = <([^>]+)', dump)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/re.py", line 163, in match
    return _compile(pattern, flags).match(string)

I'm also experiencing this same issue, python 3.5.1 on OS X.

I get a similar traceback and the last line is most informative:
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/re.py", line 163, in match
    return _compile(pattern, flags).match(string)
TypeError: cannot use a string pattern on a bytes-like object

Have you tried 0.11.7?

Same thing happens with 0.11.7.

@cmeury
Could you please try to modify werkzeug/debug/__init__.py like this ?
From
match = re.match(r'"serial-number" = <([^>]+)', dump)
To
match = re.match(r'"serial-number" = <([^>]+)', dump.decode())

The fix by @nickfrostatx works. Also, for completeness sake, the code change suggested by @taogeT solves the issue as well.
Thanks, everyone.

Fixed in 0.11.8


CSS

CSS
User Story
As a Boot Camp Student
I want the prework notes to be structured on a webpage
So that I can easily find and read the information
Acceptance Criteria
GIVEN a pre-work Study Guide website
WHEN I view the study guide
THEN I see a dark blue header and footer, and four boxes with a shadow

Completed


Issues with procedures containing multiple queries.

Hi,
I've been having issues with queries with multiple statements. I tested using the java library and got the expected output.
Example Code
import sqlparser

query = """select * from table1;
    select * from table24"""

parser = sqlparser.Parser()

if parser.check_syntax(query) == 0:
    for i in xrange(0,parser.get_statement_count(query)):
        print(i)
        stmt = parser.get_statement(i)
        root = stmt.get_root()
        print(root.get_text())

Expected output
0
select * from table1
1
select * from table2

Actual output
0
select * from table1
1
ct * from table1;

I've had a look at the source, but haven't had much luck getting started on finding the issue. Do you have any guidance for me?
Thanks.

I should note that Tokenize works perfectly on the above queries.


fix: TypeError: Cannot read property 'trigger' of undefined

Beacuse we have enable on events, so toggle component will be destroyed  in https://github.com/framework7io/Framework7/blob/v2/src/components/toggle/toggle.js#L45-L48.
So I add check for dom to avoid error caused by duplicate destruction , but I think maybe the beforeDestroy can be removed directly, pls feel free to discuss with me.

Thanks! As for what we have in F7 core i need to fix in a manner how it is done, e.g. for Range component https://github.com/framework7io/Framework7/blob/v2/src/components/range/range.js#L42 So the F7 core should automatically init & destroy only Toggles with toggle-init class


Add tintRgb to Sprite & SpriteRenderer

Use tintRgb(array)  to replace tintRGB (int) in Sprite & SpriteRenderer.
Then the tint will be more flexible. e.g. :
// make sprite be lighter
sprite.tintRgb = [ 1.5, 1.5, 1.5];

// make `red` channel be lighter
sprite.tintRgb = [ 1.5,1, 1];

// make sprite be  more 'blue'
sprite.tintRgb = [ 0.5 ,0.5, 1.5];

...

If no this feature, we have to create a new renderer or use filter to do the things  above.

This PR  include  something of  https://github.com/pixijs/pixi.js/pull/3460  .

Think about tintScale


Don't allow keyboard focus on hidden text field

Fixes https://github.com/newsboat/newsboat/issues/2351

Coverage: 59.43% (-0.008%) from 59.437% when pulling 65f9ea97af9a479cec39a009d45b67de2ee20f87 on dennisschagt:fix-stfl-focus-issue/issue-2351 into ceacb52ff506c297f2e4c8e8a1ea3078869ef520 on newsboat:master.

Thanks! Unfortunately this doesn't work for me (on Debian unstable with STFL 0.22-3+b5; I don't know what patches went into that -3+b5, need to check https://packages.debian.org/sid/libstfl0). I logged the name of the currently focused widget in the event loop, and it appears that "qnainput" is always focused in the itemlist; I didn't check the other dialogs.
I've submitted https://github.com/newsboat/newsboat/pull/2358 with a different solution that works on my machine. Can you please check if it works for you too (with a newer STFL)?

I'm not entirely sure if this PR should be closed though. My PR fixes the initial focus, but there might be ways for the user to switch the focus to the QnA field.
From the README in https://github.com/newsboat/stfl it seems that by default, the focus can be switched with Up and Down keys in vbox, and Left and Right keys in hbox. All our forms are wrapped in vboxes, and all but empty.stfl re-define the bindings for Up and Down. We then handle those keys ourselves, and don't switch the focus there, so these forms are safe. The empty.stfl is also safe because the user never actually interacts with it.
There don't seem to be other ways for the user to accidentally switch the focus to the QnA field, so we probably don't need the changes from this PR after all.
@dennisschagt, does that sound right to you? Did I miss anything?

Since I'm fairly confident that there is no way for the user to change the focus to QnA without Newsboat's consent, I'm closing this PR. Thanks for the work though!


error invalid pyproject.toml configs

Fixes #262

https://github.com/abravalheri/validate-pyproject can run in pre-commit or CI to find such problems.

Thanks for cleaning it up I was trying to fix it from my 📞

No prob! Thanks for the PR!

On Sep 23, 2022, at 9:18 PM, Adrian Garcia Badaracco @.***> wrote:

Thanks for cleaning it up I was trying to fix it from my 📞
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.


Making use of multitenancy support

Please follow the issue template below. Failure to do so will result in a delay in answering your question.

Library

[x]<EMAIL_ADDRESS>[x]<EMAIL_ADDRESS>
Description
getToken gets a token for the default tenant, this does not appear to be configurable.
Regression

[x] Did this behavior work before?
Yes, this behavior works in ADAL.js. In that library, the acquireToken function takes a tenantId parameter as input.

MSAL Configuration
authority: 'https://login.microsoftonline.com/organizations'

Reproduction steps
When a call is made to get the tenants, I'm able to get the full list:

GET: https://management.azure.com//tenants?api-version=2017-08-01

When I try and make a call to get subscriptions, I always get subscriptions from the default tenant. I should be able to configure the tenant used in some way:

GET https://management.azure.com/subscriptions?api-version=2017-03-01

@ranjanmicrosoft MSAL.js v.1 supports multiple authorities, either through passing a different authority to acquireTokenSilent, or by instantiating a new instance of UserAgentApplication with a different authority.
Please attempt the above and let us know if this does not work. Please also clarify which getToken API you are using?

Closing due to inactivity, please let us know if this is still an issue, thanks!


bin/im2rec does not support bmp format file

I read the bin/im2rec code, it only support jpeg/png format. I want to add bmp and other format support, but I'm not familiar with the the details of mxnet's image-record-io.
Can anyone add bmp and other format support or give some instructions to implement it?

bmp is very memory consuming, why not to convert it to jpg or png.

Because bmp format is not compressed. If i want to keep all the pixel info, I can not use jpeg.
png seems to support loss-compression and lossness-compression, but I'm not sure whether bin/im2rec supports png lossness-compression.

int im2rec.cc, it use cv::Mat img = cv::imdecode(decode_buf, color_mode); to get image data. this function supports bmp file also.
I think you just have a try to change some code to let im2rec support bmp.

OK, I'll give it a try : )

png is loss less. You only need to add an option to make it use png. I suggest using the python version since it's easier to work with

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!


need wider RBAC privileges on OpenShift

Part of issue #1.
Not sure yet what the specific gap is here. Got past RBAC issues by setting all resources in the mentioned APIs to "*" in the RBAC YAML.

As noted in comments on issue #275 this is not an issue on minikube at least, and might no longer be an issue in OpenShift.

Doesn't seem to be an issue w/ master-branch KD on OS 4.10.6.


Sending email in LiveView process breaks tests

I just upgraded to 0.24.3 and I'm now seeing this error when I run this tests with other tests with mix test. If I run it by itself, or just the tests in that one file, it passes.
test "sends email on confirmation", %{conn: conn, participant: participant, session: session} do
  {:ok, view, _html} = live_isolated(conn, View, session: session)
  render_click(view, :confirming)
  assert render_click(view, :confirm, %{participant_id: participant.id}) =~ "Sending..."
  assert render(view) =~ "Sent!"
  assert_email_sent(to: participant.user.email)
end

** (FunctionClauseError) no function clause matching in FooWeb.ButtonLive.handle_info/2
    (foo) lib/foo_web/views/live/button_live.ex:56: FooWeb.ButtonLive.handle_info({:email, %Swoosh.Email{assigns: %{...}}...

def handle_info({:send_email, participant_id}, socket) do
  participant_id
  |> FooWeb.Participant.ChangeInfoEmail.generate()
  |> FooWeb.Mailer.deliver()

  {:noreply, socket}
end

I'm guessing the pids/0 function is including the LiveView process when it should only include the test process?

How would that work when tests are run asynchronously? Wouldn't the overall adapter have to be global?

https://github.com/swoosh/swoosh/pull/437 Please take a look at this PR

@princemaple very cool! How do you choosing the adapter though? Seems like you can't swap it out globally (in config/test.exs, for example) w/o potentially affecting other tests. Maybe I'm missing something?

Yeah that's the problem. Still need some consideration. :) The PR is just PoC for now.

As a last resort, we can have integration tests run in a separate batch, like mix test.integration and have the adapter set to the AsyncTest.

I'm wondering if all that ceremony is better than just passing a mock mailer around?

You are not wrong, at this stage a mock is probably as good. After all what is being tested is just that deliver is being called :sweat:

Closing as won't fix, unless we come up with stronger demands and better ideas 👀

Bummer this is a wontfix. I'm having this problem, and the increasing amount of people using LiveView will too.

https://github.com/swoosh/swoosh/pull/565/files
Give this a go.

https://github.com/swoosh/swoosh/blob/main/CHANGELOG.md#-features-3

Thanks @princemaple 😄 Looks like it was fixed, just not commented here. Thanks for all your work on Swoosh ❤

😃

Just ran into this, and setup :set_swoosh_global fixed it for me. Thanks!


Fix/david/new link tab order

Task/Issue URL:  https://app.asana.com/0/414730916066338/1157894643192241
Description:
In the past, long tapping a link and opening it in a background tab, positioned the new tab immediately after the current tab. Now, when the new tab was added from any tab but the last one, it would not respect the proper order (See screencast for clarification)
Solution:
The code for adding a new tab was always using position = 0. The code for adding a tab in the background was properly adding 1 to the current position. For that reason, adding tabs in the background for the last tab was displayed properly, and not for the rest. This PR fixes that.
Screencasts:

Before
After

Steps to test this PR:
On the current app in the Play Store

Open the app
Add a new tab (duckduckgo.com)
Add a second tab (wikipedia.com)
Switch to first tab
Long press on any link and select "Add tab in background"
New tab will be added as Tab in position 3

Building this branch

Open the app
Add a new tab (duckduckgo.com)
Add a second tab (wikipedia.com)
Switch to first tab
Long press on any link and select "Add tab in background"
New tab will be added as Tab in position 2 (Between the current tab and wikipedia)

@CDRussell @cmonfortep I've added a couple of tests to ensure the position is properly updated

This is great, does it cover the crash recovery scenario mentioned in the task too? If not, you hack the refresh button to call the WebView crash url you can press refresh to test that scenario too:
fun refresh() {
  webView?.loadUrl("chrome://crash")
 }

Hey @subsymbolic it does! The problem was adding the tab in the first place, so the subsequent tabs will be created properly.


Feat: add XCM assets bridge between relaychain and magnet

add assets pallet: the assets module provides functionality for asset management of fungible asset classes with a fixed supply.

add assets bridge pallet:  bridge from substrate assets(wasm) into ERC20 tokens(evm), and transfer native currency between substrate account and evm address.

close #12
close #14

The conflict has been resolved.

set native currency decimal to 18


Hello can u pls put kissasian as provider so that we can watch asian series too? Nd can u add 360p download option too?

I can add Dramacool ?
using Consumet and maybe it won't support 360p download but I will try.

I can add Dramacool ? using Consumet and maybe it won't support 360p download but I will try.

Thanks so much

I can add Dramacool ? using Consumet and maybe it won't support 360p download but I will try.

Adding dramacool will b the best

Can u inform me here after ur done with adding dramacool nd download option of 360p if possible?

yes, I will inform and mark the issues as complete after its complete.

yes, I will inform and mark the issues as complete after its complete.

Ok sure

Added DramaCool check out the latest release.
Currently only download the highest quality.

Added DramaCool check out the latest release. Currently only download the highest quality.

Okay thanks a lot


[Loc]  update to data-workspace xlf

This PR fixes #

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.001%) to 41.948%

Totals

Change from base Build<PHONE_NUMBER>:
0.001%

Covered Lines:
28728

Relevant Lines:
63599

💛  - Coveralls


ArrayStoreException with Renato’s “Parcey”

Using @renatoathaydes’s Parcey 0.4.0 with the following code will produce an ArrayStoreException:
import com.athaydes.parcey {...}
import com.athaydes.parcey.combinator {...}

Parser<{Anything*}> letter = either({oneOf('a'..'z'), oneOf('A'..'Z')});
Parser<{Anything*}> algarism = oneOf('0'..'9');
Parser<{Anything*}> identifier = mapValueParser(sequenceOf({letter, many(either({letter, algarism}))}), function({Anything*} stream) => [String(stream.narrow<Character>())]);
Parser<{Anything*}> packageName = separatedWith(character('.'), identifier, 1);

shared void run() => packageName.parse("foo");

A shorter repro:
shared void run() => crash<Anything,Character>("foo");
shared void crash<A, B>(A a) {
    { a of A | B }.sequence();
}

java.lang.ArrayStoreException: ceylon.language.String
        at ceylon.language.Array.createArrayFromIterable(Array.java:264)
        at ceylon.language.Array.<init>(Array.java:112)
        at ceylon.language.Iterable$impl.sequence(Iterable.ceylon:286)
        at ceylon.language.impl.BaseIterable.sequence(bases.ceylon)
        at simple.crash_.crash(run.ceylon:3)
        at simple.run_.run(run.ceylon:1)
        at simple.run_.main(run.ceylon)

The code to determine the array element type for unions (https://github.com/ceylon/ceylon/blob/f80ab266eab9cd7973211fceed5402e4e6ea7e16/language/runtime/com/redhat/ceylon/compiler/java/runtime/model/TypeDescriptor.java#L946-L949) includes:
                if (td instanceof Nothing ||
                    td instanceof Class && td.containsNull()) {
                    continue;
                }

ignores Anything. That doesn't look right to me.

I'm not sure what's the best way to fix this, so I'll leave it to those familiar with the code.

@jvasileff @Zambonifofex I just pushed a proposed fix. Would you guys test it for me? Thanks.

Alright, @jvasileff, I just made some improvements to getArrayElementClass(), that I hope address your concerns (and I hope are right).

@gavinking LGTM

Closing.


Plasmid new application page

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):
Fix #
Test URLs:

Before:
https://main--moleculardevices--hlxsites.hlx.page/applications/plasmid/aav-plasmids
https://main--moleculardevices--hlxsites.hlx.page/applications/plasmid/plasmids-3d-culture-organoid-screening
https://main--moleculardevices--hlxsites.hlx.page/applications/coronavirus-research
After:
https://plasmid--moleculardevices--hlxsites.hlx.page/applications/plasmid/aav-plasmids
https://plasmid--moleculardevices--hlxsites.hlx.page/applications/plasmid/plasmids-3d-culture-organoid-screening
https://plasmid--moleculardevices--hlxsites.hlx.page/applications/coronavirus-research

Hi @alexcarol  @alinarublea  @andreituicu  can someone please review it? Seems to be a conflict in accordion.js

Closing this due to multiple conflicts and opened fresh one https://github.com/hlxsites/moleculardevices/pull/1198


Device SDK connection drop after throttling error

Context

OS and version used: Windows 10
Python version: 3.7.4
pip version: 19.0.3
list of installed packages:
Package             Version

azure-iot-device    2.5.0
azure-iot-hub       2.2.3
certifi             2020.6.20
chardet             3.0.4
deprecation         2.1.0
idna                2.10
isodate             0.6.0
janus               0.4.0
jsonmodels          2.4
msrest              0.6.19
oauthlib            3.1.0
packaging           20.4
paho-mqtt           1.5.1
pip                 19.0.3
pyparsing           2.4.7
PySocks             1.7.1
python-dateutil     2.8.1
requests            2.24.0
requests-oauthlib   1.3.0
requests-unixsocket 0.2.0
setuptools          40.8.0
six                 1.15.0
uamqp               1.2.12
urllib3             1.25.10

cloned repo: -

Description of the issue
I am using the IoTHubDeviceClient to connect to an IoT Hub and publish telemetry data. For testing purposes I am using the free tier of the IoT Hub. After hitting the quota limit of 8000 messages per day, the service drops the connection without informing the python SDK about a throttling error. I have already contacted the Microsoft Support who told me to open the issue here after discussing my problem.
Code sample exhibiting the issue
from azure.iot.device import IoTHubDeviceClient
device_client = IoTHubDeviceClient.create_from_connection_string(connection_string="connection_string", websockets=True,
keep_alive=10)
for x in range(9000):
message = Message("test {0}".format(x))
device_client.send_message(message)
Console log of the issue
Starting run_op in pipeline thread
Creating pipeline executor
Gateway Hostname not present. Setting Hostname to: HOSTNAME
HTTPTransportStage(InitializePipelineOperation): got connection args
creating a SSL context
InitializePipelineOperation: completing without error
Starting <azure.iot.device.common.evented_callback.EventedCallback object at 0x00000269D0BCD408> in callback thread
Creating callback executor
Callback completed with result None
Starting run_op in pipeline thread
Scheduling SAS Token renewal at epoch time:<PHONE_NUMBER>
Gateway Hostname not present. Setting Hostname to: HOSTNAME
MQTTTransportStage(InitializePipelineOperation): got connection args
creating mqtt client
Creating client for connecting using MQTT over websockets
Setting custom proxy options on mqtt client
creating a SSL context
configuring SSL context with default certs
Created MQTT protocol client, assigned callbacks
InitializePipelineOperation: completing without error
Starting <azure.iot.device.common.evented_callback.EventedCallback object at 0x00000269D0BCDF08> in callback thread
Callback completed with result None
Connecting to Hub...
Starting ConnectOperation on the pipeline
Starting run_op in pipeline thread
ReconnectStage(ConnectOperation): State changes LOGICALLY_DISCONNECTED->LOGICALLY_CONNECTED.  Adding to wait list and sending new connect op down
ReconnectStage: sending new connect op down
ConnectionLockStage(ConnectOperation): blocking
MQTTTransportStage(ConnectOperation): connecting
MQTTTransportStage(ConnectOperation): Starting watchdog
connecting to mqtt broker
Connect using port 443 (websockets)
_mqtt_client.connect returned rc=0
connected with result code: 0
Starting _on_mqtt_connected in pipeline thread
_on_mqtt_connected called
PipelineRootStage: ConnectedEvent received. Calling on_connected_handler
Starting _on_connected in callback thread
completing connect op
Connection State - Connected
MQTTTransportStage(ConnectOperation): cancelling watchdog
ConnectOperation: completing without error
ConnectionLockStage(ConnectOperation): op succeeded.  Unblocking queue
ConnectionLockStage(ConnectOperation): unblocking and releasing queued ops.
ConnectionLockStage(ConnectOperation): processing 0 items in queue for error=None
ReconnectStage(ConnectOperation): on_connect_complete error=None state=LOGICALLY_CONNECTED never_connected=True connected=True
ReconnectStage: completing waiting ops with error=None
ConnectOperation: completing without error
Starting on_complete in callback thread
Callback completed with result None
Successfully connected to Hub
Connecting to broker
Sending message to Hub...
Starting SendD2CMessageOperation on the pipeline
Starting run_op in pipeline thread
SendD2CMessageOperation: creating worker op of type MQTTPublishOperation
AutoConnectStage(MQTTPublishOperation): Connected.  Sending down and adding callback to check result
MQTTTransportStage(MQTTPublishOperation): publishing on devices/.../messages/events/
publishing on devices/.../messages/events/
_mqtt_client.publish returned rc=0
Waiting for response on MID: 1
failed to receive on socket: [WinError 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen, 2021-01-19 12:27:55.243008
disconnected with result code: 1
File "C:\Program Files\Python37\lib\threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "C:\Program Files\Python37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 3453, in _thread_main
self.loop_forever(retry_first_connection=True)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 1780, in loop_forever
rc = self.loop(timeout, max_packets)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 1182, in loop
rc = self.loop_read(max_packets)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 1575, in loop_read
return self._loop_rc_handle(rc)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 2228, in _loop_rc_handle
self._do_on_disconnect(rc, properties)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 3361, in _do_on_disconnect
self.on_disconnect(self, self._userdata, rc)
File "C:\Users.........\venv\lib\site-packages\azure\iot\device\common\mqtt_transport.py", line 210, in on_disconnect
logger.debug("".join(traceback.format_stack()))
Forcing paho disconnect to prevent it from automatically reconnecting
in paho thread.  nulling _thread
Done forcing paho disconnect
Starting _on_mqtt_disconnected in pipeline thread
MQTTTransportStage: _on_mqtt_disconnect called: ConnectionDroppedError('Paho returned rc==1')
ReconnectStage(DisconnectedEvent): State is LOGICALLY_CONNECTED Connected is True.
ReconnectStage: State is WAITING_TO_RECONNECT. Connected=True Starting reconnect timer
PipelineRootStage: DisconnectedEvent received. Calling on_disconnected_handler
Starting _on_disconnected in callback thread
MQTTTransportStage: disconnection was unexpected
Unexpected disconnection.  Safe to ignore since other stages will reconnect.
Connection State - Disconnected
Cleared all pending method requests due to disconnect
azure.iot.device.common.transport_exceptions.ConnectionDroppedError: ConnectionDroppedError('Paho returned rc==1')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users.........\venv\lib\site-packages\azure\iot\device\common\handle_exceptions.py", line 43, in swallow_unraised_exception
raise e
azure.iot.device.common.transport_exceptions.ConnectionDroppedError: ConnectionDroppedError(None) caused by ConnectionDroppedError('Paho returned rc==1')
Starting on_reconnect_timer_expired in pipeline thread
ReconnectStage: Reconnect timer expired. State is WAITING_TO_RECONNECT Connected is False.
ReconnectStage: sending new connect op down
ConnectionLockStage(ConnectOperation): blocking
MQTTTransportStage(ConnectOperation): connecting
MQTTTransportStage(ConnectOperation): Starting watchdog
connecting to mqtt broker
Connect using port 443 (websockets)
_mqtt_client.connect returned rc=0
connected with result code: 0
Starting _on_mqtt_connected in pipeline thread
_on_mqtt_connected called
PipelineRootStage: ConnectedEvent received. Calling on_connected_handler
Starting _on_connected in callback thread
completing connect op
MQTTTransportStage(ConnectOperation): cancelling watchdog
ConnectOperation: completing without error
ConnectionLockStage(ConnectOperation): op succeeded.  Unblocking queue
ConnectionLockStage(ConnectOperation): unblocking and releasing queued ops.
ConnectionLockStage(ConnectOperation): processing 0 items in queue for error=None
ReconnectStage(ConnectOperation): on_connect_complete error=None state=LOGICALLY_CONNECTED never_connected=False connected=True
ReconnectStage: completing waiting ops with error=None
Connection State - Connected
failed to receive on socket: [WinError 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen, 2021-01-19 12:28:00.614058
disconnected with result code: 1
File "C:\Program Files\Python37\lib\threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "C:\Program Files\Python37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 3453, in _thread_main
self.loop_forever(retry_first_connection=True)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 1780, in loop_forever
rc = self.loop(timeout, max_packets)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 1182, in loop
rc = self.loop_read(max_packets)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 1575, in loop_read
return self._loop_rc_handle(rc)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 2228, in _loop_rc_handle
self._do_on_disconnect(rc, properties)
File "C:\Users.........\venv\lib\site-packages\paho\mqtt\client.py", line 3361, in _do_on_disconnect
self.on_disconnect(self, self._userdata, rc)
File "C:\Users.........\venv\lib\site-packages\azure\iot\device\common\mqtt_transport.py", line 210, in on_disconnect
logger.debug("".join(traceback.format_stack()))
Forcing paho disconnect to prevent it from automatically reconnecting
in paho thread.  nulling _thread
Done forcing paho disconnect
Starting _on_mqtt_disconnected in pipeline thread
MQTTTransportStage: _on_mqtt_disconnect called: ConnectionDroppedError('Paho returned rc==1')
ReconnectStage(DisconnectedEvent): State is LOGICALLY_CONNECTED Connected is True.
ReconnectStage: State is WAITING_TO_RECONNECT. Connected=True Starting reconnect timer
PipelineRootStage: DisconnectedEvent received. Calling on_disconnected_handler
Starting _on_disconnected in callback thread
MQTTTransportStage: disconnection was unexpected
Unexpected disconnection.  Safe to ignore since other stages will reconnect.
Connection State - Disconnected
Cleared all pending method requests due to disconnect
azure.iot.device.common.transport_exceptions.ConnectionDroppedError: ConnectionDroppedError('Paho returned rc==1')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users.........\venv\lib\site-packages\azure\iot\device\common\handle_exceptions.py", line 43, in swallow_unraised_exception
raise e
azure.iot.device.common.transport_exceptions.ConnectionDroppedError: ConnectionDroppedError(None) caused by ConnectionDroppedError('Paho returned rc==1')

Hello again, could you give some feedback about the current status of this bug?

@thurnbauermatthi
Unfortunately, the IoTHub service doesn't indicate that throttling occurs, it simply drops the connection with the client, which means we aren't able to directly report what happened to you.
However, there are potential mitigations we are looking at, which depend on some new infrastructure being built. I'm currently working on this infrastructure. The idea would be that we can provide the option to disable automatic connection retry so it doesn't get stuck infinitely attempting to re-establish a connection (this presently exists in the latest release, however has some bugs that need to be addressed). We also would like to more gracefully report the errors to the end user via a handler function, allowing for some kind of heuristic implementation to infer the error's cause (this is partially implemented as of now).
I apologize for the delay in addressing this, but we are actively working on the pre-requisite work required to present the most workable solution we can

Unfortunately this feature is not able to be supported. We are looking at attempting to enhance our error story in the near future, however it won't bring any specificity to this exact issue as the IoTHub does not specify why it closes a connection.
However, we have mitigated this with several features in releases over the past few months - automatic reconnection can now be disabled via the auto_connect keyword argument at client creation, so the client will not keep attempting to reconnect after throttling occurs, and we have also have introduced more fail-fast responses so that the client won't lock up if it does get stuck in such a loop.


New switch-type node

This new node type will provide a missing building block that will allow the most basic topologies to be built without requiring any external repository (for topology setup testing purposes, a quick start guide, etc.), plus it helps when you need a simple switch for a topology but that switch is not a part of the system under test (so it should be really simple and stable).
This should be production ready right now, the only thing that could be an issue is that an interface needs to be UP to be added to a linux software bridge, which means we are setting the ports to this state irrespective of what our users set them to in the SZN spec.

@carlos-jenkins this is ready to be reviewed and commited now.


Error in step code packages

First the error output when I run goldens update:
PS D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup> flutter test --update-goldens
00:03 +0: D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup\test\counter_test.dart: Counter Initial counter value is 0
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
Expected: exactly one matching node in the widget tree
Actual: _TextFinder:<zero widgets with text "0" (ignoring offstage widgets)>
Which: means none were found but one was expected
When the exception was thrown, this was the stack:
#4      iSeeText (package:bdd_widget_test/step/i_see_text.dart:8:3)
#5      main.. (file:///D:/fredgrttsstuff/GithubProjects/flutter_test/expert_test_setup/test/counter_test.dart:24:13)

(elided one frame from package:stack_trace)
This was caught by the test expectation on the following line:
package:bdd_widget_test/step/i_see_text.dart line 8
The test description was:
Initial counter value is 0
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +0 -1: D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup\test\counter_test.dart: Counter Initial counter value is 0 [E]
Test failed. See exception logs above.
The test description was: Initial counter value is 0
00:03 +0 -1: D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup\test\counter_test.dart: Counter Add button increments the counter
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
The finder "zero widgets with icon "IconData(U+0E047)" (ignoring offstage widgets)" (used in a call
to "tap()") could not find any matching widgets.
When the exception was thrown, this was the stack:
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:902:7)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:841:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:273:18)
#3      iTapIcon (package:bdd_widget_test/step/i_tap_icon.dart:9:16)
#4      main.. (file:///D:/fredgrttsstuff/GithubProjects/flutter_test/expert_test_setup/test/counter_test.dart:29:13)

(elided one frame from package:stack_trace)
The test description was:
Add button increments the counter
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +0 -2: D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup\test\counter_test.dart: Counter Add button increments the counter [E]
Test failed. See exception logs above.
The test description was: Add button increments the counter
00:10 +7 -2: Some tests failed.
PS D:\fredgrttsstuff\GithubProjects\flutter_test\expert_test_setup>
the rep where the expert-est-setup project is at is
https://github.com/fredgrott/flutter_test
I did look at both:
https://github.com/olexale/bdd_widget_test/blob/master/lib/step/i_tap_icon.dart
and
https://github.com/olexale/bdd_widget_test/blob/master/lib/step/i_see_text.dart
things that might stand out:
one has a missing wait in async block
and let's see on null saefy String and IconData fields should they have late modfiers?
The error report does not  mentioned nUll os it might not be that.
Any thoughts on what it might be?

Hi @fredgrott,
Thanks for this ticket!
await is missing in i_see_text by design as there is no asynchronous operation in this step.
It seems like you're testing the default counter app, have you watched this video? If yes - could you please share the app so I could take a look?
Regards,
Oleksandr

Hi Fred,
I've tried to compile expert-test-setup project from https://github.com/fredgrott/flutter_test but it fails to compile with the following error:
Error: unable to find directory entry in pubspec.yaml: /Users/ole/dev/test/flutter_test/expert_test_setup/images/
lib/my_app_textstyles.dart:49:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:66:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({

        ^^^^^^^^^
lib/my_app_textstyles.dart:83:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,

    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({

        ^^^^^^^^^
lib/my_app_textstyles.dart:100:5: Error: No named parameter with the name 'overflow'.

    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({

        ^^^^^^^^^
lib/my_app_textstyles.dart:117:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:134:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:151:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({

        ^^^^^^^^^
lib/my_app_textstyles.dart:168:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,

    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:184:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:201:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:218:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:235:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
lib/my_app_textstyles.dart:252:5: Error: No named parameter with the name 'overflow'.
    overflow: TextOverflow.fade,
    ^^^^^^^^
../../../../fvm/versions/stable/packages/flutter/lib/src/painting/text_style.dart:458:9: Context: Found this candidate, but the arguments don't match.
  const TextStyle({
        ^^^^^^^^^
Failed to load "/Users/ole/dev/test/flutter_test/expert_test_setup/test/counter_test.dart": Compilation failed for testPath=/Users/ole/dev/test/flutter_test/expert_test_setup/test/counter_test.dart
dart:async/stream_controller.dart 561:44                       _StreamController.addError
dart:async/stream_controller.dart 830:13                       _StreamSinkWrapper.addError
_GuaranteeSink._addError
_GuaranteeSink.addError
package:flutter_tools/src/test/flutter_platform.dart 466:37    FlutterPlatform._startTest
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 45:22                        _asyncThenWrapperHelper
package:flutter_tools/src/test/flutter_platform.dart 378:36    FlutterPlatform.loadChannel
package:flutter_tools/src/test/flutter_platform.dart 342:44    FlutterPlatform.load
Loader.loadFile.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 45:22                        _asyncThenWrapperHelper
package:test_core/src/runner/loader.dart                       Loader.loadFile.<fn>
new LoadSuite.<fn>.<fn>
new LoadSuite.<fn>.<fn>
new LoadSuite.<fn>
Invoker.waitForOutstandingCallbacks.<fn>
Invoker.waitForOutstandingCallbacks.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1789:10                                   _runZoned
dart:async/zone.dart 1711:10                                   runZoned
Invoker.waitForOutstandingCallbacks
Invoker._onRun.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 45:22                        _asyncThenWrapperHelper
package:test_api/src/backend/invoker.dart                      Invoker._onRun.<fn>.<fn>.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1789:10                                   _runZoned
dart:async/zone.dart 1711:10                                   runZoned
Invoker._onRun.<fn>.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1789:10                                   _runZoned
dart:async/zone.dart 1711:10                                   runZoned
Invoker.guard
Invoker._guardIfGuarded
Invoker._onRun.<fn>
Chain.capture.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1789:10                                   _runZoned
dart:async/zone.dart 1711:10                                   runZoned
Chain.capture
Invoker._onRun
LiveTestController.run
dart:async/future.dart 198:37                                  new Future.microtask.<fn>
dart:async/zone.dart 1346:47                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1162:7                                    _CustomZone.runGuarded
dart:async/zone.dart 1202:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1162:7                                    _CustomZone.runGuarded
dart:async/zone.dart 1202:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 40:21                       _microtaskLoop
dart:async/schedule_microtask.dart 49:5                        _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 120:13                   _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 185:5                    _RawReceivePortImpl._handleMessage

✖ loading /Users/ole/dev/test/flutter_test/expert_test_setup/test/counter_test.dart
Exited (1)

Have you fixed your problem? Is there anything I can help you with?
Best,
Oleksandr

Hi Fred,
I hope you already fixed the problem hence I'm closing the issue. Feel free to reopen the ticket if the problem is still there.
Best,
Oleksandr


Track ruby-version for consistent local docs builds with rbenv

Summary
Generating the documentation locally requires having Ruby installed. If you have many different projects in your development environment, you'll also likely need to manage multiple versions of Ruby.
rbenv is a popular tool for managing multiple Ruby versions on a single machine. With rbenv installed, when a developer cds into the docs directory, the .ruby-version file is read and a matching Ruby version is available, that version is automatically switched into. Committing this file is a best practice for collaborating on a Ruby project to help all maintainers synchronize on a known good version.
In fact, if you try to build the docs without the right Ruby version installed, with this change, you'll get the following helpful error:
rbenv: version `2.7.1' is not installed (set by .../bolt-js/docs/.ruby-version)

The downside of committing this file is that every once in a while, we should synchronize the version with the production version of Ruby used in the GitHub Pages infrastructure to get the most accurate results. But getting in the habit of committing it now will allow one maintainer to share the knowledge of that change with others, and they will more quickly update Ruby in their local development environments.
Requirements (place an x in each [ ])

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.

I like this idea - LGTM. We can do the same for other repos - bolt-python, java-slack-sdk


Unreasonable breaking change

This: https://github.com/FlyingPikachu/Quests/commit/36dbf1b76e744a9ea7895337873876d21d7db4b6#diff-27ffc03d9ebc7f11788beb54e7da6838L435
Is dumb.
You changed a static getInstance method that returns an instance to... an instance getInstance method that returns the current object. IE, the method does literally nothing now.
The change to private Quests plugin = Quests.getPlugin(Quests.class); makes the general code setup worse and I'm not sure why you intentionally rewrote code in a breaking way to be overall worse.
Bukkit plugins are guaranteed singleton instances. The getInstance method is exactly the correct way to do that.

@mcmonkey4eva Thanks for your comment! I recall we've spoken once before.
This change was made during my experiments with the FindBugs plugin for Eclipse. I've just run  it again with the original getInstance() method, here's the report:

Bug: Write to static field me.blackvein.quests.Quests.instance from instance method me.blackvein.quests.Quests.onEnable()

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.

Rank: Of Concern (15), confidence: High
Pattern: ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD
Type: ST, Category: STYLE (Dodgy code)

As you've said, the fact that the plugin is a guaranteed singleton makes this report somewhat moot. Still, I get where you're coming from - this has been a popular argument since Bukkit's conception.
Here's one of my favorite threads on the topic - https://www.spigotmc.org/threads/misuse-of-the-singleton-pattern.193376/
I'd be happy to re-open this if you can provide a specific example in Quests where returning the current object will be problematic. Love all the work you're putting into Citizens for 1.13 <3

@FlyingPikachu It's not so much problematic in its current form as... useless. It is a method that literally does nothing. If you take anything that calls the method, remove that method call, and alter nothing else of that code, the code will work exactly the same. It is literally a no-operation method.
As a static method returning a singleton instance, it at least makes sense to exist, and is very useful for API usage (interfacing between plugins).
The change commit linked both disabled this useful functionality, and created a 100% useless method in its place.

Ah, I see what you mean. Deprecating it now for removal in a future build. Thanks!

Or... you could...
Add back the original static version that you blindly removed in very much not a safe-deprecation pattern and that has very valid reasons to continue to exist and no valid reasons to remove.

Deprecating the static version certainly should have been done, but it looks like I underestimated whom would be affected. At the time, I thought it would be enough for me to just update the MythicMobsModule and replace the CustomMobsModule with my own. Did this cause problems for the Citizens team?
Wish I could remember the exact reasons I had for removing it other than agreeing with points in that SpigotMC thread I linked... maybe it had to do with a FindBugs report on those modules. At any rate, what are your points for wanting the static version back, specifically?

It didn't affect Citizens.
It affected Depenizen - https://github.com/DenizenScript/Depenizen
I don't touch that much (other devs do most of the work for that), but I had to patch the link when you broke it arbitrarily.
The best point for why it should be put back: It was there before, and was exactly correct in its placement, but was then removed in some weird mistaken commit. That should be considered a bad commit and reverted or undone in full accordingly.
A valid reason for that static method to exist in general: It makes an easier, cleaner API (and also makes internal for Quests cleaner). Quests.getInstance() is a lot easier, faster, and cleaner than (Quests) Bukkit.getPlugin("Quests") or anything like that, and it's a lot nicer to have a static available at any time as opposed to tracking a variable and passing it everywhere its needed.
The only reason to not have a static instance is if the class was not a singleton or equivalent class. But... Bukkit guarantees that the plugin class is a singleton.

Let's re-open this in case anyone else cares to chime in!
I see your patch and am willing to overlook the fact you called me "dumb" and "stupid". I'll agree I shouldn't have removed the static way so promptly. However, your patch added a mere two lines - an import and the variable you mentioned - the latter of which could be avoided with this one-liner:
this.quester = ((Quests) Bukkit.getPluginManager().getPlugin("Quests")).getQuester(player.getOfflinePlayer().getUniqueId());
Calling the static version "cleaner" seems subjective, as one could argue that linking everything to one static instance is messy because it goes against OO principles. As for "faster" and "easier" we're talking about a few nanoseconds difference in processing time and perhaps another second or two of proficient typing.
As countless others whom have held this argument before us have made clear, neither of us is truly wrong. However, I'm still hard-pressed to see any major advantage to the static instance beyond the fact that you had to patch Depenizen, which I apologize for. Perhaps you could answer with why neither Citizens nor Denizen seem to provide a static plugin instance?

No that one-liner would not work, as that would almost certainly run horrifically slow for no real reason (iirc getPlugin is weirdly slow compared to what it should be).

I did call you dumb, but also I wrote that as a 2-second patch name without any thinking and also without offhand knowing who it was even referring to specifically, as I was just trying to label the change made as dumb but wrote it poorly. Sorry for the insult.
And you cannot possibly claim that a change to a non-OO type 'goes against OO principles' as justification for a change. Making a motorcycle use more fuel goes against bicycling principles. So what? The entirety of the motorcycle goes against bicycling principles. A motorcycle is not a bicycle.
A plugin is not an OO type. Just being a class within Java does not make it OO.
Perhaps you could answer with why neither Citizens nor Denizen seem to provide a static plugin instance? well the answer to that is "because they do".
Citizens: https://github.com/CitizensDev/CitizensAPI/blob/master/src/main/java/net/citizensnpcs/api/CitizensAPI.java#L102
Denizen: https://github.com/DenizenScript/Denizen-For-Bukkit/blob/master/plugin/src/main/java/net/aufdemrand/denizen/utilities/DenizenAPI.java#L47

Java is an OO language.
Not all Java code is OO code.
A Bukkit plugin class is not and can not be OO.
As it is a singleton.
And a singleton is not OO.
You have a singleton, which is not OO, and you're trying to handle it like it is not a singleton and it is OO... but that's wrong. You're applying rules and methodologies that simply do not apply to the relevant case.
You're not altering the class to not be a singleton. It is and always will be a singleton, as Bukkit plugins are always singletons. You're just removing the advantages provided by the singleton pattern (easy static get), while retaining the limitations (requirement of only one instance ever, known and defined statically).
This is not a discussion of "should you use a singleton". This is a discussion of you're using a singleton, but you're not doing it as effectively as possible. You have a singleton and that will not (and can not) be changed. The question is whether to have the primary benefit of the singleton be present, or to over-complicate for no reason. It's not both options have advantages. It's... one option has an advantage, and the other option lacks an advantage, and all else is equal.
Also, re:perf - yes, significantly more than just a few nanoseconds. Also, rapid reuse applies to strengthen the need for performance. Not that anything in Minecraft/Bukkit/etc. is ever written for efficiency (though I can at least dream!). But it did actually have a measurable effect when I tested with getPlugin in use in a dObject class. I don't remember the exact details and it doesn't particularly matter, as just getting it once and having it in my own static variable is not significantly more difficult to have in place than the in-line form, as the main time draw with that situation is not writing that code but rather researching what code to write.


migrate to new studio in jsreport 1.0

I prepared the changes required to make this working with the new jsreport studio.
It will be officially released with the latest tag tomorrow. You can merge this and publish it afterwards, when you find the time. Thank you

@pofider this is great! thnk you for the PR, I've left some comments

done in 2.0!


[backport] Fix copyto for NumPy 2 compatibility

Backport of #8430 by @seberg

/test mini

Looks like everything passes except CUDA 11.2
The CUDA 11.2 image is running into the CentOS 7 repo issue seen before: https://github.com/cupy/cupy/pull/8429#issuecomment-2234234738
Would it be alright if we merged anyways? Or do we want to first fix that issue ( https://github.com/cupy/cupy-release-tools/pull/381#discussion_r1681763282 )?

I'm working on fixing the centos issue now, and it should be done soon.

Thanks Masayuki!

/test cuda112

Hooray it passes! 🥳
Thanks Kenichi and Masayuki! 🙏

Thanks Masayuki! 🙏


Demos and tests are abusing Pods relentlessly.

Well...
I have checked Demos.xcworkspace located in Demos directory.
It has nearly 40 projects ( 20 apps + 20 Pods.xcodeproj )
I suppose that all these Pods projects could be removed and be simply replaced by one dependency - Lumberjack.xcodeproj.
Moreover, Tests directory contains CocoaLumberjack Tests.xcodeproj which also abuses CocoaPods dependencies manager which is especially for tests is super-extremely-bad in case of internal parts access. ( if needed )
I suppose that all - pod install in travis could be removed easily after cleaning up Lumberjack.xcodeproj from App targets.
#961

Feel free to do all the changes you think are necessary and PR them.

#969
#970

Great work @lolgear - once #970 is merged, we can close this one.

@bpoplauschi
Yes!
#970 is waiting for review.

Closing.- #970 was merged


Update version

Sorry, I'm such a moron when it comes to using github. Now I changed the code, the json and the changelog.


adding batch account template

Adding Bicep template to create azure batch account with batch service pool allocation mode.

Looks like you also need to rerun bicep build with the latest changes you have made.

@alex-frankel , Thanks for the quick help! I updated the new line formatting and reran the build command too. Does this look to be correct?

Codecov Report

Merging #1222 (a3ad658) into main (5c772ef) will increase coverage by 0.47%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1222      +/-   ##
==========================================
+ Coverage   94.49%   94.96%   +0.47%
==========================================
  Files         336      332       -4
  Lines       16825    16676     -149
  Branches       14        0      -14
==========================================
- Hits        15898    15836      -62
+ Misses        927      840      -87

Flag
Coverage Δ

dotnet
94.96% <ø> (-0.08%)
:arrow_down:

typescript
?

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

Impacted Files
Coverage Δ

...cep.Core.UnitTests/FileSystem/FileResolverTests.cs
79.31% <0.00%> (-20.69%)
:arrow_down:

.../Bicep.Core.UnitTests/Assertions/BaselineHelper.cs
63.63% <0.00%> (-15.91%)
:arrow_down:

src/Bicep.Core/FileSystem/PathHelper.cs
96.15% <0.00%> (-3.85%)
:arrow_down:

src/Bicep.Core.UnitTests/Utils/CompilerFlags.cs
33.33% <0.00%> (ø)

...Bicep.Core.UnitTests/FileSystem/PathHelperTests.cs
100.00% <0.00%> (ø)

...Core.IntegrationTests/Emit/TemplateEmitterTests.cs
100.00% <0.00%> (ø)

src/vscode-bicep/src/language/client.ts

src/vscode-bicep/src/utils/telemetry.ts

src/vscode-bicep/src/extension.ts

src/vscode-bicep/src/utils/logger.ts

... and 1 more

@alex-frankel , thank you for pointing to right direction, I could successfully complete the tests after updating the required changes.