Role Assignments that fail due to a read-only resource lock do not throw an error

Hi EPAC Team!
Describe the bug
EPAC will create Service Principals for assignments, and assign the minimum required permissions (role assignments) automatically. However, if the resource getting this role assignment is protected by a resource lock (and possibly other safeguards - I have not tested this extensively) the role assignment fails, but the script fails silently. This leads to a discrepancy between the deployed state and the defined state, where the missing role assignment will impact policy automations.
To Reproduce
Steps to reproduce the behavior:

Create a resource (for example, a Log Analytics Workspace) and apply a read-only resource lock
Create a policy assignment that requires a certain role on the resource (for example, Automation Contributor)
Run a deployment pipeline including the "Roles" deployment stage

Expected behavior
The role assignment will fail (as writing role assignments is prevented by the read-only resource lock). This should cause the script to return an error, encouraging the monkey behind the keyboard to investigate the strange red colors. Instead, the script returns, "Role assignment already exists (ignore): $($RoleAssignment.assignmentDisplayName)".
Screenshots/Info
I can do one better than screenshots, the issue is a result of the error handling on line 37, script Set-AzRoleAssignmentRestMethod.ps1,
    $statusCode = $response.StatusCode
    if ($statusCode -lt 200 -or $statusCode -ge 300) {
        if ($statusCode -eq 409) {
            Write-Warning "Role assignment already exists (ignore): $($RoleAssignment.assignmentDisplayName)"
        }
        else {
            $content = $response.Content
            Write-Warning "Error, continue deployment: $($statusCode) -- $($content)"
        }
    }

ARM will return the error,

"The scope '/subscriptions/SUBSCRIPTION_UUID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.OperationalInsights/workspaces/WORKSPACE_NAME/providers/Microsoft.Authorization/roleAssignments/26e18bc7-c730-424b-9a17-019bbf7a66a1' cannot perform write operation because following scope(s) are locked: '/subscriptions/SUBSCRIPTION_UUID/resourceGroups/RESOURCE_GROUP_NAME'. Please remove the lock and try again."

Parsing this return for the term "remove the lock" will allow the script to explicitly handle this error.
EPAC Version
10.2.11
Thank you for your hard work on this project, I truly appreciate all your effort.
--Benjamin

It must be a 409 error if that message is triggering, parsing the result as you said will allow us to customise the message.
+1 for comments about monkeys interpreting colours 😅😅
I think we would keep this as a warning, only because removing the lock may require changes/other teams/approvals - in the meantime role deployment would be blocked which may lead to bigger issues.
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Benjamin Pieplow-Rohner @.>
Sent: Monday, June 10, 2024 7:29:57 PM
To: Azure/enterprise-azure-policy-as-code @.>
Cc: Subscribed @.***>
Subject: [Azure/enterprise-azure-policy-as-code] Role Assignments that fail due to a read-only resource lock do not throw an error (Issue #661)
Hi EPAC Team!
Describe the bug
EPAC will create Service Principals for assignments, and assign the minimum required permissions (role assignments) automatically. However, if the resource getting this role assignment is protected by a resource lock (and possibly other safeguards - I have not tested this extensively) the role assignment fails, but the script fails silently. This leads to a discrepancy between the deployed state and the defined state, where the missing role assignment will impact policy automations.
To Reproduce
Steps to reproduce the behavior:

Create a resource (for example, a Log Analytics Workspace) and apply a read-only resource lock
Create a policy assignment that requires a certain role on the resource (for example, Automation Contributor)
Run a deployment pipeline including the "Roles" deployment stage

Expected behavior
The role assignment will fail (as writing role assignments is prevented by the read-only resource lock). This should cause the script to return an error, encouraging the monkey behind the keyboard to investigate the strange red colors. Instead, the script returns, "Role assignment already exists (ignore): $($RoleAssignment.assignmentDisplayName)".
Screenshots/Info
I can do one better than screenshots, the issue is a result of the error handling on line 37, script Set-AzRoleAssignmentRestMethod.ps1,
$statusCode = $response.StatusCode
if ($statusCode -lt 200 -or $statusCode -ge 300) {
    if ($statusCode -eq 409) {
        Write-Warning "Role assignment already exists (ignore): $($RoleAssignment.assignmentDisplayName)"
    }
    else {
        $content = $response.Content
        Write-Warning "Error, continue deployment: $($statusCode) -- $($content)"
    }
}

ARM will return the error,
"The scope '/subscriptions/SUBSCRIPTION_UUID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.OperationalInsights/workspaces/WORKSPACE_NAME/providers/Microsoft.Authorization/roleAssignments/26e18bc7-c730-424b-9a17-019bbf7a66a1' cannot perform write operation because following scope(s) are locked: '/subscriptions/SUBSCRIPTION_UUID/resourceGroups/RESOURCE_GROUP_NAME'. Please remove the lock and try again."
Parsing this return for the term "remove the lock" will allow the script to explicitly handle this error.
EPAC Version
10.2.11
Thank you for your hard work on this project, I truly appreciate all your effort.
--Benjamin
—
Reply to this email directly, view it on GitHubhttps://github.com/Azure/enterprise-azure-policy-as-code/issues/661 or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACWCJVUDAM7DY73A56VS7WTZGVWZLBFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLKRSG4ZDKOJYHE2DOOFENZQW2ZNJNBQXGX3MMFRGK3ECUV3GC3DVMWSHI4TVMWSG4YLNMWXHOYLUMNUF6YLDORUXM2LUPGWHG5LCNJSWG5C7OR4XAZNFJFZXG5LFUZ2G64DJMNZZHAVEOR4XAZNKOJSXA33TNF2G64TZUV3GC3DVMWUTGMZXGE3DEOBTHCBKI5DZOBS2K2LTON2WLJLWMFWHKZNKGIZTIMZTHE3TMNJZQKSHI6LQMWSWYYLCMVWKK5TBNR2WLKRSG4ZDKOJYHE2DOOFHORZGSZ3HMVZKMY3SMVQXIZI.
You are receiving this email because you are subscribed to this thread.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Wand doesn't show spellbook page number

when scrolling the spellbook in the wand the page number doesn't show, only hex.spellbook.tooltip.page, same with hovering over the spellbook, I think it might be because it's just "hex" instead of "hexcasting" but I can't check (my IDE isn't playing nice)

Closed by 65acd40!

(Is that Vivenna?)

yeah, it is! it's by Shuravf, I just commandeered the picture


brew edit --print-path --formula src prints src not the full path

brew doctor output
❯ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: The filesystem on /System/Volumes/Data appears to be case-sensitive.
The default macOS filesystem is case-insensitive. Please report any apparent problems.

Verification

[X] My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
[X] I ran brew update twice and am still able to reproduce my issue.
[X] This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output
❯ brew config
HOMEBREW_VERSION: 4.1.11
ORIGIN: https://github.com/Homebrew/brew
HEAD: 1f80e82dd72fce6642e4ea360f7a1feef5d78470
Last commit: 3 hours ago
Core tap JSON: 15 Sep 19:55 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 14.0-arm64
CLT: <IP_ADDRESS>.1.1692336968
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?
Get the path to the src core formula
What happened (include all command output)?
❯ brew edit --print-path --formula src
src

What did you expect to happen?
Same as if you fully specify the formula:
❯ brew edit -dv --print-path --formula homebrew/core/src
/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/s/src.rb

Step-by-step reproduction instructions (by running brew commands)
brew edit --print-path --formula src

Can't reproduce with or without homebrew/core tapped. Do you have a src directory or file in your current working directory?

Oh wow, yes that's totally it, I have a src/ directory, and it works when I cd somewhere else. I would never have thought to check $PWD. Is this intended behaviour?

It's an unintentional consequence of sharing code with brew style's intentional behaviour of allowing to take in any arbitrary path as an argument, rather than necessarily a valid package name.

This has come up before (https://github.com/Homebrew/brew/issues/14895) and personally I think this behavior is confusing and unexpected. @MikeMcQuaid mentions in that issue that this is an intentional part of some users workflows though it seems like there are better options for opening files in the current directory. I think this is particularly confusing when the --formula or --cask options are passed to brew edit since that implies that relative files/directories should not be returned.
Other than deprecating this behavior entirely, we could always just print expanded paths whenever --print-path is set and at least then it would be clearer to the user what is happening.

Other than deprecating this behavior entirely, we could always just print expanded paths whenever --print-path is set and at least then it would be clearer to the user what is happening.

This seems like a good idea 👍🏻

this is an intentional part

The feature was added to brew edit by accident when Cask support was added.

I think this is particularly confusing when the --formula or --cask options are passed to brew edit since that implies that relative files/directories should not be returned

I agree with this - the logic should probably be skipped if only is set.

Perhaps also this could default to a formula if one exists, so preferring src.rb over ./src/. I guess maybe that's a breaking change, but especially when --print-path is set, I struggle to see the use-case for wanting to do brew edit --print-path src to get src/, so 🤞  no-one started relying on that undocumented behaviour.

To add --formula parameter fix to edit.rb, I tried to simplify the flow in #16029, but run into incompatible rubocop requirements.

I think we should deprecate the behavior of reading relative files/directories in brew edit.
This would mean adding a deprecation warning for users if local files exist that shadow formula/tap names.
It would also mean modifying Homebrew::CLI::NamedArgs#to_paths to add an option to skip local/relatives files/directories. This would allow us to keep the current behavior for brew style while updating brew edit to the expected behavior.
This might break some users' workflows. I believe that that is not a big deal though because there are other options when it comes to opening relative files and the brew edit command is not destructive so changing things should be low risk.

@MikeMcQuaid You've mentioned multiple times that we should keep the current behavior because users will complain otherwise. Can you give use some examples of the users this change will negatively affect and why other approaches wouldn't work for them?

I think we should deprecate the behavior of reading relative files/directories in brew edit.
@MikeMcQuaid You've mentioned multiple times that we should keep the current behavior because users will complain otherwise. Can you give use some examples of the users this change will negatively affect and why other approaches wouldn't work for them?

I disagree. People use this and it's easier to resolve this confusion with messaging (i.e. always output a full, resolved path when editing or with errors) and then it allows them to continue to use these workflows.
An example workflow I've seen a few people do:

git clone a tap outside of Library/Taps
cd into that tap and brew edit Formula/something.rb

This neither seems harmful or undesirable, other than confusion like in this issue.

This would allow us to keep the current behavior for brew style while updating brew edit to the expected behavior.

I think it's also desirable that brew style Formula/something.rb || brew edit Formula/something.rb works as expected.

I still don't think brew edit --cask Formula/something.rb working is desirable behaviour and path arguments should only be interpreted as such without --formula/--cask.

I agree that that should fail. Whether brew edit --formula Formula/something.rb should work: I don't really care and could be convinced either way but mostly would be convinced by "the implementation is simpler this way".

I disagree. People use this and it's easier to resolve this confusion with messaging (i.e. always output a full, resolved path when editing or with errors) and then it allows them to continue to use these workflows.
An example workflow I've seen a few people do:

git clone a tap outside of Library/Taps
cd into that tap and brew edit Formula/something.rb

This neither seems harmful or undesirable, other than confusion like in this issue.

It's harmful because this undocumented behavior has precedence over all of the documented and therefore expected behaviors of brew edit. Beyond that if someone is specifying the full path to a file, using brew edit <path> is not any more convenient than $EDITOR <path>. brew style <path> in contrast doesn't have any clear alternatives and this behavior is documented for that command.
The only argument for keeping the current behavior as I see it is momentum. It shouldn't be a big deal to remove support for undocumented behavior with clear alternatives; we do that regularly already.

After making https://github.com/Homebrew/brew/pull/16030/files I think there is also a structural problem - cli/named_args.rb:to_paths decides the user flow for brew edit and brew style.  But it really should just expand the paths and let those commands handle the processing logic.
Maybe the path should be more complicated object after this function.
   path = "meh"
   path.formula = "Formula/meh.rb"
   path.cask = nil
   path.dir = "meh"

The only argument for keeping the current behavior as I see it is momentum.

For a package manager with millions of users and thousands of users: the "momentum" argument is non-trivial.

It shouldn't be a big deal to remove support for undocumented behavior with clear alternatives; we do that regularly already.

If we were talking about removing it from style and edit: I'd see the logic. Ultimately, though: this needs handled for both and edit is the only place there's confusion so we should handle it there.

Maybe the path should be more complicated object after this function.

I don't think the internals are the problem here.

edit is the only place there's confusion so we should handle it there.

There is actually a wider question to be had here. This is how the following currently behave:
$ cd ~

$ brew formula hello
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/h/hello.rb
$ brew formula Library
Library
$ brew formula /etc
/etc

$ brew formula hello
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/h/hello.rb
$ brew formula Library
Library
$ brew formula /etc
/etc

$ brew log hello
(git log output)
$ brew log Library
[if not in git directory]
fatal: not a git repository (or any of the parent directories): .git
[if in git directory]
Warning: . is a shallow clone so only partial output will be shown.
To get a full clone, run:
  git -C "" fetch --unshallow
(git log output)

$ brew audit --installed Library
(runs `brew style Library`, not installed formulae, and then audits over the installed formulae, not Library)

The follow up question is how should each of the the previous behave?

I still don't think brew edit --cask Formula/something.rb working is desirable behaviour and path arguments should only be interpreted as such without --formula/--cask.

I agree that that should fail. Whether brew edit --formula Formula/something.rb should work: I don't really care and could be convinced either way but mostly would be convinced by "the implementation is simpler this way".

The easiest way to deal with it is:
diff --git a/Library/Homebrew/cli/named_args.rb b/Library/Homebrew/cli/named_args.rb
index 98ab981c1..f0bf6ab74 100644
--- a/Library/Homebrew/cli/named_args.rb
+++ b/Library/Homebrew/cli/named_args.rb
@@ -230,7 +230,7 @@ module Homebrew
         @to_paths[only] ||= Homebrew.with_no_api_env_if_needed(@without_api) do
           downcased_unique_named.flat_map do |name|
             path = Pathname(name)
-            if File.exist?(name)
+            if File.exist?(name) && only.nil?
               path
             elsif name.count("/") == 1 && !name.start_with?("./", "/")
               tap = Tap.fetch(name)

There's perhaps also an priority argument to be had too. If you run brew style src, what should take priority - a src directory or a src formula?

The follow up question is how should each of the the previous behave?

Great question. Here's what I think the ideal behaviour/output would be:
$ cd ~

$ brew formula hello
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/h/hello.rb

$ brew formula Library
/Users/mike/Library
$ brew formula /etc
/etc

# alternatively:

$ brew formula Library
Error: /Users/mike/Library is not a formula!
$ brew formula /etc
Error: /etc is not a formula!

$ brew log hello
Git log for /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/h/hello.rb:
(git log output)
$ brew log Library
[if not in git directory]
Error: no /Users/mike/Library/.git directory found!

$ brew log Library
[if in git directory - and one that's not even a shallow clone like the warning suggests]
Git log for /Users/mike/Library:
Warning: . is a shallow clone so only partial output will be shown.
To get a full clone, run:
  git -C "" fetch --unshallow
(git log output)

$ brew audit --installed Library
Error: no formulae or casks found in /Users/mike/Library!

The easiest way to deal with it is:

This makes sense to me 👍🏻

There's perhaps also an priority argument to be had too. If you run brew style src, what should take priority - a src directory or a src formula?

I think the src directory but the output should be clear that that's what it's looked at.

It looks like we're already in agreement about the expanding paths in brew edit --print-path so that should be an easy thing to add. I'll make a PR for that.
The current eval order:

local file/dir
tap

This only works with tap/name and not tap name syntax.

formula/cask

This includes local files because of the path loaders so it includes ./formula.rb.

local file/dir

Included even if the file/directory doesn't exist as a catch-all.

I still think it's more intuitive to make local files/directories lower priority for this specific command but we should update the docs to mention it either way. The brew style man page includes this paragraph which we could use as a guide.
Check formulae or files for conformance to Homebrew style guidelines.

Lists of file, tap and formula may not be combined. If none are provided,
style will run style checks on the whole Homebrew library, including core code
and all formulae.

In comparison, this is what we have for brew edit right now.
Open a formula, cask or tap in the editor set by EDITOR or
HOMEBREW_EDITOR, or open the Homebrew repository for editing if no argument is
provided.

I'd like to discuss other commands too if possible but maybe that'd be worth making another issue for since it's not directly related to this one. Just to make it easier to follow.

By keeping local files/directories as the highest precedence option we're essentially signaling that this is the most common expected use case of this command.

I don't agree with this take. It's almost certainly too much work but I think brew edit src should be lower precedence than brew edit ./src or brew edit src/foo or brew edit src.rb or brew edit src/ i.e. if it looks a lot more like a path: take that as the user requesting a path and if it's ambiguous: I don't mind as much how we resolve it.
As I keep saying, though: I think the main issue here is just communicating through the command output what is being edited.

I'd like to discuss other commands too if possible but maybe that'd be worth making another issue for since it's not directly related to this one. Just to make it easier to follow.

Yeh, happy to discuss that in another issue 👍🏻. I think ideally there'd be as much consistency between commands as possible.

The ambiguous ones are brew edit src and brew edit user/repo/src for referencing formulae and brew edit user/repo for referencing taps.
It should be easy enough to add handling for the other cases though. Anything that starts or ends with a slash or includes a period should be treated as a file path by default. Strings with periods and strings that start with slashes are already unambiguous. Interesting that as currently written brew edit src/ is ambiguous unless it is a url that matches one of the formula/cask loaders. If there isn't a local directory that matches, we treat it as a tap which doesn't really make sense.
diff --git a/Library/Homebrew/cli/named_args.rb b/Library/Homebrew/cli/named_args.rb
index bfa013001..0fd56ae5d 100644
--- a/Library/Homebrew/cli/named_args.rb
+++ b/Library/Homebrew/cli/named_args.rb
@@ -230,9 +230,7 @@ module Homebrew
         @to_paths[only] ||= Homebrew.with_no_api_env_if_needed(@without_api) do
           downcased_unique_named.flat_map do |name|
             path = Pathname(name).expand_path
-            if only.nil? && File.exist?(name)
-              path
-            elsif name.count("/") == 1 && !name.start_with?("./", "/")
+            if name.match?(%r{^[^./]+/[^./]+$})
               tap = Tap.fetch(name)

               if recurse_tap

Something like this would work I think.

Something like this would work I think.

Yup, that seems like a good idea.


Basic snapshot/restore through dumps stored in S3 bucket

Thanks for sharing this great idea and codebase in the cf summit session. I find interesting the idea of materializing dumps as service instances. We're planning on trying to the data-lifecycle-service-broker to propose a basic way for our user to perform the proposed tasks:

backup/restore of a given db service instance (plan "restore")
snapshot of a given db service instance, and then cloning it into a new service instance (adding the anonymisation step, plan "clone")

We're thinking to start with a basic approach suiteable for low volume dbs that would use the standard clients to dump the content of the service instance into a S3 bucket, and then restore into an existing instance or create a new instance from this dump. This approach is therefore iaas independent, and appliceable to a large set of dbs, provided their clients provides the ability to dump its content into a file.
More specifically, to start with the case of a p-mysql service instance, the first prototype could be as follow:
a custom fork of the data-lifecycle-service-broker broker (as a cf app) with 3 bound services:

a source p-mysql database service instance we want to make a copy of (this corresponds to the instanceId passed into https://github.com/krujos/data-lifecycle-service-broker/blob/master/src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/provider/CopyProvider.java  which is currently supposed to be provided by a specific env variable)
an S3 endpoint for storing backup/snapshot dumps
a user-provided-service containing the credentials of a cloudfoundry account (user/password) allowing to make calls to the CC API to create new service instances (using the cf-java-client)

This custom fork of the data-lifecycle-service-broker would do the following:

when the provision phase is called (i.e. translating to a call to https://github.com/krujos/data-lifecycle-service-broker/blob/master/src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/provider/CopyProvider.java  ), the CopyProvider impl would use mysql dump to dump the bound p-mysql service instance into a S3 bucket, and return the Id of this bucket. As to avoid reaching the cf app ephemeral disk and RAM limits, optimization such as streaming the dump to S3 using multipart uploads.

With the "clone" service plan:

when the bind instance is called (i.e. translating into a call to https://github.com/krujos/data-lifecycle-service-broker/blob/master/src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/provider/CopyProvider.java ), it extracts the app guid from https://github.com/cloudfoundry-community/spring-boot-cf-service-broker/blob/fd81650388d25ca38d97a9e0b5777b33d8a6ce01/src/main/java/org/cloudfoundry/community/servicebroker/model/CreateServiceInstanceBindingRequest.java  and uses the  cf-java-client/cc api to lookup in which space this app is currently deployed. It then calls the cc api to do an equivalent of "cf target -s this space; cf cs p-mysql 100mb mysql-copy". It then retreives the credentials of the created mysql (through the upcoming broker service key feature[1], or binding a fake app just to get access to the bound service credentials through “cf env” cc api call equivalent), and connects the mysql dump to restore the dump stored in the S3 bucket. It returns the service key credentials in the credentials
when the unbind instance is called, it uses the cc api to delete the p-mysql mysql-copy instance,
when the delete instance is called, it removes the bucket from S3

With the "restore" service plan:

when the bind instance is called (i.e. translating into a call to https://github.com/krujos/data-lifecycle-service-broker/blob/master/src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/provider/CopyProvider#getCreds() it imports the dump from the specific S3 bucket into the original db, and returns the original creds
when the unbind instance is called, it does nothing
when the delete instance is called, it simply removes the bucket from S3 bucket

Pending limitations of this approach: there is a need to have a service broker registered in the marketplace for each source service instance we want to backup/restore snapshot/clone, which is cumbersome, pollutes the marketplace, and causes confidentiality issues.
A potential evolution, once the arbirary service params feature would be out, would be to have a unique service broker, and pass to it a source db service instance binding guid (or alternatively a spaceid, service instance name, and an app name), and the broker would dynamically lookup the associated credentials to perform the dump.
[1] https://docs.google.com/document/d/1rHH-QeMKHEksLoFKYh3XfzSY3EBgQCf-tFoj0SF0a7Q/edit?usp=sharing
I am keen on exchanging on this idea, and get feedback prior to sending a PR once the prototype is working.

Hi @gberche-orange, thanks for submitting this! I'm excited to collaborate. I'm still chewing on it and anticipate some more in depth comments soon! I wanted to point you to the branch where I'm breaking out changes, as that will hopefully allow for an easier extension model. Ideally we can use fewer forks. The big thing that's jumping out at me is your need to specify a different catalog endpoint. Still reading and thinking!
https://github.com/krujos/data-lifecycle-service-broker/tree/deconstruct

Okay, so chewing on it a bit more. The restore use case is one I'd like to understand better. I'm not sure I'm clear on what you're trying to achieve there. It reads to me as if you overwrite the source data, and then delete the copy? Can you tell me more about what you're trying to achieve from a user perspective?

Thanks for your feedback, and pointing the inconsistencies in the "restore" plan during unbind. I've editted the initial proposal to fix this.
One use-case for the restore plan is:

before deploying a new version of an application, app-ops want to perform a backup of their db
the new version of the application is deployed (which alters the db schema and db content)
if the deployment shows regressions, they can restore the backup, and rollback to initial app version.

In this case, the usage of the service broker would be as follow:

create data-sb instance (service plan=restore), called "backup-before-upgrade-to-version-n"
deploy app version N+1
watch app metrics. As they show unacceptable regression, decide to rollback
create data-sb instance (service plan=restore), called "backup-on-version-n-plus1-before-rollback-to-n"
bind data-sb instance "backup-before-upgrade-to-version-n"
rollback app to version N

One missing use-case would be to clone data-sb instance "backup-on-version-n-plus1-before-rollback-to-n" in order to reproduce/diagnose in dev. I see that possible in the future if the "binding params" (mentionned at a time on vcap-dev) finally get implemented. In which case, the service broker would expose a single plan, and depending the binding parameter would perform a clone or a restore action.
I also share your concern w.r.t. the current 60s bind duration limit: it might indeed be too short for some large S3-based dumps to be imported. In terms of alternatives:

having the bind and unbind also be async. But not clear this would come any time soon as it might not be useful to other traditional brokers
split the broker in two brokers:

a "data-dump-broker" that only performs dumps.
an "import-dump-broker" that accept the dump in bind arbitrary service param, with two service plans, or potentially it self split in two brokers:

a "restore-dump-to-existing-instance" broker
a "restore-dump-to-new-instance" broker

The later solution seems more realistic and flexible, and supports the use-case of cloning a "backup" instead of being forced to "restore" it. The main downside being the need to pass in arbitrary service params in json, which may require a CLI plugin to make it user-friendly and productive.
I'm not sure I understand your comments about the Brooklyn and Eureka, I'll watch their summit session now.
Also I don't understand your comment about having two service endpoints (I was originally thinking of a single endpoint exposing two service plans "clone" and "restore" service plans.
Thanks again,
Guillaume.

I'd like to suggest an alternative implementation that may fit within the existing service broker architecture a bit better. Create a service broker which makes a full clone / copy of a target upon service provisioning (cf create-service plan=copy) and loads it into an other database.
For example:
1 cf create-service NewBroker Copy NewInstance
1.1 NewBroker does a mysql dump to s3 of it's production instance
1.2 NewBroker creates a new MySQL instance (this could use the existing MySQL broker)
1.3 NewBroker does a db load based on info from the new instance.
2 cf push app-v2 --no-start
3 cf bind-service app-v2 NewInstance
4 cf start app-v2
5 migrations etc happen now.
6 cf stop app-v1
This has a couple of advantages. The first is that recovery is an explicit action, not a side effect. The second is that recovery is much simpler and much quicker. In a rollback scenario, simply delete app-v2 and restart app-v1. When you're satisfied that app-v2 is healthy, you can delete app v1 and the associated service instance. Thirdly, it fits within the existing async framework. Lastly, it gives you the clone case that was missing.
If I were implementing this I think I'd try to proxy the p-mysql broker for all the creation and binding logic, and insert the copy code in between. Theres some credentials issues to sort through there, can one broker know anthers password, or are we actually brokering the db creds (which is what I'm doing in my implementation from summit).
Thoughts? Would this work better for you? It feels a bit easier to me to implement and for users to consume.
My other comments. The framework (data-lifecycle-service-broker) presents a catalog via an @service annotation. For your use case you would need to supply your own. I'd not thought about that previously and you pointed out a gap. I believe it will be easy to address, I'd just not thought of it.
Brooklyn and Eureka seem like good ways to avoid having to deploy a broker per database, but I think that's a future problem.

This model (full clone on "provision") seems simpler, with the following trade-offs:

a given S3 dump can only be instanciated once, and is only used as transient storage between dump and import. This could as well be a streamed export dump to import without S3 storage.
it's potentially much more expensive to keep p-mysql instances up as snapshot "in case something happens", than having S3 buckets as cold snapshots (a p-mysql instance would typically use high IOPS storage, replicated within the galera cluster), plus mysql import statement might be slow to execute "just-in-case)

Point 1: If your desire is to have a persistent backup then you need to store it outside the system. So yes you could streamline it, but then you loose the backup.
Point 2: depends on how long it takes you to figure out something went wrong and if you can accept the downtime or degraded performance (not knowing the apps I can only speak in the abstract, which makes me dangerous :)). If you're doing immediate cut overs to the new then you could delete the database straightaway and only restore if there was an issue. Your trading cost for risk there.

I refined the idea above in a design document: detailing requirements, and possible designs.
I'd be happy to get thoughts on this, improvements, whether this could be useful for the community. Feel free to comment in the google doc, or continue high-level conversation here.


Custom editor reopens files with dirty icon when restarting VS code

VSCode Version: 1.46.0 insiders
OS Version: Windows 10

Steps to Reproduce:

Build the pawDraw sample
Run
Edit a pawdraw file
Save it.
Reload VS code

Expected: pawdraw file opens
Actual: vs code issues an error saying it can't load the backup file.
In the API I can see the openCustomDocument parameters containing a backup id in the context when it's not expected.
If instead you don't reload VS code, but just reopen the edited pawdraw file, it works fine.

Does this issue occur when all extensions are disabled?: N/A

For the python extension we're not loading the backup file in this case (we don't fail to load if the file isn't there), but the tab for the editor looks as if an edit has occurred.

Duplicate of #99293 I believe


v1.0.0 Checklist

[ ] Document DynamoStore
[x] Codec Interop with FsCodec
[ ] Propulsion equivalent? (Propeller has shared types, but we might want a Sink/Source abstraction, but this is node so that seems overkill)
[ ] Partition the DynamoStore index?
[ ] Example application as a boilerplate repo?
[ ] Prove out CDK

Hi @nordfjord
Is this library stable, can we use it in production?

It’s stabilising as we speak. The message-db store is being used in production by a few people including my employer. The dynamo store has not seen production usage yet. It’s a port of the F# version and I believe there’s at least two production users of that version.
We’re have an equinox channel on the DDD/CQRS/ES discord if you want to chat/ideate!
https://discord.gg/nPMCupfEc7

To be clear, the messagedb store is production ready, but I would hold off on the dynamostore for now, unless you’d like to become the first production user with everything that entails.

Thank you the quick responses. I'd prefer PostgreSQL (MessageDB) to DynamoDB.
Is this kind of architecture (comprising 3 layers/processes) possible, does it even make sense?

Web controller layer/process dispatches the commands.

Command handler is an intermediate layer comprising the business logic and publishes two types of events: a. Domain (internal, private to a microservice) events b. Integration events (exposed outside of the service)

c. Event sourcing process (equinox-js, in this case) does the 3 things: a. event sourcing (store domain events in a db) b. implement Outbox table (store integration events temporarily) c. Write integration events to Kafka i.e. doing the job of Kafka producer
The intermediate Command handler is what I want to be language-independent.

Thanks for this. I’m on mobile at the moment, but I’ll come back to you with a well formed response in a few hours! In the meantime I really do recommend joining the discord, we’re a friendly bunch who have a lot of experience building event sourced applications.

Thank you, I will surely join tomorrow.

Thank you the quick responses. I'd prefer PostgreSQL (MessageDB) to DynamoDB.
Putting my application into production will take several months and I can hope
this library will be quite mature by then.

Is this kind of architecture (comprising 3 layers/processes) possible, does it
even make sense?

Web controller layer/process dispatches the commands.

We tend to avoid the Command terminology in equinox. It tends to look great for
toy examples, but as soon as you get into real-world territory we've found it
more a hinderance than a help.
If you think about it there's not much difference between an object representing
a Command and a function.
type Command =
  | { type: "Increment"; data: { by: number } }
  | { type: "Decrement"; data: { by: number } };

type State = number;

const decide = (command: Command) => (state: State) => {
  switch (command.type) {
    case "Increment":
      return state < 10
        ? [{ type: "Incremented", data: { by: command.data.by } }]
        : [];
    case "Decrement":
      return state > 0
        ? [{ type: "Incremented", data: { by: command.data.by } }]
        : [];
  }
};

vs
namespace Decide {
  export const increment = (by: number) => (state: State) =>
    state < 10 ? [{ type: "Incremented", data: { by } }] : [];
  export const decrement = (by: number) => (state: State) =>
    state > 0 ? [{ type: "Incremented", data: { by } }] : [];
}

What we preach is that a single "CommandBus" is detrimental to your
architecture. Instead we choose to instantiate domain service and call methods
on them directly. With the counter example above the domain service might look
like
class Service {
  constructor(
    private readonly resolve: (id: string) => Decider<Event, State>,
  ) {}

  increment(id: string, by: number) {
    const decider = this.resolve(id);
    return decider.transact(Decide.increment(by));
  }
  decrement(id: string, by: number) {
    const decider = this.resolve(id);
    return decider.transact(Decide.decrement(by));
  }

  // prettier-ignore
  static createMem(store: VolatileStore) {
    const category = MemoryStoreCategory.create(store, categoryName, codec, fold, initial)
    const resolve = (id: string) => Decider.forStream(category, streamId(id), null);
    return new Service(resolve);
  }
}

And in your http/message-handler/whatever layer you'd construct this service and
use it
class CounterConsumer {
  constructor(
    private kafka: Kafka,
    private counter: Counter.Service,
  ) {}

  async start(signal: AbortSignal) {
    const consumer = createConsumer(this.kafka);
    consumer.run({
      async eachMessage(msg) {
        await counter.increment(getId(msg.value), getCount(msg.value));
      },
    });
  }
}

There's a full example application including read-models avalaible in the source

Command handler is an intermediate layer comprising the business logic and
publishes two types of events: a. Domain (internal, private to a microservice)
events b. Integration events (exposed outside of the service)

I would wholeheartedly advise against this architecture. Your service is part
of a context and if it needs to expose integration events for other services
that should be done the same way you create read models, with a consumer tailing
your store.
function createHandler(kafka: KafkaProducer) {
  return async (stream: StreamName, events: ITimelineEvent[]) => {
    await kafka.send({
      topic: TOPIC,
      messages: await mapToIntegrationEvents(stream, events),
    });
  };
}
async function main(signal: AbortSignal) {
  const kafkaProducer = createKafkaProducer(signal);
  const handler = createHandler(kafkaProducer);
  const source = MessageDbSource.create({
    pool: followerPool() ?? leaderPool(),
    batchSize: 500,
    categories: ["MyCategory"],
    groupName: "IntegrationEvents",
    checkpoints,
    handler: handle,
    tailSleepIntervalMs: 100,
    maxConcurrentStreams: 10,
  });

  await source.start(signal);
}

Event sourcing process (equinox-js, in this case) does the 3 things: a. event
sourcing (store domain events in a db) b. implement Outbox table (store
integration events temporarily) c. Write integration events to Kafka i.e. doing
the job of Kafka producer

See above

The intermediate Command handler is what I want to be language-independent.

I'd say having your events stored in message-db is enough for them to be
interoperable in many languages, we have services written in JS and F# using the
same message-db instance for storage and reading the same events in some cases.
Hope this helps, and again, feel free to reach out on the discord to talk about
these sorts of architectures in more detail!

1.0 is already out for a while, closing this


Doc needs MORE Screenshots

For this project to gain traction, there need to be screenshots for every page that has an example application. Especially the ones that us the .kv files.
I'm willing to contribute screenshots, if someone will point me to where to submit them.
ref #710

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25366858-doc-needs-more-screenshots?utm_campaign=plugin&utm_content=tracker%2F42681&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F42681&utm_medium=issues&utm_source=github).

check #3374 as well.

Perhaps it's that I'm not a visually driven person, but this does not seem so important to me.
There are lots of screenshots in the guides, and in other places I feel enough for a person to be pretty fluid in Kivy by the time they need them? How do others feel?
If it's felt important, I'm certainly willing to try a sweep through adding these, I think initially just for the kv examples as I agree these are more important and kivy specific.

We are closing some of the stale issues, please create a new pr if you'd like to work on this feature, or get in touch with us on #kivy-dev.


Update to the latest updates of ncbi blast and mito parse

Update to the latest versions of NCBI blast plus and parse_mito_blast
Installation sequence for tool-installers

[x] Test using @galaxybot test this
[x] Inspect CI output for expected changes
[x] Deploy using @galaxybot deploy this if test install was successful
[ ] Merge this PR

@Delphine-L ,
Should these tools be updated on Test too?

I don't need them on test, but I can make another PR for updating them on test if needed

@galaxybot deploy this

I don't need them on test, but I can make another PR for updating them on test if needed

That might not be a bad idea, as Test and Main would be in-sync. Thanks.

That might not be a bad idea, as Test and Main would be in-sync. Thanks.

Maybe that's a good thing to do, but we don't support that in the same PR. I'm also gonna say test is hopelessly behind main, so I think that's just holding up people.

@galaxybot test this

These seem to be installed already, odd, but OK.

That might not be a bad idea, as Test and Main would be in-sync. Thanks.

Maybe that's a good thing to do, but we don't support that in the same PR. I'm also gonna say test is hopelessly behind main, so I think that's just holding up people.

Right, the Test tool update was done in a separate PR. I understand that Test is vastly behind Main. I guess we can either incrementally sync Test with Main (which I favor, hence, the PR comment), or completely give up on syncing them.

Option 3 is to mount main's cmvfs for the tool config, which would make test so much more useful for testing. We barely have enough time to keep main updated.


MessageDecorator: fix removeHeader() return value

MessageDecoratorTrain::removeHeader() should return bool as it's PHPDoc stats "This method should return true if the header was successfully deleted, and false if the header did not exist").
Currently this method doesn't return anything and this PR fixes the issue.

@evert / @jakobsack: hey guys, i found out that MessageDecoratorTrait::removeHeader() doesn't propagate return value (although PHPDoc suggests it should), so i wrote a test for it + fixed it.
Also I found out that I needed to run code-style fixer in order to make build pass.
View the commits one-by-one for simple code review.
Let me know if you've got any concerns.
Thanks for your time! :)


Derive Debug for CoreBPE struct

Want to be able to include the CoreBPE struct within another struct and derive Debug.

Thanks for the contribution here. I avoided adding this initially because I didn't want to deviate too far from the original OpenAI code. The change here sounds reasonable.


Implement a view-only mode

I would like to be able to share my dashboard with people without exposing private details such as the peer's IP / port, as well as exposing the add / remove neighbor functionality to the public;
The ask is to setup a launch flag that will enable a view-only mode;
This mode will hide the private details of each peering connection - it will show only the transaction graphs and associated tag.

I also would be interested into this 👍


Read and Write API issues

VaultTemplate.write Issue:
MySecretData mySecretData = new MySecretData();
mySecretData.setUsername("walter");
mySecretData.setPassword("white");
vaultTemplate.write(
"/secret/myapplication/user/3128",mySecretData);
Expected:
Sucesss
Actual:
404 - Not found error.
To make it work made following changes:
MySecretData mySecretData = new MySecretData();
mySecretData.setUsername("walter");
mySecretData.setPassword("white");
HashMap<String,MySecretData> hm = new HashMap<String,MySecretData>();
hm.put("data", mySecretData);
	try {
		vaultTemplate.write(
		"/secret/data/myapplication/user/3128",objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(hm));
	}catch(Exception e) {
	}

Note the change in path to include "data".
Vault API expects JSON object structured like {"data":{}}.
Converted target object to a Hashmap with a dummy key "data".
Used Jackson library to produce JSON and pass to write method.
VaultTemplate.read issue.
Vault API returns a JSON object with "data" and "metadata" sections.

Use the VaultKeyValueOperations via VaultOperations. opsForKeyValue("data", KeyValueBackend.versioned()).

Hi Mark,Apologies but I tried in with VaultKeyValueoperations and continue to get '400 bad request' if I follow the examples as described.I may be missing something about Vault but I followed code samples as per documentation available online.thanksVyas
On Friday, December 14, 2018, 4:48:54 PM EST, Mark Paluch<EMAIL_ADDRESS>wrote:

Closed #347.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

We've got a working sample in https://github.com/mp911de/spring-cloud-vault-config-samples at KeyValueTests. This sample uses Vault 1.0 and here's a pointer to how Vault is configured.
You might want to enable wire logging along using Apache's Http client to see what's happening on the wire.

Thanks Mark,
Got this to work finally. It wasn't an issue with the code since I coded exactly the same way but vault config on the back end.
I am running vault server on windows, instead of running the bash script, i executed few commands in that set up related to kv engine.
thanks much
Vyas


Coupling objperm

This is possible solution to issue #166 .
The approach is to check permissions on record early on.
The key challenge is the limited interaction a plugin has with core objects. We keep running around in circles trying to intercept the correct event to run the correct code. The coupling code is split in many parts ; it's difficult to reason about its state and behavior.
I didn't measure the performance impact (each coupled record is first inserted, and then updated).

Hi @jean1,
thanks again for your work! Some tips to keep the review process simple:

You can run the tests locally on your machine, otherwise you'll lose lots of time waiting for GitHub. I usually run them with manage.py test -v2 --keepdb netbox_dns, which is much faster than the GitHub CI cycle.
Please do not merge. That adds a lot of unnecessary commits, a rebase is usually fine. And while you're at it, you can also remove all the unnecessary commits that the merge created, and the ones that you needed to reformat etc. Having so many commits makes it impossible to review your changes.
As long as your PR isn't ready for merging, please mark it as a draft. That makes it clearer that you are still working on it, which you obvioisly are.

A couple of commits for a complex change is fine, though.


support quick iteration when developing a repair strategy

It would be nice to be able to quickly iterate over an in-development repair strategy, without needing to build too many things (e.g. docker images), so that we can quickly evaluate new ideas.

We do support local deployment, using --local
This assumes the environment is setup to run the repair tool.

Hi @rshariffdeen!
I added this issue following a discussion with @Marti2203, where he said that there might be some issue with accessing the benchmarks. Maybe he can explain better what the issue would be.

Hi @andre15silva ,
in-development repair techniques can be used in two ways,

deploying and testing on local machine, can be used with --local flag which expects the invocation can be executed (i.e. system paths are configured if using aliases)
locally built docker image exist for tool, specifying the local image name in the driver is sufficient

let me know if this helps, or you are looking for a different setup?

Hi @andre15silva , I have developed an implementation of the discussed idea in commit b8256eba  - there is a folder called dynamic where your tool can be stored, this allows you to quickly update your codebase and not have to rebuild the containers.


Change name to Kubernetes Basics. Compress introduction to each step.

This change is

LGTM. I'll merge.


HHH-18832 Bytecode enhancement skipped for entities with "compute-only" @Transient properties

https://hibernate.atlassian.net/browse/HHH-18832

FWIW this seems to fix the test failure in Quarkus -- I tested locally using https://github.com/quarkusio/quarkus/pull/44391 and a snapshot of ORM built using this PR.

Thanks. Backporting as #9245.


Issue when creating new release if main branch is protected

I just turned on branch protection on the main branch and ran into issues when creating a new release. When I had no branch protection it worked fine.
The job "UpdateVersionNumber" gives the following output message.

remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: At least 1 approving review is required by reviewers with write access.
To https://github.com/--******/PTE-ABC123
! [remote rejected] main -> main (protected branch hook declined)

The only rule I am using is the "Require a pull request before merging". How to get around this?

Will look into this next week

Currently having issues with updating the version number that i think is related to this.

pull request create failed: GraphQL: GitHub Actions is not permitted to create or approve pull requests (createPullRequest)
Error: Increasing the version number failed.

Solved the issue by going to my organization and enabling "Allow GitHub Action to create and approve pull requests" at Settings -> Actions -> General. After enabling the this setting I can now protect the branch and create a release. However this creates a pull request that i need to approve each time i update the version number from the action or when creating a release.

If you set the Direct Commit to Y, then it will commit directly instead of creating a PR:

I will see if I can check whether it is allowed to create a PR - and then fail with a better error message.


Traceback (most recent call last):
File "style_transfer/train.py", line 167, in
main(args)
File "style_transfer/train.py", line 79, in main
d_acc = trainer.dis_update(co_data, cl_data)
File "/home/seonghyun/deep-motion-editing-master/style_transfer/probe/../trainer.py", line 92, in dis_update
dis_loss_dict = self.model(co_data, cl_data, 'dis_update')
File "/home/seonghyun/anaconda3/envs/seonghyun/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/seonghyun/deep-motion-editing-master/style_transfer/probe/../model.py", line 242, in forward
l_real_p, acc_r, resp_r = self.dis.calc_dis_real_loss(db, lb)
File "/home/seonghyun/deep-motion-editing-master/style_transfer/probe/../networks.py", line 250, in calc_dis_real_loss
dtype=torch.float).to(self.device)
RuntimeError: CUDA error: device-side assert triggered

We're sorry for the messy config.py. To make things work for bfa.npz, line 156 should also be changed to num_classes = 16, since we have 16 instead of 8 training styles in the BFA dataset. Hope this could help!

I changed !
There is no content information, so an error occurs while saving the plot to the output folder after learning.
Can you help?
Traceback (most recent call last):
File "style_transfer/train.py", line 167, in
main(args)
File "style_transfer/train.py", line 131, in main
get_all_plots(vis_dicts, os.path.join(config.output_dir, key_str), writers, iterations + 1)
File "/home/seonghyun/deep-motion-editing-master/style_transfer/probe/../probe/latent_plot_utils.py", line 258, in get_all_plots
fig = plot2D(code, data[phase]["meta"][label_type], fig_title(f'{title}{name}{label_type}'))
KeyError: 'content'

We're sorry for the messy config.py. To make things work for bfa.npz, line 156 should also be changed to num_classes = 16, since we have 16 instead of 8 training styles in the BFA dataset. Hope this could help!

I changed !
There is no content information, so an error occurs while saving the plot to the output folder after learning.
Can you help?
Traceback (most recent call last):
File "style_transfer/train.py", line 167, in
main(args)
File "style_transfer/train.py", line 131, in main
get_all_plots(vis_dicts, os.path.join(config.output_dir, key_str), writers, iterations + 1)
File "/home/seonghyun/deep-motion-editing-master/style_transfer/probe/../probe/latent_plot_utils.py", line 258, in get_all_plots
fig = plot2D(code, data[phase]["meta"][label_type], fig_title(f'{title}{name}{label_type}'))
KeyError: 'content'

Oh yes, there's no content label for the BFA dataset so there're probably more tweaks needed. Could you try commenting out the lines that involve the usage of content labels? For example, the relevant code in get_all_plots (or just see which lines give you errors). This part of the code only serves for visualization purposes and can be safely removed.

Oh yes, there's no content label for the BFA dataset so there're probably more tweaks needed. Could you try commenting out the lines that involve the usage of content labels? For example, the relevant code in get_all_plots (or just see which lines give you errors). This part of the code only serves for visualization purposes and can be safely removed.

Thank you very much.  ^__^
Training without visualization!!!
Can I ask just one more question?
Why is Motion Retargeting necessary?
It seems to proceed separately from Style Transfer.

You're welcome :)
Retargeting is not necessary. In fact, motion retargeting and style transfer work independently of each other. We build this unified repository because they both operate on motions and share the same utility functions (e.g. BVH parsing, visualization, forward kinematics, foot-skating clean-up, etc.)


We need to update the version in /cli/src/version.rs

There is a CONST defined in /cli/src/version.rs that hasn't been updated for 8 months. I don't know the details of where this is used yet, but we should update this and understand the implications.

in /cli/src/lib.rs line 9, there is pub mod version, which is used on line 14.
I have confirmed this is the same string when calling --help with the cli invocation. I will likely adjust this string as part of a PR which is intended to support "regtest mode"

This one got covered by #26 or #8 !


Fixed the inconsistency between CUDA and multi-threads(MT) implementations of rtkDisplacedDetectorFilter

I have found that for geometry that have negative sdd and sid, which means the projection geometry is described in a right handed coordinate system, the DisplacedDetectorFilter implemented on CUDA behaves differently, and the CUDA version obviously takes the wrong direction of the detector row and gives wrong weights on the padded projections.
After looking into the implementation, I have found that the function ToUntiltedCoordinateAtIsocenter  has been implemented differently in CUDA and MT versions.
I have altered function ToUntiltedCoordinateAtIsocenter in rtkCudaDisplacedDetector.cu, to make it have consistent results with rtkDisplacedDetector.hxx.

It seems the RTK is fully tested with left handed geometry, which makes the reconstructed images having opposite Z direction with the scanned objects. But right handed geometry is more nature. This issue makes me confused all the time. Do you know why is this happening?

Thanks for your contribution. Can you please update the commit message to follow ITK guidelines?
The inconsistency has been introduced by ad58d3c110b98254e9ff33e4de83697e852baaf6. Maybe other Cuda filters need to be updated too. I would appreciate it if you have the time to check.
I'm not sure I understand what you mean by left handed... but I usually have positive source-to-isocenter and source-to-detector distances with the systems I deal with.

Thank you for the clue.
I have checked the revisions you've done in ad58d3c.
This commit is OK with consistent between the CUDA and non-CUDA implementations.
The inconsistency happens between the rtkDisplacedDetectorImageFilter and rtkCudaDisplacedDetectorImageFilter. I think this error exists because displaced detector images is not used a lot with negative SDD as you said.

Thanks for your contribution. Can you please update the commit message to follow ITK guidelines?
The inconsistency has been introduced by ad58d3c. Maybe other Cuda filters need to be updated too. I would appreciate it if you have the time to check.
I'm not sure I understand what you mean by left handed... but I usually have positive source-to-isocenter and source-to-detector distances with the systems I deal with.

I see you've updated the PR title, can you amend the commit message instead? The prefix BUG: is good but the message should not be longer than 72 characters, maybe BUG: Fix CUDA/CPU inconsistency in DisplacedDetectorImageFilter Then you can explain the negative "distance" in the message body. If you don't mind, can you also add a line in rtkdisplaceddetectorcompcudatest.cxx to test a negative SID? Thanks again!

Currently I am in a environment that's a little difficult to have some test.. I will add a new line in rtkdisplaceddetectorcompcudatest.cxx to test a negative SID later in a week.


Improve 3rd bullet color to be accessible/readable

Please change purple color to something readable against the navy background (maybe lilac or pink?). You can use online accessibility tools (example) to ensure the the color contrast between the background and the font is readable.

yeah this is really hard to see

https://github.com/ipfs-shipyard/peer-pad/issues/271


Implement version and mod-independent entity identification.

Also fixed a long standing bug with get_server_info that probably nobody will notice.

I've found a few more things that need to be changed.

What this does:

puuid() now accepts a boolean parameter which will remove the dashes from the uuid it returns.
storm() with 3 arguments is now fixed, before it only assigned the world for 1 and 2 args.
get_server_info() has been corrected to match the documentation. Indices 1 and 2 (Bukkit/API version and Craftbukkit/Mod version) were switched before. The internal method names have been renamed to clarify what each is.

And the main events:

A dynamic entitytypes list has been implemented that populates itself at server start. Our names for vanilla mobs are matched to mapped to the vanilla Bukkit names, and any modded entities added by Forge are added mapped to their own name, marking themselves as the Unknown type from Bukkit. It will not create entries for entities that do not exist on the server's Minecraft version. BukkitConvertor's BukkitGetCorrectEntity() method now uses the dynamic list to reflectively obtain the appropriate class. If the mob has a specialized class created by us, that will be used, otherwise it will try to put it into a general class using the old method. The only maintenance this should need is adding new vanilla types to that list, and if we add a specialized class that doesn't follow the conventional naming scheme, it will need an exception in the reflection method. All the information for this system is cached, it is generated on startup, and the only processing at runtime is retrieving the information from memory. The result is a slight increase in startup time, but the latest version of CH will be able to operate on entities without giving the server entities the server doesn't know about, and without the server giving CH entities CH doesn't know about, with theoretically no runtime performance hit (tested on a 1.7.10 Forge server with 8-10 players).

A dynamic event registrar has been added as well. Basically it won't register events that don't exist yet on the server's Minecraft version. This looks complicated, but the only thing it does that it didn't before is compare the server version to the version each event was added.

With these changes, I've encountered NO errors running the master version of CH on Cauldron for 1.7.10 or Spigot for 1.8. Testing MCPC+ for 1.6.4 will come later, but the goal is to no longer need backports.


Validate len(array) > 0 - address #437

Description of changes
Validate len(array) > 0 - address #437
Test plan
They are not tested in a new way. These cases previously error'ed in the validation code since all validation for lists checks the datatype of the first element. Now we ensure the list has length > 0.
Documentation Changes
None required.

Thank you @Satyam-79 :)


"URDF Model (New)" Have No Rigidbodies, New Links Have No Joints

[X] I am at the right place and my issue is directly related to ROS#. General technical questions I would post e.g. at ROS Answers or Stack Overflow. For library-specific questions I would look for help in the corresponding library forums.
[X] I have thoroughly read the Contributing Guideline and writing this issue is the right thing to do in my case.

I have a question!

[X] I searched the Wiki, open and closed issues for an answer. I tried my best to find the answer by myself without success. I believe that the discussion we will have in this issue, and the solutions we might find, will help me, and likely other community members who have a similar problem.

Here is my question:

Following the "create a new URDF" tutorial I found that none of the new links had joints created. In the video no extra steps were needed for this but I found I needed to manually add a rigidbody to the base_link in order for joints to be created in the manner shown in the video. I couldn't find reference to adding the rigidbody in the wiki or previous issues. Is this change by design or a regression of some kind?

I found a bug!

[X] I am using the latest ROS# version available here on the master branch.

[X] I am adding all required information, code and data files, screenshots and log files so that you can reproduce the problem.

My OS is: Windows 11, dev preview

My Unity Version is: 2020.3.11f1

My ROS Distribution is: N/A

My Build Target Platform is: N/A

Here is my bug description:

Creating a new URDF doesn't include a rigidbody on the base_link, this prevents joints being created.
Perform the following steps reproduce the bug:

Create a new 3d object by selecting "urdf (new)" in the 3d objects menu
Click on the base_link and add a new link
Look at the newly created link, there will be no joint present

Observed results:

Base_link on a new model with no rigidbody

Newly created child link, no joint component

Expected results:

Base_link with rigidbody

New children have joints

Hi @kneave ! is there an inertia tag specified in the URDF, something like
<inertia ixx="1"  ixy="0"  ixz="0" iyy="1" iyz="0" izz="1" />

This is required to generate  a rigidbody in Unity, see also https://github.com/siemens/ros-sharp/issues/19.

Hi Martin, this is from creating a new model completely in Unity so no URDF imported in this case. If it's expected behaviour that the user adds a rigid body could I suggest the video demo be updated to show this please or it be included in a the documentation?

Hi @kneave , I digged a bit deeper into this issue. We changed the functionality in commit https://github.com/siemens/ros-sharp/commit/f15f3f9eeec0d46b7dbb3dfbc4364eeef8e7fbe8
to not automatically generate rigidbodies in this case.
The problem is that URDF does not require <inertial> tags (i.e. rigidbody data) whereas Unity requires rigidbodies to create joints between transforms (i.e. links). We had discussions whether to create a default rigidbody to a new/empty link or not since the beginning and didn't find a clear answer yet.
In pull request #405 I changed it back, such that creating a new link in Unity also creates a rigidbody / default inertial data.
It seems like this is the more convenient / user friendly solution.
Would you please test if it works for you?

I just pulled that branch and it looks like it works as I'd expect from the demo video, thanks for the quick update! Good call with the Newtonsoft.Json fix too. :)

Merged in https://github.com/siemens/ros-sharp/commit/6e91309b2447c0919d3dabaa0650bb71e3e490dd . Thank you @kneave .


lower android minSdk to 23

I was unable to find anything that can't work on 23, am I missing something?

In theory it would work on API Level 23, though  I set it to 24 by intention.
I find API Level 24 for most comfortable to support any Java stuff that had migrated to OpenJDK and namely Java8 language and its base library API. If we lower the minSdk to 23 and keep it as the expected lowest version, we will be unable to write any code that depends on Java8 features. That's what I would like to avoid.
Having said that, shipping ktmidi that "once supported" minSdk = 23 is not a bad idea. We can keep it until we want to write any code that depends on Java8. Let me state that I have no hesitate to discard that at any time...!

Apart from that, is your suggestion for any practical reason, or just like "it can be lower" ?

Apart from that, is your suggestion for any practical reason, or just like "it can be lower" ?

It's just to support more devices. I don't see any Java8 features that can be used in this library (but that's just me!), and also some of the Java8 features are available without a higher sdk level. I'm not pushing it though, just wanted to know if there's a reason for a higher sdk level!

Let's roll 0.4.2 release so that anyone who wants to support Android 6.0  in their app builds upon ktmidi can survive...!


SEQ Triad 2 is inconsistent on reset

Love your sequencers!  I use an AS Trigger MK III to generate a pulse that I use as a global reset.    Each of the 3 sequencers stay on whatever step they were on before reset.  If the clock is running, the first and third sequencer will go to step 1.
I really love the triad and 6x32 trigger!
Mike

I have changed it so now it resets immediately.  This will show up in the next version. Thanks!


Do you use test data in neuron selection part (training)?

Here the sunrise_test is the data you use for finally test the ASR.

Do you use the data for test in neuron selection process? (as below)

We assume we've a small portion of test data. You can use training data for neuron selection. The result still holds.


Converting it for Regression Purpose

Issue Description
Hi, commendable job on the code and the corresponding blog.
I am trying to tailor this code wherein instead of an array of length 88, my time series consists of one continuous variable i.e. cost.
There are a few parts that I do not understand entirely:

Since mine is a regression problem; I know Bernoulli wouldn't work. Which distribution should I rather try? And will the negative log-likelihood calculation still work? Could you point out what all modifications would be necessary?
All the sequences vary in length; this part is resolved by imputing zeros until T_max. Does this mean that we are giving the information to the algorithm that from time t to T_max observed cost was zero (for my setup)? Or is this being taken care by the mask?

Ohh, I am sorry. I was referring to the Deep Markov Model.


Ladda's CSS must be made part of react-ladda package

As this package is intended for react-apps, the css file for ladda buttons must be included in the react-ladda package so that one can perform clean imports / builds in projects that use webpack + css-modules for managing CSS.
Example Usage from my app's App.js:
...
// imports of CSS styles of 3rd-party packages
import 'font-awesome/css/font-awesome.min.css';
import 'rc-slider/assets/index.css';
import 'react-datepicker/dist/react-datepicker.css';
import 'react-select/dist/react-select.css';

I think you can still import the CSS from Ladda itself from its dist folder, since it gets installed with react-ladda.

@austinbutler I've already checked and there is no style available in the dist folder.

I am referring to the ladda module itself, not react-ladda.

@austinbutler Yes this is what I did eventually. But the issue I opened is that the style should be included in the react-ladda so that it's easier to use.


Hang / Stall while Deploying - Cannot Deploy Flow with only Standard Nodes

Dear Node Red Team,
i am Using this Flow in a Node Red instance in Bluemix:
flow.zip
I built the Flow Sequentially and everythin works fine if you just make changes to only one of the Template Nodes in the lower group at a time, which each contain around 1200 lines of JSON.
When i try to import the flow or make changes to more than one of the template nodes with many lines inside, deploying crashes and data is lost after refreshing the page. This issue caused us to loose a lot of time and work lately...
When opening the browser console, we can see the following error messages:

Bluemix does not give me any errors in the logs. I have been able to reproduce this error with current and slightly older versions of Chrome, Firefox and Safari browsers.
Please update the template node as it seems as node red is not able to handle template nodes with moderate amounts of data in it as well as multiple template nodes with some data in it.
Deploying the Flow works when i delete all of the template nodes containing the json data but one and then deploying. I then keep adding them one by one and deploying every time.
Thx in advance!!!

Hi, thanks for raising an issue.
For general support questions we prefer to use the mailing list, slack team or you could ask a question on Stack Overflow and tag it node-red. That way the whole Node-RED user community can help, rather than rely on the core development team.
My guess is your flows are too big for the default API payload size node-red accepts - although I am unable to open the zip file you've attached to see for myself.
In which case, you'll need to add apiMaxLength to your bluemix-settings.js file and increase the limit to something big enough to accept your flows - https://github.com/node-red/node-red/blob/master/settings.js#L102
Thanks!


Fix up g_alts_resource usage.

Avoids useless initialization of g_alts_resource before main which affects startup time.
Also fixes up issue where it appears that the default constructor values for any fields inside of g_alts_resource were being set to zero indiscriminately.

I appear to be unable to add the release-notes=no label.

****************************************************************

libgrpc.so

     VM SIZE                                                       FILE SIZE
 ++++++++++++++ GROWING                                         ++++++++++++++
  +2.2%     +12 src/core/tsi/alts_transport_security.cc             +12  +2.2%
       +41%    +122 grpc_tsi_alts_shutdown                             +122   +41%
       +23%     +12 grpc_tsi_alts_init                                  +12   +23%
       +18%      +9 grpc_tsi_alts_signal_for_cq_destroy                  +9   +18%

 -------------- SHRINKING                                       --------------
  -0.0%    -196 [None]                                             -948  -0.0%
      -0.0%     -68 [Unmapped]                                         -948  -0.0%
     -93.8%    -120 g_alts_resource                                       0  [ = ]
      -0.8%      -8 [None]                                                0  [ = ]

  -0.0%    -184 TOTAL                                              -936  -0.0%

****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

[trickle] No significant performance differences

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,976,526      Total (<)      1,976,654

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,775,536      Total (<)     10,775,733

 No significant differences in binary sizes

[microbenchmarks] No significant performance differences

****************************************************************

libgrpc.so

     VM SIZE                                                       FILE SIZE
 ++++++++++++++ GROWING                                         ++++++++++++++
  +2.2%     +12 src/core/tsi/alts_transport_security.cc             +12  +2.2%
       +41%    +122 grpc_tsi_alts_shutdown                             +122   +41%
       +23%     +12 grpc_tsi_alts_init                                  +12   +23%
       +18%      +9 grpc_tsi_alts_signal_for_cq_destroy                  +9   +18%

 -------------- SHRINKING                                       --------------
  -0.0%    -196 [None]                                             -948  -0.0%
      -0.0%     -68 [Unmapped]                                         -948  -0.0%
     -93.8%    -120 g_alts_resource                                       0  [ = ]
      -0.8%      -8 [None]                                                0  [ = ]

  -0.0%    -184 TOTAL                                              -936  -0.0%

****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,976,526      Total (<)      1,976,654

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
10,775,531      Total (<)     10,775,730

 No significant differences in binary sizes

[microbenchmarks] No significant performance differences


Make DataSourceResult generic and fix tests.

When I ran the tests after pulling, they were failing due to a timezone mismatch.  I fixed that and then made the DataSourceResult a generic class so it can be serialized/deserialized.

Thanks for your report, I will review it in recent days.


Problem with policy.json

Problem
I run with this cmd sudo ./buildah bud -f Dockerfile, got this:
STEP 1: FROM busybox
ERRO[0000] error building: error creating build container: error pulling image "docker.io/library/busybox:latest": error obtaining default signature policy: open /etc/containers/policy.json: no such file or directory

I read docs/buildah-bud.md, find this:
**--signature-policy** *signaturepolicy*
Pathname of a signature policy file to use.  It is not recommended that this
option be used, as the default behavior of using the system-wide default policy
(frequently */etc/containers/policy.json*) is most often preferred.

But I still have no idea what the policy json should be.
About My test enviroment
Linux version 4.4.0-96-generic (buildd@lgw01-10) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017

I build buildah from source code, use make buildah

Install skopeo-containers

Thank, this helps me


feat(combobox/select): update styling for items list inverse

re #731
Also,
feat(spinner): Add isInverse support for Spinner component.

Codecov Report

Merging #732 (1822830) into dev (9ca1827) will decrease coverage by 0.20%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##              dev     #732      +/-   ##
==========================================
- Coverage   87.15%   86.94%   -0.21%
==========================================
  Files         174      174
  Lines        4374     4390      +16
  Branches     1467     1472       +5
==========================================
+ Hits         3812     3817       +5
- Misses        284      286       +2
- Partials      278      287       +9

Impacted Files
Coverage Δ

...act-magma-dom/src/components/Combobox/Combobox.tsx
92.85% <ø> (ø)

...agma-dom/src/components/Combobox/MultiCombobox.tsx
93.44% <ø> (ø)

...ct-magma-dom/src/components/Select/MultiSelect.tsx
97.50% <ø> (ø)

...s/react-magma-dom/src/components/Select/Select.tsx
97.29% <ø> (ø)

...act-magma-dom/src/components/Select/components.tsx
100.00% <ø> (ø)

...s/react-magma-dom/src/components/Spinner/index.tsx
92.30% <0.00%> (-7.70%)
:arrow_down:

...eact-magma-dom/src/components/Select/ItemsList.tsx
93.75% <50.00%> (-6.25%)
:arrow_down:

...es/react-magma-dom/src/components/Select/shared.ts
73.52% <58.82%> (-26.48%)
:arrow_down:

...es/react-magma-dom/src/components/Search/index.tsx
88.88% <100.00%> (ø)

... and 4 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 570e104...1822830. Read the comment docs.


'Unexpectedly high' fee message on Trezor not replicated in MBHD

I just increased my fee to 0.000 15 BTC/ KB.
When I do a send with my Trezor it shows, in order:

Confirm sending 0.002 BTC to "an address"/
Click OK on Trezor
Fee 0.00015 BTC is unexpectedly high. Send anyway ?
This is NOT shown in MBHD - you get a confusing empty trezor message. See screen shot.

Click OK on Trezor
3) Really send 0.00215 BTC from your wallet ? Fee included 0.00015 BTC
Click OK on Trezor to send

Just to clarify: the send gets sent correctly - it's just the extra interstitial screen does not display in MBHD.

Added support code for the additional button press request. Here's a screen shot:

It follows the same formatting pattern that we use everywhere else and has been applied to both Send and Empty use cases.
Supporting code (MultiBit Hardware and hid4java) has been pushed to Maven staging repo
Ready for review and close.

Confirmed the 'high fee' message appears ok.
Closing


How can I turn on requireEnsure option?

I am using pdf.js in my project.
When using this library with cra, the following output is displayed on the console.
(See mozilla/pdf.js#10324 comment.)

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

When ejected, this option is set as below.
{
  module: {
    rules: [
      // Disable require.ensure as it's not a standard language feature.
      { requireEnsure: false },
    ],
  },
}

I would like to remove this option or change the value to true using craco without no ejecting. How can I do this?

I solved the issue by getting an existing webpack configuration object and returning a new configuration object.
module.exports = () => ({
  webpack: {
    configure: (config) => {
      const [rule, ...restRules] = config.module.rules;

      return {
        ...config,
        module: {
          ...config.module,
          rules: restRules,
        },
      }),
    },
  }
};

Sounds good to me, CRACO doesn't have anything out of the box for these specific use case.
If you feel like getting this a step further, you could write a small CRACO plugin to share the good with others.
Here's the docs for plugins: https://github.com/gsoft-inc/craco/blob/master/packages/craco/README.md#develop-a-plugin


Issue with updating Results Display Field

Good afternoon, I'm seeing another issue crop up where I receive the following error after attempting to update the Results Display Field:

I'm also seeing "No Results Found. (151 results filtered)" under my Results tab.

Can you provide the logs you're seeing when you get this error?

I'm not seeing any direct output with this error. I also checked the Scumblr log folder and the two files there didn't show much. When I run the troubleshooting commands to retrieve results, I'm getting the following:
res = Result.where(id: ).first
SyntaxError: unexpected '<'
res = Result.where(id: ).first
res.metadata
NameError: undefined local variable or method `res' for main:Object
Does Scumblr have another debug mode?

Hi,
There should almost certainly be something in the log if you're seeing this message. Try tailing the end of the production log while making a request that errors.
For the command you pasted above, you need to replace <id> with a number (i.e. the id number of a result).
If you run scumblr in development mode (RAILS_ENV=development rails s) it will provide verbose errors when a problem something occurs.

I see. That worked and I'm able to see the id:, title:, url:, etc... outputs from the python CLI.
Okay, so on the filter settings, if I select "Is Closed?", it'll show all my previous results. All set. Thank you!

Cool no problem!


connection broken error

I'm having an issue with the solana library. I'm trying to query "get_program_accounts"
But the connection keeps getting broken by the "remote host"
See the screenshot...

It was actually working this morning and I'm quite clueless as of why it doesn't anymore...
It shouldn't be an IP ban issue as I've tried through a few of those...
Thanks!

Which endpoint are you trying to hit? It's possible that the solana RPC nodes are unstable sometimes, I would check with the solana team on discord.


Refactor: Shinylive URL encode/decode

#20 introduced shinylive url commands and a set of functions to create and decode shinylive.io URLs. In practice, I've found the functions to be very helpful. But the functional design I used in #20 introduces some friction when I need to work with an app bundle and format it or manipulate it.
This PR refactors the shinylive.io url encoding and decoding to use a central ShinyliveApp class that implements a number of useful methods. This makes it much easier to use the app bundle built with url_encode() or url_decode() in a variety of settings and to produce several outputs from the same set of app files, without having to reach into the shinylive._url module.
As part of this, I renamed encode_shinylive_url() and decode_shinylive_url() to url_encode() and url_decode(), since they'll most often be called as shinylive.url_encode().
url_decode() will now return a ShinyliveApp, while url_encode() still returns the Shinylive URL as a string.
The ShinyliveApp class implements:

.to_url() to return the shinylive.io URL
.to_chunk_contents() to create the shinylive chunk contents for a quarto shinylive chunk
.to_chunk() to create a complete shinylive chunk, including the header and options, from the app
.to_json() to return the JSON representation of the app bundle
.write_files() to write the app bundle to a directory
.view() to open the shinylive.io URL in a web browser

The ShinyliveApp constructor takes a ready-to-go app bundle of list[FileContentJson], but most users will instead use class methods to construct the ShinyliveApp from various sources:

.from_url() decodes a URL into a ShinyliveApp
.from_local() creates a ShinyliveApp from a set of local files
.from_text() creates a ShinyliveApp from a string with the contents of app.py or app.R (optionally with support of local files).

Once created, there are additional methods to help add to or remove from the app bundle. These methods all allow for method chaining.

.add_file(), add_files() or .add_file_contents() (i.e. text files with a given name),
.remove_file() to take a file, by name, out of the bundle.

Additionally, I implemented + and - operators for the local app class to add and remove files from the bundle.

@wch this is ready for final review. I updated the main PR post to reflect the changed behavior after your review yesterday. Some quick callouts:

Now only one ShinyliveApp class with alternate constructors .from_url(), .from_local() and .from_text().
url_encode() returns the URL string but the ShinyliveApp is now exported.
I renamed the methods .url(), .json(), etc. to .to_url(), .to_json()...
Simplified class attributes and made them public by including them as params of __init__.
host is now a class attribute that defaults to https://shinylive.io but is parsed from the url in .from_url().


Error = 'json: cannot unmarshal number into Go struct field JobResourceList.value of type backup.JobSupportedAction'

Bug Report
I would like to list the backup jobs, therefore I am using call backup.JobsClient.ListComplete. However, this cause the following error:
backup.JobsClient#List: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal number into Go struct field JobResourceList.value of type backup.JobSupportedAction'
Indeed, in the JSON file that is reported in the error,
{
    "value": [
        {
            "id": "...",
            "name": "...",
            "type": "Microsoft.RecoveryServices/vaults/backupJobs",
            "properties": {
                "jobType": "AzureIaaSVMJob",
                "duration": "PT2H1M21.2577606S",
                "actionsInfo": [
                    1
                ],
               ...
            }
        }
   ]
}

actionsInfo field is a number, not any of the values defined here:
https://github.com/Azure/azure-sdk-for-go/blob/master/services/recoveryservices/mgmt/2017-07-01/backup/models.go#L568
Minimal example to reproduce the error: https://gist.github.com/jkrajniak/a3717b6afa441cd3c6f41d84d614c779
Not sure where is the problem. the documentation for the API (https://docs.microsoft.com/en-us/rest/api/backup/backupjobs/list#mabjob) defines that field as a string.

@AdityaTulasi, @TAdityaAnirudh: can you please take a look at this?

met same issue,
 --- PASS: TestClientSuite/TestClients (0.00s)
    --- FAIL: TestClientSuite/TestGetOperationStatus (2.08s)
        client_test.go:70:
            	Error Trace:	client_test.go:70
            	Error:      	Received unexpected error:
            	            	backup.JobsClient#List: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal number into Go struct field JobResourceList.value of type backup.JobSupportedAction' JSON = '{"value":[{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/c5529980-4735-4a7b-b360-5073cdef7185","name":"c5529980-4735-4a7b-b360-5073cdef7185","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT1H9M58.9495507S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-19T03:07:26.0228043Z","endTime":"2019-09-19T04:17:24.972355Z","activityId":"535f4731-0a1b-4dd6-8139-01f66d258ce5"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/cac9d958-c953-4863-a081-f8ae09025840","name":"cac9d958-c953-4863-a081-f8ae09025840","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT51M17.2611476S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-18T03:05:48.4990038Z","endTime":"2019-09-18T03:57:05.7601514Z","activityId":"df7c0fc5-1cb6-44cb-81bd-9f38ad4d2ae2"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/0a599218-033f-4d3c-8ad8-bbd8111af351","name":"0a599218-033f-4d3c-8ad8-bbd8111af351","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT41M17.1287143S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-17T03:05:10.2373432Z","endTime":"2019-09-17T03:46:27.3660575Z","activityId":"c41e116c-1d47-4bd9-bce2-1ff67055c8e3"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/e0b5751b-1fc0-4d8c-a91e-6520e3aec6fc","name":"e0b5751b-1fc0-4d8c-a91e-6520e3aec6fc","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT0.4092717S","errorDetails":[{"errorCode":134607754,"errorTitle":"BMSUserErrorObjectLocked","errorString":"Another operation is in progress on the selected item.","recommendations":["If there is an in-progress operation, please retry after it has finished."]}],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"ConfigureBackup","status":"Failed","startTime":"2019-09-17T00:58:44.2368639Z","endTime":"2019-09-17T00:58:44.6461356Z","activityId":"d4f75510-8839-40d1-ab65-726fa5448641"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/30a00235-e49e-471a-87c0-422be1a41187","name":"30a00235-e49e-471a-87c0-422be1a41187","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT11.6938589S","virtualMachineVersion":"Compute","entityFriendlyName":"democ","backupManagementType":"AzureIaasVM","operation":"ConfigureBackup","status":"Completed","startTime":"2019-09-17T00:58:42.4601096Z","endTime":"2019-09-17T00:58:54.1539685Z","activityId":"59a5a5ba-5282-483c-b58d-955c38b9cf9b"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/471e1336-9421-4a2a-9c3a-6b92f54d5b40","name":"471e1336-9421-4a2a-9c3a-6b92f54d5b40","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT11.7137541S","virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"ConfigureBackup","status":"Completed","startTime":"2019-09-17T00:58:42.444488Z","endTime":"2019-09-17T00:58:54.1582421Z","activityId":"59a5a5ba-5282-483c-b58d-955c38b9cf9b"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/a50cbdc1-d969-4f33-88d6-0a1762c98472","name":"a50cbdc1-d969-4f33-88d6-0a1762c98472","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT2H41M24.1171941S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-16T03:32:48.5753373Z","endTime":"2019-09-16T06:14:12.6925314Z","activityId":"0dcd22b8-4f79-450d-8db9-b99f51e99c24"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/f5686e24-5acb-4fe4-8b7b-ff311346003d","name":"f5686e24-5acb-4fe4-8b7b-ff311346003d","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT3H11M21.5033472S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-15T03:43:25.8321677Z","endTime":"2019-09-15T06:54:47.3355149Z","activityId":"6c4886f7-d7ec-4267-ba86-fa68c55ca19b"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/7357df8f-0bec-4155-8bfc-f51f48f7aefb","name":"7357df8f-0bec-4155-8bfc-f51f48f7aefb","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT4H21M23.7997244S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-14T03:37:40.0401516Z","endTime":"2019-09-14T07:59:03.839876Z","activityId":"5b03c9b8-0f75-4ed6-96cc-3bea68a1b225"}},{"id":"/Subscriptions/fc51e62f-aef2-49c3-b154-5b313db3f379/resourceGroups/Minghe_test/providers/Microsoft.RecoveryServices/vaults/backupvaultMinghetestdemo/backupJobs/b4315780-5760-4f6d-9ad1-8f52c6e95cc2","name":"b4315780-5760-4f6d-9ad1-8f52c6e95cc2","type":"Microsoft.RecoveryServices/vaults/backupJobs","properties":{"jobType":"AzureIaaSVMJob","duration":"PT4H21M23.2197762S","actionsInfo":[1],"virtualMachineVersion":"Compute","entityFriendlyName":"demo","backupManagementType":"AzureIaasVM","operation":"Backup","status":"Completed","startTime":"2019-09-13T03:18:57.9085514Z","endTime":"2019-09-13T07:40:21.1283276Z","activityId":"6253060a-b49d-40f7-aa08-7e191dad80c9"}}]}'
            	Test:       	TestClientSuite/TestGetOperationStatus

Create a PR here https://github.com/Azure/azure-sdk-for-go/pull/5831

I create a new issue in the swagger repo.
The service team will take care of this.

@ArcturusZhang : I see that the new issue you created in swagger repo is now closed. So, should I track this issue there or continue here?

@ArcturusZhang : I see that the new issue you created in swagger repo is now closed. So, should I track this issue there or continue here?

I suggest you track this issue at the swagger repo, since the root cause is in rest api.

Closing this issue since the original issue is being tracked in the swagger repo.