Date constructor in standard library typings uses incorrect parameter name

VSCode Version:

OS Version: Windows 10

Steps to Reproduce:

Instantiate a new Date object.
Observe the objects parameter dialog next to curser.

MDN Reference:

Note:

The new Date object is created with the right day value. It seems to just be a typo.
Happens in TypeScript and JavaScript.
I'm not familiar enough with VS Code to know where this would be and I'm also new to JS. If this is not applicable here, I apologize.

Does this issue occur when all extensions are disabled?: Yes

This comes from libes5.d.ts:
interface DateConstructor {
    ...
    new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
}

The ECMAScript spec calls this parameter "date": https://www.ecma-international.org/ecma-262/#sec-date-year-month-date-hours-minutes-seconds-ms . Using "day" could be ambiguous with day-of-week so really neither is entirely perfect.

wow. thanks for the quick response. =) So thats supposed to be date. Thank you.


matter 1.0 branch pairing failed with sve2(v2.5)TH

Reproduction steps
DUT: matter 1.0 commit: 26a054c31144478e3c27391c06b0dc3230bb0882 (HEAD -> v1.0-branch, origin/v1.0-branch)
TH  : TH v 2.5 - 1.0 Release Build

The CD in sve2 and matter 1.0 is not same, the links are below, I am wondering whether the cd or keys are mismatched,we  should updated the TH image.
https://github.com/project-chip/connectedhomeip/blob/sve-2/src/credentials/examples/DeviceAttestationCredsExample.cpp
https://github.com/project-chip/connectedhomeip/blob/v1.0-branch/src/credentials/examples/DeviceAttestationCredsExample.cpp

Bug prevalence
everytime
GitHub hash of the SDK that was being used
26a054c31144478e3c27391c06b0dc3230bb0882
Platform
efr32, raspi
Platform Version(s)
ubuntu 22.04
Type
Core SDK Interopability Issue
Anything else?
The chip tool on the TH log says "Failed in verifying 'Attestation Information' command received from the device: err 601. Look at AttestationVerificationResult enum to understand the errors"  and I checked the enum(kCertificationDeclarationNoCertificateFound = 601) means no certificate found, but it works very well with  matter1.0-branch chip tool, dose any one can help me out? thank you very much.
pairing failed.txt

In the above comment:
Left side is 1.0 branch (https://github.com/project-chip/connectedhomeip/blob/v1.0-branch/src/credentials/examples/DeviceAttestationCredsExample.cpp), right side is master (https://github.com/project-chip/connectedhomeip/blob/master/src/credentials/examples/DeviceAttestationCredsExample.cpp#L82)

@Leo2442926161  the appropriate fixes were cherry-picked with #23239
Please test

@Leo2442926161 the appropriate fixes were cherry-picked with #23239
Please test

Hi @emargolis , based on the TH2.5 (SHA: 6e5a2f9) , what should I do to fix this in TH? Thank you.


Logging and validation

(WIP) fix for #8

Codecov Report

Merging #9 into master will increase coverage by 0.02%.
The diff coverage is 92.1%.

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   96.25%   96.27%   +0.02%
==========================================
  Files           8        8
  Lines         588      645      +57
==========================================
+ Hits          566      621      +55
- Misses         22       24       +2

Impacted Files
Coverage Δ

src/NaiveNASlib.jl
100% <ø> (ø)
:arrow_up:

src/mutation/size.jl
98.03% <100%> (+0.03%)
:arrow_up:

src/mutation/vertex.jl
91.56% <88.09%> (+1.56%)
:arrow_up:

src/vertex.jl
95.83% <96.66%> (+2.97%)
:arrow_up:

Continue to review full report at Codecov.

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


400 bad request : Unable to connect with FileShare in python for Upload

I followed up a tutorial from MS docs for Uploading a file to Azure File share https://docs.microsoft.com/en-us/python/api/overview/azure/storage-file-share-readme?view=azure-python , faced a Bad request 400 error .
Please specify the path_name format i have to define in the function parameter

Hi @praveenRI007 thanks for reaching out! @jalauzon-msft could you take a look at this?

Hi @praveenRI007, could you please share the following information so we can better assist you? Thanks!

A code sample of what you are trying to do.
The exact error/exception you are receiving.
The version of the file-share SDK and the version of Python you are using.

Hi @tjprescott ,

Here is the sample code :
from azure.storage.fileshare import ShareFileClient
file_client = ShareFileClient.from_connection_string(conn_str="<connection_string>", share_name="my_share",
file_path="my_file")
with open("./SampleSource.txt", "rb") as source_file:
file_client.upload_file(source_file)

The exception that i got:

Version of SDK iam using :

Python Version 3.7 (64-bit)

Iam not sure about the syntax of file_path that i had used is correct : please clarify what could be the error here

Hi @navba-MSFT

I am getting this error now , can you please provide solution for this asap

@praveenRI007 Thanks for sharing the error details. I looked at the backend logs, I see that your request URL (file path) was incorrect. I could see // in the request URL file path after the ShareName. Could you please fix that and check if that helps ? Awaiting your reply.
Your Request URL: https://XXXXXXXXXX.file.core.windows.net:443/archive-attachments//DTS/Archival/CIS
Syntax: https://MySTorageAccount.file.core.windows.net/ShareName/DirectoryName1/DirectoryName2/File.txt

@navba-MSFT Thanks ! it worked :)

@praveenRI007 Thanks for getting back. We will now proceed with closure of this github issue. If you need any further assistance on this issue in future, please feel free to reopen this thread. We would be happy to help.


WIP: shrink openstackclient container PoC (do not merge!)

closes osism/issues#24
Signed-off-by: Tim Beermann<EMAIL_ADDRESS>

Let's close this for the moment.


修改post_quantization.py

1、post_quantization.py中os.mkdirs为os.makedirs

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

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


ios app crashes on simulator while running proper on real devices

Steps to reproduce:
Ran the command - ionic cordova emulate ios
After installing the app on simulator it opens for few seconds(around 3-5 sec.) and then app automatically crashes.
Again each time if try to open app on simulator then it shows blank screen then app crash.
ionic information
ionic 3.20.0
cordova 6.5.0
ios information
xcode- 10

This is the wrong repository: You ae using ionic-v3, this is related to v3 -> https://github.com/ionic-team/ionic-v3
And from my point of view, this issue is related to Cordova not Ionic


Updated for compatibility with latest lean commit 1866488

Changes in BaseResultsHandler.cs and the addition of BacktestResultParameters broke LeanOptimizer.
Hopefully this fixes it. Please let me know if anything else needs to be done here.
Thanks!

I'm not planning on maintaining the old codebase of the the optimizer now that the new rewrite has more features.


Updating OAuth parameter post-breaking-change

This PR fixes #11.
If you have a previous existing installation of this application live anywhere (either local or deployed), you will need to, after integrating this change:

Re-install the app via slack run or slack deploy, depending on which app instance you want to affect. If you want to update both, you will have to run both.
Re-authenticate with the OAuth dance, that is, re-generate and save to Slack infra the OAuth token. Do so via the slack external-auth add command. Similarly, if you have both local and deployed instances of the app, you will have to do so for each.

Thanks for this fix and apologies for letting it sit open!


I can't load .ts file in another .ts file.

Hi Deluze
I'm trying to build a second window(set show=false) to deal with the loading state when reading large files, which causes the interface to become unresponsive.
But now I try to load the corresponding ts (remote.ts) file in the html (remote.html) file of the second windows, and then encounter these errors when calling other custom files(cross-values.ts) in this remote.ts file, I don't know how to solve it, and I haven't found an effective way to check the information.
If I import the ts script this way, I get this error:
Option 1:

<script type="application/javascript" src="./../main/remote.ts"></script>

Option 2:

<script type="module">require("./../main/remote.ts")</script>

Option 3:
<script type="module" src="./../main/remote.ts"></script>

remote.ts

cross-values.ts

file list.

remote.html

I have not been able to find the answer to this question in Google, so I would like to ask if you have encountered any similar problems.

The problem is that you're trying to import a module from the renderer that's defined in the main/electron part of your application. I recommend to put all the code referenced by the renderer in the renderer directory as these are bundled together, rule of thumb is that your front-end code (renderer process) shouldn't know about back-end code (main process). Then, option 3 should work.

It's clear that option 1 won't ever work; your remote.ts is a module, so it needs to be specified as one.
Same is happening in option 2, sort of; you defined the script to be a module, but when you use require it assumes the target (remote.ts) is not a module. So the proper usage would be
<script module>
import ... from './../main/remote.ts'
</script>

I can't see what you're exporting in remote.ts, so replace the ... with whatever fits your code.
Although, fixing option 2 won't be the solution you're looking for and possible won't work out of the box.

Hi Deluze, thanks for your response!
I tried as you suggested, and put both remote.html and remote.ts in the renderer directory, and still got this error.
I'm not sure what else could be the cause.

Can you show me your build directory? Seems like your import is incorrect, as you have no default export you should import ZipCodeValidator with import { ZipCodeValidator } from './remote.ts'
Double check if all paths are as expected in build, and is this file being transpiled correctly? Maybe it's still trying to load the ts file from the HTML.
If all looks good, a reproduction repo would be appreciated, hard to tell what's the reason on why you can't import the script.

@Deluze  Hi Deluze,
I just deleted the build folder, which is the newly compiled build directory, and it doesn't look like remote.js or remote.html.
When I moved remote.ts into the main folder, remote.js was generated, but now in the renderer directory, it is not generated.
And even if remote.js is generated under the main folder, this error is still displayed.

That's because electron-builder copies every file that's in the main directory and tell the ts compiler to transpile all js files. The renderer works a little bit different, as everything is done through Vite which is running the Vue plugin; it's an SPA and the entry point is only a single html file and ignores the others.
On the dev server, it's likely that the remote.ts is not being transpiled by Vite and that's the reason for error (Vite can't serve you the file). You should be able to check the network log to see what Vite responded with.
I assumed you were transpiling the files already, you might want to look into creating a simple Vite plugin that will also transpile other html/ts files besides Vue, I assume such plugins already exist.
An easier solution might be to utilize Vue router and have your 2nd window go to a specific route.

Thank you so much! I'm not a front-end engineer, so I lack understanding of many basic knowledge.
Thank you again, based on this great information you told me, I tried to find this link, I will try to follow this configuration after dinner.
https://github.com/vitejs/vite/issues/257
https://stackoverflow.com/questions/68973043/how-to-create-multi-pages-with-vite-following-this-directory-structure


Validate Tekton works with GKE Autopilot

GKE Autopilot is a new mode for GKE which locks down certain aspects of the cluster, in exchange for a more managed environment, and billing based on pod resource requests instead of node reservations. Someone should make sure Tekton works well with it, or at least identify where it doesn't and document those.
Looking through the overview (https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview) there aren't many things locked down that we might rely on, but a few might be problematic:
Webhook limitations:

You cannot create custom mutating admission webhooks for Autopilot clusters, but you can create custom validating webhooks.

Tekton uses mutating webhooks to set defaults. There's also no mention of conversion webhooks, which Tekton uses.
Pod affinity and anti-affinity:

Pod affinity is limited for use only with the following keys: topology.kubernetes.io/region, topology.kubernetes.io/zone, failure-domain.beta.kubernetes.io/region, and failure-domain.beta.kubernetes.io/zone.

This might affect the Affinity Assistant
Allowable resource ranges:

The minimum value is 250 milliCPU (mCPU).

Containers with no resource requests will default to the standard minimums of 500 mCPU and 1 GiB memory.

We should set reasonable resource requests for controller and webhook deployments, especially if we think we should request lower than the default.
We might find out other things don't work as expected as well. If things already work fine with Autopilot, we should document that somewhere too.
/kind documentation

🧑💻 🎉
in short,
installing pipeline v0.24.1 on GKE Autopilot cluster:
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "admissionregistration.k8s.io/v1, Resource=mutatingwebhookconfigurations", GroupVersionKind: "admissionregistration.k8s.io/v1, Kind=MutatingWebhookConfiguration"
Name: "webhook.pipeline.tekton.dev", Namespace: ""
from server for: "https://github.com/tektoncd/pipeline/releases/download/v0.24.1/release.notags.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "webhook.pi
peline.tekton.dev" is forbidden: User<EMAIL_ADDRESS>cannot get resource "mutatingwebhookconfigurations" in API group "admissionregistration.k8s.io" at the cluste
r scope: GKEAutopilot authz: cluster scoped resource "mutatingwebhookconfigurations/" is managed and access is denied

@imjasonh @vdemeester @bobcatfish
installation log
kubectl apply -f https://github.com/tektoncd/pipeline/releases/download/v0.24.1/release.notags.yaml

namespace/tekton-pipelines created
podsecuritypolicy.policy/tekton-pipelines created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-controller-cluster-access created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-controller-tenant-access created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-webhook-cluster-access created
role.rbac.authorization.k8s.io/tekton-pipelines-controller created
role.rbac.authorization.k8s.io/tekton-pipelines-webhook created
role.rbac.authorization.k8s.io/tekton-pipelines-leader-election created
serviceaccount/tekton-pipelines-controller created
serviceaccount/tekton-pipelines-webhook created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller-cluster-access created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller-tenant-access created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-webhook-cluster-access created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-webhook created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller-leaderelection created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-webhook-leaderelection created
customresourcedefinition.apiextensions.k8s.io/clustertasks.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/conditions.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/pipelines.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/pipelineruns.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/pipelineresources.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/runs.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/tasks.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/taskruns.tekton.dev created
secret/webhook-certs created
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.pipeline.tekton.dev created
validatingwebhookconfiguration.admissionregistration.k8s.io/config.webhook.pipeline.tekton.dev created
clusterrole.rbac.authorization.k8s.io/tekton-aggregate-edit created
clusterrole.rbac.authorization.k8s.io/tekton-aggregate-view created
configmap/config-artifact-bucket created
configmap/config-artifact-pvc created
configmap/config-defaults created
configmap/feature-flags created
configmap/config-leader-election created
configmap/config-logging created
configmap/config-observability created
configmap/config-registry-cert created
deployment.apps/tekton-pipelines-controller created
service/tekton-pipelines-controller created
horizontalpodautoscaler.autoscaling/tekton-pipelines-webhook created
deployment.apps/tekton-pipelines-webhook created
service/tekton-pipelines-webhook created
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "admissionregistration.k8s.io/v1, Resource=mutatingwebhookconfigurations", GroupVersionKind: "admissionregistration.k8s.io/v1, Kind=MutatingWebhookConfiguration"
Name: "webhook.pipeline.tekton.dev", Namespace: ""
from server for: "https://github.com/tektoncd/pipeline/releases/download/v0.24.1/release.notags.yaml": mutatingwebhookconfigurations.admissionregistration.k8s.io "webhook.pi
peline.tekton.dev" is forbidden: User<EMAIL_ADDRESS>cannot get resource "mutatingwebhookconfigurations" in API group "admissionregistration.k8s.io" at the cluste
r scope: GKEAutopilot authz: cluster scoped resource "mutatingwebhookconfigurations/" is managed and access is denied

Thanks for trying it out @nikhil-thomas
Do e2e tests pass against the autopilot cluster?
In theory we could redo any webhook-initiated mutations on a resource's first reconcilation (which we should maybe do anyway, and maybe already do), which would make the mutating webhook a nice-to-have optimization.

i haven't tried. I shall add it to my list and post an update soon. 🧑💻

I am also running into this issue 👋🏾

I am also running into this issue. Happy to help out testing if I can.

If the lack of webhooks is indeed the only issue (big if), I think this boils down to two issues:

Allow installation to succeed even if setting up the webhooks fails -- this is probably an Operator issue.
Allow Tekton to work correctly if the webhooks aren't available -- detect this scenario and set defaults etc on the first reconciliation, then things should proceed as normal.

And a secret third:

Cover this scenario in automated tests, so we know we don't break this in future changes.

Seeing as my background is Java and my Go is basic / still learning. Can I help with 1 or 2? I was using the helm chart, not sure if that's using the operator under the covers or whether its slightly different.

I thought I could get away with this autopilot restriction, but it seems tekton-pipelines-webhook doesn't start up correctly due to the MutatingWebhookConfiguration. Other things seem to work okay though.

I thought I could get away with this autopilot restriction, but it seems tekton-pipelines-webhook doesn't start up correctly due to the MutatingWebhookConfiguration. Other things seem to work okay though.

The trick is that we use the mutating webhook for our default values set or our auto conversion from v1alpha1 to v1beta1, ..

 If we loosened these tests to handle async validation on the first reconcile loop, they should pass.

https://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview

In GKE version 1.21 and later, you can also create mutating dynamic admission webhooks. However, Autopilot modifies mutating webhooks objects to add a namespace selector which excludes the resources in managed namespaces (e.g. kube-system) from being intercepted.

tl;dr: it should be much easier to test on GKE Autopilot >1.21 now.

Tried tekton (v0.33.0) with Autopilot (1.21.6-gke.1500) with a pipeline with two tasks: git-clone and kaniko (both v0.5).  My roadbumps, well predicted by @imjasonh

Needed to update the firewall rule to allow port 8443 for the admission webhook
Had to disable affinity assistant, else admission webhook "policycontrollerv2.common-webhooks.networking.gke.io" denied the request
Had to increase ephermal-storage via a LimitRange

Generally I should also say with Autopilot scheduling and using kaniko to build a 1Gi image this was slow.  PipelineRuns were all 10min+

I've played with Tekton on GKE Autopilot, including with GKE Spot Pods, and everything in my tests seems to work fine. There might be room for some official GCP-authored-and-hosted doc about how to make them work best together, but that's probably out of scope for Tekton.
If someone finds a bug that makes it not work with GKE Autopilot, please let us know. Until then:
/close


Not getting the same quality as Hugging face demo

Dear Author,
Thank you for your amazing work.
I tried deploying and running your code in my local with the same requirements as mentioned in the hugging face repo and using the same model that is BiRefNet-massive-epoch_240.pth but still we get a different quality .
We are using cuda : 12.3 and python 3.10.
Can you please guide me what I am doing wrong so I can get the same quality as hugging face demo?
Thanks in advance.

Hi, thanks a lot for your interest :)
You mean you got different results with the same weights (even lower quality)? That's a problem.
Could you use the single_image_inference colab to have a try and provide the images of them for me to look into the problem?
Thank you very much, looking forward to hearing from you.

Hey, how is it going? I do care about the differences of using different versions of libs.

Re-open it if you still have any trouble.


COPY --from should reference a previously defined FROM alias

Codacy detected an issue:
Message: COPY --from should reference a previously defined FROM alias
Occurred on:

Commit:  9b8f97485aa91be1800336ea931e8ebdacc622fa
File:    Dockerfile
LineNum: 9
Code:    COPY --from=0 /tmp/batcher .

Currently on:

Commit:  914094d864c21e659302ccd9bfa172ec35961e7d
File:    Dockerfile
LineNum: 9

Fixed

Fixed


Write a Python wrapper

[x] First version of the wrapper
[ ] Documentation (make clear that the NumPy array must stay valid!)
[ ] GloVe example
[ ] Helper functions (compute_number_of_hash_functions, etc.)
[x] Performance debugging to get the wrapper closer to C++ performance.
[x] Update README (include new license information for numpy.i)

Merge 6f0ca805343b0be5888ba1b2d9d02faebf545e3e introduces the first version of the Python wrapper. Currently it supports dense data in with double and single precision.

The performance issue was fixed in 5a69217c6026f641063da8465dc56986e64b6c67 . The issue was related to passing Eigen vectors / memory maps correctly: http://eigen.tuxfamily.org/dox/TopicFunctionTakingEigenTypes.html

Do we check dtype of the numpy array we pass? Would be nice to do it, if that's not the case yet.

We are not doing it on the C++ side (the C++ side doesn't really the the numpy object). The swig-generated numpy wrapper might do it automatically (swig does it for "normal" objects at least). Definitely something we should test though.

Another thing: not to forget to write IN CAPS that DON'T LET YOUR NUMPY ARRAY TO GET GC'ED! Otherwise, the C++ internals crash silently and that could be very confusing.
Would it be possible to enforce this or throw a more explicit exception if the memory is corrupt?

Agreed! (it's a bold item in the to-do list above)
A check on the C++ side would be great, but I don't know how to check if a given float or double pointer is valid. I did a quick search and it's not clear if this is possible.
Another workaround would be to write a thin wrapper on the Python side that stores a reference to the numpy array with the LSH table.

I just added the helper functions in 60cf7e4b0149b998d9be163f8d7c1675dded4a4a .
So for the first version of the Python wrapper, only documentation (github wiki and the glove example) should be left now.

I just added the helper functions in 60cf7e4b0149b998d9be163f8d7c1675dded4a4a .
So for the first version of the Python wrapper, only documentation (github wiki and the glove example) should be left now.

Should we have a thin wrapper around whatever swig produces? It would serve two purposes:

detect dtype automatically and call the appropriate version of the construction function
hold a reference to the dataset so that it does not get garbage-collected
(optionally) we can provide a flag for re-centering

I think it would substantially improve the user experience.

Yes, I still think that a thin wrapper would be a good idea, especially for the dtype issue. It might be good to keep it as "thin" as possible (small additional functionality) so that the C++ and Python versions don't diverge too much.
Maybe we should only do re-centering with issue #7. That issue is more for "implicit" re-centering (no additional copy of the data), but it would be good to clearly separate the two (e.g., by saying that construct_table never copies the data set and offering a separate function for pre-processing that copies the data?)


Something is broken

I am trying to multipack a set of textures to a nearest low po2 value by adjusting the width and height (currently 1024 and 512 respectively), except this is my output:

My full settings are:
"packer": "OptimalPacker",
"packerMethod": "Automatic",
"width": 1024,
"height": 512,
"fixedSize": false,
"powerOfTwo": true,
"alphaThreshold": 4
"padding": 0,
"extrude": 1,
"allowRotation": true,
"detectIdentical": true,
"allowTrim": true,
"removeFileExtension": true,
"prependFolderName": false,
"textureFormat": "png",
"base64Export": false,
"scale": 1,
"exporter": "JsonHash",
"filter": "none"
My source assets:
wildcollect.zip
Seems like a multipack bug, its creating the second texture on the first

Yes, looks like a bug. I will investigate this.

Yes, looks like a bug. I`m will investigate this.

Ok, this is OptimalPacker issue. Other packers works fine.

@qtiki can you assist?

More precisely, the problem is in the MaxRectPacker with "square" option enabled. OptimalPacker just finds this combo as best.

There is new version of MaxRectPacker, is the issue solved?

Got same problem when OptimalPacker used.
Looks like problem in MaxRectsPacker(SmartSquareArea)
To continue using Optimal packet I made this hack:
let allPackers = require('free-tex-packer-core/packers').list;
allPackers.splice(1, 1);//remove MaxRectsPacker from list

SmartSquare and SmartSquareArea methods removed


[CT-3296] [Bug] dbt doesn't enforce 2-argument ref() when using models from installed packages

Is this a new bug in dbt-core?

[X] I believe this is a new bug in dbt-core
[X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior
As stated in dbt docs here:

We especially recommend using two-argument ref to avoid ambiguity, in cases where a model name is duplicated across multiple projects or installed packages. If you use one-argument ref (just the model_name), dbt will look for a model by that name in the same namespace (package or project); if it finds none, it will raise an error.

The last sentence is incorrect though - if you use 1-argument ref and a model doesn't exist in the same package (namespace), but exists in a package installed as a dependency - no error is raised.
Expected Behavior
I expect the behaviour specified in docs, so 1-argument ref should only work with models from the same package (namespace), but not with models (even the public ones) from installed packages. Such models should be referenced exclusively with two-argument ref, otherwise - an error should be raised.
If it's not a bug, but a mistake in documentation and you don't want to enable such behaviour by default - there should be an option provided to enforce it.
Steps To Reproduce

create package_a
create model_a (public or protected) in package_a
create package_b
specify package_a as a dependency in package_b
create model_b in package_b as select * from {{ ref('model_a') }}
run dbt compile in package_b
compilation succeeds instead of raising an error

Relevant log output
No response
Environment
- OS: macOS
- Python: 3.10
- dbt: both 1.6 & 1.7

Which database adapter are you using with dbt?
redshift
Additional Context
No response

cc: @jtcohen6, as we discussed package / project namespaces in the past

@jaklan would you mind double-checking this?
When I tried this with dbt-core 1.6.6, two-argument ref within package_b raised an error when restrict-access: True within package_a. Otherwise, it passed without an error. See below for details.
We should update the docs
We should update the docs for two-argument refto specifically call-out how restrict-access in the upstream project affects two-argument ref in the downstream project.
Project setup
Here's the files that I used:
Directory structure
package_a
├── dbt_project.yml
├── models
│   └── model_a.sql
└── profiles.yml
package_b
├── dbt_project.yml
├── dependencies.yml
├── models
│   └── model_b.sql
└── profiles.yml

Project A
package_a/dbt_project.yml
name: "package_a"
version: "1.0.0"
config-version: 2
profile: "sandcastle"

restrict-access: True  # default is False

package_a/models/model_a.sql
select 1 as id

Project B
package_a/dbt_project.yml
name: "package_b"
version: "1.0.0"
config-version: 2
profile: "sandcastle"

package_b/models/model_b.sql
select * from {{ ref('model_a') }}

package_b/dependencies.yml
packages:
  - local: ../package_a

Try to compile in Project B
cd package_b
dbt deps
dbt compile

Error log output
(postgres_1.6) $ dbt compile

21:01:15  Running with dbt=1.6.6
21:01:16  Registered adapter: postgres=1.6.6
21:01:16  Unable to do partial parsing because saved manifest not found. Starting full parse.
21:01:16  Encountered an error:
Parsing Error
  Node model.package_b.model_b attempted to reference node model.package_a.model_a, which is not allowed because the referenced node is protected to the 'package_a' package.

When I removed restrict-access: True from package_a/dbt_project.yml, then it compiled just fine though.

@dbeatty10 if I understand correctly, you haven't specified model access, so by default it's protected. So in your case it failed not because of dbt enforcing 2-argument ref(), but because of referring to protected model with restrict-access: True. Please try again following that step:

create public model model_a in package_a

Actually that part:

create package_a with restrict-access: True

should be replaced with:

create package_a

as restrict-access: True is not really relevant for the actual issue. Sorry for the confusion, I have just updated the original description.

Yeah, I see what you are saying!
Indeed, in contraction to the original issue in #7446 and the docs here, the following code in the reprex below works fine instead of erroring.
i.e. this says that it shouldn't:

If you use one-argument ref (just the model_name), dbt will look for a model by that name in the same namespace (package or project); if it finds none, it will raise an error.

And #7446 also says it shouldn't:

model in root (running) project has a ref('model_a')

if it defines its own model_a node → model.root_project.model_a
otherwise: raise an error indicating an ambiguous ref

The first two scenarios already work! But the third is broken because dbt resolves “model_a” to an arbitrary project.

Reprex

Here's the files that I used to demonstrate the issue
Directory structure
package_a
├── dbt_project.yml
├── models
│   └── model_a.sql
└── profiles.yml
package_b
├── dbt_project.yml
├── dependencies.yml
├── models
│   └── model_b.sql
└── profiles.yml

Project A
package_a/dbt_project.yml
name: "package_a"
version: "1.0.0"
config-version: 2
profile: "sandcastle"

package_a/models/model_a.sql
select 1 as id

Project B
package_a/dbt_project.yml
name: "package_b"
version: "1.0.0"
config-version: 2
profile: "sandcastle"

package_b/dependencies.yml
packages:
  - local: ../package_a

package_b/models/model_b.sql
select * from {{ ref('model_a') }}

Compile in Project B
cd package_b
dbt deps
dbt compile --s model_b

Output
(postgres_1.6) $ dbt compile --select models/model_b.sql
00:00:15  Running with dbt=1.6.6
00:00:16  Registered adapter: postgres=1.6.6
00:00:16  Found 2 models, 0 sources, 0 exposures, 0 metrics, 352 macros, 0 groups, 0 semantic models
00:00:16
00:00:16  Concurrency: 5 threads (target='postgres')
00:00:16
00:00:16  Compiled node 'model_b' is:
select * from "postgres"."dbt_dbeatty"."model_a"

@dbeatty10 thank you for the answer! I have also done a few additional tests in various combinations, here are the outcomes:

Click to expand test scenarios

package_b installs package_a, package_c installs package_b

package_a with model_a + package_b with model_a:

select * from {{ ref('model_a1') }} works in package_b - model_a is taken from package_b (✅)

package_a with model_a + package_b without model_a:

select * from {{ ref('model_a1') }} works in package_b - model_a is taken from package_a (🚨)

package_a with model_a + package_b with model_a + package_c with model_a:

select * from {{ ref('model_a1') }} works in package_c, model_a is taken from package_c (✅)

package_a with model_a + package_b with model_a + package_c without model_a:

select * from {{ ref('model_a1') }} doesn't work in package_c (✅)
Compilation Error in model model_c1 (models/model_c1.sql)
  When referencing 'model_a1', dbt found nodes in multiple packages: 'model.project_b.model_a1', 'model.project_a.model_a1'
  To fix this, use two-argument 'ref', with the package name first: 'project_b' or 'project_a'

package_a with model_a + package_b without model_a + package_c without model_a:

select * from {{ ref('model_a1') }} works in package_c - model_a is taken from package_a (🚨)

package_a without model_a + package_b with model_a + package_c without model_a:

select * from {{ ref('model_a1') }} works in package_c - model_a is taken from package_b (🚨)

package_a without model_a + package_b with model_a + package_c with model_a:

select * from {{ ref('model_a1') }} works in package_c, model_a is taken from package_c (✅)

package_a with model_a + package_b without model_a + package_c with model_a:

select * from {{ ref('model_a1') }} works in package_c, model_a is taken from package_c (✅)

To sum up - an error is only raised in a situation when both conditions are met:

a) model_a is not found in the current project
b) model_a is found in more than one installed package

When model_a is found in one installed package exclusively then there's no ambiguity, so that's why dbt doesn't fail currently. But in my opinion - ambiguity shouldn't be the only reason to raise such error.
Why? Let's imagine the 6. scenario described above - you work on package_c without model_a, but such model is in package_b, so ref('model_a1') works with no error. But after some time - maintainers of package_a decide to add model_a to their package. This way our scenario turns into the 4. one - so package_c starts to fail although it wasn't modified.
Another example - we again start with the 6. scenario, but this time model_a was added to package_c by another developer working on that project. This way we get into the 7. scenario. All models which were previously using ref('model_a1') to refer to model_a1 from package_b - now quietly start to refer to the new model from package_c!
The only way to prevent such situations is to use 2-argument ref() from the very beginning. But when you can't enforce it - it's just a convention that developers may simply not follow, we have no real control of that. And that's why I find it really crucial that dbt allows to enforce explicit, 2-argument ref() when using models from installed packages - either as a default behaviour or as a config in package_c.

That's why I think the goal of that setting should be to enforce 2-arg ref() at the project level, so all people working on given project have to use it.

I agree with this!
I should clarify what I meant in option (3) above: I don't think it should be possible to enforce this differently based on the configs of the referencing project. It should be the same for all models in an invocation. And it should be a config that's defined, in version control, in the project code, so that it does not differ for different users/environments.

@jtcohen6

And it should be a config that's defined, in version control, in the project code, so that it does not differ for different users/environments.

So we agree on that one 😄 I just still miss what's the difference between 2nd and 3rd variant then, could you provide some example?


[Feature Request] Better mobile support

Currently it's not really possible to use the app on mobile phones. Will there be a better responsive design implemented?

It will be considered, and maybe someone will submit a pr.

It has better mobile support now, not perfect but usable.


[DWARF] Use a function-local offset for AT_call_return_pc (llvm)

Logs provided by @stella.stamenova indicate that on Linux, lldb adds a
spurious slide offset to the return PC it loads from AT_call_return_pc
attributes (see the list thread: "[PATCH] D50478: Add support for
artificial tail call frames").
This patch side-steps the issue by getting rid of the load address
calculation in lldb's CallEdge::GetReturnPCAddress.
The idea is to have the DWARF writer emit function-local offsets to the
instruction after a call. I.e. return-pc = label-after-call-insn -
function-entry. LLDB can simply add this offset to the base address of a
function to get the return PC.
Differential Revision: https://reviews.llvm.org/D53469
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344960 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 8266f03bf7f9c694dbf2965dc0a1a755da483e03)

Merged along with https://github.com/apple/swift-lldb/pull/995.


Closes: #1

Updated validations.py python script.
Fixed the behavior of google function in validations.py.
Fixes #1

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

All done now

Updated validations.py python script.
Fixed the behavior of google function in validations.py.
Fixes #1

It's a good idea to open an issue first for discussion.

[x ] Tests pass
[x ] Appropriate changes to README are included in PR


Formlibrary refactor

What is the Purpose?
Merge the most recent work on formlibrary into dev
Are there any concerns to addressed further before or after merging this PR?
Delete the formlibrary-app-update branch, and all the branches that have ever been merged into it.
Mentions?
@andrewtpham @Kimaiyo077 @odenypeter
Issue(s) affected?
No specific ticket was addressed. Just a refactoring of common code into the utils Django app and some general grooming of formlibrary

@TAnas0  we have updated main dev branch with develop so you will need to rebase this to develop before it can be merged.


The page references code style inference feature in IntelliCode which seems to have been removed from IntelliCode

Hello,
The page https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2022#other-ways-to-add-an-editorconfig-file references code style inference in IntelliCode, but that feature seems to have been removed from IntelliCode. I found this commit: https://github.com/MicrosoftDocs/intellicode/commit/6cd2a1d174f265fd265fb86a02593b43091764e9 of the IntelliCode documentation where it was removed from the docs at least.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 72f45eb4-3596-866a-2c16-ee225737d956
Version Independent ID: cea055e7-fe9b-95c7-6d25-086f182c01d2
Content: EditorConfig settings - Visual Studio (Windows)
Content Source: docs/ide/create-portable-custom-editor-options.md
Product: visual-studio-windows
Technology: vs-ide-general
GitHub Login: @mikadumont
Microsoft Alias: midumont

Interested in this.
According to https://learn.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2022#other-ways-to-add-an-editorconfig-file
"There are a couple of other ways you can add an EditorConfig file to your project:
The code inference feature of IntelliCode for Visual Studio infers your code styles from existing code. It then creates a non-empty EditorConfig file with your code-style preferences already defined."
and this feature was present in previous VS versions, see IntelliCode "IntelliCode is installed by default with any workload that supports C#, C++, TypeScript/JavaScript, or XAML in Visual Studio 2022.", "which dynamically creates an .editorconfig file from your codebase to define coding styles and formats."

I too am interested in this.  Is there any way of getting the feature back or does the Microsoft Learn documentation have to be updated?


Keep being signed out of GitHub

Issue Type: Bug
I find that closing and re-opening VS Code means that I'm signed out of GitHub each time when I attempt to start or join a collaboration session.  This didn't used to happen.  I'm not sure if this is due to an update to VS Code or something else.
Extension version: 1.0.2274
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 10.0.18362

System Info

Item
Value

CPUs
AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx   (8 x 2196)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
6.90GB (1.35GB free)

Process Argv

Screen Reader
no

VM
0%

Hi.  Thanks for the response.

thank you for reaching out. As a workaround, can you try running this command: Live Share: Disable VSCode account authentication? This will revert the authentication to the old flow. Please let us know if this unblocks you.

I tried this but no joy.  It did the change the flow but the same issue persists (not signed in from session to session).
If it helps, I was experimenting with a Live Share in Visual Studio 2019 and I think I tried doing a Live Share between Visual Studio 2019 and VS Code on the same machine (and same account) to see if it would work.  The problem appeared shortly after.  Not sure if they are related but thought it worth mentioning.

if it still doesn't work, your logs may provide us with helpful information. You can access them via the Live Share: Export Logs command from the command palette (ctrl + shift + p) and attach them to this issue.

I'm happy to do this.  Can you let me know if there would be any sensitive info/PII in these logs?  If so, can you point me to them so that I can remove them before attaching?  Thanks.

thank you for reaching out. As a workaround, can you try running this command: Live Share: Disable VSCode account authentication? This will revert the authentication to the old flow. Please let us know if this unblocks you.

This fixed the problem for me. 👍

@AmirGamilDev , we try to keep the logs free of PII, but please double check before you post here, and if you find any, let us know so that we can remove it. If you are still not comfortable to posting it , you can send to us via<EMAIL_ADDRESS>Please add this issue number to the e-mail, so we correlate your logs with the issue.

@AmirGamilDev , we try to keep the logs free of PII, but please double check before you post here, and if you find any, let us know so that we can remove it. If you are still not comfortable to posting it , you can send to us via<EMAIL_ADDRESS>Please add this issue number to the e-mail, so we correlate your logs with the issue.

I took a look through the logs and am fairly satisfied that there's no PII.  I shall still send it via email though.

Myself and my colleagues all have this issue and I was wondering could it be due to our GitHub accounts also having SSO enabled for our org repos, will try your suggested fix tho

Hi folks @setaskin
Just letting you know that I noticed today that this issue seems to be resolved.  Not sure when it was resolved but it's working today in version 1.50.1.
Thanks to whoever fixed it! 👍  ❤
Version: 1.50.1 (user setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.18362

Thanks for the update! @dlebu made a fix a few weeks ago but seems we missed updated this one.
Will resolve, feel free to reopen if anybody is still seeing this specific issue.

Thanks @dlebu for the fix 👍  and you're welcome @BrunoGuardia


OneToOne cascade persist throws exception

Hey there,
I have two relating entities:
/**
 * @ORM\Entity
 * @ORM\Table("foo")
 */
class A {
    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\OneToOne(targetEntity="B", mappedBy="ref", cascade={"persist"})
     */
    private $ref;

    public function getRef() {
         return $this->ref;
    }

    public function setRef(B $reference) {
         $this->ref = $reference;
         if ($reference->getRef() !== $this) {
              $reference->setRef($this);
         }
    }
}

/**
 * @ORM\Entity
 * @ORM\Table("bar")
 */
class B {

    /**
     * @ORM\OneToOne(targetEntity="A", inversedBy="ref")
     * @ORM\JoinColumn(name="ref_id", referencedColumnName="id")
     */
    private $ref;

    public function getRef() {
         return $this->ref;
    }

    public function setRef(A $reference) {
         $this->ref = $reference;
         if ($reference->getRef() !== $this) {
              $reference->setRef($this);
         }
    }
}

If I want to persist A like this, I get the exception, that there is no identifier value set yet (ofc not, I am actually persisting tho...):
$entity = new A;
$entity->setRef(new B);

$entityManager->persist($entity); // Throws exception...
$entityManager->flush();

The Problem is, that the Method \Doctrine\ORM\UnitOfWork::scheduleForInsert wants to create an identifier hash but since we did not flushed the entities yet, there aint any value other than null.

Is it really the first statement throwing an exception here?
$entityManager->persist($entity); // Throws exception...
$entityManager->flush();

Can we eventually have a test case?

@boesing @Ocramius this is definitely related to the refactoring of the commit order calculation that was done a couple years ago and which is just part of 2.6.x. Since the changes are quite complex to backport we decided to keep that only on master.
@boesing as I said on your PR, try to reproduce this against master. If you're unable, I do recommend you to start changing your application to be compatible with our next minor release.

@lcobucci The problem is, that we are not using PHP 7.1 yet... :/

@boesing I understand but this seems to be one of the edge cases that we couldn't backport and unfortunately if you want to use that mapping you would have to update.
If you don't manage to reproduce this on master, you could try to use a fixed commit on your composer.json to "solve" this until you upgrade your stack to PHP 7.1.
It's definitely not ideal but serves as a TEMPORARY workaround (at fc67b398a1efd3d61837778e2cda2d05a395778c all the tests were working and PHP 7.0 was still supported). Please mind the emphasis on temporary 😂

I closed this as incomplete on the PR, closing it here as well.
@boesing all we need is to test it against master on the repository. Due to the patches that landed in 2.6, we won't be able to fix this for 2.5 anymore, sorry.


Change max/min for current plot to the current plot max/min

repro:
set max and min for the color bar to say 0 - 10, while actual data falls somewhere within that range. Want to see real data max and min while using 0 - 10 as plot max and min.

Unassigning myself because (please correct me if mistaken) @brugger1 has a fix for this in development.


Undefined method asset_path

I use Slim and I got error undefined method asset_path.
It happen because in angular-rails4-templates/slim_processor.rb called method render without arguments.
First argument should be some ActionView object which will be use as scope for template.

@jeremyk any thoughts on this one?

Took a look at this. I was able to reproduce this but had not seen it previously as I do not use any url helpers in my client side templates. I tried fixing by passing ActionController::Base.helpers as an argument (it was the only thing I could find with a asset_path method on it) but get a stack size error. I am happy to take another look if anyone has suggestions but need to get back to other things at the moment.

Methods what can by used in template placed in ActionView::Helpers
I tried many different options. Some of them:

Some class include ActionView::Helpers

module AngularRails4Templates
  class Test
    include ActionView::Helpers
  end
end

then
output = Slim::Template.new { template }.render AngularRails4Templates::Test.new

In this case asset_path works incorrect.
scope.asset_path('test.jpg') return /test.jpg but have to /assets/test.jpg

Create an instance of ActionView::Base

output = Slim::Template.new { template }.render ActionView::Base.new

In this case I got SystemStackError. But this also work incorrect
av = ActionView::Base.new
av.asset_path('test.jpg') # /test.jpg

I suggest that there is no rails configurations in both cases.

Any chance it maybe needs to have the path set with one of the values in
the input hash?
On Tue, Jan 19, 2016 at 11:26 PM Viktor<EMAIL_ADDRESS>wrote:

Methods what can by used in template placed in ActionView::Helpers
I tried many different options. Some of them:

Some class include ActionView::Helpers

module AngularRails4Templates
class Test
include ActionView::Helpers
end
end
then
output = Slim::Template.new { template }.render AngularRails4Templates::Test.new
In this case asset_path works incorrect.
scope.asset_path('test.jpg') return /test.jpg but have to /assets/test.jpg

Create an instance of ActionView::Base

output = Slim::Template.new { template }.render ActionView::Base.new
In this case I got SystemStackError. But this also work incorrect
av = ActionView::Base.new
av.asset_path('test.jpg') # /test.jpg
I suggest that there is no rails configurations in both cases.
—
Reply to this email directly or view it on GitHub
https://github.com/gaslight/angular-rails4-templates/issues/5#issuecomment-173117242
.

I tried, but have no success

@jeremyk any news?

I'm getting what seems like a variant of this: undefined method image_tag' for #Object:0x00000007d4bac8`

Yes. It's the same

Was taking another look at this and I am super confused. Just trying different things:
`
class AssetHelper
include ActionView::Helpers::AssetUrlHelper
end
  def render_html(input)
    ah = AssetHelper.new
    ap = ah.asset_path('add.svg')
    Rails.logger.debug "HERE: #{ap}"
    byebug
    template = input[:data]
    output = '' #Slim::Template.new { template }.render ah
    escape_javascript output
  end
end

end
`
(byebug) aa  = ActionView::Base.new (byebug) aa.asset_path('add.svg') HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg HERE: /add.svg "/assets/add.svg" (byebug)
So it eventually outputs the correct value by using  ActionView::Base.new but no idea why it hits this so many times as a it is running asset_path on the new ActionView base. I think it is probably equal to the number of .slim files I have in the project.
Anyway, not really getting anywhere but here are some more thougths: 1) Is there any way to initialize a new ActionView::Base and pass it in so that the same one is used every time. 2) input has a sprockets cache on it via input[:cache]. No luck with that but maybe someone more knowledgeable would know how to use it? 3) Why isn't this happening with HAML? I don't see any use of any of these helpers for the HAML processor?
Sorry I am not more help but I'm really not much of a ruby/rails developer, just dabble in it a little.

More random stuff I tried (in case it gives anyone ideas):
        sp = Sprockets::Environment.new(Rails.root)
        sp.append_path(input[:load_path])
        sp.instance_variable_set(:@cache, input[:cache])
        ah = ActionView::Base.new(ActionController::Base.view_paths)
        ah.assets_environment = sp


airgap k3s v1.30.4+k3s1: FATA[0000] exec: "k3s-agent": executable file not found in $PATH

Environmental Info:
K3s Version:
k3s version v1.30.4+k3s1 (98262b5d)

Node(s) CPU architecture, OS, and Version:
Linux 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 1 04:16:12 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
1 server, 1 agent
Describe the bug:
Failed to start agent using airgap image (k3s-airgap-images-amd64.tar.gz and k3s-airgap-images-amd64.tar)
FATA[0000] exec: "k3s-agent": executable file not found in $PATH

No issue with v1.29.8+k3s1 airgap images.
Steps To Reproduce:
Copy airgap image to /var/lib/rancher/k3s/agent/images/
Copy k3s binary to /usr/local/bin/
Start agent:
sudo systemctl start k3s-agent.service

Installed K3s: v1.30+k3s1

Additional context / logs:
$ sudo ls -lart /var/lib/rancher/k3s/data
total 4
-rw-------. 1 root root    0 Sep 13 10:29 .lock
drwx------. 5 root root   45 Sep 13 10:29 ..
drwxr-xr-x. 4 root root   28 Sep 13 10:29 c38ba7cc1669e7d80b8156ae743932fd86f5bce3871b8a88bef531dd4e3c02b2
lrwxrwxrwx. 1 root root   90 Sep 13 10:30 previous -> /var/lib/rancher/k3s/data/c38ba7cc1669e7d80b8156ae743932fd86f5bce3871b8a88bef531dd4e3c02b2
drw-------. 4 root root   28 Sep 13 10:34 e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5
lrwxrwxrwx. 1 root root   90 Sep 13 10:34 current -> /var/lib/rancher/k3s/data/e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5
drwxr-xr-x. 4 root root 4096 Sep 13 10:34 .

$ sudo ls -lart /var/lib/rancher/k3s/data/e50868881d9744d0d0027dda983507e867b3787482eb00005d97239d9aa501a5/bin  | grep k3s
-rw-------. 1 root root 174180208 Aug 22 07:06 k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 kubectl -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 containerd -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 crictl -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-agent -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-secrets-encrypt -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-server -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-etcd-snapshot -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-certificate -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-completion -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 k3s-token -> k3s
lrwxrwxrwx. 1 root root         3 Sep 13 10:34 ctr -> k3s

After changing file permission in /var/lib/rancher/k3s/data/current/bin, it is able to start.
 sudo chmod ugo+rx -R /var/lib/rancher/k3s/data/current/bin

Something prevented the extract process from completing successfully. This has nothing to do with airgap, the content in question is embedded in the k3s binary itself. Did you perhaps interrupt it while it was starting?

Something prevented the extract process from completing successfully. This has nothing to do with airgap, the content in question is embedded in the k3s binary itself. Did you perhaps interrupt the process while it was starting?

I tried in another set of VMs and no issue in installing the agent for v1.30.4+k3s1.


luci-proto-ipv6: add missing extendprefix option for DHCPv6 client

add missing extendprefix option for DHCPv6 client (see https://openwrt.org/docs/guide-user/network/ipv6/configuration#protocol_dhcpv6)
Allow the DHCPv6 client to accept /64 prefix via SLAAC and extend it on downstream interface (RFC 7278)
useful for ISPs that only distribute /64 IPv6 prefixes through SLAAC.

[x] This PR is not from my main or master branch :poop:, but a separate branch :white_check_mark:
[x] Each commit has a valid :black_nib: Signed-off-by<EMAIL_ADDRESS>row (via git commit --signoff)
[x] Each commit and PR title has a valid :memo: <package name>: title first line subject for packages
[x] Incremented :up: any PKG_VERSION in the Makefile
[x] Tested on: (architecture, openwrt version, browser) :white_check_mark:
[ ] ( Preferred ) Mention: @ the original code author for feedback
[ ] ( Preferred ) Screenshot or mp4 of changes:
[ ] ( Optional ) Closes: e.g. openwrt/luci#issue-number
[ ] ( Optional ) Depends on: e.g. openwrt/packages#pr-number in sister repo
[x] Description: (describe the changes proposed in this PR)

Seems OK.
Could extend and request be mutex? Seems a tad dissonant that a SLAAC option is under a DHCPv6 pane (not your fault, just it's a DHCPv6 option).

Just thinking about interactions and dependencies:
https://github.com/openwrt/openwrt/blob/a2f0cd35ac1d15e69f4897b35c049e175dd06825/package/network/ipv6/odhcp6c/files/dhcpv6.sh#L17
and
https://github.com/openwrt/openwrt/blob/a2f0cd35ac1d15e69f4897b35c049e175dd06825/package/network/ipv6/odhcp6c/files/dhcpv6.script#L92

Seems OK. Could extend and request be mutex? Seems a tad dissonant that a SLAAC option is under a DHCPv6 pane (not your fault, just it's a DHCPv6 option).

Seems OK. Could extend and request be mutex? Seems a tad dissonant that a SLAAC option is under a DHCPv6 pane (not your fault, just it's a DHCPv6 option).

I'm not sure...  extendprefix is to automatically add Prefix Delegation based on the address requested via SLAAC.
It's a different thing from DHCPv6 PD.

Just thinking about interactions and dependencies: https://github.com/openwrt/openwrt/blob/a2f0cd35ac1d15e69f4897b35c049e175dd06825/package/network/ipv6/odhcp6c/files/dhcpv6.sh#L17
and
https://github.com/openwrt/openwrt/blob/a2f0cd35ac1d15e69f4897b35c049e175dd06825/package/network/ipv6/odhcp6c/files/dhcpv6.script#L92

I think this is a conflict with the protocol name.
DHCPv6 client can actually support SLAAC only upstream.
Maybe it should be renamed to IPv6 Client XD

Just that this one implies that prefix should be set to 64.

https://github.com/openwrt/openwrt/blob/a2f0cd35ac1d15e69f4897b35c049e175dd06825/package/network/ipv6/odhcp6c/files/dhcpv6.script#L92

But it works for you with auto?

Just that this one implies that prefix should be set to 64.

https://github.com/openwrt/openwrt/blob/a2f0cd35ac1d15e69f4897b35c049e175dd06825/package/network/ipv6/odhcp6c/files/dhcpv6.script#L92

But it works for you with auto?

Request IPv6-prefix of length option doesn't affect extendprefix.
Since my ISP doesn't support DHCPv6 PD, any DHCPv6 request I make just gets a NO PREFIX AVAIL response from upstream.
So even if I set both Request IPv6-address and Request IPv6-prefix of length to disabled, everything still works fine.

Good.  Or Remove the po changes (I see nothing included from the pot file).

Good.  Or Remove the po changes (I see nothing included from the pot file).

done.

Merged - thanks @missing233


Plot Refactoring

closes #260
closes #258
pyCSEP Pull Request Checklist
Please check out the contributing guidelines for some tips
on making pull requests to pyCSEP.
Fixes issue #(please fill in or delete if not needed).
Type of change:
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Checklist:

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

rasterio is breaking the macos python 3.9 CI build for some reason. Need to fix

The refactoring is ready. All the tasks done for this refactoring are explicit in #260. Would be great if @mherrmann3, @bayonato89 and/or @Serra314 can also take a look. The main changes are:

Clearly defined the main and helper functions, as well as removed unused functions (need feedback that im not removing something used)
Harmonized function signatures (e.g., args/opt_args/kwargs):
2.1 All the plot functions now have identically named arguments
2.2 Removed the plot_args dictionary as argument, in favor of using direct keyword arguments (to be consistent with matplotlib and seaborn).
2.3. Cleaned all function signatures for only those arguments that are essential for a function. Fine-tuning args (e.g. title_fontsize) are now part of optional kwargs, and described in the docstrings.
2.4. The plots.py module has a DEFAULT_PLOT_ARGS dictionary (similarly to matplotlib.rcParams), that contains the default values for all plotting. Any arg/kwarg passed to a function, replaced the defaults. I opted by this simple solution, but if required, we can refactor in the future to a PlotConfig class, in the plotly style.
Added type hinting (e.g., plot_catalog(catalog: CSEPCatalog) ) for all the functions, so there is awareness of the argument type that a function requires.
Refactored all plot_{catalogforecast_test} (e.g., number_test, spatial_test, likelihood_test) onto one function, since the logic was identical. It now calls a helper function that retrieves the annotations and labels. The function name is plot_distribution_test. Please advice for a more precise name
Revamped plot_cumulative_number_versus_time and plot_magnitude_versus_time: They now use datetime for the x label, and the latter sizes the events by their magnitude (for the looks)
Added unit tests for all the plotting functions.
Basemaps now caches downloaded data, so it becomes 1000% quicker to plot multiple catalogs/forecasts. Also a geotiff file can be used as basemap, as long as it is in the same projection required.

This PR should go to a v1.0.0 candidate version, since its not backwards compatible.


Clarificaiton regarding completion response spec

Currently, completion for module attributes returns insertText with @ prefix removed.
ie. if the module have @default_value attribute. @defa<cursor> returns defult_value as insertText.
From the spec CompletionItem.insertText should be complete text including @?

I do see that insertText is deprecated: https://github.com/microsoft/language-server-protocol/blame/56e4fc292c121118ac520c8a19688c85066ed0bb/specification.md#L2946 because

The insertText is subject to interpretation by the client side.
* Some tools might not take the string literally. For example
* VS Code when code complete is requested in this example con<cursor position>
* and a completion item with an insertText of console is provided it
* will only insert sole. Therefore it is recommended to use textEdit instead
* since it avoids additional client side interpretation.

Unfortunately elixir-ls does not yet support textEdit.
This is the response that I'm seeing:
%{
  "id" => 15,
  "jsonrpc" => "2.0",
  "result" => %{
    "isIncomplete" => false,
    "items" => [
      %{
        "detail" => "module attribute",
        "filterText" => "default_value",
        "insertText" => "default_value",
        "insertTextFormat" => 2,
        "kind" => 6,
        "label" => "@default_value",
        "sortText" => "00000000"
      }
    ]
  }
}

Which appears to work as expected in the two lsp editors that I tested (emacs lsp-mode and vscode). What editor are you using?
(Closing this for now since it appears to be an editor issue, but raised #28 which should fix this issue)


Using Boostrap is Valid and green on load

I am using Bootstrap to bind green and red to my input.
:class="{ 'is-valid': true, 'is-invalid': errors.has('email')  }"
But my form is green when I load the page. So it looks like it is valid when it is pristine and empty.
How can I bind the green only when the input is valid?
I can't seem to bind pristine to any class and the valid condition is only rendered on load and overwritten by is-invalid rather than removing it from the dom, so it is always there and green. Vee-validate uses a psudo :focus element that adds the style on focus where bootstrap does not

Make sure you are using the latest version of vee-validate since old versions was setting the validity option by default and some frameworks were doing psudo :valid and :invalid styling, which is set to valid on load since it wasn't validated yet.

Thanks, I added some extra checking now which seems to be working
:class="{'is-valid': !fields.email.pristine && fields.email.valid, 'is-invalid': errors.has('email') }"

Glad it worked for you


PDS Cluster Monitoring Status Exception

Problem
While running a cluster of 3 PDS members and requesting the status of the cluster, exceptions occur on the PDS members:
com.daimler.sechub.pds.PDSJSONConverterException: Was not able to convert JSON string to class com.daimler.sechub.pds.monitoring.PDSClusterMember object
…
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "uuid" (class com.daimler.sechub.pds.job.PDSJob), not marked as ignorable (8 known properties: "started", "owner", "created", "ended", "result", "serverId", "state", "jsonConfiguration"])
  at [Source: (byte[])"{"hostname":"708ac9247372","ip":"<IP_ADDRESS>","port":8444,"heartBeatTimestamp":"2021-09-20T09:24:24.719885","executionState":{"queueMax":10,"jobsInQueue":1,"entries":[{"jobUUID":"4e1c67d8-21fc-4066-a39b-a8ac245b0d82","done":false,"canceled":false,"job":{"owner":"admin","serverId":"PRODUCT_CLUSTER","created":"2021-09-20T09:17:32.188512","started":"2021-09-20T09:22:07.725691","jsonConfiguration":"{\"sechubJobUUID\":\"b6196fb6-62e8-44f8-99f2-4a74daf2090d\",\"apiVersion\":\"1.0\",\"productId\":\"PDS_P"[truncated 98 bytes]; line: 1, column: 557] (through reference chain: com.daimler.sechub.pds.monitoring.PDSClusterMember["executionState"]->com.daimler.sechub.pds.execution.PDSExecutionStatus["entries"]->java.util.ArrayList[0]->com.daimler.sechub.pds.execution.PDSExecutionJobInQueueStatusEntry["job"]->com.daimler.sechub.pds.job.PDSJob["uuid"])

At first no exception occurs while requesting the monitoring_status using sechub-developertools/scripts/pds-api.sh monitoring_status and the cluster has three members:
{
  "jobs": {
    "CREATED": 3,
    "READY_TO_START": 0,
    "QUEUED": 0,
    "RUNNING": 1,
    "CANCEL_REQUESTED": 0,
    "CANCELED": 0,
    "FAILED": 0,
    "DONE": 8
  },
  "members": [
    {
      "hostname": "708ac9247372",
      "ip": "<IP_ADDRESS>",
      "port": 8444,
      "heartBeatTimestamp": "2021-09-20T09:17:24.449131",
      "executionState": {
        "queueMax": 10,
        "jobsInQueue": 0,
        "entries": []
      }
    },
    {
      "hostname": "708ac9247372",
      "ip": "<IP_ADDRESS>",
      "port": 8444,
      "heartBeatTimestamp": "2021-09-20T08:27:29.945557",
      "executionState": {
        "queueMax": 10,
        "jobsInQueue": 0,
        "entries": []
      }
    },
    {
      "hostname": "6b200213fce3",
      "ip": "<IP_ADDRESS>",
      "port": 8444,
      "heartBeatTimestamp": "2021-09-20T09:17:24.441473",
      "executionState": {
        "queueMax": 10,
        "jobsInQueue": 0,
        "entries": []
      }
    }
  ]
}

After a couple more requests of the monitoring_status, exceptions in the PDS cluster members are thrown. For example, first in member 2, afterwards member 3 and finally in member 1. Once exceptions occurred in all members, only one member will be shown in the monitoring status:
{
  "jobs": {
    "CREATED": 1,
    "READY_TO_START": 0,
    "QUEUED": 0,
    "RUNNING": 3,
    "CANCEL_REQUESTED": 0,
    "CANCELED": 0,
    "FAILED": 0,
    "DONE": 12
  },
  "members": [
    {
      "hostname": "708ac9247372",
      "ip": "<IP_ADDRESS>",
      "port": 8444,
      "heartBeatTimestamp": "2021-09-20T08:27:29.945557",
      "executionState": {
        "queueMax": 10,
        "jobsInQueue": 0,
        "entries": []
      }
    }
  ]
}

This is the same as #804 - with some additional information.

The problem seems to be that there comes no more an heartbeat when a PDS Job was inside the queue and the deserialization problem from #804 happens...
So even when #804 happens the heartbeat must still work!


NonSend resources off the main thread

What problem does this solve or what need does it fill?
NonSend resources cannot be sent across threads, but our requirement is currently significantly stricter: systems that contain even one NonSend resource always run on the main thread.
This creates minor inefficiencies when working in a single world context, but causes much more serious problems in the context of multiple worlds.
If we are running two schedules in parallel, and each contains a system that operates on a distinct NonSend resource, under the current model, we must couple the two schedules to ensure that the main thread is free, even though no other coordination is required.
This limitation also blocks the ability to use more complex strategies for thread management, such as a dedicated input-polling thread.
What solution would you like?
Relax the limitation that NonSend resources must always be accessed on the main thread to the limitation that they are always accessed on the same thread.
In order to assign threads properly, we must evaluate the Schedule as a whole. As systems must run in exactly one thread, NonSend resources that are accessed in the same system must belong to the same thread.
This creates a particular challenge when it comes to exclusive systems, which access the contents of the entire World.
Option 1: Remove NonSend resources from the World
If NonSend resources are not part of the World, then exclusive systems must request them explicitly.
This avoids spurious conflicts, and allows us to find a thread-assignment that meets the constraints of the schedule.
However, this causes some serious limitations:

Systems which must operate on all NonSend resources associated with a World become dramatically harder to write and probably need to get moved into the runner. These should be extremely rare (perhaps restricted to editor-style inspection), but this is a noticeable ergonomics loss.
Scheduling access to NonSend resources that are accessed by more than one World requires coordination.
If and when we have the ability to dynamically add systems to the schedule (#279), this strategy can result in users attempting to add systems that access two NonSend resources that are already assigned to different threads. The only possible solution is to error upon system insertion, which is frustrating at best.

Users could annotate systems with manual thread assignments (or hints) to work around this, but this is tedious and requires a very global view of both current and future schedule state. It is also rather unclear how this would work with respect to systems that have variable numbers of threads.
Note that this would resolve the problem fixed by #3519's turtles.
Option 2: Assign each World its own thread
This solution is straightforward, and allows zero-coordination execution of schedules on different worlds.
Furthermore, (assuming that schedules are bound to specific worlds) new systems will always be able to be added.
However:

it blocks optimizations for scheduling systems involving NonSend resources within the same World
not all threads are created equal: some OS processes must be created on the main thread, or some NonSend resources may have to be initialized in the runner

as a result, we must have two tiers of World: ones which are associated with the main thread (and thus must contend for access), and ones which are not (and can never access hypothetical MainThread resources)

Systems which must operate on all NonSend resources associated with a World become dramatically harder to write and probably need to get moved into . These should be extremely

I think there is a typo here

Relax the limitation that NonSend resources must always be accessed on the main thread to the limitation that they are always accessed on the same thread.

How does this interact with things like winit, which requires some functions be run on the main thread (or maybe just the thread the event loop is on?). We might need an additional parameter for resources that rely on NonSend being on the main thread. See #4027.

We might need an additional parameter for resources that rely on NonSend being on the main thread. See https://github.com/bevyengine/bevy/pull/4027.

Agreed. I think that there's fundamentally an important distinction between "main thread" and "fixed thread" that we need to tease apart.

#6534 technically adds support for NonSend resources from non-main threads, instead individually tracking where they were inserted from. However, the multithreaded scheduler currently does not support scheduling systems using these resources to anything other than the thread where the scope is running.
Moreover, in a previous discussion (see https://discord.com/channels/691052431525675048/692572690833473578/1047997793375096852 and #6552), looks like the general consensus is to move away from storing NonSends inside World. We may need to rethink how our strategy for this.


Image Picker always go to response.didCancel in Android < 5

Description
I'm using the library in my project, is working great in iOS and also in Android > 5, when i try to use the library in a Android version lower than 5 the response is always bringing response.didCancel = true, even if you press on chooseFromLibraryButton or takePhotoButton, so it never bring the data with the image.
How to repeat issue and example
ImagePicker.showImagePicker(options, (response) => {
      console.log('Response = ', response);

      if (response.didCancel) {
          // Always enter here
        console.log('User cancelled photo picker');
      }
      else if (response.error) {
        console.log('ImagePicker Error: ', response.error);
      }
      else if (response.customButton) {
        console.log('User tapped custom button: ', response.customButton);
      }
      else {
        this.setState({ image : 'data:image/jpeg;base64,' + response.data });
        this.postImage(this.state.image);
      }
    });

Additional Information

React Native version: 0.41.2
Platform: Android
Development Operating System: MacOS

Same issue here. Can't find a fix for this.

Same issue here. Is a weird one.

Any luck figuring this out? I'm getting it on Android 5.1.1, only when I do not have a default photo application set. If I do have a default photo application already set, then it works fine.

In my case was an issue with the "launchMode" that is on the Android Manifest, that was causing that the activity in charge of selecting the pictures wasn't working. I fixed changing the launchMode to this:
android:launchMode="singleTop"
And with that it works.


[Feature] UI add Top-N metric click query entity info

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
UI add Top-N metric click query entity info
Use case

Related issues
https://github.com/apache/skywalking-rocketbot-ui/issues/568
No response
Are you willing to submit a PR?

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

Code of Conduct

[X] I agree to follow this project's Code of Conduct

A new UI is replacing the rocketbot UI


#141 Take monitored status into account for Missing Available Movies

Fix for #141 (re-opened to point to develop)

@mikeporterdev I did some long overdue commit cleanup. Please create a new pr :) (you will need to pull fresh)


[WIP] Clean booking rspec

Fixes #20.
Changed the quantity validation.
Checked with rspec, but the test name and implementation may be lacking.

There's an issue with the counting, working on it

The quantity validation now correctly bases itself on the total quantity of reserved item, instead of the total number of bookings

I added the ability for curr to jump to the next start_time, instead of incrementing in 30 minutes


missing componentFromStream helper

The componentFromStream helper is the main reason I use recompose, and I noticed it was absent here.

Hi @DanielFGray
Thanks for your request. I'll have a look at this new feature asap. If you have some spare time you could also create a PR 😄

I've started with the implementation. You can follow the progress here => https://github.com/zanettin/incompose/tree/feature/observables.
Do you have any test scenarios where you can verify the functionality of the code?

Hi @DanielFGray
Can you provide me a tiny snippet / gist on which I can test the implementation against?
Thx

This is what I would do with react+recompose
import React from 'react'
import {
  componentFromStream,
  createEventHandler,
  setObservableConfig,
} from 'recompose'
import { Observable } from 'rxjs'

setObservableConfig({
  fromESObservable: Observable.from,
})

const ControlledInputAndRequest = componentFromStream(props$ => {
  const startWith = 'foo'
  const { handler: textChange, stream: textChange$ } = createEventHandler()
  const search$ = textChange$
    .map(e => e.target.value)
    .startWith(startWith)

  const users$ = Observable.timer(1, 3000)
    .flatMap(() => fetch('https://randomuser.me/api'))
    .concatMap(x => x.json())
    .map(x => x.results)

  return Observable.combineLatest([props$, users$, search$])
    .map(([props, users, search]) => (

          <input
            placeholder="Search..."
            defaultValue={startWith}
            onChange={textChange}
            value={search}
          />
          {' '}
          {search}

          {JSON.stringify(users, null, 2)}

    ))
})

const Example = () => (
  <ControlledInputAndRequest style={{ background: '#ccc', padding: '10px' }} />
)

export default Example

Hi @DanielFGray
I've tested your code against v.1.1.0 which I've just released. Worked good for me 👍


HIVE-24051 : Hive lineage information exposed in ExecuteWithHookContext

The lineage information is not populated unless certain hooks are enabled.
However, this is a bit fragile, and no way for another hook that we write to get this information. This proposes a flag to enable this instead.

Shoot sorry can you open this again when you have the chance?  I still seem not to have permissions.

Oops. I forgot about this. Already approved. I'll merge it once the CI finishes.

Merged to trunk. Thanks @szehon-ho !

Thanks a lot @sunchao !


Correctly detect devices, which went offline during HA restart

Description:
Related issue: fixes #18698
This fix addresses the following scenario:

Device is online (home)
Stop Home Assistant
Power off device
Start Home Assistant
Home Assistant thinks that the device is home forever

So, what happens?

Device object is created with state = not home and last seen = None.
async_added_to_hass loads the previous state of the entity and updates state = home.  last_seen is still None.
Sooner or later async_update_stale correctly detects that the device is stale and triggers async_update_ha_state.
It calls async_update and we expect that the following code will run:    elif self.stale():
        self.mark_stale()

Nope.  Nothing happens because:    if not self.last_seen:
        return

The cause of the problem is a situation when state = home and last seen = None: a device was never seen, but is treated online.
The idea of the fix is to set some last_seen when we loaded the previous state and it's home.  That allows to correctly handle the scenario above and shouldn't break any other scenarios.
Example entry for configuration.yaml:
device_tracker:
  - platform: ping
    consider_home: 120
    hosts:
      slinex: <IP_ADDRESS>

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

IMHO the sensor-type devices should not restore the previous state.
Would not it be a more appropriate behavior for the device to be detected again independently of the previous state? Why set a fake date with previous state better than detect state again?
I do not know the internal behavior of device_tracker but I thinkit is the behavior that should be followed for those devices that can update the status periodically.

I have seen that restore state is a old PR (PR #6150).
I'm sure it's not something you want to modify now.
Maybe last_seen attribute can be saved too and restored like the others attributes
        for attr, var in (
                (ATTR_SOURCE_TYPE, 'source_type'),
                (ATTR_GPS_ACCURACY, 'gps_accuracy'),
                (ATTR_BATTERY, 'battery'),
        ):
            if attr in state.attributes:
                setattr(self, var, state.attributes[attr])

So, should we put all devices into not home state for up to a minute after HA restart (and to trigger a dozen of monitoring alerts in my case)?
I'm ok if we would have a state that means state detection is pending, be patient, but for device_tracker we have only home/not home (and I don't think any other platform has something like that).
Personally, I'm fine to read all previous states (in most cases nothing changes) and give HA another minute to update them.
Does it make sense?

Maybe last_seen attribute can be saved too and restored like the others attributes

What if HA was stopped at least for several minutes?  Then all restored last seen values will be outdated and all devices will be marked as not home immediately.

...for device_tracker we have only home/not home ...

I see your point.
I thought that maybe the state was not initialized until having a reading, but I have seen at code that (as you say) it is initialized in the not home state, with all the problems it entails.

What if HA was stopped at least for several minutes? Then all restored last seen values will be outdated and all devices will be marked as not home immediately.

But in the opposite case, your proposal would also be a good solution. For example, a device goes to not home during a ^several minutes restart. Can the fake date cause an unexpected behavior?
I hope you do not misunderstand me, I do not know this type of device or its implementation. Also I do not doubt the proposed solution. But it is something that I have raised myself in other situations (RFLink sensors) and I'm glad to see your point of view about it.

With my fake date fix we have the following situation after HA restart:

We assume that all devices, which were home before the restart are still home and we have just seen all of them (my fake last seen value).
In a minute:

If there was no seen event, the device is marked as not home (and fake date here helps to avoid if not self.last_seen early exit).
If there was a seen event, last seen is updated with a real date and the device remains home.

We assume that all devices, which were not home before the restart are still not home and we have never seen any of them (I didn't change anything here).
In a minute:

If there was no seen event, the device remains not home and last seen remains None.
If there was a seen event, last seen is updated with a real date and the device becomes home.

No, your questions are fine :)
Thanks!

Now I think I can see the full picture.

Restore states prevents from undesired trigger events (default state not home)
Fake date also prevents from undesired trigger events if too much time passes ((now or dt_util.utcnow()) - self.last_seen > self.consider_home)
If in the middle of restarting a device changes its state, next update (at SCAN_INTERVAL) triggers events and changes states to the real one

Thank you for your patience and understanding.

Yes, I see it the same way.
Thanks!

The solution is like you say before, restore last_seen.
The magic is my code on:
https://github.com/home-assistant/home-assistant/blob/cee8abb8266b26a9cfd17597a92a1dfcbee9869d/homeassistant/components/device_tracker/__init__.py#L388-L405
Only device they are not available during setup will be restored.

Should this fix #19998 too? It's a similar issue, just other platform.
Maybe it's worth it to tag for the next 0.88 release?
Will try out if this fixes my issue as well.

Unfortunately this makes device_tracker disregard consider_home so devices are set not_home when they should actually still be considered home. I'd suggest reverting this PR until there is a better solution which doesn't break existing integrations.
https://github.com/home-assistant/home-assistant/issues/22387

Further discussion is directed to the issue linked above.


[BUG] Parent category does not change when category is updated in OMAS Subject-Area

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
in Request
"parentCategory" : {
"type" : "Category",
"guid" : "184644cc-c4ff-4470-a690-0ecdb10f1300"
}
Return in Response
"parentCategory" : {
"type" : "Category",
"name" : "XQ2EG7DNE0",
"qualifiedName" : "LCSN56U4CW@a50931a1-a68a-40a9-bc24-578c9b09906f",
"guid" : "f078ff61-5df9-4083-9bcf-5bc2feb16a40",
"relationshipguid" : "2ba92e6f-910b-4672-b1a8-773c114ccf6f"
}
}
Expected Behavior
Return ParentCategory must equals Request ParentCategory
Steps To Reproduce
PUT https://<IP_ADDRESS>:9443/servers/xxx/open-metadata/access-services/subject-area/users/test/categories/209e75c1-2dca-4768-87ec-0ade461ad98b?isReplace=false
{
"class" : "Category",
"nodeType" : "Category",
"name" : "Топовый раздел",
"readOnly" : false,
"description" : "Самое лучшее описание раздела",
"classifications" : [ ],
"glossary" : {
"type" : "Glossary",
"guid" : "634cf473-e420-4786-bd01-7127ceca06f5"
},
"parentCategory" : {
"type" : "Category",
"guid" : "184644cc-c4ff-4470-a690-0ecdb10f1300"
}
}
200 OK
{
"class" : "SubjectAreaOMASAPIResponse",
"relatedHTTPCode" : 200,
"result" : [ {
"class" : "Category",
"nodeType" : "Category",
"name" : "Топовый раздел",
"qualifiedName" : "Топовый раздел@e033f334-a94f-4358-a050-0fd53fe22b70",
"systemAttributes" : {
"status" : "ACTIVE",
"createdBy" : "test",
"createTime" :<PHONE_NUMBER>155,
"version" : 1,
"guid" : "209e75c1-2dca-4768-87ec-0ade461ad98b"
},
"readOnly" : false,
"description" : "Самое лучшее описание раздела",
"classifications" : [ ],
"glossary" : {
"type" : "Glossary",
"name" : "R-o-o-t 1G2l3o4s5s6a7r8y9",
"qualifiedName" : "R-o-o-t 1G2l3o4s5s6a7r8y9@81db59ff-eed7-4a18-9d76-dd011543cdb2",
"guid" : "634cf473-e420-4786-bd01-7127ceca06f5",
"relationshipguid" : "72e3e961-329a-4c09-b1f6-487de0cc79d2"
},
"parentCategory" : {
"type" : "Category",
"name" : "XQ2EG7DNE0",
"qualifiedName" : "LCSN56U4CW@a50931a1-a68a-40a9-bc24-578c9b09906f",
"guid" : "f078ff61-5df9-4083-9bcf-5bc2feb16a40",
"relationshipguid" : "2ba92e6f-910b-4672-b1a8-773c114ccf6f"
}
} ]
}
Environment
- Egeria: 3.0 in 3.2 too promblem
- OS: Centos
- Java: 11

Any Further Information?
No response

Is there any movement on the issue?

@Inventoroz I have just had a quick look. The code only update the category bean content - it does not update the parent category or parent glossary. Those fields were intended mostly for gets.
I can see that the API as documented does not indicate that this is the way it works.
we have 2 options :
1- document this is working as designed.
2- fix change the code for Category Update take into account changes to the glossary or category parent and Term update takes into account update the term glossary.
I am going to look today at option 2.

@davidradl, I think it's better to do it according to option 2. This will be similar to the situation when we update the parent for the term

@Inventoroz  Agreed - I am thinking that if the existing category has a parent and the update request a null parent with isReplace=true - then I should remove the parent. is= false I would not remove the parent in this case.

@Inventoroz I have a draft fix in the associated pr . It fails on one of the junits at the moment. If you want to review it and feedback - feel free.


Make memoryviews with aliased types comformable

Tentative fix for https://github.com/cython/cython/issues/5373

The one thing we should be careful of - extern typedefs are often wrong (because we don't know the real type so we just use a "close enough" integer type). I'm not sure what will happen in that case, but hopefully it will give a runtime error

The fix seems reasonable. If users lie to Cython, they're on their own regarding the code that Cython generates for them. There is a certain chance that developers don't notice issues on their side (e.g. because long is different on Linux and Windows), but they'll still notice it (or get notified by their users) at some point.
We apply the right runtime checks when unpacking the buffer, so nothing can really go bad in the end. The extern typedefs might be somewhat inexact, but they usually turn into the exactly right thing at C compile time, so the runtime behaviour will usually be safe.

Yes, I'm in favour of the change - was just pointing out something that'd ideally be treated

I think that here we should also add Test testing this PR...

Right, there are a couple of ctypedef tests in tests/memoryview/memoryview.pyx already. Let's add one there.

there are a couple of ctypedef tests in tests/memoryview/memoryview.pyx already. Let's add one there.

@metab0t, could you add a test? Would be nice to have this PR included for the next beta release.

Sure. Could you give some guidance or example for adding new tests?
I am curious about :

The location to put tests
The style of writing new test
How to run the added test (instead of the whole test set)

The location to put tests

The tests related to memoryviews are located in /tests/memoryview directory

The style of writing new test
The tests are executed as doctest. See e.g. this as example: https://github.com/cython/cython/blob/master/tests/memoryview/transpose_refcount.pyx

How to run the added test (instead of the whole test set)

Tests are run via runtests.py script. Script accepts regular expression of filename to be executed (hint: don't run it over whole test suite because it takes a lot of time.).
e.g. transpose_refcount.pyx can be executed as follows:
$ python runtests.py '.*transpose_refcount.*'
Python 3.9.16 (main, Dec  7 2022, 10:15:43)
[Clang 14.0.0 (clang-14<IP_ADDRESS>)]

Running tests against Cython 3.0.0b2 99f857f3d94e90a5e4517c8ff4aead0b97303243
Using Cython language level 2.
Test dependency found: 'numpy' version 1.23.5
Test dependency not found: 'pythran'
Test dependency found: 'setuptools.sandbox' version 59.8.0
Test dependency found: 'asyncio' version 3.9.16
Test dependency found: 'pstats' version 3.9.16
Test dependency found: 'posix' version 3.9.16
Test dependency found: 'array' version 3.9.16
Test dependency not found: 'Cython.Coverage'
Test dependency not found: 'Cython.Coverage'
Test dependency found: 'IPython.testing.globalipapp' version 7.30.1
Test dependency not found: 'jedi_BROKEN_AND_DISABLED'
Test dependency not found: 'test.support'
Backends: c,cpp

#### 2023-04-14 17:10:46.877218
Compiler output for module transpose_refcount:
transpose_refcount.c:5677:28: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
  if (((__pyx_v_c_mode[0]) == 'f')) {
       ~~~~~~~~~~~~~~~~~~~~^~~~~~
transpose_refcount.c:5677:28: note: remove extraneous parentheses around the comparison to silence this warning
  if (((__pyx_v_c_mode[0]) == 'f')) {
      ~                    ^     ~
transpose_refcount.c:5677:28: note: use '=' to turn this equality comparison into an assignment
  if (((__pyx_v_c_mode[0]) == 'f')) {
                           ^~
                           =
1 warning generated.

Compiler output for module transpose_refcount:
transpose_refcount.cpp:5692:28: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
  if (((__pyx_v_c_mode[0]) == 'f')) {
       ~~~~~~~~~~~~~~~~~~~~^~~~~~
transpose_refcount.cpp:5692:28: note: remove extraneous parentheses around the comparison to silence this warning
  if (((__pyx_v_c_mode[0]) == 'f')) {
      ~                    ^     ~
transpose_refcount.cpp:5692:28: note: use '=' to turn this equality comparison into an assignment
  if (((__pyx_v_c_mode[0]) == 'f')) {
                           ^~
                           =
1 warning generated.

----------------------------------------------------------------------
Ran 4 tests in 10.919s

OK
Most expensive pipeline stages: 'AnalyseDeclarationsTransform': 1.16 / 22 (0.053 / run), 'inject_utility_code_stage': 1.13 / 3 (0.377 / run), 'generate_pyx_code_stage': 0.47 / 3 (0.157 / run), 'AnalyseExpressionsTransform': 0.12 / 12 (0.010 / run), 'parse': 0.09 / 10 (0.009 / run), 'RemoveUnreachableCode': 0.08 / 34 (0.002 / run), 'ControlFlowAnalysis': 0.07 / 12 (0.006 / run), 'MarkClosureVisitor': 0.06 / 22 (0.003 / run), 'PostParse': 0.06 / 22 (0.003 / run), 'InterpretCompilerDirectives': 0.05 / 22 (0.002 / run)
Times:
compile-cpp :     3.92 sec  (   1,  3.925 / run) - slowest: 'cpp:transpose_refcount' (3.92s)
compile-c   :     3.78 sec  (   1,  3.783 / run) - slowest: 'c:transpose_refcount' (3.78s)
cython      :     2.24 sec  (   2,  1.120 / run) - slowest: 'cpp:transpose_refcount' (1.12s), 'c:transpose_refcount' (1.12s)
import      :     0.73 sec  (   2,  0.366 / run) - slowest: 'c:transpose_refcount' (0.54s), 'cpp:transpose_refcount' (0.19s)
run         :     0.08 sec  (   2,  0.040 / run) - slowest: 'c:transpose_refcount' (0.08s), 'cpp:transpose_refcount' (0.00s)
ALL DONE

@matusvalo I add a short test to existing assignment test of memoryviews.

Just add the test to the test file that I mentioned above. No need to add a new file for this.

@scoder Is the added test OK?


Make PRNG be thread-local

Addresses #9 & #13.
It appears that BORDEAUX-THREADS supports all Lisps which IRONCLAD is
tested under, and so depending on it shouldn't hurt.
Notably, this does not use locking.

Thanks, this seems to work well (I've tested SBCL, CCL and ECL).


Move from 2 checkboxes to one pulldown

Fix #1365

Filing as draft; want to exercise it before review.

Trying a fake run with the new options: https://github.com/opendp/opendp/actions/runs/8334264668 -- fails

Do we know that fake builds are working on main?

Trying a dry-run: https://github.com/opendp/opendp/actions/runs/8334328445 -- expecting failure because testpypi has already had a version pushed.

I think this is at least worth a review now, to decide what the next steps should be.

@mccalluc note : You can't do multiple dry-runs and have then succeed b/c something already pushed to Test PyPI.

nightly sync v123 dry-run: https://github.com/opendp/opendp/actions/runs/8363872592

Rust test failure:
---- accuracy::tail_bounds::test::test_empirical_integrate_discrete_gaussian_tail_fixed stdout ----
Discrete Gaussian significance levels/alpha
Theoretical (upper): 0.0013498987536877394
Theoretical (avg):   0.0011393741550945382
Empirical:           0.00152

Saw this earlier today, and re-running test fixed it, but should investigate.


Fixes issues with database names needing backticks (`)

Quotes database names with backticks (`) to prevent "PHP Fatal error:  Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;" for names containing characters like '-'.

Superseded by:
fix(SQL): Escape Database Names
#92 opened on May 19, 2019 by janfa • Review required


chore: package version bump

/no-platform
bumping the package json version to sync the future releases.

We have one going here already 😉: https://github.com/Betterment/test_track_js_client/pull/64/files


Fix #18611: Add note about isAcquired() behavior to Mutex

Q
A

Is bugfix?
❌

New feature?
❌

Breaks BC?
❌

Tests pass?
✔

Fixed issues
#18611

I'm not sure if this fixing the problem but it helps.


Unable to add the Google Home integration

Trying to add the custom integration by following the instructions for manual installation on the following system:

version
core-2021.12.6

installation_type
Home Assistant OS

dev
false

hassio
true

docker
true

user
root

virtualenv
false

python_version
3.9.7

os_name
Linux

os_version
5.10.63-v8

arch
aarch64

timezone
Europe/Stockholm

Home Assistant Supervisor

host_os
Home Assistant OS 7.0

update_channel
stable

supervisor_version
supervisor-2021.12.2

docker_version
20.10.9

disk_total
29.0 GB

disk_used
3.2 GB

healthy
true

supported
true

board
rpi3-64

supervisor_api
ok

version_api
ok

installed_addons
Duck DNS (1.14.0), File editor (5.3.3), NGINX Home Assistant SSL proxy (3.1.0), Spotify Connect (0.10.0), Terminal & SSH (9.2.2)

But when trying to add the Google Home integration, nothing shows up. Restarted the system without any success. Is there something that is needed to enable the custom components?

After copying the google_home content to the customer_components folder and restarting the home assistant the Google Home was now available.