Set-Content duplication with array of directories

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
Set-Content will duplicate content, when passed a wildcard directory containing shortcuts to folders

Create a folder
Create a shortcut to the folder
create an ini file
Pass Set-Content a wildcard and the parent directory containing the above folders

See $scoopInstall below

ini file being written to
[Settings]
gtk-application-prefer-dark-theme=false

Powershell script (outline)
See the project linked below for full context, however this captures the bug.
# Will contain both folders above even though they are the same.
$scoopInstall = "$env:USERPROFILE\scoop\apps\deluge\*\"

$currentSettingsPath = ($scoopInstall + "settings.ini")

$regex = '^\s*gtk-application-prefer-dark-theme\s*=\s*(true|false)\s*$'
$newValue = 'gtk-application-prefer-dark-theme=true'

$null = (Get-Content $currentSettingsPath) -replace $regex, $newValue | Set-Content -Path $currentSettingsPath -Force

A project I encountered this issue with
Link
Expected behavior
Ini file will only update that one line, instead of being written to by both entries (the shortcut folder containing this file and the real folder). So $scoopInstall should only contain the "real" folder.
[Settings]
gtk-application-prefer-dark-theme=false

Actual behavior
When using the * instead of the path to the folder, this is because of the shortcut folder being included in $scoopInstall
# Bug occures with this, as it collects the shortcut too.
"$env:USERPROFILE\scoop\apps\deluge\*\"

# Doesnt occur when used like this
"$env:USERPROFILE\scoop\apps\deluge\2.1.1\"

This is what happens when the wildcard is used, and the shortcut to the folder is included. All of the content inside of the ini file would be duplicated.
[Settings]
gtk-application-prefer-dark-theme=false
[Settings]
gtk-application-prefer-dark-theme=true

Error details
I feel the shortcut folder shouldnt be included since they are in the same parent directory. This is my first bug report, sorry if anything is incorrect.
Environment data

Deluge installed through scoop on Windows

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

The term shortcut [file] usually applies to a Windows-only.lnk file, which PowerShell cannot read directly.
Are you talking about a symbolic link instead?

The term shortcut [file] usually refers to a Windows-only.lnk file, which PowerShell cannot read directly.
Are you talking about a symbolic link instead?

I think so, ill double check later. If symbolic links are shown in file explorer than yes, however either way...

Assuming symlinks (symbolic links):

It is defensible that Get-Content targets all its input paths, even if, among them, some happen to refer to each other, via symlinks.

By contrast - and this is a moot point here - it is problematic that Set-Content allows wildcard-based output paths to write to (potentially) multiple output files (which in the case at hand apparently target the same output file, one directly, the other via a symlink):

See #6729

Assuming symlinks (symbolic links):

It is defensible that Get-Content targets all its input paths, even if, among them, some happen to refer to each other, via symlinks.

By contrast - and this is a moot point here - it is problematic that Set-Content allows wildcard-based output paths to write to (potentially) multiple output files (which in the case at hand apparently target the same output file, one directly, the other via a symlink):

See Set-Content should not allow writing to multiple files using wildcards #6729

Hmm, so the file content duplicating is a feature?

It's not a file-content duplication feature.
It is about Get-Content honoring all its input paths, whether or not they happen to point to the same file via symlinks (which isn't typical).

If you expect your $currentSettingsPath wildcard to only ever to match one file of interest (with any additional matches presumed to be symlinks to that file), simply limit your processing to that one file:
$targetFile = Get-Item $currentSettingsPath | Select-Object -First 1
(Get-Content -LiteralPath $targetFile) -replace $regex, $newValue | Set-Content -LiteralPath $targetFile

It's not a file-content duplication feature.
It is about Get-Content honoring all its input paths, whether or not they happen to point to the same file via symlinks (which isn't typical).

Regardless why would Get-Content include folders and symlinks that are in the same folder, the symlink should be ignored.

If you expect your $currentSettingsPath wildcard to only ever to match one file of interest (with any additional matches presumed to be symlinks to that file), simply limit your processing to that one file:
$targetFile = Get-Item $currentSettingsPath | Select-Object -First 1
(Get-Content -LiteralPath $targetFile) -replace $regex, $newValue | Set-Content -LiteralPath $targetFile

I solved it by just using the name of the symlink itself. Wanted to post this issue because this behaviour should be changed. And as content for other people who might have the same issue. Thanks for helping me understand this and your workaround for now!

I think Get-Content doesn't analyze whether a file is a symbolic link or not.
$ "12345" | Set-Content file.txt
$ ln -sr file.txt file-symlink.txt
$ dir file*

    Directory: ~/Desktop

UnixMode     Num   UID   GID      LastWriteTime    Size Name
--------     ---   ---   ---      -------------    ---- ----
lrwxrwxrwx   644  1000  1000   26.12.2023 13:01       8 file-symlink.txt -> file.txt
-rw-r--r--   644  1000  1000   26.12.2023 13:00       6 file.txt

$ Get-Content file*
12345
12345

doesn't analyze whether a file is a symbolic link or not.

Indeed, @237dmitry, and I don't think it should: it isn't the mandate of wildcard pathname resolution (globbing)  to treat matches that happen to be symlinks differently, or to weed out duplicates.
POSIX-compatible shells such as Bash don't do that either.
Symlinks only get special treatment during deletion (removing a symlink only removes the link itself, not its target) and in the context of recursive enumeration of a directory tree (following directory symlinks requires opt-in via -FollowSymlink)
@tadghh, I'm glad we have a shared understanding now, but as for a potential change in behavior:
Given the above, I don't think the symlink should be ignored.
The very purpose of a symlink such as in your case (I'm assuming that it has an abstract name such as latest) is to not require use of wildcards in the first place.
(On a general note: I'm just a fellow user.)


AKS - The default kubelet identity is user-assigned, not system-assigned

We were testing an AKS migration from a Service Principal to Managed Identities. We ran the command:
az aks update \
    --resource-group my-cluster-rg \
    --name my-cluster \
    --enable-managed-identity

Since we did not specify the kubelet identity, we expected two system-assigned managed identities to be created, one for the control plane and one for the nodes (kubelet) as mentioned here

However, a user-assigned Managed identity was created in the cluster's managed resource group with the name my-cluster-agentpool.
Upon checking the cluster's JSON view, we confirmed it was indeed using a user-assigned Managed Identity
"identityProfile": {
            "kubeletidentity": {
                "resourceId": "/subscriptions/my-subscription/resourcegroups/my-cluster-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-cluster-agentpool",
                "clientId": "redacted",
                "objectId": "redacted"
            }
        },

We also checked the VMSS and saw the mentioned identity is indeed attached as a user-assigned identity and there are no system-assigned identities in-use by the VMSS.
Since we have never created a new cluster using Azure CLI, we don't know if this behavior is the same on a new cluster. But we can confirm that clusters created using the terraform azurerm provider follow the same behavior we described.

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

ID: 6a9c74a8-9f1a-3d3d-3aed-f8ec45f92e05
Version Independent ID: 01e98043-dc80-490e-a761-8d558ff4e6df
Content: Use a managed identity in Azure Kubernetes Service (AKS) - Azure Kubernetes Service
Content Source: articles/aks/use-managed-identity.md
Service: azure-kubernetes-service
GitHub Login: @MGoedtel
Microsoft Alias: magoedte

@FelipeEmerim
Thanks for your feedback! We will investigate and update as appropriate.

@FelipeEmerim
It's normal for the az aks update command with the --enable-managed-identity flag to create a user-assigned managed identity for the AKS agent pool. The agent pool is responsible for running the Kubernetes nodes in your cluster, and it requires an identity to interact with other Azure services, such as Azure Monitor.
When you enable managed identities for AKS, you can choose between using system-assigned identities, user-assigned identities, or a combination of both. If you don't specify a kubelet identity during cluster creation or update, AKS creates a user-assigned identity for the agent pool by default. This is documented here.
In your case, the az aks update command created a user-assigned managed identity named my-cluster-agentpool in the cluster's managed resource group. This identity is then attached to the VMSS instances in the agent pool to enable them to interact with other Azure services.
It's worth noting that the behavior of creating a user-assigned managed identity for the agent pool is the same for both Azure CLI and Terraform. This is a feature of AKS and not specific to the tool used to create or manage the cluster.
I hope this helps clarify things! Let me know if you have any further questions.

I appreciate the response!
I understand that the command will create a user-assigned kubelet identity. The issue here is that the documentation explicitly says otherwise. This a quote from the documentation linked in this issue:

AKS creates a system-assigned kubelet identity in the node resource group if you don't specify your own kubelet managed identity

https://learn.microsoft.com/en-us/azure/aks/use-managed-identity#enable-managed-identities-on-a-new-aks-cluster

@FelipeEmerim
I'm going to assign this to the document author so they can take a look at it accordingly.

@MGoedtel
Can you please check and add your comments on this doc update request as applicable.

Thanks for the feedback @FelipeEmerim.
For kubelet identity, it only has 'userassigned' type. If user doesn't specify it, aks will help to create a user-assigned kubelet identity.
For control plane identity, it has user-assigned and system-assigned types. For BYO control plane identity, it's user-assigned type; for non-BYO control plane identity, it's system-assigned.
The doc is a bit confusing and we will improve it later :)

Per discussion with @CocoWang-wql, this issue has been resolved. I will now close it. Thank you!
#please-close

This is all fine and pods running on any of our node pools are able to use the {clustername}-agentpool to authenticate against other azure resources. The problem comes when you enable Azure Policy as this will create a second managed identity called azurepolicy-{clustername}. Then if you try to authenticate in a pod you will get the following error message
{"error":"invalid_request","error_description":"Multiple user assigned identities exist, please specify the clientId / resourceId of the identity in the token request"}azure-cli-699
4fb869-mbrjn:/#
Is it possible to deploy Azure Policy and get it to use the {clustername}-agentpool managed identity?

Hi @atedsimple - I did some investigating and uncovered a way that you can configure a policy assignment to use a different user-assigned managed identity. I did a test and confirmed this works by following the steps here using PowerShell. I haven't looked to see if there is a supported CLI equivalent.
Hope that helps.

IMO this is very confusing
The documents suggest the system-managed identity is what will be used for authentication with Azure services, only for you to find out pods are using the agentpool user managed identity to perform authentication with Azure services. What's more confusing, it seems like the SAMI inherits all the roles you provide the agentpool.

Our cluster has multiple node pools so user assigned makes sense as you can share a common Auth across the whole cluster. Just don't know why you can't specify a default for situations where it's not specified which to use.

Our cluster has multiple node pools so user assigned makes sense as you can share a common Auth across the whole cluster. Just don't know why you can't specify a default for situations where it's not specified which to use.

The system assigned identity is already supposed to serve this function of a common authentication across the whole cluster regardless of node pool. AKS already supports having a system assigned identity. In practice, the pods continue to use the agentpool to authenticate, and not the system assigned managed identity.

If you enable system assigned, what it actually does is enable system assigned on each scale set for each node pool in the MC resource group. As this is the compute that runs the workloads, and would ultimately require access to other resources


sqlserver firewall settings

it would be nice to be able to set the 'Allow Azure services and resources to access this server' setting.

when using the following resource i cannot find a way to change the settings:
resource sqlServer_Firewall 'Microsoft.Sql/servers/firewallRules@2014-04-01' = {
  name: '${sqlServer.name}/AllowAllWindowsAzureIps'
  properties: {
    //TODO: Allow Azure services and resources to access this server
    startIpAddress: '<IP_ADDRESS>'
    endIpAddress: '<IP_ADDRESS>'
  }
}

I believe if you add rule with  <IP_ADDRESS> to both start and end will result in that setting being switch to yes.

nice, that seems to do the trick. i should have just used the samples as they are :)

Closing - looks like this got resolved. Thanks @slavizh


Add yocto build with tpm

Signed-off-by: Nabendu Maiti<EMAIL_ADDRESS>

This is tracked at https://github.com/secure-device-onboard/client-sdk-fidoiot/pull/111


Add dj-rest-auth

This PR:

Adds various endpoints to use the currently available auth/registering functions via the API
Adds JWT as an auth method (simpler to use in SPA - related to #3901)

TODO:

[x] test registering endpoint
[x] add social connect endpoints
[x] security review?
[ ] extend docs

Fixes #3978

Does this work with existing SSO solutions?

@SchrodingersGat that is still TODO

@SchrodingersGat do we want to continue supporting all social connection options with #3901 or should we cut down the options for the first version?

By "cut down" do you mean still supporting key ones (e.g. google / microsoft)?

@SchrodingersGat I think supporting the main ones (google, apple, microsoft, github, twitter, discord, keycloak, OIDC, saml) should be good enough for a start. There are a lot of providers by default.

@SchrodingersGat it took a bit but it seems like we can maintain support for almost all providers (all that support OAuth2).
Exceptions are:
Found handler that is not yet ready for platform UI: `bitbucket`
Found handler that is not yet ready for platform UI: `draugiem`
Found handler that is not yet ready for platform UI: `evernote`
Found handler that is not yet ready for platform UI: `500px`
Found handler that is not yet ready for platform UI: `flickr`
Found handler that is not yet ready for platform UI: `keycloak`
Found handler that is not yet ready for platform UI: `linkedin`
Found handler that is not yet ready for platform UI: `openid`
Found handler that is not yet ready for platform UI: `openstreetmap`
Found handler that is not yet ready for platform UI: `persona`
Found handler that is not yet ready for platform UI: `pocket`
Found handler that is not yet ready for platform UI: `steam`
Found handler that is not yet ready for platform UI: `telegram`
Found handler that is not yet ready for platform UI: `trello`
Found handler that is not yet ready for platform UI: `tumblr`
Found handler that is not yet ready for platform UI: `twitter`
Found handler that is not yet ready for platform UI: `vimeo`
Found handler that is not yet ready for platform UI: `xing`

I will work on adding support for Keycloak, OpenId and Twitter. Are you ok with waiting for FRs for the rest?

Ok, I have to revise that; there is a Twitter OAuth2 and OIDC  endpoint; I added keycloak so it should be good to go.
The only thing missing is an endpoint to get all available providers and a few small refactors.

I will work on adding support for Keycloak, OpenId and Twitter. Are you ok with waiting for FRs for the rest?

Absolutely - I don't think it makes sense to spend a bunch of effort for integrations that may never actually be used.

Does this replace our existing SSO login views completely?

No, it just exposes them in another way. Under the hood the same functional code is used.

Closes https://github.com/inventree/InvenTree/issues/3978

@matmair ready for merge?

@SchrodingersGat I got it to point where the settings do not need to change so no new docs needed.

Well, great! Thanks :)


New version: igoogolx.itun2socks version 1.0.1

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

Hi @igoogolx,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 855.)

Automatic Validation ended with:

Installation failed with exit code -1978335187
2024-02-29 03:10:29.873 [FAIL] Installer failed security check. Url: https://github.com/igoogolx/itun2socks/releases/download/v1.0.1/itun2socks_1.0.1_windows_amd64.zip Result: 0x80004005

(Automated response - build 855.)

@wingetbot run


[Bug]: No kubeconfig can be passed when running in a pod

What happened:
Unable to run Kuttl tests from a pod, to another Kubernetes cluster. The specific setup involves cluster A (CI cluster) and Cluster B (target Ci cluster). I expect to trigger tests from Cluster A, and trigger for cluster B. Even tho I sign in to cluster A, update kubeconfig A, tests trigger in Cluster A.
I have tried, according to documentation the following:

Use --kubeconfig flag in test commands, however this renders:

╰─ kubectl-kuttl --kubeconfig=/my/.kube/config
Error: unknown flag: --kubeconfig

And setting $KUBECONFIG environment variable.
What you expected to happen:
I expect to have my test executed in cluster B.
How to reproduce it (as minimally and precisely as possible):
Run any test from pod A using kubeconfig for cluster B.
Anything else we need to know?:
This has been already mentioned here in issues however I am unclear how this got solved since documentation instructions seem not to be working for me.
Environment:

Kubernetes version (use kubectl version): 1.29
KUTTL version (use kubectl kuttl version): KUTTL Version: version.Info{GitVersion:"0.18.0", GitCommit:"3cfbf0c", BuildDate:"2024-07-08T07:14:28Z", GoVersion:"go1.22.1", Compiler:"gc", Platform:"darwin/amd64"}
Cloud provider or hardware configuration: EKS
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

I'm pretty sure seeing $KUBECONFIG is enough to make this work, we do this all the time for https://gihub.com/stackrox/stackrox end2end tests 🤔
Can you please prepend env|sort; to your kuttl command, and post the results (after eliding any secrets). Maybe this will reveal something?
Otherwise, if you could come up with a minimal reproducer using e.g. a couple of kind clusters, that would be great.

I seem to recall that mistyping the path to the kubeconfig file might have such effect, the client lib behaves as if no kubeconfig was set, when running in a pod.

I just verified that kuttl does obey KUBECONFIG even when running in the cluster. Here is what I did:

copied a kubeconfig for a different cluster into a configmap: kubectl create configmap  kc --from-file=kubeconfig.txt=kubeconfig-ocp.txt
grant some permissions: kubectl create clusterrolebinding def-admin --clusterrole=cluster-admin --serviceaccount=default:default (not sure if this step is really necessary, perhaps I was confused in the early iterations of this procedure, but including it here for completeness just in case)
created a test suite CM: kubectl create configmap t1 --from-file=1-assert.yaml=1-assert.yaml

that file is:
apiVersion: v1
kind: ConfigMap
metadata:
  name: foo
data:
  foo: bar

ran kuttl with:

apiVersion: v1
kind: Pod
metadata:
  name: p
spec:
  containers:
  - name: k
    image: quay.io/mowsiany/kuttl:latest
    args:
    - /kubectl-kuttl
    - test
    - /tmp/test
    env:
    - name: KUBECONFIG
      value: /tmp/kc/kubeconfig.txt
    volumeMounts:
    - name: t1
      mountPath: /tmp/test/t1
    - name: kc
      mountPath: /tmp/kc
  volumes:
  - name: t1
    configMap:
      name: t1
  - name: kc
    configMap:
      name: kc

Watched the pod with kubectl logs --follow p
Output:
2024/09/03 10:36:58 running without a 'kuttl-test.yaml' configuration
2024/09/03 10:36:58 kutt-test config testdirs is overridden with args: [ /tmp/test ]
=== RUN   kuttl
    harness.go:464: starting setup
    harness.go:255: running tests using configured kubeconfig.
    harness.go:278: Successful connection to cluster at: https://api.mo-09-03-ocp.ocp.infra.rox.systems:6443
    harness.go:363: running tests
    harness.go:75: going to run test suite with timeout of 30 seconds for each step
    harness.go:375: testsuite: /tmp/test has 1 tests
=== RUN   kuttl/harness
=== RUN   kuttl/harness/t1
=== PAUSE kuttl/harness/t1
=== CONT  kuttl/harness/t1
    logger.go:42: 10:36:59 | t1 | Ignoring ..2024_09_03_10_36_57.3847788774 as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$
    logger.go:42: 10:36:59 | t1 | Ignoring ..data as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$
    logger.go:42: 10:36:59 | t1 | Creating namespace: kuttl-test-relaxing-osprey
    logger.go:42: 10:36:59 | t1/1- | starting test step 1-

then created the expected configmap on the other cluster with KUBECONFIG=kubeconfig-ocp.txt kubectl -n kuttl-test-relaxing-osprey apply -f 1-a.yaml
noticed test resume and complete OK:

    logger.go:42: 10:37:08 | t1/1- | test step completed 1-
    logger.go:42: 10:37:08 | t1 | t1 events from ns kuttl-test-relaxing-osprey:
    logger.go:42: 10:37:08 | t1 | Deleting namespace: kuttl-test-relaxing-osprey
=== NAME  kuttl
    harness.go:407: run tests finished
    harness.go:515: cleaning up
    harness.go:572: removing temp folder: ""
--- PASS: kuttl (16.57s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/t1 (15.76s)
PASS


fixes error when trying to config breakpoint with no breakpoint

Split from PR #220 by @cgalvarez
Editor

Fixes error when trying to change breakpoint configuration in a line with no breakpoint set.

LGTM


Project Euler 17-20

Added solutions to Project Euler 17,18,19 and 20.

well that's a lot, do you want me to merge this now?

Yeah, sure.

Would it be preferred to open separate PRs for each problem or bunching them together is fine?

Would it be preferred to open separate PRs for each problem or bunching them together is fine?

It should be fine :D theyre all separate commits anyway. i will just do a merge commit with no squash


[FE App Bootstrap] Add unit tests for all existing codes and coverage report function

Description

Add unit tests to cover all existing FE codes.
Add a new npm script for code coverage report.
Update README for testing and code coverage.
Add a PR template doc.

Trello

Link: https://trello.com/c/uJaKFzJa/27-f0-fe-reactjs-app-bootstrap-2

 F0 - FE ReactJS app bootstrap 2


double-calling of component field initialization procs 🐛

Describe the bug 🐛
Sometimes component fields initialize twice..and sometimes they don't. This matters in cases where components change external state on creation.
To Reproduce 👨🔬

var index = 0

proc newIndex(): int =
  result = index
  index += 1

type refIndex = ref object
  value*: int

var rindex = refIndex(value:0)
var sindex = refIndex(value:0)
var tindex = refIndex(value:0)
var uindex = refIndex(value:0)

proc nextIndex(r: refIndex): int =
  result = r.value
  r.value += 1

proc newIndexByRef(): int =
  result = rindex.value
  rindex.value += 1

component Index:
  index: int = newIndex()
  Rindex: int = newIndexByRef()
  myRefIndex: refIndex = sindex
  Sindex: int = myRefIndex.nextIndex()
  html:
    tDiv: "my index is {self.index.val}"
    tDiv(style="color:purple"): "my refIndex is {self.Rindex.val}"
    tDiv(style="color:orange"): "my internal refIndex is {self.Sindex.val}"
    tDiv(style="color:green"): "my refIndex from the main body is {uindex.nextIndex()}"

appRoutes("ROOT"):
  "/":
    Index
    Index
    Index
    for i in 1..3:
      tDiv(style="color:green"):
        "call from route: {tindex.nextIndex()}"

Each successive call of each type should count 0,1,2... but that is not what we see.

Interestingly the double-calling disappears when it is based on a reference stored in another field.
noted on happyx@#head:  https://github.com/HapticX/happyx/commit/1fbc1a93f750edc6a03daafc855658f316c25db5
maybe connected with resolution to #237?

So, this behavior is really weird.
Reason was here (I added .typeof.default and this now works as expected):

Solved in the next commit :)


GUVNOR-2290 - New search menu builder and renamed find to asset search

Depends on https://github.com/uberfire/uberfire/pull/274

Sweet! +1 to merge.
@cristianonicolai .... now this brings me to a related topic (and yes, here probably isn't the place to ask, but since you're elbow-deep in this code already....) "Contextual Search" is sort of broken - The "Task List" Perspective sets up "local contextual search" however the other perspectives don't reset "local contextual search" to their needs. So, in essence, once you've gone to the "Task List" all other Perspectives contextual search is broken. Really we need each perspective to setup contextual search.. unfortunately they don't.. Would you mind taking look?
There are various BZs relating to issues with "Search" (I suspect at least some are due to the above):-

https://bugzilla.redhat.com/show_bug.cgi?id=1283873
https://bugzilla.redhat.com/show_bug.cgi?id=1283864
https://bugzilla.redhat.com/show_bug.cgi?id=1283880

(If not don't worry.. if you're worrying at all!!)

master: e177e280b8d4dee454fe6b305137be7024cdb359


weird cursor behavior in the undo/redo stack

VSCode Version: 1.21.0
OS Version: Ubuntu 16.04 and MacOS High Sierra

I apologize in advance because I'm having trouble reproducing this bug.  I haven't been able to identify a reliable pattern of actions that trigger the bug, so this is a really poor bug report.  But I'd rather report a partial or sub-par ticket than none at all.
The issue is that upon trying to undo/redo file changes using Ctrl+Z and Ctrl+Shift+Z, there will be odd entries in the undo/redo stack that cause the cursor to jump to the top of the file.  Those entries don't see to actually cause any changes in the file.
I tried searching through the reported bugs to see if anyone had already reported this, but I came up empty.  I may have just not used the proper search terms or labels.  I looked in both the open and closed issues.
I've noticed this behavior on both my home Linux machine and my work Mac Book Pro.  This seemed to have started happening with the latest 1.21.0 release, but I'm open to the possibility that this is related to a buggy extension.  If that's the case, the bug is either related to how an extension interacts with a change in VSCode 1.21.0, or the bug was introduced in the causal extension at around the same time as the 1.21.0 release.  See below for the list of extensions I currently have installed.  Because I can't reproduce this issue intentionally, I haven't tried it with extensions disabled.
Steps to Reproduce:
These steps won't necessarily reproduce the bug, but here's what I did last time I observed this happening.

Make changes to a JavaScript file.  (The particular changes I made the most recent instance were selecting a range of text and then pressing " to add quotations around the selection.)
Save the file.  (I used Ctrl+S.)
I clicked into the integrated terminal and ran some commands, but I don't think this is required to trigger the bug.
Change focus back into the same open file.
Try to undo the changes using Ctrl+Z.

At that point, the cursor jumps to line 0, character 0 at the top of the document.  Pressing Ctrl+Z another few times usually eventually gets to the actual changes I was intending to undo.  If I try redoing the actions with Ctrl+Shift+Z, those weird jumps to the beginning of the document are still there in the undo/redo stack.
Does this issue occur when all extensions are disabled?: Unknown
Here's my current list of plugins.  It's very close to identical on both machines where I encountered this bug.  (By the way, if there's a better way to record the extensions I have installed than the method used below, please let me know.)
~/.vscode/extensions$ ls
alefragnani.bookmarks-0.18.2
bungcip.better-toml-0.3.2
christian-kohler.npm-intellisense-1.3.0
codezombiech.gitignore-0.5.0
dbaeumer.vscode-eslint-1.4.7
donjayamanne.githistory-0.4.0
dzannotti.vscode-babel-coloring-0.0.4
eamodio.gitlens-8.1.0
EditorConfig.editorconfig-0.12.1
flowtype.flow-for-vscode-0.7.3
gerane.theme-flatlanddark-0.0.2
haaaad.ansible-0.2.7
kimkwanka.theme-atomic-dark-0.2.0
ms-vscode.cpptools-0.15.0
Orta.vscode-jest-2.6.4
PeterJausovec.vscode-docker-0.0.25
pflannery.vscode-versionlens-0.20.0
robinbentley.sass-indented-1.4.8
ryanluker.vscode-coverage-gutters-1.3.1
Tyriar.sort-lines-1.5.0
yzhang.markdown-all-in-one-1.1.0

If there's anything else I can try or any other info I can provide to help diagnose this bug more completely, please just ask!

Facing the same issue (macOS High Sierra)

Same problem here since version 1.21.0 (Mac High Sierra)

I see that vscodebot has removed the new release label since a new release occurred.  I just upgraded and I'll keep an eye out for this issue.  If I witness it occur again, I'll report it here.

Same problem here, Version 1.21.1, High Sierra.

Having the same problem. Also Version 1.21.1 (1.21.1) on High Sierra. No plugins needed to duplicate the problem.

Has anyone fixed this issue by any chance?
This is killing me...

Can anyone identify a series of steps that will reliably reproduce this behavior?

@JayAndCatchFire Could be that you need to paste in some text: https://github.com/Microsoft/vscode/issues/46208

@nicklasafe I don't know for sure since this bug is hard to reliably reproduce, but I don't think it's related.  Pasting wasn't involved the last time I experienced this.
I just did a quick test by adding pasting to my workflow.  I couldn't reproduce this bug and I couldn't reproduce #46208 exactly.  I'll discuss what did happen on #46208.

In my case, a bug occurs when you save the text consecutively and then run undo. (cmd + s -> cmd + s -> cmd + z). So I save it once. I have not found a solution yet.

I have this problem too,  since version 1.21.0 (on Mac High Sierra)

@bpasero It looks like cmd+s leads to a call to IModelService.updateModel. IMHO the file should not be  read from disk when it is saved via cmd+s.
I can reproduce somewhat often with the following steps:

Apply the following diff:

user settings:

{
    "files.trimTrailingWhitespace": true
}

open a file and type and undo, and type and undo, etc.
press cmd+s twice quickly
Observe the stack:

(1,1,1,1)!!! Error
    at TextModel.pushEditOperations (file:///Users/alex/src/vscode/out/vs/editor/common/model/textModel.js:819:47)
    at ModelServiceImpl.updateModel (file:///Users/alex/src/vscode/out/vs/editor/common/services/modelServiceImpl.js:302:19)
    at TextFileEditorModel.BaseTextEditorModel.updateTextEditorModel (file:///Users/alex/src/vscode/out/vs/workbench/common/editor/textEditorModel.js:116:31)
    at TextFileEditorModel.doUpdateTextModel (file:///Users/alex/src/vscode/out/vs/workbench/services/textfile/common/textFileEditorModel.js:340:22)
    at TextFileEditorModel.doLoadWithContent (file:///Users/alex/src/vscode/out/vs/workbench/services/textfile/common/textFileEditorModel.js:324:29)
    at TextFileEditorModel.loadWithContent (file:///Users/alex/src/vscode/out/vs/workbench/services/textfile/common/textFileEditorModel.js:278:25)
    at TextFileEditorModel.handleLoadSuccess (file:///Users/alex/src/vscode/out/vs/workbench/services/textfile/common/textFileEditorModel.js:256:25)
    at file:///Users/alex/src/vscode/out/vs/workbench/services/textfile/common/textFileEditorModel.js:251:57
    at Object.notifySuccess [as _notify] (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1185:59)
    at Object.enter (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:867:30)
    at Promise_ctor._run (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1083:29)
    at Promise_ctor._completed (file:///Users/alex/src/vscode/out/vs/base/common/winjs.base.js:1051:18)
    at IconvLiteDecoderStream.<anonymous> (file:///Users/alex/src/vscode/out/vs/editor/common/model/textModel.js:62:21)
    at emitNone (events.js:91:20)
    at IconvLiteDecoderStream.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Notice how the undo stack is getting (1,1,1,1) because the file is loaded from disk. I can look into improving the (1,1,1,1) cursor position via the issue #46208, but it is IMHO very worrying that saving the file to disk leads to us reading the file from disk ?

Moving to April, I am not brave enough to make a change in endgame because it involves how we think a file has changed on disk when reading.

I pushed a change that makes it very hard for me to reproduce compared to before. We had different code execution paths upon save depending on the file being dirty or not:

dirty: we flush the contents to disk (typical save)
non-dirty: we call fs.utimes to update the mtime of the file (non-typical save)

It looks like modifying the mtime of the file on disk is not clever because we basically store Date.now() as mtime while the operating system might have other strategies for setting the mtime when writing to a file. Often the mtime of the file on disk was different from what we expect in our model.
The fix is to not tamper with the mtime of the file anymore and instead just run the same code that runs when saving the file normally. That means that saving a file again that is not dirty will flush the contents to disk in the same way as if the file was dirty. I think that is a fair compromise and OK for a text editor to do.
The potential disadvantage of this approach is that external file watchers might read such a change as 2 file events (one for truncating the file and one for writing) but that behaviour is already there for saving normal dirty files. As such, VS Code is now always doing the same operation upon save independent if the file is dirty or not.


Process Neuropixels Dataset Log.xlsx (needed for #34)

WIP
The Neuropixels Dataset Log is an XLSX file provided from the Fee Lab which contains the exact duration of syllables and their mapping to motifs.
TODO: add more detailed description about the file (discrepancy in dates etc.)
The motif: syllable mapping dictionary that is produced by this PR is needed for creating the hierarchical table of motifs in #34.

Closing this as it become too messy to follow, opened a cleaner version at #45


Expose 'create' and 'remove' desktop

This PR exposes 2 new methods.
int CreateVirtualDesktop()
Create a new desktop and return the desktop number. If it fails, it returns -1.
int RemoveVirtualDesktop(int number, int fallbackDesktop)
Will remove the desktop with the number number and switch to the desktop number fallbackDesktop. Will return true upon success, otherwise false.
I'm using these in my own project. Just thought it might be useful to others.

Yes, someone might see these useful. I have implemented these already in my Rust version. I plan to deprecate the C++ part and create the DLL directly from Rust.

Amazing! What's the status on that .dll? I'm also quite interested in renaming desktops and was planning on implementing it here. But I see that you already have it in Rust.

@TheSimpleZ I just started the DLL part. It's basically matter of re-exporting those with cdylib, as I have the functions already there.
DLL made with Rust is also great as it doesn't depend on msvcrt anymore either which makes it a bit nicer to use (but the DLL is a bit bigger 200kB). But I've always hated that users must install msvcrt library before using Visual Studio C++ DLLs.


Update offers.md

added sample jsons which are reverse engineered from the provided sample functions

related to:
https://github.com/Chia-Network/chia-docs/issues/264

Sorry, the GitHub checks are failing due to an issue with permissions. Our IPS team is working on this. Meanwhile, I have updated the Offers RPCs with examples.


Added code of conduct

Summary
Added Code of Conduct
Fixes : #188
Description
Explain in detail what this PR is all about. This should include the problem you're solving, the approach taken, and any technical details that reviewers need to know.
Images
Include any relevant images or diagrams that can help reviewers visualize the changes, if applicable
Issue(s) Addressed
Enter the issue number of the bug(s) that this PR fixes

Template should be strictly Closes <#188>
Example: Closes #188

Prerequisites

[x] Have you followed all the CONTRIBUTING GUIDELINES?

Doesn't follow the contributing guidelines and god alone knows whose code of conduct it is :), I have clearly said what the content should be 2 times, can't expect more efforts for this PR.


SDK interface clarification

We are analyzing the SDK together with @hevelius and @LazyAfternoons and we are experiencing some glitches in the interface.
In particular, it is not clear to us why within the demo app for the initialization of the SDK it is also necessary to pass the private key. This specification conflicts with the ARF and the need to use a TEE for signature.
I would have expected the SDK to provide one interface for getting stuff to sign and a second interface for sending the signed stuff.
Signing and key management in particular cannot be delegated to the SDK.
https://github.com/italia/eidas-it-wallet-pid-provider-android-sdk/blob/d46c3568b4e88f1985b2e75028d3e7d7d0319d3d/androidpidproviderdemo/src/main/java/it/ipzs/androidpidproviderdemo/PidProviderDemoApplication.kt#L49
Another point is the use of only ECPublicKey for the keys. It is necessary to be able to use JWK both RSA and EC as some android devices do not support EC.
Furthermore, we do not understand the need to have a wallet uri since it is already present in the Wallet Instance Attestation (iss).

Hi Francesco,
Thanks for the support, but it does seem to us that all android devices support EC. From the documentation it can be seen that they are available starting from api level 1.
https://developer.android.com/reference/java/security/spec/EllipticCurve
We choose EC because is able to provide more cryptographic strength than RSA.
We require them as an input parameter to prevent the SDK from managing them and create an api to request them. The SDK need it for DPoP generation keys for the PKCE flow.


Allow next/prev controls to be disabled

Requested by @pavlov70 in https://github.com/blakeblackshear/frigate/discussions/1590#discussioncomment-1283952

While I like the next/previous buttons on clip playback, an option to turn them off would be nice as well.

Although the preview icon for previous and next image are cool, they do take up a bit of screen real estate. Maybe change or option to use left/right chevrons, to take up less space.

@s24dor PR just merged supports thumbnails, chevrons or off entirely.


APPSRE-11014 enforce version diff option

As discussed, we will wait for https://issues.redhat.com/browse/RELEASE-993 instead


Quires about the experiment on LineMOD dataset

Hi, thanks for sharing the code. I am planning to compare my algorithm with the GPV-Pose. About the experiment on the LineMOD dataset, is the evaluation mask trained using MaskRCNN? Also, would you like to share the resulting masks for a fair comparison? Thanks!

We use the masks provided by GDRN (https://github.com/THU-DA-6D-Pose-Group/GDR-Net).

Thanks! One more question, please. Is the GPV-Net trained using real images only or the full LineMOD dataset setting as the GDRN?

Sorry that I do not remember clearly. It should be the same setting as GDRN.

Thanks!


99th_percentile_frame_rasterizer_time_millis needs a test for a full shader cache

After https://github.com/flutter/flutter/pull/68128 was landed the flutter_gallery is uninstalled between tests.  This has the affect that the shader cache is thrown out.  Now 99th_percentile_frame_rasterizer_time_millis is showing a reading for an app without a full shader cache.  It would be nice if we could tweak the test so that we can measure both values, once with the cache full and once empty.
related issue: https://github.com/flutter/flutter/issues/68316
cc @liyuqian @jonahwilliams

I agree that the regression #68316 is caused by some caching that gets deleted during an uninstall. However, I doubt whether it's the shader persistent cache because it only helps significantly on Android, but not on iOS yet. @gaaclarke : can you please run the test multiple times with --purge-persistent-cache flag which will remove all shader cache without uninstalling the app? I expect it to be fast, and thus rule out the persistent cache to be the problem here.

I don't think I'll be able to get to it today because of sheriffing, but no matter what the cause is I think we should track these 2 numbers separately (performance on first launch, performance on subsequent launches).  There could potentially be a regression in one and not the other that we'd want to capture.

Cool, I just revised the issue title to reflect that.


Only store the int in size if it's an int not a tuple

The documentation for this function is that if you provide an int,
scale will scale the smallest size to the int. Creating a tuple here
ruins the checks in functional. So, just store the int.
(Re-submitting since I was originally in the wrong branch, sorry about that).

Looks good to me! Thanks for your contribution.


[-1] call to cuInit results in UNKNOWN_CUDA_ERROR

Reporting a bug

My enviroments:
Numba: 0.48.0
CUDA: 10.2
CUDnn: 8.2
I am using 2080 Ti right now.

When I run numba -s, the bug comes to me:
Error: CUDA device intialisation problem. Message: Error at driver init:
[-1 ]call to cuInit results in UNKNOWN_CUDA_ERROR:
Error class: <class 'numba.cuda.cudadrv.error.CudaSupportError'>
Any suggestions would be greatly appreciated!

Do any other CUDA programs work on your system?

Also, note that Numba 0.48 and CUDA 10.2 are quite old - I'd suggest upgrading to Numba 0.56, CUDA 11.7, and the latest CUDA driver.

Closing this issue due to lack of information. If more information becomes available please add it and reopen the issue. Thanks.

Reporting a bug
When I run numba -s, the bug comes to me:
Warning log
Warning (cuda): CUDA device initialisation problem. Message:Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)
Exception class: <class 'numba.cuda.cudadrv.error.CudaSupportError'>
When you run the program,the bug comes to me:
raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)
Can you help me?

When I run numba -s, the bug comes to me:
Warning log
Warning (cuda): CUDA device initialisation problem. Message:Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)
Exception class: <class 'numba.cuda.cudadrv.error.CudaSupportError'>
When you run the program,the bug comes to me:
raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)
Can you help me?


daos: improvements

Two commits:

Improve some of the path parsing by NOT using static buffers, NOT limiting paths to PATH_MAX explicitly, and using the "n" versions of some string functions for buffer overflow protection.
Added documentation for dsync and dcmp

closes #448

Thanks!

Thanks!


[Feature Request] Handle Wrinkle Care better

Is your feature request related to a problem? Please describe.
My dryer has an option for "Wrinkle Care", where it tumbles every 3 minutes for up to 3 hours. This shows up as the on state, and the run_state is Wrinkle Care. The initial_time shows up as the time it's been on Wrinkle Care, and the remain_time shows up (always while in Wrinkle Care) as 0:01.
Describe the solution you'd like
It'd be better if it showed up as off. Also, maybe in this case inital_time should be hardcoded to 3:00 and remain_time should be 3 hours minus the initial inital_time.
Describe alternatives you've considered
Just one of these is okay, I guess...
Additional context
Nothing

Still (I think)

Can you please attach diagnostics?

as in while the dryer is running or whenever?
also i'll need to figure out how to reconnect the integration, it broke recently, probably a tos thing again

still relevant

The bot used to close the issue should just ignore the issue with label "Feature Request", I do not understand why this configuration doesn't work!!!

 Thanks a lot.


Note about compiling user op with gcc 5

Added a note about compiling user op library with gcc 5

Can one of the admins verify this patch?

I signed it!


When I apply the yaml file, it show error below. I need to login into worker node(edit new launch plate version and add a key first) and modify this cpu-count to 4

[ E22 ] Insufficient CPUs available in the pool. User provided cpu-count is 2, which is more than the configured CPU pool size.
You can increase the CPU pool size by editing the cpu_count value from '/etc/nitro_enclaves/allocator.yaml' and then enable the nitro-enclaves-allocator.service.

[ E22 ] Insufficient CPUs available in the pool. User provided cpu-count is 2, which is more than the configured CPU pool size. You can increase the CPU pool size by editing the cpu_count value from '/etc/nitro_enclaves/allocator.yaml' and then enable the nitro-enclaves-allocator.service.

You can update the value of the "node_enclave_cpu_limit" field from the "settings" JSON file [1]. The current value of "node_enclave_cpu_limit" is 2, but it can be updated to 4, for example. This way, it will match the setup you would like for "cpu_count" [2].
Thank you.
[1] https://github.com/aws/aws-nitro-enclaves-with-k8s/blob/main/settings.json
[2] https://github.com/aws/aws-nitro-enclaves-cli/blob/main/bootstrap/allocator.yaml

Should we modify this default value to 4 in this repo? Otherwise others will run into  same problem I think

I have the same error here, even though i had set the cpu-count to 4 at the beginning, it still complains about  Insufficient CPUs available in the pool
[ E22 ] Insufficient CPUs available in the pool. User provided `cpu-count` is 2, which is more than the configured CPU pool size.
You can increase the CPU pool size by editing the `cpu_count` value from '/etc/nitro_enclaves/allocator.yaml' and then enable the nitro-enclaves-allocator.service.


Create and add events to the react app

In this project I did the following:

Add logic folder.
Modify calculate.js file
Add operator.js file
Modify README.md file

Thank you @HAMMAS-SALEEM


Calendar on Module Start Date & End Date - Error

Description of bug
After a clean install of 9.4, when I tried to edit a module start date and end date. The calendar popup does not show. Instead, there are multiple errors that showed up on the console of the developer tool.
Steps to reproduce
List the steps to reproduce the behavior:

Click on Start Date or End Date Field when editing a module.
Open up developer tools inspector.

Current result
Nothing happens, but errors on console.
Error:

Selectize: Dependency MicroPlugin is missing
Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.
Uncaught TypeError: w.define is not a function
Uncaught ReferenceError: Selectize is not defined
Uncaught TypeError: $(...).dnnComboBox is not a function

Affected version

[ ] 10.0.0 nightly build
[ ] 9.4.1 nightly build
[x] 9.4.0 latest supported release

Affected browser

[x] Chrome
[ ] Firefox
[ ] Safari
[ ] Internet Explorer
[X] Edge

Ugh.  I updated Selectize from 0.12.4 to 0.12.6 (01f890ab2c746ad6e2ae27dfcffd26be5e4858dc), but apparently didn't use the standalone version that was used previously.  It's easy enough to fix for 9.4.1, but it creates an upgrade issue (the updated package won't get installed during a 9.4.0 to 9.4.1 upgrade, because it's the same version number).  @mitchelsellers, @donker, @valadas, do any of y'all know of an easy way to force a same-version package install when upgrading the Platform?

By the way, thanks @kaneluong for the detailed bug report, it pointed me right to the underlying issue.

No Worries. @bdukes . Is it something that users should hold off on installing/upgrading 9.4.0 until 9.4.1 gets released? or is there a easy fix for a fresh install of 9.4.0 on this bug?

I would probably recommend waiting for 9.4.1 at this point.  If you're already upgraded, the workaround is to fix the Selectize script.  Save https://raw.githubusercontent.com/dnnsoftware/Dnn.Platform/da491cb606d62460f50bfcc53a6674fd50ca08b7/DNN Platform/JavaScript Libraries/Selectize/selectize.min.js to Resources\Libraries\Selectize\00_12_06\selectize.min.js

Closing issue since the PR got merged, 9.4.1 RC1 will be out very soon if you want to test and 9.4.1 official release very shortly after that


RFC: Reorganize search page

Thoughts

The search is not the obvious thing your eye goes to when you open the page.
The top bar buttons, e..g, "SAVE," "LOAD", "THEME", etc. look like they're the most important. They're big, bold, and capitalized. In contrast, the most important thing, the search is plain and small.
There's no obvious reason why the term selector needs a "Term" label. No one would think "2024 Winter Quarter" is anything else.

Suggestions

Remove the "Term" label for the selector.
Put the term selector with the manual search button below the search bar.
Remove the "Search" label above the search bar. The tab is called "SEARCH" anyway.

Have a colored icon or search button to draw the user's eyes to it.

Make the search bar BIG or give it an outline. Maybe color it as well somehow.

Examples

sounds good


Import documents: support split documents

Pulling the work to support split documents out from the work for supporting AI collaboration documents (issue #113). The work to support AI collaboration documents is being done for milestone 0.4.5, but this does not support documents split without the chapter marker. From the comments:

The algorithm [used for #113] will work for Collaboration mode documents as well as documents split with the standard chapter marker. I'm not sure how the split "from current point" can be put back together in order; it looks like AI desktop requires the user to specify the document order for rejoining these documents.

----- Original Message -----
From: Erik Brommers
To: adapt-it/adapt-it-mobile
Sent: Wednesday, November 04, 2015 6:35 AM
Subject: [adapt-it-mobile] Import documents: support split documents (#119)
Pulling the work to support split documents out from the work for supporting AI collaboration documents (issue #113). The work to support AI collaboration documents is being done for milestone 0.4.5, but this does not support documents split without the chapter marker. From the comments:
The algorithm [used for #113] will work for Collaboration mode documents as well as documents split with the standard chapter marker. I'm not sure how the split "from current point" can be put back together in order; it looks like AI desktop requires the user to specify the document order for rejoining these documents.

That's correct. The dialog for document joining will join them in top to bottom listed order. In AID the user has control over the order in the sense that if he doesn't want the default order shown, he can tweak.

--Bruce

—
Reply to this email directly or view it on GitHub.


Bug with tensorflow.random_normal() when using placeholders and last dimension is 1

tensorflow.shape(x) gives ? for the last dimension when the last dimension is 1.
This is a problem if you have layers or inputs which are only one dimensional.
Environment info
Operating System: OSX
Tensorflow 0.9.0
Installed version of CUDA and cuDNN:
problem not related to CUDA or cuDNN
Edit: thanks to @cwhipkey I noticed I mischaracterized the problem, edited version below.
Steps to reproduce
import tensorflow as tf
n=1
x = tf.placeholder(tf.float32, shape=(None, None, n), name='x')
shp = tf.shape(x)
shp is (?,?,n)  as it should be.
But then if I use shp to create a random_normal tensor of the same shape, it will fail if n==1.
noise = tf.random_normal(shp,mean=0,stddev=1)
print(noise.get_shape(noise))
has output (?,?,n) if n>1 but output (?,?,?) if n==1.
This is a problem, because if I then do
xtilde= x+noise
this will give me an error if n==1.
Specifically in my case:

File "/anaconda/envs/hrnn/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 630, in _dynamic_rnn_loop
"Input size (depth of inputs) must be accessible via shape inference, "
ValueError: Input size (depth of inputs) must be accessible via shape inference, but saw value None.

when I feed this xtilde to dynamic_rnn
rnn.dynamic_rnn(rnn, xtilde,                                                        initial_state=self.hhat_combined_init,                                                        scope='RNN')
I get no such error if n>1.

What are you printing from shp to see the (?,?,1)?  Against the head version, I tried the following and could not reproduce it.  I also tried to run shp in my session, but that requires an actual value of the placeholder in order to run.
import tensorflow as tf
n=1
x = tf.placeholder(tf.float32, shape=(None, None, n), name='x')
shp = tf.shape(x)
print(str(shp))
print(x.get_shape())
Output:
Tensor("Shape:0", shape=(3,), dtype=int32)
(?, ?, 1)

Thank you for looking into it.
I'm seeing this in the PyCharm debugging mode.
I think you are right, I missidentified the problem. shp is actually ok, the problem occurs while using
tf.random_normal(shp,mean=0,stddev=1)
This occures inside my _build_graph methode of a neural network.
I have the following line:
xtilde = x + noise_level * tf.random_normal(tf.shape(x),                                                                     mean=0.,                                                                     stddev=1.)
which fails because
while x.get_shape() = (?,?,1)
tf.random_normal(tf.shape(x),mean=0,stddev=1).get_shape() = (?,?,?)
and so the addition fails because the tensors are not of the same shape.
So the problem is that tensorflow.random_normal has fails to be correctly shaped when the last dimension is 1.

A ? in a shape output means "unknown dimenson value", and that is
considered compatible with a dimension with a known size.  So I'm not sure
it would give an error from that step.
Does it fail when running the model, or while setting up the model?  What
is the error message you get?
On Fri, Jul 15, 2016 at 1:21 AM, isabeaups<EMAIL_ADDRESS>wrote:

Thank you for looking into it.
I'm seeing this in the PyCharm debugging mode.
I think you are right, I missidentified the problem. shp is actually ok,
the problem occurs while using
tf.random_normal(shp,mean=0,stddev=1)
This occures inside my _build_graph methode of a neural network.
I have the following line:
xtilde = x + noise_level * tf.random_normal(tf.shape(x),
mean=0.,
stddev=1.)
which fails because
while x.get_shape() = (?,?,1)
tf.random_normal(tf.shape(x),mean=0,stddev=1).get_shape() = (?,?,?)
and so the addition fails because the tensors are not of the same shape.
So the problem is that tensorflow.random_normal has fails to be correctly
shaped when the last dimension is 1.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/3311#issuecomment-232891583,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQw4wY_Jb42pWiJcCfNV2zrQ8MAN28HXks5qV0MngaJpZM4JMXSO
.

It fails while setting up the model.
As you can see in the above revised original issue post, doing
xtilde = x +  tf.random_normal(tf.shape(x), mean=0., stddev=1.)
fails with error:

File "/anaconda/envs/hrnn/lib/python2.7/site-packages/tensorflow/python/ops/rnn.py", line 630, in _dynamic_rnn_loop
"Input size (depth of inputs) must be accessible via shape inference, "
ValueError: Input size (depth of inputs) must be accessible via shape inference, but saw value None.

I used the test body below and get noise always as (?, ?, ?), regardless of n.  xtilde is (?, ?, ?) when n = 1, and (?, ?, 2) when n = 2.
This is because x + noise might broadcast x onto noise, and when the dim's value is 1 then the output dim could be 1 or the other side.  A fix is to use tf.add_n([x, noise]) - this ends up giving the right shape.   Does this workaround work for you?
It seems that "random_normal" does not infer the output shape no matter what the final dim value.  I think it's because of tensor_util.py's _ConstantValue, where tensor.op.type == "Shape" is handled.
n = 1
x = tf.placeholder(tf.float32, shape=(None, None, n), name='x')
shp = tf.shape(x)
noise = tf.random_normal(shp, mean=0, stddev=1)
print("noise: ", noise.get_shape())
xtilde = x + noise  # tf.add_n([x, noise])
print("xtilde: ", xtilde.get_shape())

Output:
# Output when n = 1
noise:  (?, ?, ?)
xtilde:  (?, ?, ?)

# Output when n = 2
noise:  (?, ?, ?)
xtilde:  (?, ?, 2)

I'm not sure I understand your explanation completely, but the workaround works and is good enough for my purposes. Thank you!

I also encountered the same problem, tf.random_normal always return a tensor with unknown shape, even when the shape parameter is set to a fixed shape. Should this be classified as a bug?

@cwhipkey I admit I didn't entirely follow your explanation above either. Would you clarify if this should be considered a bug or not?

Yes, it is something that could be improved in random normal.
The workaround is to do a reshape immediately after the call, or otherwise force the shape to become known.

I think the shape has been correctly inferred with the most recent master:
ubuntu@ubuntu:~/$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> n = 1
>>> x = tf.placeholder(tf.float32, shape=(None, None, n), name='x')
>>> shp = tf.shape(x)
>>> noise = tf.random_normal(shp, mean=0, stddev=1)
>>> print(noise.get_shape())
(?, ?, 1)
>>> n = 2
>>> x = tf.placeholder(tf.float32, shape=(None, None, n), name='x')
>>> shp = tf.shape(x)
>>> noise = tf.random_normal(shp, mean=0, stddev=1)
>>> print(noise.get_shape())
(?, ?, 2)
>>>

Maybe this issue could be closed?

Closing this per comment from yongtang.


playwright stealth + persistent context

hello,
i would like my browser to be undetectable for anti bot systems and this works if i use a chromium browser with chrome channel in stealth mode.
however i would like my cookies and user data to be saved to reuse for next session.
so i launch my chrome with
browsers[i] = await p.chromium.launch_persistent_context(c.folderpath_userdata + "\user" + str(i) + "\", channel="chrome", headless=False)
page[i] = await browsers[i].new_page()
await stealth_async(page[i])
however as soon as i use the persistent context i get a bot detecton webdriver on https://bot.sannysoft.com/

I think disabling AutomationControlled fixes this problem:
  browser = pw.chromium.launch_persistent_context(
      './chromium-data',
      args=["--disable-blink-features=AutomationControlled"],
  )

That seems to turn the "WebDriver" section green. Sadly, Cloudflare still manages to detect headless mode for me.

@AndrewVeee were you able to get around headless detection on cloud flare?

I didn't have any luck getting around headless detection, but I gave up on it pretty early.
Instead, I used xvfb in Linux so the browser runs in a hidden X11. I would much prefer headless mode, but this works well enough for a light use case.
Hope that helps a little, I know it's not optimal.


Gatsby v4 compatibility

After upgrading to gatsby 4 and 1.7.0 of the imgix library (which adds gatsby 4 support), I get errors related to invalid config formats, though the format hasn't changed (and still seems to match the readme)
Steps to reproduce the behaviour:

Have the following section in your fields config in gatsby-config.js:

fields: [
        {
          nodeType: "Instagram",
          fieldName: "image_imgix",
          getURL: (node) => node.image?.url
        },
        {
          nodeType: "ShopifyProductImages",
          fieldName: "imgix",
          getURL: (node) => node.url
        },
      ],

Build with production node env
Error during "Validating Rendering Engines" of gatsby build:

error [@imgix/gatsby] Fatal error during setup: Error: The plugin config is not in the correct format. Errors: Invalid value [{"nodeType":"Instagram","fieldName":"image_imgix"},{"nodeType":"ShopifyProductImages","fieldName":"imgix"}] supplied to : GatsbySourceUrlOptions/fields: (undefined | Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>)/0: undefined,Invalid value undefined supplied to : GatsbySourceUrlOptions/fields: (undefined | Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>)/1: Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>/0: (({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))/0: ({ nodeType: string, fieldName: string } & { getURL: Function })/1: { getURL: Function }/getURL: Function,Invalid value undefined supplied to : GatsbySourceUrlOptions/fields: (undefined | Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>)/1: Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>/0: (({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))/1: ({ nodeType: string, fieldName: string } & { getURLs: Function })/1: { getURLs: Function }/getURLs: Function,Invalid value undefined supplied to : GatsbySourceUrlOptions/fields: (undefined | Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>)/1: Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>/1: (({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))/0: ({ nodeType: string, fieldName: string } & { getURL: Function })/1: { getURL: Function }/getURL: Function,Invalid value undefined supplied to : GatsbySourceUrlOptions/fields: (undefined | Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>)/1: Array<(({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))>/1: (({ nodeType: string, fieldName: string } & { getURL: Function }) | ({ nodeType: string, fieldName: string } & { getURLs: Function }))/1: ({ nodeType: string, fieldName: string } & { getURLs: Function })/1: { getURLs: Function }/getURLs: Function

Information:

imgix/gatsby version: [v1.7.0]

Potentially related: https://github.com/gatsbyjs/gatsby/discussions/33199#discussioncomment-1345213

Does seem like it's very similar... @frederickfogerty happy to PR something if you've got an approach that'd make sense for this plugin

Hey @finematterdave, thanks for the offer. At this stage I don't exactly know what is going here - will take a look at this next week and give an update then.

Hey @frederickfogerty , sorry to bug you, did you get a chance to look at this?

Hey @finematterdave thanks for following up! Unfortunately this one slipped through the cracks - I'll make sure I get onto this next week (hopefully Tuesday)

Hi @finematterdave, I looked into this today and I can't seem to reproduce your issue:

Dependencies
  "dependencies": {
    "@imgix/gatsby": "1.7.0",
    "gatsby": "^4.3.0",
    "gatsby-plugin-image": "^2.4.0",
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  }

If this issue is still persisting for you, could post more of your gatsby-config.js, the specific commands use to trigger the issue, your dependency versions, and if possible an example repo which is showing the issue?

Hey @frederickfogerty , apologies, I shouldn't have said "build" in my original issues, looking closer this seems to only happen when using the gatsby develop or gatsby serve commands when we try and run some automated tests in the CI. Let me know if it happens for you with develop instead and I'll work on a basic repo to share as well

Actually getting a test repo up and running is painful due to https://github.com/imgix/gatsby/pull/155 not being released yet, once that is I'll set something up with the quick start gatsby repo (all their stuff is on the newer versions now, so gets into some dependency issues)

Unfortunately, I also couldn't repro it with the develop command.
I released #155 in 1.7.4 just now - let me know if that helps you.

https://github.com/finematterdave/example-imgix-issue is a broken example, clone, run npm install then npm run build, let me know if it's also broken for you... hope so!

@finematterdave just wanted to follow up here that I'm still investigating this. I hope to have another update for you in the coming days

No problem, thanks @frederickfogerty, let me know if I can help at all

Hi @finematterdave, I'm still investigating this. At least this time I've managed to reproduce the issue! Will let you know how I go

Turns out @angeloashmore was totally correct, it is related to https://github.com/gatsbyjs/gatsby/discussions/33199#discussioncomment-1345213. This took a long day of debugging and searching to find out what was going wrong. I'm going to wait for Angelo to update me about any fixes he made, but at this I don't have an immediate fix.

Hey @frederickfogerty, I replied to your comment in the Gatsby discussion. Let me know if you have any questions. 👍

Thanks @angeloashmore - replied over there too

Hey @frederickfogerty , any thoughts on an approach here?

Hi @finematterdave. We are going to rework the configuration of this plugin to not use a function option, and instead use a string option for the getURL config option. I have been slammed both on vacation a lot recently and lots of other high priority work has come up so I haven't been able to get to this, but if you feel like opening a PR for this change, that would be welcome. Otherwise, I hope to be able to get to this next week or the week after.

No worries @frederickfogerty , I probably won't get time to get to it before you do, but the approach sounds sensible! Hope you had a nice break 🏝

Hi @finematterdave, I just released this onto our prerelease channel - would you be able to help us test this out? 🙌  You can install the prelease channel with yarn add @imgix/gatsby@next

Hey @frederickfogerty , works great for me, readme instructions were nice and clear too, good work! 🎉

Hey @finematterdave just wanted to follow up here and see how this was going for you and if you had any issues?

Yep all good for us, been working fine and haven't found any strange issues

Fixed by #167 and #163 💯


Bluetooth: GATT: Allow to tune writable device appearance permissions

This allows to select if device appearance requires encryption or authentication or none. This makes it similar to what is implemented for device name characteristic.

converted to choice and defaults are set to what was already in tree (name enc, appearance enc and auth)


Sticky Footer

In your sticky footer example you show the following selector:
.Site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

However you page actually uses height: 100% . The styles you show (min-height: 100vh) won't work in IE11.

I address this on the home page in the "About the code" section:

All of the code samples on this site show how to solve a particular design problem with Flexbox. They show just the code that's needed to make the demos work in a spec-compliant browser. Some browsers do not fully comply with the latest version of the spec, so sadly, a few workarounds were necessary.

Workarounds for non-compliant browsers are not shown in the code samples, but if you're curious about those implementation details, you can check out the source files. Each demo links to its source, and all browser-specific workarounds are well-documented, so don't be afraid to take a look.

I think you misunderstood. I'm not complaining that the example doesn't work in IE, but that the markup you actually use is different from the markup you say you are using so that it looks like it does work in IE.
In your own words:

Workarounds for non-compliant browsers are not shown in the code samples

But in reality the whole sticky footer example is itself a workaround because it uses height rather than min-height that you say you are using. It would make more sense if you used min-height for the example as you do in the markup shown on the page, and allow it to fail in IE.


newrelic.yml: Avoid trailing whitespace in comment

Running newrelic to generate a configuration from the template, a
trailing whitespace would be introduced. Remove it in the template, so
that certain coding style utilities don’t complain.

@paulmenzel Thanks for the submission! We have a release right around the corner and will check this out as soon as that's out.

@paulmenzel We just pushed the release I mentioned earlier, if you have a sec to rebase this and push so we can get a fresh CI pass that'd be great. Thanks!

@tkrajcar, done!

Hmm, it looks like there were unrelated failures. Can the build be restarted?

@paulmenzel the test failures are due to an issue introduced into Rails <IP_ADDRESS> on Monday, so we're waiting on an upcoming patch to Rails to fix the issue. We'll look into re-running that build after that.

@paulmenzel I'm pulling this into our internal repo, though the PR will stay open here until it's released. Thanks for the contribution!

This PR was merged and released in <IP_ADDRESS>4 this morning. Thanks @paulmenzel for the contribution!


Bring your own OpenAI API key

Users should be able to input their own OpenAI API key for use with Navie. When set, the RPC process should receive the environment variable OPENAI_API_KEY with this value.
Ideally, this value is not stored in plain text.
Upon changing the OpenAI API key, the user is prompted to reload the editor. If possible, the user can click to reload.
If the value is set to an empty string, it is cleared and OPENAI_API_KEY is no longer propagated. This value should take precedence over the environment variable settings.
Example flow in Visual Studio Code
Peek 2024-04-25 12-57.webm

:tada: This issue has been resolved in version 0.65.0 :tada:
The release is available on:

v0.65.0
GitHub release

Your semantic-release bot :package::rocket:


serialization date filtering in Sparklyr 0.7?

Hello,
I am sorry to ask this, but serialization is new in 0.7 and nobody can know the answer to this question except for the great sparklyr team ;-)
I am loading a large parquet file and with spark_read_parquet I can see that my date variable has a date type. However, I have no idea what is the proper way to filter a date variable?
I tried filter(mydate <= as.Date('2016-06-06')) with and I got an error.
filter(mydate <= '2016-06-06') seemed to work but it seems weird to me to compare a date type with a string.
Any help appreciated. Thanks again!

This works for me just fine:
spark_read_parquet(sc, "dates_parquet", "dates.snappy.parquet.txt") %>%
  filter(dates < as.Date("2018-04-20"))

# Source:   lazy query [?? x 1]
# Database: spark_connection
  dates
  <date>
1 2018-04-16
2 2018-04-17
3 2018-04-18
4 2018-04-19

dates.snappy.parquet.txt
I would need a sample parquet file and the error output to help out more here.

hum, interesting. it now works with sparklyr 0.7.0-9010.
Did you fix something about dates/serialization in that version already?

Yes, there were a couple date fixes, should have resolved this one, glad it works!


Images issue165

Replaced images 3a to 3e, including updating figure labels and alt-text where necessary. Deleted defunct images for audit logo and tech notes.

You've removed the 91-counter-audit-logo.jpg and d-tech-notes-cover.jpg, but not the corresponding references?

As far as I know, the audit logo is only referenced in the R5 version of section 9, which is replaced by pr #185 and the tech notes cover is only in section d, which is being deleted as part of the clean up issue

Merging to facilitate clean up and text edit issues


Pass vite.configs own or tsconfigs target option to esbuild

Description
When building esbuild's target option (vite.config.ts) esbuild.target is not being affected by what I set in (vite.config.ts) build.target.
Optimally, I'd like to define target in only one single place and that's the tsconfig file. I know vite does not use tsc for builds, only for typechecks, so it'd need a way to know which tsconfig file to read as there could be multiple of those. I'd imagine this would need a tsConfigFilePath option too.
Suggested solution
If present and build.minify is set to 'esbuild' (or undefined), pass vite.config.ts's build.target option to esbuild.target.
Additionally, If build.target is not defined and tsconfig is present (*), use compilerOptions.target.

* knowing which tsconfig to read is non-trivial

Alternative
Define target twice, once for code checks in tsconfig and once for the builds, it leads to inconsistencies in what I see in a development build and when using a bundled library.
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

build.target should be used for esbuild when build. Do you have a reproduction of that?

Sorry, I was able to find the source of the problem after I couldn't reproduce it in isolation. But I also used @nxext/vite and my config was processed through that so maybe it got lost somewhere there.


Update .env.example

I think that you opened this PR on the wrong repository. Anyway, is a good practice to not commit the environment variables.
If the values committed on this PR are valid values, you should generate new ones to keep your account safe.


[New Script] Added Btrfs Assistant  + grub-btrfs under System Setup/Fedora.

Type of Change

[+] New feature
[+] Documentation update

Description

I added a script under Fedora section to installs Btrfs Assistant with snapper and Grub-Btrfs to Fedora, allowing snapshots to be displayed in the Grub menu.

Additionally, it configures scheduled timeline snapshots for both the root and home directories, ensures automatic GRUB updates following snapshot creation, and includes a DNF plugin that facilitates automatic snapshots before/after package installations.

Because of default Fedora disk partitioning during OS installation, the /boot configured as an separate EXT4 partition in Fedora. Therefore, it cannot be included in root snapshots.

Necessary information has been provided in the documentation, description and post install steps for users to pay attention to this point.

Fedora's EXT4 /boot, btrfs root(/) choice also prevents restoring Timeshift backups. So snapper still seems to be the best solution for Fedora anyway.

The grub-btrfs installation was left optional because it is a deeper system intervention and some systems have problems with snapshot booting due to the “tpm.c:150:unknown TPM error” error. This seems like a common problem even with unmodified Fedora systems... https://bugzilla.redhat.com/show_bug.cgi?id=2128485

A mitigation step was also provided for those who encountered the error.

Testing

Tested with Fedora 40 Workstation and KDE Spin without issues.
I also did a test to see if updating the kernel after installation would cause any issues with GRUB. After the kernel was updated, GRUB also updated successfully.
For testing purposes I completely deleted /etc and /usr directories and then did a restore to a previous snapshot  successfully.

Impact
Users often want to use the btrfs snapshot feature, but guides on the internet seems too complicated because they start from partitioning steps from initial setup.  I tried to perform the snapshot process in the easiest way without interfering with the partitioning.
As long as /boot is not corrupted, Fedora users can recover their systems with these tools. They may need to evaluate manual backup options for /boot.
Issues / other PRs related

Additional Information
Checklist

[+] My code adheres to the coding and style guidelines of the project.
[+] I have performed a self-review of my own code.
[+] I have commented my code, particularly in hard-to-understand areas.
[+] I have made corresponding changes to the documentation.
[+] My changes generate no errors/warnings/merge conflicts.

Close this, all this does is duplicate the Timeshift backup functionality that's already provided inside of Linutil.

Btrfs-assistant is not the same as timeshift (functionality overlap is irrelevant; linutil already has installation options for multiple different web browsers, terminal emulators, etc). This also proposes installing a bootloader that improves the ease of using snapshots.

Close this, all this does is duplicate the Timeshift backup functionality that's already provided inside of Linutil.
Addressed in the description:
Fedora's EXT4 /boot, btrfs root(/) choice also prevents restoring Timeshift backups. So snapper still seems to be the best solution for Fedora anyway.

Close this, all this does is duplicate the Timeshift backup functionality that's already provided inside of Linutil.
Addressed in the description:
Fedora's EXT4 /boot, btrfs root(/) choice also prevents restoring Timeshift backups. So snapper still seems to be the best solution for Fedora anyway.

i see, bad judgement on my part then

all suggested modifications added. thanks again guys.


[SYSTEMML-1449] Fix a wrong comparison condition

Please, review this pull request for SYSTEMML-1449. Thanks!

Can an Admin verify this patch?

LGTM - thanks @lifove; I'll merge it in later tonight


KEP-2170: Add directories for the V2 APIs

Related: https://github.com/kubeflow/training-operator/issues/2206
I added directory structure for the V2 APIs.
/assign @tenzen-y @kubeflow/wg-training-leads

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

0 of 3 (0.0%)  changed or added relevant lines in 1 file are covered.
6 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.04%) to 33.427%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

cmd/training-operator.v2alpha1/main.go
0
3
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/controller.v1/mpi/mpijob_controller.go
6
80.67%

Totals

Change from base Build<PHONE_NUMBER>9:
-0.04%

Covered Lines:
3944

Relevant Lines:
11799

💛  - Coveralls

/lgtm


Simplify api

I added the new API with the client and service api
https://github.com/mesg-foundation/core/blob/2e73981067b6d45b7d66e427fd711fb6211b5281/api/client/api.proto
https://github.com/mesg-foundation/core/blob/2e73981067b6d45b7d66e427fd711fb6211b5281/api/service/api.proto
Also added an event package to handle all events
and added a build/proto.sh script to build all proto files

don't mind about the code coverage, this is because of the generated files from protobuffer, we need to remove them from the codecoverage but for now it's fine

bug on test tracked here https://github.com/mesg-foundation/core/issues/116


Additional Configuration for Custom OP3

Hello @ROBOTIS-Will,
Currently, my team build a clone of OP3 with a slightly different configuration and facing quite a lot of problems, I there any additional configuration that needed to be changed in order to achieve the same functionality as OP3? We have changed every single servo configuration from .robot file and servo offset. We straight using this repository as our base program.
When we trying to run the op3 demo until at the point where no more error showed on the console, but no single servo is moved even once.
Specs

NUC Intel Celeron (lower specs, but shouldn't be a problem)
OpenCR (Same)
U2D2
Camera (Logitech C920)
Upper Body (6 * MX-28)
Lower Body (12 * MX-64)

We've been stuck for quite a while. Any help advice would be very helpful, thank you in advance

Hi @luqmansen ,
Thank you for sharing the picture of your robot :+1:
This OP3 package is designed specifically for the OP3 hardwares and therefore could require significant modifications depending on your hardware configuration.
First of all, please check if proper OP3 Arduino sketch is downloaded on the OpenCR.
Please refer to Arduino IDE section of OpenCR1.0 emanual for installing required board manager.
Once the OpenCR board manager is installed correctly, open Arduino IDE and find the OP3 example in the OpenCR example list.
Secondly, if your MX DYNAMIXEL is using Protocol 1.0, it is recommended to update the firmware to Protocol 2.0.
In case using Protocol 1.0 which is a default of MX series, you'll need to modify the Protocol column in OP3.robot file.
Also, make sure to correctly set the initial value settings in the dxl_init_OP3.yaml file.
I'd recommend to operate each joint with DYNAMIXEL Wizard 2.0 first then try to control with your software.
Thank you.

Thanks for your response @ROBOTIS-Will  however, we have done what you've listed on your answer but still no luck. However, we still have quite a doubt about this MX-64.device file (and Mx-28 one).
The provided configuration is using the addressing table for protocol 1.0, however, we notice this and change all the addressing table to protocol 2, since this file is required on OP3.robot.
Can you help with this? thank you in advance.

@luqmansen
Oh, I see. The current MX-64 and MX-28 device files are written based on Protocol 1.0.
You may still use these files if you are going to use default firmware of MX series.
When using Protocol 2.0, these device files also needs to be updated and you can refer to XM430 device file which is very similar to Protocol 2.0 MX DYNAMIXEL.
Please refer to product emanual for updating the control table values and you may not needed to change the torque_to_current_value_ratio and velocity_to_value_ratio as these are optional when running DYNAMIXEL with Current or Velocity control modes.
Please note that the file name should be the same as the MODEL name of the OP3.robot file (e.g. XM430-W350 refers to XM430-W350.device file)
Thank you.

This issue will be closed as there isn't any recent activity. Please feel free to reopen when necessary.


IAMAuthenticator returned a token that expired in 4 seconds

We are using IBM VPC go sdk to create VSIs for our service. And we use IamAuthenticator in this go-sdk-core to do the authentication.
       authenticator := &core.IamAuthenticator{
		ApiKey: iamAPIKey,
		URL:    iamTokenServerEndpoint,
	}

	// Create the service options struct.
	options := &vpcv1.VpcV1Options{
		Authenticator: authenticator,
		URL:           vpcURL,
		Version:     VPC_API_VERSION,
	}

        return vpcv1.NewVpcV1(options)

We have been seeing not_authorized errors when creating VSI.
We have raised support case for this error and we were told that token by the time reach to storage had expired.
In this case, IamAuthenticator returned a token that expired in 4s.
the token expires on
18:24:24Z  and it was received at
18:24:20.434Z"
(4 seconds remaining)

The IBM support told us that the global catalog considers a token expired if it has less than 5 seconds left until expiration when the request is received.
func (authenticator *IamAuthenticator) GetToken() (string, error) {
	if authenticator.getTokenData() == nil || !authenticator.getTokenData().isTokenValid() {
		// synchronously request the token
		err := authenticator.synchronizedRequestToken()
		if err != nil {
			return "", err
		}
	} else if authenticator.getTokenData().needsRefresh() {
		// If refresh needed, kick off a go routine in the background to get a new token
		//nolint: errcheck
		go authenticator.invokeRequestTokenData()
	}

	// return an error if the access token is not valid or was not fetched
	if authenticator.getTokenData() == nil || authenticator.getTokenData().AccessToken == "" {
		return "", fmt.Errorf("Error while trying to get access token")
	}

	return authenticator.getTokenData().AccessToken, nil
}

After checking the code, it seems that the cached token will be used as long as it is not expired even if it will expire within 5 seconds(although it will be refreshed).
It it possible to enhance the code to make sure the returned token's TTL is greater than 15 minutes (or a specified value)?

Checking with the global catalog service team to confirm server's behavior of (TTL <= 5 secs) --> "expired"

@leo0514 Is this issue relatively easy to reproduc, or did you get unlucky and just happened to invoke an operation within 5 seconds of the access token's time-to-live?

@leo0514 Is this issue relatively easy to reproduc, or did you get unlucky and just happened to invoke an operation within 5 seconds of the access token's time-to-live?

@padamstx This issue is not easy to reproduce. But we have been seeing this issue lately (few came in last 3 weeks).

FYI, I've opened PRs to fix this issue in the Go and Java core libraries.  The fix is pretty simple... we'll just consider an access token as "expired" when it gets to within 10 seconds of it's IAM-server reported expiration time. I'm working on the Python and Node core libraries now.  We should be able to deliver the fixes in all four core libraries within another day or so.

PR: https://github.com/IBM/go-sdk-core/pull/209

This issue was fixed in version 5.15.3.


Bug 2084545: Add missing annotations for cluster-capi-operator-secret

Currently CVO doesn't create the secret, because it doesn't contain required annotations. This PR adds them.

/bugzilla refresh


Add PubMedDiabetes.load

See: #812

Codecov Report

Merging #986 into develop will increase coverage by 0.3%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           develop    #986     +/-   ##
=========================================
+ Coverage     84.5%   84.8%   +0.3%
=========================================
  Files           58      53      -5
  Lines         4955    5300    +345
=========================================
+ Hits          4185    4494    +309
- Misses         770     806     +36

Impacted Files
Coverage Δ

stellargraph/datasets/datasets.py
83.8% <100%> (+12.9%)
:arrow_up:

stellargraph/layer/knowledge_graph.py
98.1% <0%> (-0.2%)
:arrow_down:

stellargraph/mapper/sampled_link_generators.py
91.2% <0%> (ø)
:arrow_up:

stellargraph/utils/ensemble.py

stellargraph/utils/loss.py

...rgraph/utils/saliency_maps/integrated_gradients.py

stellargraph/utils/calibration.py

stellargraph/utils/saliency_maps/__init__.py

...ph/utils/saliency_maps/integrated_gradients_gat.py

stellargraph/utils/saliency_maps/saliency_gat.py

... and 6 more

Continue to review full report at Codecov.

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

Yeah, you're right. However, unfortunately that notebook is hard to update, because it uses EdgeSplitter, which still uses NetworkX. Removing (or, at least, hiding) the use of NetworkX is work in #174, after which we can update the various link prediction demos that haven't been updated to use the new load functions.

Yeah, you're right. However, unfortunately that notebook is hard to update, because it uses EdgeSplitter, which still uses NetworkX. Removing (or, at least, hiding) the use of NetworkX is work in #174, after which we can update the various link prediction demos that haven't been updated to use the new load functions.

Ok then, it's all good as far as I am concerned.
P.


CodeBrowser deadlocks when viewing certain functions?

Describe the bug
Under various circumstances I haven't been able to fully narrow down, the act of selecting certain functions causes the entire application to become unresponsive, consuming 100% of one CPU core until I manually terminate the Java process.
At least one case I've been able to reproduce is the act of flagging a function as "inline" and then trying to view another function that calls it more than once (and triggers the bug described in #3091). Oddly, the Decompiler window does not need to be open for this to happen.
To Reproduce
Steps to reproduce the behavior:

Open the attached program (/bin/ls retrieved from Ubuntu 20.04.6 LTS x64) and analyze it with the default options
Edit the function definition for FUN_001148c0, check the "In Line" box, then press OK
Attempt to Go To address 0x00104df0
Watch Ghidra become completely unresponsive, not even allowing the "Go To ..." window to disappear

Expected behavior
The application shouldn't hang.
Attachments
ls.gz
Environment

OS: Ubuntu 20.04.6 LTS x64
Java Version: observed with both Temurin-17.0.7+7 and 17.0.7+7-Ubuntu-0ubuntu120.04
Ghidra Version: 10.3 PUBLIC
Ghidra Origin: official GitHub distro

Additional context
This did not occur in version 10.2.3

I noticed this myself yesterday using 10.4_DEV but don't know what caused it. It did eventually continue responding but took around a minute or two.

If this happens again, please produce a stack dump so we can see where the UI is spending its time.  From a terminal:
jps
jstack <pid>

Not sure exactly what the issue is, but clearly a livelock and not a deadlock.
If this is preventing you from working, you can remove the Stack Depth field from the listing to prevent the issue.

a likely related issue: when i right-clicked on a function in the listing and selected "set stack depth change", everything locked up. i did not investigate getting a java stack dump at the time, but i can do more investigation if it would be useful

I did not investigate getting a java stack dump at the time, but i can do more investigation if it would be useful

This would be helpful.  I'm assuming it is the same issue, but it would be good to confirm.

I did not investigate getting a java stack dump at the time, but i can do more investigation if it would be useful

This would be helpful. I'm assuming it is the same issue, but it would be good to confirm.

ok, attached jstack captured while interface hung after right clicking on a function in the listing, and selecting "Function > Set Stack Depth Change"
jstack.txt


When can we expect support for Laravel 5.5?

I will look at 5.5 changes to night.

The version 3.5.0 is released.


Fix css bugs of limit condition and lookback condition components in zipkin lens

I found some css bugs in limit condition and lookback condition components.
BEFORE

AFTER

thanks again


 Theme provider can't target MuiTab: {selected}

I am trying to customize MuiTab text color in createMuiTheme but failed

[x ] The issue is present in the latest release.
[ x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

The selected tab does not change color
Expected Behavior 🤔

Selected tab text should be red
Steps to Reproduce 🕹

https://codesandbox.io/s/mui3-how-to-override-tab-theme-forked-lmo6k?file=/demo.js
Context 🔦

Your Environment 🌎

`npx @material-ui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/envinfo` goes here.

Tip, increase the specificity. use .Mui-selected as CSS selector to do such.