Investigate performance improvements for Github Actions build

The csvcubed build process is currently very slow on GitHub Actions due to these being a single build process for Windows and Linux which needs to install tools every time the process is run. This process could be improved by creating some reusable docker images which are pre-built with all of the tools necessary.
Unfortunately, linux docker containers cannot run in the Windows environment, so we will need to create a docker container for the linux environment and another one for the Windows environment. We either need to have a separate docker image built for every version of python we want to test, or we need to be able to have multiple versions of python installed within each container (think pyenv) which we can switch between at runtime.
The first step of this task should be to progress towards the Windows docker container(s) (since the Windows part of the testing process is always the slowest). Make sure the container has all necessary versions of python installed as well as csvlint, csv2rdf and the sparql tests.
I recommend you do this in a Windows virtual machine on your local macbook - do not try and do this in GitHub actions just yet as that is a terrible way to trial + debug.

[ ] Once built, publish the container manually to docker hub so we can use it in the build pipeline.
[ ] Once complete, create a new task to make use of the windows docker image within the csvcubed github actions pipeline.
[ ] Once complete, create another new task to automate the build and deployment of this windows docker image using GitHub actions from a github repository.

The windows tests take >13mins and the  linux ones take >6 mins. Fix the problems with Windows performance first.

https://console.cloud.google.com/marketplace/product/cloud-infrastructure-services/docker-windows-2019?project=optimum-bonbon-257411

Initially attempted using full Windows Server image - this took approximately 6 mins to build the container, which would not improve the performance of the test_in_environments action for Windows builds. Switched to Nanoserver image, but this introduced issues with running commands as Powershell is not available by default, and paths were not being persisted between commands.
There may be some value in exploring increased caching of steps in the test_in_environments action, e.g. for installing Python, Pyright, Poetry - see the screenshot below for timings of these steps.


Reg Color theme, light+, selected text not proper

VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:32:36.023Z)
OS Version: Windows_NT x64 10.0.17134
Extensions:

Extension
Author (truncated)
Version

cpptools
ms-
0.16.1

Steps to Reproduce:

Select Preferences->Color Theme -> Light+ (default)
Search for some text across files. The selected text in the file cannot be read because of improper colors.

Reproduces without extensions: Yes/No

Version 1.18 is rather old, can you try in the latest version?
And can you share a screenshot to show exactly what the problem is?


Font selection is buggy

Expected behavior
The user can add a select custom fonts to create a report.
Actual behavior
The user can add and select custom fonts to create the report but if those fonts are used anywhere other than the title page it can cause the program to crash.
Proposed solution
The reason the program crashes is because paragraph font selections in the report page section are required to be bold in areas. FPDF2's method for using the built in bold fonts clashes with custom font files. The proposed solution is to for the time being prevent custom fonts being used in the page sections of the report. Limiting custom selection to the title page.

Issue Resolved
Updated 'fonts.yaml' file to separate standard fonts from custom fonts. Now is separated into 'font_types' and 'custom_font_types'. Added additional for loop in 'report_gui.py' 'load_font_selection_combo' to only add custom_font_type font's to the titleFontComboBox attribute of the report_gui.


[BUG] Cannot create a Namespace inside a Project

Describe the bug
After a fresh install I successfully created a new project called test-project. I then had the option to create a new namespace inside that project, so I tried to create on called test-ns but I have this error message: Cannot read property 'id' of undefined.
To Reproduce
Steps to reproduce the behavior:

Go to Projects/Namespaces
Click on Create Project
Set Name to test-project, click Create
Click on Create Namespace in the new created test-project project
Set Name to test-ns, click Create
You ended with the error message : Cannot read property 'id' of undefined

Expected behavior
New namespace created? But as the new created project test-project is in fact a namespace, is it really possible to create a new namespace inside a namespace?
Support bundle
harvester-supportbundle_e707144b-450c-4130-b3a9-3255c3159c1d_2021-07-05T09-44-23Z.zip
Environment:

Harvester ISO version: master-88f1d22c-head
Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630): HP ProLiant DL360 Gen9

Additional context
None.

Tested in master-661ee801-head, i couldn't reproduce this issue. It seems like be fixed.
Could you re-validate it? Thanks!

Closing as N/A anymore per @guangbochen . Tested in version master-1a041d23-head.


Showing an internal link or external link by toggling radio buttons with ACF

Hi there,
I have a repeater set up that loops over a list of events. Within those events they can link to an external or internal page. I've set this up in ACF but I'm having some trouble with conditional logic.
Basically in ACF I have two radio buttons. One that says "yes" that shows the internal page link and "no" which shows a URL field.
Could anyone help me out on where I'm going wrong?
`
{% for event in post.get_field('event') %}

          {{event.event_title}}
          {{event.event_content}}

          {% if event.is_this_an_internal_link(option) == 'yes' %}
            {{event.event_link_content}}
          {% else %}
            {{event.event_link_content}}
          {% endif %}

        {% endfor %}

`

I guess this is not really an issue specific with Timber, but more of a question on how to implement ACF with Timber. A better place to ask these kind of questions would probably be Stackoverflow or the Gitter chat. But maybe I can help.

In your Twig file you have this line:
{% if event.is_this_an_internal_link(option) == 'yes' %}

Where does the option variable come from that you pass as a parameter? Is is_this_an_internal_link a method that you defined for event posts? If it’s just the name of the ACF field, try this:
{% if event.is_this_an_internal_link == 'yes' %}

Now the most standard way to achieve something like this would probably be to use a True / False field instead of a Radio Button field with "yes" and "no" as possible options.
If your field is named is_this_an_internal_link, you could use:
{% if event.is_this_an_internal_link %}

@frazerf Is this still something you're actively working on or need addressed? Please respond in two weeks or we'll close this thread


fix(baremetal): inject mac when admin nic found

What this PR does / why we need it:

[x] Smoke testing completed

Does this PR need to be backport to the previous release branch?:

release/3.7
release/3.6

/area baremetal
/cc @swordqiu

/hold

/hold cancel

/lgtm

/approve


Update Travis config

Moves to a Node.js based env with Nix installed.

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Do not redirect users back to redirect password on login

Addresses https://artsyproduct.atlassian.net/browse/PLATFORM-1561
On login we redirect users back to the origin of their login request, but we do not want to do this on reset password because it is confusing to users. This adds a check to the login redirect logic to always send users who reset their password home.

👍

🙏


Mira 3569 graphql server logic

One remark overall: I think the formatting is not consistent. Some lines are very long but only sometimes long parameter lists are wrapped. Also comments beginning with double forward slashes sometimes contain a space afterwards and sometimes not. Perhaps linting should be configured to solve those issues!?

Regarding the formatting I added additional linting rules and formatted the code so the lines should not be longer than 100 characters and the comment formatting should be consistent now.

👍


[zuul] Add autoscaling job

This job will deploy openstack with autoscaling components enabled

Use a pre_deploy hook to create the COO subscription

Pass kustomization for autoscaling to the tempest job Enable heat for autoscaling.

Depends-On: https://github.com/openstack-k8s-operators/ci-framework/pull/1155

recheck
There were a number of changes being done across the operators to bump the controller-runtime. The CI was expected to fail until that was finished.

Build failed (check pipeline). Post recheck (without leading slash) to rerun all jobs. Make sure the failure cause has been resolved before you rerun jobs.
https://review.rdoproject.org/zuul/buildset/0e252f3f17444cfaa8da4c74164f1750
✔ openstack-k8s-operators-content-provider  SUCCESS in 1h 15m 26s ✔ podified-multinode-edpm-deployment-crc  SUCCESS in 52m 15s ❌ telemetry-operator-multinode-autoscaling  FAILURE in 58m 38s

https://logserver.rdoproject.org/01/301/c5780491a891c186062df36de387bd8d40633ab8/github-check/telemetry-operator-multinode-autoscaling/75078a4/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack-operators/all_resources.log
The errors seems to be due to the baremetal operator crashlooping:
pod/openstack-baremetal-operator-controller-manager-657fc9cb4cgrj8g   1/2     CrashLoopBackOff   8 (44s ago)   34m

check-rdo
The failure is unrelated to this change. I can't find any errors in telemetry components.
If I keep seeing issues with the baremetal operator, I'll disable it, since it is not used in the test environment because we're using pre-provisioned nodes

recheck

check-rdo


P22 SALT3-NIR model

Reran tests after merging sncosmo/sncosmo.github.io#28 and they now all pass.


[18.x] Next is 18.1.0.Beta1

We're ready to merge a feature into 18.x so this is to move the development version from a micro to a minor.

Core - Full Integration Build 11092 outcome was FAILURE using a merge of a9b3084f089323accd7849634a2f842644798e56
Summary: Exit code 1 (Step: Build & test full (Maven)) (new) Build time: 00:11:56

Core - Full Integration Build 10992 outcome was FAILURE using a merge of a9b3084f089323accd7849634a2f842644798e56
Summary: Exit code 1 (Step: Build & test full (Maven)) (new) Build time: 00:02:16


Changed a feature to use the word 'Stripe and Braintree' to 'Paddle'

This change should be made directly to Wave instead of my fork of Wave.


[SaaS Connector] Make HTTP method config non-optional

Is your feature request related to a specific problem?
Force specification of HTTP method for saas config.
Describe the solution you'd like
Make sure there is config validation for HTTP method, ensure that all pre-existing configs are updated accordingly, add tests.
Additional context
https://github.com/ethyca/fidesops/pull/283#discussion_r830352653

Fixed by https://github.com/ethyca/fidesops/issues/289
https://github.com/ethyca/fidesops/pull/327/files#diff-dbbcf121d7b27a36a9632ced4799e5a662b37c7346fd0c9c97a1ff62cd793f12R76


Revise interpretation of future tags

Based on further details from Arok, the grammatical preverb wî- should be interpreted as be going to, and the preverb ka- as will.
Thus, the mappings need to be changed as follows (Int+ will no longer be needed/used):

[ ] PV/wi+ -> Fut+
[ ] PV/ka+ -> Def+

The analyzing and generating transcriptors have already been modified accordingly, but the test cases would need fixing.

Fixed by #758.


⚠ Samsung has degraded performance

In 8173713, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2766 ms

Resolved: Samsung performance has improved in 722296b.


removing the .read from the with open() file open method.

Fixes #9186
Status
ready
Description
Fixes the file open method.
Is it backward compatible (if not, which system it affects?)
YES
Related PRs
#9186
External dependencies / deployment changes
None

@amaltaro Alan, should this be merged or would you like to have some workaround here?

Good catch, Vytas!


Throttling tests

Added method to kafka.py to set throttle manually. Applied to test throttling_test.py. Take this is you can, otherwise I'll create a separate pr for it later.

You can leave this. I'll do it separately.


Use androidx.core:core:1.3.2 instead of dynamic 1.+ version

Overview
Hi 👋
Here is a small proposal of fixing a version of androidx.core:core artifact used in this project.
Currently the com.reactnativecommunity:netinfo:5.9.6 artifact is published with dynamic version for the androidx.core:core artifact.
This causes silently putting the latest, less stable alpha versions of androidx.core:core to be pulled transitively, unless this is suppressed or overriden everywhere in the project.
Example output of Gradle dependencies resolution:
|    +--- com.reactnativecommunity:netinfo:5.9.6
|    |    \--- androidx.core:core:1.+ -> 1.5.0-alpha04 (*)

It can be definitely fixed from the consumers side of the com.reactnativecommunity:netinfo artifact, but I believe more consumers of your library might have similar problem of silently depending on alpha version of androidx.core:core, which can bring various issues from the nature of the fact it is alpha :)
Proposed solution

Use explicit version and not the dynamic one to ensure binary and behaviour consistency between builds from the same codebase
Latest stable version of androidx.core:core is 1.3.2 - https://developer.android.com/jetpack/androidx/releases/core

Test Plan

I believe the existing CI building and testing in place should verify the code is built properly with this artifact.

child_process.js:650
    throw err;
    ^

Error: Command failed: /Users/runner/work/react-native-netinfo/react-native-netinfo/node_modules/detox/scripts/build_framework.ios.sh
    at checkExecSyncError (child_process.js:629:11)
    at Object.execFileSync (child_process.js:647:13)
    at Object.<anonymous> (/Users/runner/work/react-native-netinfo/react-native-netinfo/node_modules/detox/scripts/postinstall.js:2:27)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
Error: Process completed with exit code 1.

I assume this is unrelated? :)

CI appears to have suffered some sort of entropic bitrot that is unrelated to the PR

The CI likely broke when all of the "community" modules were moved around. I'm not likely to have time to look into anything open source until at least December due to client work.

I was going to look into this, but it turns out I'm not an owner of the new organisation which was created for this project.
@brentvatne Can you look into this or move me up to being an owner of the organisation?

@matt-oakes - sorry i thought i did that already, looks like i just added you as a member! feel free to remove me from the org

My Android build just random, inexplicably stopped working, spitting out an error that apparently nobody on the Internet has seen before:
* What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > The minCompileSdk (30) specified in a
     dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
     is greater than this module's compileSdkVersion (android-29).
     Dependency: androidx.core:core:1.7.0-alpha01.
     AAR metadata file: /Users/ashoat/.gradle/caches/transforms-3/b888447526bca50dc42cb758ba942042/transformed/core-1.7.0-alpha01/META-INF/com/android/build/gradle/aar-metadata.properties.

After a couple hours of misdirected debugging, I realized androidx.core.core-1.7.0-alpha01 had been published right as the issue started occurring. It took me a couple more hours to realize that it was because an old version of this package was configured to always pull in the latest version of androidx.core.core.
Thanks for this PR! Hopefully this comment will get picked up by search engines and other people using old versions of NetInfo who are suddenly seeing build failures on Android will notice this.


Issue + Suggestion

Stops working in certain scenarios, for example, when you type a code for a turret or door you have to reopen "view monitor" for the quickswitch to work again.
Could we perhaps just switch players like we do in the monitor and assign that to a custom keybind like mouse5 (which doesn't input anything in the terminal)

Yeah agree

A patch has been released for this suggestion. You find all the news in the readme of this repo


Add Java 19

See https://www.oracle.com/news/announcement/oracle-releases-java-19-2022-09-20/

Dupe of #1631


unicode: unicode.Is and bytes.Buffer.WriteRune get confused by negative runes

What version of Go are you using (go version)?

$ go version
go version go1.15.6 darwin/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/davidben/Library/Caches/go-build"
GOENV="/Users/davidben/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/davidben/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/davidben/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/davidben/boringssl/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qc/[...]/T/go-build280151090=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

https://play.golang.org/p/9ZkvjGuE1so
What did you expect to see?
unicode.Is and related functions should return false on negative values, as they do for other invalid runes. bytes.Buffer.WriteRune should write a replacement character, as it does for other invalid runes. In particular, a UTF-32 decoder could easily construct a negative rune before checking. (Looks like x/text/encoding/unicode/utf32 does that and then relies on RuneLen noticing.)
What did you see instead?
unicode.Is thinks some negative values are printable, and bytes.Buffer.WriteRune accidentally runs a single-byte fast path.
I wasn't sure at first whether this was a bug, but most functions seem to check for negative values or cast to uint32, so I think these should as well. (If they expect the rune be a real code point, that should probably be documented.)

/cc @robpike @mpvl

If you all agree that the functions should handle this case, I uploaded some CLs to fix the instances I found.

Thank you @davidben for the report and for mailing the CLs, I’ve just merged both: shall we then close this issue?

We might also need to add release notes. I’ll mark the CLs as requiring them.

Thanks!


Bump up the ICU build sccache size

100Mib cache size is not able to fit all entries for the Android ICU build, which leads to manifestation of sccache bug happening in subsequent runs (https://github.com/mozilla/sccache/issues/2092).

I tested this on two separate cache flows with multiple rounds producing full cache hits and no crashes.


[Github] chore: Correct command in changelog

1. Why is this change necessary?
There is no composer command build:storefront only build:js:storefront, and therefore while reading the UPGRADE notes I was quite confused, if the JS files need to be built differently for production, than for development (where I usually used the build:js:storefront).
Additionally note that in production setups usually you do not have the composer.json from the platform repository, but the script bin/build-storefront.sh. Not sure if that should also be included.
2. What does this change do, exactly?
Change the UPGRADE nodes and changelog to only mention the existing command.
3. Describe each step to reproduce the issue or behaviour.
Read the UPGRADE notes.
4. Please link to the relevant issues (if any).
-
5. Checklist

[x] I have rebased my changes to remove merge conflicts
[ ] I have written tests and verified that they fail without my change
[ ] I have created a changelog file with all necessary information about my changes
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfill them.

Imported from Github. Please see: https://github.com/shopware/shopware/pull/5421

[public] Shopware automated response: This issue is linked to the internal issue: NEXT-39713
[created from NEXT-39713, comment 514721]


Binary Strings (having a \0) not propery retrieved

Hi,
When I store a binary string  (in redis-cli this looks like "\r\x04\x00\x04\x05")
it will not be properly retrieved.
The reply will be cut off and look like this.
{_type=STRING (1) _str="\r\x4" _integer=0 ...}
Is there any workaround or pending fix? Otherwise I have to use another library :(
Regards

doh!
int strlen = repl.str().length();


Always required to reload on remote container

Operating system/version: Windows 10
VSCode version: 1.55.2

Settings
{
  "gruvboxMaterial.darkContrast": "hard",
  "gruvboxMaterial.darkCursor": "yellow",
}

Steps to reproduce this bug
Whenever I connect with the remote container extension, I get a notification that it needs to be reloaded.
Also, if you do not reload, the json settings will not be reflected.

When the settings.json is changed, the /themes/*.json files are regenerated based on your new settings, so you need to reload to apply the new settings.
I'm not sure how the container extension works, but looks like whenever you connect to it, your settings.json will be applied, and since your settings is not the default settings, so the /themes/*.json will be regenerated.
So maybe remove the settings for gruvbox-material, or try another gruvbox theme instead.
I don't use vscode very much and I'm not an experienced user, so I'm unable to fix this, but PR is always welcome :)
Btw, the typescript code for this theme is based on Binaryify/OneDark-Pro, you can try this theme in remote container and see if this bug can reproduce in it.


Allow taking screenshot after loadAppFonts(), before pump()

The Banner widget reacts to font changes by marking the element as dirty. This caused capturing a screenshot to throw due to an assertion.
Before this never happened, because markNeedsPaint was always followed dirctly by a paint during pump().
I removed the assertions because the function works great without this check

// cc @NickPeters97 @robiness


Error occurs when npm test

I git clone to my local just now, and then npm test. The following error occurs and/but I have not edited my local repo. What's wrong with it?
path-to/ramda/test/addIndex.js:13
var mapIndexed = R.addIndex(R.map);
                   ^
TypeError: undefined is not a function

I try to find the reason for this error. Then, I found that there is no addIndex in path-to/ramda/dist/ramda.js.   I wonder if we should build the dist file in pretest and reset it in posttest to make it completely transparent

https://github.com/ramda/ramda/pull/1157


[QUERY] Connect to EventHubs with different namespaces using spring-cloud-azure-starter-stream-eventhubs

Query/Question
Is it posible to connect to EventHubs with different namespace using spring-cloud-azure-starter-stream-eventhubs? It seems that the configuration is defined under the spring.cloud.azure.eventhub namespace and only one connection can be defined.
Why is this not a Bug or a feature Request?
If it's not posible, it will be great to have it as a feature request.
Setup (please complete the following information if applicable):

Library/Libraries: spring-cloud-azure-starter-stream-eventhubs

@ceremo  thanks for reaching us. You can use multiple binders to connect to different Event Hubs namespaces, here is a sample.


Add bzbarsky to reviewers.

This change is

@bors-servo r=emilio

:pushpin: Commit f860bff has been approved by emilio

:hourglass: Testing commit f860bff with merge 1430acf...

:sunny: Test successful - status-travis
Approved by: emilio
Pushing 1430acfeeedfa89c07ac2c8fd133e8de5e754894 to master...

@jdm @metajack Looks like there were some reviews by him here:
https://github.com/servo/saltfs/pull/608
Does this look good to one of you two? Seems OK to me :-)

@bors-servo r+

In the future, let's have pointers to reviews in the PR description and wait for someone on the core team to approve.


Deprecate kubecfg

Do we have plans to keep both kubectl and kubecfg? If so, why? If not, what are we waiting for to get rid of kubecfg?
There's a lot of duplicated code between them. Also, it's annoying to have to fix two clients.

All the necessary functionality has been added to kubectl. Now we can complete the removal of kubecfg.

#1928 is subsumed by this bug.

I am trying to do a very important demo of Kubernetes using a tutorial on Google.com  - but the issue is the tutorial uses the deprecated kubecfg.sh, and the instructions on the tutorial have not been updated to reflect the new kubectl.sh commands.  Can someone please look at the below and advise the equivalent command line entries to do the same thing using kubectl.sh?   Need help on this urgently please.
https://cloud.google.com/solutions/real-time/kubernetes-redis-bigquery

"list pods" -> "get pods"
" -f  create " -> "create -f " (type automatically deduced)
"resize foo 0" -> "stop foo"
"delete pods/foo" -> "delete pod foo"
(All from memory and unchecked, YMMV)
I filed a bug report internally to get this page updated.

Awesome !  Thanks for the quick response :)
On Sunday, March 8, 2015, Daniel Smith<EMAIL_ADDRESS>wrote:

"list pods" -> "get pods"
" -f create " -> "create -f " (type automatically deduced)
"resize foo 0" -> "stop foo"
"delete pods/foo" -> "delete pod foo"
(All from memory and unchecked, YMMV)
I filed a bug report internally to get this page updated.
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/issues/2144#issuecomment-77800890
.


Bad TypeScript example at your docs page

From @PhilipMay on February 2, 2016 20:24
Hello,
at your docs page you have a TypeScript example:
https://code.visualstudio.com/docs/languages/typescript
class Startup {
    public static main(): number {
        console.log('Hello World');
        return 0;
    }
}

The example implies that it prints Hello World to the console.
But it does not. There is a "Startup.main();" missing at the end.
Copied from original issue: Microsoft/vscode#2652

good catch, moving to vscode-docs

@egamma wrong repo I think

Also, please don't write TypeScript code like this :( TypeScript isn't C#, there's no reason to shove things into classes

TypeScript isn't C#, there's no reason to shove things into classes

Well - that's right. This would just be way better (and simpler):
console.log('Hello World')`
But I thought you wanted to show some of the TypeScript features in the example.
What's the right place for this report? Is it https://github.com/Microsoft/vscode-docs ?

OOPS, issue mover mistake... sorry
This should have been moved to vscode-docs

This issue was moved to Microsoft/vscode-docs#139


fix incomplete furo/sphinx patching in #850

Supposed to have been fixed in #850, It seems as though upper_bound does not always work, and so missed two packages. I use replace_depends to remedy this.
Checklist

[x] Used a static YAML file for the patch if possible (instructions).
[x] Only wrote code directly into generate_patch_json.py if absolutely necessary.
[x] Ran pre-commit run -a and ensured all files pass the linting checks.
[x] Ran python show_diff.py and posted the output as part of the PR.
[x] Modifications won't affect packages built in the future.

================================================================================
================================================================================
linux-armv7l
================================================================================
================================================================================
win-32
================================================================================
================================================================================
osx-arm64
================================================================================
================================================================================
linux-ppc64le
================================================================================
================================================================================
linux-aarch64
================================================================================
================================================================================
noarch
noarch::furo-2020.12.9b21-pyhd8ed1ab_1.tar.bz2
noarch::furo-2020.12.30b24-pyhd8ed1ab_1.tar.bz2
noarch::furo-2020.12.30b24-pyhd8ed1ab_0.tar.bz2
noarch::furo-2021.2.21b25-pyhd8ed1ab_0.tar.bz2
-    "sphinx >3.0",
+    "sphinx >3.0,<7.2.0",
noarch::furo-2020.12.9b21-pyhd8ed1ab_0.tar.bz2
-    "sphinx >3.0"
+    "sphinx >3.0,<7.2.0"
================================================================================
================================================================================
win-64
================================================================================
================================================================================
osx-64
osx-64::rabbitmq-delayed-message-exchange-3.10.0-h694c41f_0.tar.bz2
osx-64::rabbitmq-delayed-message-exchange-3.10.2-h694c41f_0.tar.bz2
-    "rabbitmq-server >=3.10.0,<3.11"
+    "rabbitmq-server >=3.8.16"
osx-64::rabbitmq-delayed-message-exchange-3.11.1-h694c41f_0.tar.bz2
-    "rabbitmq-server >=3.11.0,<3.12"
+    "rabbitmq-server >=3.11.0"
osx-64::rabbitmq-delayed-message-exchange-3.9.0-h694c41f_0.tar.bz2
-    "rabbitmq-server >=3.9.0,<3.10"
+    "rabbitmq-server >=3.8.16"
================================================================================
================================================================================
linux-64
linux-64::rabbitmq-delayed-message-exchange-3.10.2-ha770c72_0.tar.bz2
linux-64::rabbitmq-delayed-message-exchange-3.10.0-ha770c72_0.tar.bz2
-    "rabbitmq-server >=3.10.0,<3.11"
+    "rabbitmq-server >=3.8.16"
linux-64::rabbitmq-delayed-message-exchange-3.11.1-ha770c72_0.tar.bz2
-    "rabbitmq-server >=3.11.0,<3.12"
+    "rabbitmq-server >=3.11.0"
linux-64::rabbitmq-delayed-message-exchange-3.9.0-ha770c72_0.tar.bz2
-    "rabbitmq-server >=3.9.0,<3.10"
+    "rabbitmq-server >=3.8.16"

Great thanks!

Maybe? I'm not sure. It's definitely surprising.
On Wed, Sep 18, 2024, 4:27 PM Mark Harfouche @.***>
wrote:

@.**** approved this pull request.
In recipe/patch_yaml/furo.yaml
https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/851#discussion_r1765743753
:

@@ -7,3 +8,6 @@ then:

tighten_depends:
name: sphinx
upper_bound: 7.2.0

is the fact that it wasn't caught by this a bug?
—
Reply to this email directly, view it on GitHub
https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/pull/851#pullrequestreview-2313839004,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJCJYIX4VR4TAORJCAAHCTZXHV3HAVCNFSM6AAAAABOORCHKCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMJTHAZTSMBQGQ
.
You are receiving this because you authored the thread.Message ID:
<conda-forge/conda-forge-repodata-patches-feedstock/pull/851/review/2313839004
@github.com>


Server Sent Events support

Server Sent Events are simpler to use than Websocket for unidirectional push on HTTP.
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
It would be nice to be able to push a ZStream where each chunk is a data line in the SSE format, for example
data: {"time": "1616750897"}
data: {"time": "1616750952"}
....

This should now be possible after after #143


Support MQTT Protocol

Thanks to the great work by @tuukka, we should now have working MQTT parsing. Hooray!

Adds support for previewing of MQTT packets

Also parses the payload, as that is a seperate buffer

Adds browserified mqtt-packet dependency to lib

Closes #56

This is great!
I am seeing one problem:

Load http://www.hivemq.com/demos/websocket-client/
Click the "Connect" button
Select the first sent packet
Check out the Payload side panel tab, the content isn't properly encoded ->.BUG

But, the inline preview works fine.
Honza

@janodvarko
Shoot, yeah, I totally forgot about that. Try now - the payload tab now shows the parsed MQTT payload, and I also added an MQTT tab for good measure.

Works for me now, thanks!
Honza

Ah, yet one problem, the 'payload property isn't encoded in the Details tab.
Honza

Also, I am seeing: Console Service ERROR [JavaScript Error: "TypeError: data.payload is null" {file: "resource://websocketmonitor-at-getfirebug-dot-com/data/components/frame-list.js" line: 139}]
Honza

@janodvarko
I pushed https://github.com/firebug/websocket-monitor/commit/a0f488bf3fa046e7db11cdbd7d4206c122534e54 and https://github.com/firebug/websocket-monitor/commit/ce16ba959b20e166610251add780eca79fb1f355 to master (if that is cool with you) adressing these issues.

@esphen Thanks for quick response!

I pushed a0f488b and ce16ba9 to master (if that is cool with you) adressing these issues.

Yes (I wanted to suggest that before)
And the error is gone...
But, I realized that seeing the encoded data in (a) the Payload tab and (b) the "Payload" field in the Details tab was actually correct - it's binary data as I understand now (in e.g. socket.io it's just plain text). These places display the entire 'ws frame payload' and we have MQTT tab for displaying MQTT payload now. This is how it works for all the other protocols too.
So, I pushed https://github.com/firebug/websocket-monitor/commit/da1ac851839d235f88a8220a66d629cadda64595
What do you think?
Honza

@janodvarko
Yeah, that looks fine by me. The MQTT payload is visible in both the inline preview and the MQTT panel, so we're not losing that in any way. Might as well stay consistent with the other protocols, as you suggest.


AccessViolationException when disposing the VlcPlayer

First off, thank you for such great VLC library. It works just fine, I have one issue though.
An AccessViolationException encountered when disposing the VlcPlayer in the window's OnClosing event, it occurs randomly while playing a stream or after the VlcMediaPlayer's EncounteredError event.
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

   at xZune.Vlc.VlcMediaPlayer.get_State()
   at xZune.Vlc.Wpf.VlcPlayer.<>c.<get_State>b__152_0(VlcMediaPlayer x)
   at xZune.Vlc.Wpf.Extension.DefaultValueWhenNull[T,TRet](T value, Func`2 selector, TRet defaultValue)
   at xZune.Vlc.Wpf.VlcPlayer.get_State()
   at xZune.Vlc.Wpf.VlcPlayer.<VlcMediaPlayerStateChanged>b__105_0()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()

I tried many workarounds and even to catch the exception using the [HandleProcessCorruptedStateExceptions] attribute, but it does not work!

I have tried to fix it, you can try the new code.

Thanks a lot  for your quick response!
I just found a workaround by stopping the VlcPlayer before disposing.
I'll try the new code soon and feedback.

Perfect! no exceptions so far with the last code.
Please update NuGet packages. Thanks again.

I want to fix and update it with #80 .


sum of the digits of a number

💥 Proposal
program to find the sum of the digits of a number
eg. for given number= 325, the sum is 10
Have you read the Contributing Guidelines on Pull Requests?
yes

/assign


add -fno-rtti flag

For #999 we had trouble compiling abseil-cpp with msan and asan. Turning
of rtti fixes this.

..trying to fix
cc1: error: command line option ‘-fno-rtti’ is valid for C++/ObjC++ but not for C [-Werror] in tests


Using Windows Auth

There's a problem i saw when navigating from add new employee back to overview.
If you log in as a new user (i used win auth) then go to add a new employee, but then instead click the "back to overview" button - you get trapped in the 'logging you in" screen.
I suspect the button 'back to overview' should not be visible to the user i was logged in as?

Just had a look - the reason for this is that the new user won't have a country claim, which means (s)he is not authorized to access the employeeoverview page due to the CanManageEmployees policy.  You could write a bit of code that would navigate away if the user isn't authorized or any other custom rule you might want to implement.  For that, you can use the RedirectToLogin razor page.
In a real-life situation would probably also requiring the new user to input a country claim when registering.  That's a bit out of scope for this course, but I cover that in this course: https://app.pluralsight.com/library/courses/dealing-credentials-when-securing-aspdotnet-core-3-application/table-of-contents
Hope this helps :)


No video on Android

I builded demo on Android 5.1.1 and successfuly connected with https://react-native-webrtc.herokuapp.com/ on my laptop. The problem is that there is no video (local nor remote) on the phone.
After starting application there are thrown these exceptions:

02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: startCapture failed
02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: java.lang.RuntimeException: Fail to connect to camera service
02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.(Camera.java:520)
at android.hardware.Camera.open(Camera.java:361)
at org.webrtc.VideoCapturerAndroid.startCaptureOnCameraThread(VideoCapturerAndroid.java:350)
at org.webrtc.VideoCapturerAndroid.access$1200(VideoCapturerAndroid.java:68)
at org.webrtc.VideoCapturerAndroid$7.run(VideoCapturerAndroid.java:331)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:211)
at android.os.HandlerThread.run(HandlerThread.java:61)
02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo I/org.webrtc.Logging: VideoCapturerAndroid: stopCaptureOnCameraThread
02-10 22:17:05.422 15777-25179/com.rctwebrtcdemo E/org.webrtc.Logging: VideoCapturerAndroid: Calling stopCapture() for already stopped camera.

The only difference in code is fix from here, everything else is untouched.
Am i doing something wrong or is it currently not supported on Android?

Same issue.  I have followed all of the same steps and cannot get the RTCMediaStream to render at all.

I just published 0.3.0. Please try to see whether the problem is fixed. You can also try Demo project. It should work with RN 0.20.0 on iOS and Android.

Thank you for your answer, I will try it out tommorow and tell you if it works :)

Ok, sorry for late response but i was really bussy lately.
I've checked demo on Android today, and it works like a charm.
Thank you for fixing it.


Previously, a kill -SIGTERM would be requested of the daemon, which would forward the signal to /usr/local/sbin/wifibox. /usr/local/sbin/wifibox would not forward the signal to bhyve, which requires the signal to shutdown cleanly.
Also explicitly unlink the tap interface from the wifibox interface, and wait 5 seconds instead of 3 for the VM to shutdown.
Also consistently use subshells.

There is a problem remaining with the patch. vm_manager() calls destroy_vm() always after bhyvectl is started, and possibly destroy_nmdm() and destroy_bridge()

Yes, I have noticed the same issue while experimenting with your patch and my suggested addition about the adaptive wait for forced shutdown.  I think I already have a solution for that.  First of all, destroy_nmdm() has just been removed by #105 so that is good.  For destroy_bridge(), what worked for me is to remove its invocation from vm_manager(), right before calling quit_daemonization().

For destroy_bridge(), what worked for me is to remove its invocation from vm_manager(), right before calling quit_daemonization().

Just to confirm: are you satisfied that there is no condition that the VM manager exits somehow without restarting, and we don't want to call destroy_bridge()? For example if the VM is powered off or is halted for some reason, destroy_bridge() may not be called unless the service is manually stopped/restarted.
Personally, I think it's fine to remove the call. The VM manager does not create the bridge, so it shouldn't destroy it either.

Just to confirm: are you satisfied that there is no condition that the VM manager exits somehow without restarting, and we don't want to call destroy_bridge()? For example if the VM is powered off or is halted for some reason, destroy_bridge() may not be called unless the service is manually stopped/restarted.

The purpose of the VM manager is to keep the VM running until it is stopped in the expected way.  This can cover unexpected crashes or even deliberate reboot issued from the console.  Throughout all this time, the network interface has to be available as well.  I think placing the destroy_bridge() call there was the result of the bug that this PR is fixing -- I did not notice that the ACPI power-off does not happen for the VM and everything was forcefully removed at the end.
If the VM manager is killed directly from somewhere else in the system, the VM would leave the interface behind.  But wifibox can notice the existing interface upon the next start or the leftover resource can be cleaned up separately directly.

Personally, I think it's fine to remove the call. The VM manager does not create the bridge, so it shouldn't destroy it either.

I agree!

I have got some warnings from ShellCheck (by running the make shellcheck command):
In sbin/wifibox line 727:
    trap _kill_child SIGTERM
                     ^-----^ SC3048 (warning): In POSIX sh, prefixing signal names with 'SIG' is undefined.

In sbin/wifibox line 738:
    trap - SIGTERM
           ^-----^ SC3048 (warning): In POSIX sh, prefixing signal names with 'SIG' is undefined.

For more information:
  https://www.shellcheck.net/wiki/SC3048 -- In POSIX sh, prefixing signal nam...

I've fixed the Shellcheck warnings, and fixed three calls to kill -SIGTERM as well.

Also, today I realized there is a more elegant solution to solving this bug than creating the (local) whole function for it. This patch provides the same functionality:
--- /usr/local/sbin/wifibox	2024-09-10 04:58:25.754894000 +0200
+++ /tmp/wifibox.old	2024-09-10 05:04:12.978878000 +0200
@@ -770,7 +770,7 @@

     log info "Stopping guest ${WIFIBOX_VM}, managed by PID ${_pid}"

-    if ! (${KILL} -SIGTERM "${_pid}" 2>&1 | capture_output debug kill); then
+    if ! (${KILL} -SIGTERM -"${_pid}" 2>&1 | capture_output debug kill); then
 	log warn "Guest could not be stopped gracefully"
     fi

By killing the pgid, we can kill daemon, bhyve, and sh all at the same time:
$ ps ax -o pid,pgid,comm  | grep 23442
23442 23442 daemon
24815 23442 sh
87148 23442 bhyve
87640 23442 sh

Up to you how you'd like to proceed, @pgj.

I've fixed the Shellcheck warnings, and fixed three calls to kill -SIGTERM as well.

Thanks!  Curiously, ShellCheck did not give a warning for other instances :shrug:

[T]oday I realized there is a more elegant solution to solving this bug than creating the (local) whole function for it.

I like this solution!  Let us do that, and I can then test it locally.

That should do it. Please test.

The approach works nicely.  But there is a new ShellCheck warning:
In sbin/wifibox line 748:
    _gpid="$(${PS} -o pgid -p $_pid | ${TAIL} -1)"
                              ^---^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
    _gpid="$(${PS} -o pgid -p "$_pid" | ${TAIL} -1)"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

Great! With this patch and all of the others applied, Wifibox now works 100% on my system. Feel free to add it to the supported list.
CPU: Core i7-4870HQ CPU @ 2.50GHz
NIC: BCM43602 802.11ac Wireless LAN SoC
Model: Apple MacBookPro11,4


Error in CONTRIBUTING instructions

CONTRIBUTING.md says (excerpted):
npm run build
npm dev

I don't think 'npm dev' is a valid command<EMAIL_ADDRESS>doesn't understand it.  I had to start cnc with
bin/cnc
I would also like to create a development build but I can't figure out how.  So many frameworks!

It's supposed to be npm run dev. I have updated the build instructions in the CONTRIBUTING.md and README.md files. Thank you.


Adding border_color arguments to utility class workflow

follow up to https://github.com/primer/view_components/pull/801
This is the last pr for upgrading the color arguments to functional arguments. This pulls in the border color classes.
This one will be the easiest to integrate into dotcom. Currently there are 15 uses of border_color: system argument in total. And one of them uses a deprecated value :black_fade. I'll send a PR to fix this.

Fix to remove the black_fade https://github.com/github/github/pull/193712


Provide 404-like for non-existent Job

If an individual job URL is mistyped or if it's been deleted and the page returned to, we see 3 spinners and a red snackbar.
Change that to 0 spinners (also don't show the Trigger and Request Template cards) and an informative alert instead of a snackbar.
This change will be visible only when fetching the Job fails on page load. Other error handling, for example if there's a problem when pushing the Delete Job button, remains the same.

This appears to have been resolved with other error handling changes.  Closing as OBE.


Error in Class Activation map for hidden layers

I was trying out the class activation map of some cat and dog images for different layers of VGG16 (using keras.applications.vgg16, not vis.utils.vggnet), and the code, shown in (https://raghakot.github.io/keras-vis/visualizations/attention/) does not seem to be working for layers other than 'predictions'. When I use layer_name='block1_conv2', it is throwing an error, ValueError: Unable to detect penultimate 'Convolution2D' or 'Pooling2D' layer for layer_idx: 2. On the other hand, for layer_name='block2_conv2', or layer_name='block3_conv2' there is an AssertionError for len(item_slice) == 4.
Further, when I am using layer_name='predictions', the prediction is performed correctly for the cat and dog image (Tabby, and Siberian Husky), but the heat map is barely on the dog.

The problem is seen even for the images shown in the website, at least for the Tiger and the Spider Web.

When I use the VGG16 from vis.utils.vggnet, though, the heatmap makes sense!

Though, even in this case, when I change the layer to fc1 or fc2, the entirety of the image lights up.

And the same error as mentioned before shows up when I try see the map for intermediate Convolution layers. How can this be solved?
The code I am using is:
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.axis as ax

from keras.preprocessing.image import img_to_array
from keras.applications.imagenet_utils import preprocess_input

from vis.utils import utils
from keras.applications.vgg16 import VGG16, decode_predictions
from vis.visualization import visualize_cam

# Build the VGG16 network with ImageNet weights
model = VGG16(weights='imagenet', include_top=True)
print('Model loaded.')

# The name of the layer we want to visualize
# (see model definition in vggnet.py)
layer_name = 'predictions' # 'block1_conv2', 'block2_conv2', 'block3_conv2'
layer_idx = [idx for idx, layer in enumerate(model.layers) if layer.name == layer_name][0]

# Images corresponding to cat, and dog
image_paths = [
    "cat.jpg",
    "dog.jpg"
]

heatmaps = []
for path in image_paths:
    seed_img = utils.load_img(path, target_size=(224, 224))
    x = np.expand_dims(img_to_array(seed_img), axis=0)
    x = preprocess_input(x)
    pred_class = np.argmax(model.predict(x))
    print('Predicted class is ' +str(decode_predictions(model.predict(x), top=1)[0][0]))
    # Here we are asking it to show attention such that prob of `pred_class` is maximized.
    heatmap = visualize_cam(model, layer_idx, [pred_class], seed_img)
    heatmaps.append(heatmap)

plt.imshow(utils.stitch_images(heatmaps))
plt.axis('off')
plt.title('Class Activation map')
plt.savefig('keras-vis-cam-2.jpeg')

I got similar constant heatmap (but mine are covered by a blue layer). #27 mentioned this problem as well and I think it's not fully fixed?

Can you guys try this again in latest? There were a couple of big changes with the latest commit.

@raghakot I'm using the latest version on PyPI (0.3.1).
from keras.preprocessing.image import ImageDataGenerator
from keras.models import load_model

batch_size = 2
test_datagen = ImageDataGenerator(rescale=1./255)
validation_generator = test_datagen.flow_from_directory(
        'validation',
        target_size=(200, 200),
        batch_size=batch_size,
        class_mode='binary',
        shuffle=False)

model = load_model('weights.hdf5')
res_cnn = 1- best.predict_generator(validation_generator,steps=1)

res_cnn_class = [0 if x < 0.5 else 1 for x in res_cnn[:,0]]

import numpy as np
import matplotlib
import matplotlib.pyplot as plt

from vis.utils import utils
from vis.visualization import visualize_cam

model = model

fig = plt.figure(figsize=(20,20))
i = -1
for fn in validation_generator.filenames:
    i += 1
    subplot = fig.add_subplot(1,12,i+1)

    if i < 1:
            subplot.set_title('Class A')
    else:
        subplot.set_title('Class B')

    seed_img = utils.load_img('validation/'+fn, target_size=(200,200))

    heatmap = visualize_cam(best, 7, [res_cnn_class[i]], seed_img)
    plt.imshow(heatmap, cmap=plt.get_cmap('gray'))
    plt.axis('off')

plt.show()

Attached zip file contains model weights, python notebook of the code, and test images to reproduce the problem.
debug.zip

I reinstalled keras-vis from source, and the new error that is now showing up is,
Traceback (most recent call last):
  File "keras-vis-cam.py", line 38, in <module>
    heatmap = visualize_cam(model, layer_idx, [pred_class], seed_img)
  File "/home/yx96/anaconda2/lib/python2.7/site-packages/keras_vis-0.3.1-py2.7.egg/vis/visualization.py", line 371, in v
isualize_cam
    penultimate_output = penultimate_layer.output
AttributeError: 'numpy.ndarray' object has no attribute 'output'

It seems to be failing to get the output from the penultimate layer!

Hi, The API has changed. There is now visualize_class_cam and visualize_regression_cam with visualize_cam being more general that works on custom loss functions. You might want to use visualize_class_cam now. API docs should be updated. I am still working on completely overhauling the docs and examples.

@raghakot Thanks for the update. After updating the package to 0.3.2 I'm able to import the new function visualize_class_cam. However now the output are pure blue squares (I just simply replaced visualize_cam with visualize_class_cam) :

It is very likely the case that the penultimate_layer has a spatial resolution of (1, 1). You might have to specify a pre Conv layer manually via penultimate_layer_idx. I added examples for MNIST in examples/. Highly recommend checking that out to understand grad-CAM.
Is your code the same as this?

@raghakot The MNIST example runs well on my machine but my model still gets these blue squares even after I set the penultimate layer idx (now the idx corresponds to a 48x48x64 maxpooling layer) for CAM. visualize_class_saliency also gives me these blue squares. My input size is 200x200 and the output size of last maxpooling layer is 48x48x64.
The code for both CAM and saliency map I used is included in a notebook in this compressed file, along with two test images and the model weights.
debug.zip

@wanting0wang It appears that the gradients are all 0's with respect to the input. This could mean that your model is overfitting or not trained properly since none of the input pixels have an effect on the output. How was this trained? It also seems too shallow. You probably need more conv layers and reduce spatial resolution down to (7, 7) or (5, 5) before applying Dense layer.
Also, this is unrelated to MNIST dataset, so you should create a separate issue for it and avoid cluttering this thread. I will help with debugging on the new thread.

I am closing this due to lack of correspondence. Feel free to reopen the issue if you're still encountering problems.

@raghakot Hi sorry for the late reply.. I was on holiday. I think my problem is because of the high spatial resolution (and that increases the parameters a lot and leads to overfit). I trained another model with lower spatial resolution in the last maxpooling layer (about 9x9) and everything looks great. Thank you for the suggestions!

Great. Glad it worked out :)


Incompatible with ueberauth_github

Hello,
It seems the current version is not compatible with oauth2 0.8.
I tried to update the calls but have had no success, I don't quite understand everything the code does (I have just started learning elixir).
After seeing the github strategy was updated I tried to follow the way it is donewith no success.
Any plans to update this strategy?
Thanks!

#16 was merged, this should be compatible with ueberauth_github now.


Initial Database Setup

I've implemented the initial database setup with the following functionality:

Established a connection with the database
Made an initial schema model for the database (maybe subject to change as we establish our design decisions)
Made 'outline' functions for sending and receiving data from the database, functionality to send and receive data needs to be implemented.

For access to the database use the following commands in the terminal:
npm install mongoose
npm install mongodb
npm isntall dotenv

I just pulled and ran the backend with no worries, but when running the client I get this error in the browser - Application error: a client-side exception has occurred (see the browser console for more information). - do you know what could cause this?

I just pulled and ran the backend with no worries, but when running the client I get this error in the browser - Application error: a client-side exception has occurred (see the browser console for more information). - do you know what could cause this?

I'm not receiving those errors when I run it, strange. I'll look into this now.

Anyone merge this pull request please use Squash and merge option in the drop down.

It should work now, I'm receiving no errors when inputting data and its appearing in the server. Let me know if it works on your end.


Figure out what to do about abbreviations in modes other than insert mode

It's quite annoying to search for non-ASCII characters via /, for instance, because you have to have yanked the character you're looking for ahead of time.
Possibly there's some solution we can think of that'd allow abbreviations in more places. Nothing has occurred to me so far the past few months, but it may be there are things we can try.

If you're looking for a quick partial solution, you could try digraphs (ctrl-K a * for example). Perhaps we can find some way to map abbreviations to digraphs?

Another option is finding a way to enable abbreviations in the q/buffer

What I want to try here as a first pass is via https://github.com/hrsh7th/cmp-cmdline -- specifically after #140, it should be possible to expand abbreviations in cmdline or search mode by just enabling that (which seems to work well for other cmp sources).

What nvim-cmp does (cmp-cmdline seems to be only configuration) is hook into CmdlineChanged and insert the completion via nvim_feedkeys, we could adopt that for the built-in expander as well.

Yep I saw that, probably a good idea too.

I've taken a strong interest in this recently. I was thinking that abbreviations are a more lightweight kind of snippet, but of course there isn't a one-to-one correspondence -- for example snippet completion is triggered on command while abbreviation completion is automatic, and there's no notion of reverse-lookup for snippets.
The builtin :iabbrev command mentioned in #117 can be used to a very similar effect to what we have, it can be buffer-specific and :abbrev already works in the command line, however it will be more difficult to extend than something that lives in a Lua plugin.
Overall, I feel like the correct approach is to extend a plugin like LuaSnip for our purposes, then we could get other goodies like abbreviation autocompletion in the command line and search. And it has the "autotrigger" option we can use. But there's the question of how to get reverse-lookup to work in that context, which may not make sense for general snippets, but perhaps COULD if we were to generalize it to searching for a regex match to a visual selection (with snippet placeholders replaced by appropriate patterns, and optimized with a simple map for the plain string case).
So, I think that going in this direction could eventually get this and #117 working, but let me know if you had something else in mind.


Initial conda environment and binder links

Add conda dependency specification file and getting started instructions in the main README.md.
Notes:

The conda environment.yml is paired with a conda-lock.yml lockfile for full reproducibility. Current dependency pins include:

conda-lock~=2.4.2
jupyterlab~=4.0.7
lightning~=2.1.0
planetary-computer~=1.0.0
python=3.11
stackstac~=0.5.0
zarr~=2.16.1

Main README.md contains the quickstart Binder button, and steps for installation and usage locally.

References:

Setup adapted from https://github.com/developmentseed/chabud2023/pull/3
Planetary Computer and Sagemaker button adapted from https://github.com/opengeos/leafmap/pull/380

Gonna give this another day for reviews, and will merge directly unless I hear otherwise!


Adding support for RDS instances.

My first puppet provider module. It was a learning experience. I can now create and destroy RDS instances using puppet. Please code review. I'm sure I missed/buggered up something. :)

Thanks @daveseff, just tidying up. Looks like this is continuing in https://github.com/puppetlabs/puppetlabs-aws/pull/69


Enable overwriting of routeRoundTrip

Hey together,
I tried to overwrite the lookup function by extending the routeRoundTrip function, since https://github.com/graphhopper/graphhopper/pull/2100 allows to overwrite this function now. There are still two methods that I really need to successfully create my own routeRoundTrip function. Is it possible to change these two methods from private to protected?
best regards,
Fabian

Are there any comments/opinions on the proposed changes?

I would prefer thinking about which parts of the GH code shall be reusable and are not reusable yet. For me there is a difference between 'library' kind of code that is 'meant' to be re-used and 'server/config' code that is more or less throw-away code that was only written once and in a specific way to implement the GH server.
The routeRoundTrip method itself is rather short IMO and I would expect it is not too much of a problem to overwrite and modify it entirely? Then again it calls concatenatePaths(which calls the private createPathMerger method) and createFlexiblePathCalculator which are private, so they would need to be copied and modified as well.
Don't get me wrong I do not think its a very big deal to make two more methods protected, especially if there is at least someone who thinks its useful. But on the other hand I do not think this is very sustainable, we should not open more and more methods just so it is easy to modify them a bit. The code in Router (just like GraphHopper) is still heavily mixing 'library'/useful/reusable code with server/configuration kind of code and I think this is the real problem here.
What to do with this PR? I do not have a strong opinion, I'd just like to say that IMO making 'random' methods protected should not be the way to go and there is no guarantee these methods will stay the way they are in the future. I am looking forward to hearing other's opinions here :)

A lot of important logic that I regularly find needs adjustment to special problems is hidden in the Router. For example in #1713 I had an issue changing the snap prevention. I also remember a few other questions where similar things were asked or sought after.
So I think allowing to modify the Router is important and I think a lot of modifications are probably very problem specific, so adding them to GH core is probably not a good idea. I think in this case it would be the easiest to set these methods to protected for now.
In the long run I am wondering if we might find a way to make the *Routing (RoundtripRouting, ViaRouting) classes easier to extend by defining a common interface, if possible? The used *Routing classes are not especially extension friendly - considering that all methods in the *Routing class are static. I know we just got rid of the RoutingTemplates ;). On the other hand, the code is now quite straight forward, which is a big plus as well. I agree, I feel a bit uncertain about what would be the best step in the long run.

So I think allowing to modify the Router is important and I think a lot of modifications are probably very problem specific, so adding them to GH core is probably not a good idea. I think in this case it would be the easiest to set these methods to protected for now.

I just want to emphasize that what @easbar says is important in full generality:
Extending the Router to "modify" it is not something we should support. Maybe this sounds drastic, but the correct way to modify the Router is to fork it, unless the modification is done by very specific extension points which we support. Every method that is not private and not final is a commitment and causes serious work in the long run.
It basically dumps the work that maintaing a fork would be -- on us.

Every method that is not private and not final is a commitment and causes serious work in the long run.
It basically dumps the same work that maintaing a private copy would be -- on us.

I know what you mean, but I don't agree with you on this. So far, even after the 1.0 release, GraphHopper changed a lot of interfaces, including the here discussed Router and RoutingTemplates. Don't get me wrong, change is good and change hurts these people that think it's necessary to extend some lower level feature. So I think no one can expect that every public method will stay the same forever (especially with the release of a major version ;)). I do understand, that once a method is public, one is hesitant to change it and I can see the issue with that. On the other hand maintaining a fork/copy of GraphHopper is a whole lot more work compared to changing a method.

RoutingTemplates

Don't want to dwell on this detail, we can agree to disagree (especially since we are sitting on opposite ends of the trade-off :-)), but RoutingTemplate was a particularly not-so-great interface. It is exactly an example of the thing I don't want to come back in salami slices, or disguised as protected methods. It had like three or four methods that were totally ad-hoc, each one just pretending to be something general where you could just write your own implementation for and where it was perfectly clear what it meant, but in reality, it became 20 times clearer by just converting the exactly three implementations into exactly three procedures and removing this abstraction.
This really held us back.

No worries, I haven't been a big fan of the RoutingTemplates either. Also I really appreciate this great improvement by @easbar. The code is now indeed a lot cleaner and out right just better. So we fully agree on that.
My point is, don't let public or protected methods hold you back. Especially protected methods. It's OK if they change.
Creating and maintaining a fork on the other hand just to change a minor thing seems like an anti-pattern to me. This leads to half maintained and outdated forks that don't improve anything and don't contribute anything back to GraphHopper. After several years of being outdated they will be thrown away and a new fork is created and the changes start again.
IMHO, a library should be open enough to be customizable, but close enough, that it's easier to contribute back an improvement instead of hacking it in a local fork. This allows to customize a few features that are important to the business case and allow the less business important features to be contributed.

@easbar Are you teasing me? :-)

No, not at all :) I just wanted to say that I do not want to decide myself if and how which parts of GH should be made extensible or not. I like to give my opinion, but I hope we can find some consensus on these things.

Every method that is not private and not final is a commitment and causes serious work in the long run.

I am not sure if I agree. I mean I agree we should not expose an API that is not meant to be kept/maintained as an API, but I do not agree that this causes us lots of work (maybe some time ago, but not right now), because if we are honest we did not care too much about changing not-private or final methods recently. But I wonder if addng more protected/public/open code that just like private code might be changed in the next release anyway does not make it even worse for those who maintain a modified GH instance. How does it help not to have a clear boundary and no guarantees about what might and might not change?
To me it seems it very much comes down to how much code needs to be customized. If its just about making one method protected isn't it very easy to create a fork and keep it up to date? And if more changes are needed why does it help to make one method protected upstream when all this other code needs to be changed or added as well and could also break with the next release?

IMHO, a library should be open enough to be customizable, but close enough, that it's easier to contribute back an improvement instead of hacking it in a local fork. This allows to customize a few features that are important to the business case and allow the less business important features to be contributed.

Yes this sounds right, but how do we achieve this? Also the question is when a contribution is really an improvement. I think its an improvement if it helps most or many users of the code, but if it is just an adjustment that prevents work downstream it is not (I mean this just in general, I do not have any specific contribution in mind here).

My point is, don't let public or protected methods hold you back. Especially protected methods. It's OK if they change.

Ok good to know, so you think having protected methods that are just as likely to change as private ones makes it easier to maintain a customized GraphHopper? And its easier because people who want to customize something do not have to create a fork and change the accessibility of this method this way?. Honestly, I do not really understand this, but since I never really maintained a custom GraphHopper instance I just take your word or maybe you can explain this a bit more.
My goal is rather making the GH code so decoupled and modular that it is easy to take the parts and create something interesting with them. My goal is not so much creating a stand-alone GH server that can just be pulled in as a maven artifact and be adjusted by overriding a few methods. And the reason is that I think the first approach is much more powerful while I do not really have an idea how the latter is even supposed to work.
But apart from these general thoughts, like I said, I do not see a huge problem in making a high level method like routeRoundTrip protected instead of public for now. Especially since we are currently still far from the ideal.

This really held us back.

Just my two cents on the routingtemplates. I agree this held us back, but not even so much because we did not want to break compatibility, but rather because the code was or became so twisted that it was even hard to remove it :) So I agree that just the attempt of making things 'pluggable' can come with significant costs. But obviously we should not compare the routing templates with making a few methods protected.

I agree this held us back, but not even so much because we did not want to break compatibility, but rather because the code was or became so twisted that it was even hard to remove it :) So I agree that just the attempt of making things 'pluggable' can come with significant costs.

Yes, exactly, that's what I meant as well. That interface and its methods were not a problem because we were hesitating to change their signatures, but because they existed, instead of just linearly writing down the three different alternatives.

To me it seems it very much comes down to how much code needs to be customized. If its just about making one method protected isn't it very easy to create a fork and keep it up to date? And if more changes are needed why does it help to make one method protected upstream when all this other code needs to be changed or added as well and could also break with the next release?

The biggest benefit from my perspective is that there is clear a boundary. I know exactly what is custom code and what is no custom code. This makes writing the code itself more complicated, but down the road it is easier to maintain.
Every GraphHopper update produces work to get everything compatible again, both for forks and for library extends. I maintain a few different projects that either fork GraphHopper or extend it as a library. From my experience, the library extends are a lot easier to maintain. That's why I try to get it working with extends and avoid forking.

Ok good to know, so you think having protected methods that are just as likely to change as private ones makes it easier to maintain a customized GraphHopper? And its easier because people who want to customize something do not have to create a fork and change the accessibility of this method this way?. Honestly, I do not really understand this, but since I never really maintained a custom GraphHopper instance I just take your word or maybe you can explain this a bit more.

Maintaining a fork is always ugly and when you update a fork after half a year for example you end up in merge hell. You might merge code for a few days, then fix all the obvious compiler errors. Then it's about fixing tests, both GraphHoppers own tests, then your own tests that test your customization. Just to give you an idea, I recently worked on a GraphHopper update with over 1000 commits, ~80k lines added and ~45k lines removed. There is no way that you can review something like this properly.
On the other hand, if you update library code, you could first comment out all your customization and get the basics back up an running, then your start to slowly add your custom code.

Thanks for sharing some insights!

On the other hand, if you update library code, you could first comment out all your customization and get the basics back up an running, then your start to slowly add your custom code.

Why can you take this approach when you extended the library, but not when you forked the upstream project? Maybe this example is too simple but I imagine it like this:

extend the library

create new project
add GH dependency
add custom code, overwrite methods etc.

fork the library

fork GH
make stuff accessible (make methods public, maybe change some method signatures, add a hook etc.)
create new project
add forked GH dependency
add custom code, overwrite methods etc.

So basically in the fork you open up methods just the way you need it and the (probably much heavier) customizations are in the actual custom project, but these you need to do (and later update) anyway. When you update to a new GH version you first need to check if your previous hooks/replacements/public/signatures still work or you need to find a new way to add them.

So basically in the fork you open up methods just the way you need it and the (probably much heavier) customizations are in the actual custom project, but these you need to do (and later update) anyway.

Ah, now I see, that would be indeed an option. When I talked about a fork I actually meant a fork with code changes and not just accessibility changes.
So in this case:

Option 1) extend the library
Option 2) fork the library

Both options are indeed comparable in effort.

For now this is the recommended approach to add entry points / modification hooks etc. to the GraphHopper app/server code: https://github.com/graphhopper/graphhopper/pull/2106#issuecomment-688914649


Rescaling anchors before computing iou

Hi,
When computing the bboxes in dataset.py in preprocess_true_boxes at each level, w and h are scaled following the level:
bbox_xywh_scaled = (
1.0 * bbox_xywh[np.newaxis, :] / self.strides[:, np.newaxis]
)
Then, shouldn't we also scale the anchors before computing the iou to match the boxes, like:
anchors_xywh[:, 2:4] = self.anchors[i] / self.strides[i]
instead of:
anchors_xywh[:, 2:4] = self.anchors[i]
Thanks !

Same question and I think you are right. The anchors_xywh[:, 2:4] should be scaled too.

#156 also mention about same issue. I also agree with you.

I also totally agree that the anchors should be scaled before computing the IOU. A strong argument for that: try computing IOUs when stride=32. The IOUs are so small because the anchors are so big. How I fixed it? On line :
https://github.com/hunglc007/tensorflow-yolov4-tflite/blob/9f16748aa3f45ff240608da4bd9b1216a29127f5/core/dataset.py#L335
just divide by stride:
anchors_xywh[:, 2:4] = self.anchors[i] / self.strides[i]


Species and other % Buffs

This feature would be a toggle for enabling % damage buffs against certain species using certain items. This should have a toggle or be presented as a second max hit in the infobox, similar to how inventory weapons' max hits currently appear.
I believe that toggles would be a better implementations, as displaying all of the possible max hits for all of the weapons in your inventory would be very cluttered. However, the onus could be put on the user to limit the number of weapons they are checking.
The categories I can think of are Demonbane weapons (silverlight/arclight/darklight), Dragonbane weapons (dhl/dhcb), kurask (lbaxe), kalphite (keris), and undead (salve, salve(i), salve(e), salve(ei)).
Two other related categories, though not species, are wilderness (craw's, chainmace, and thammy sceptre), and slayer task (black mask/slayer helm).
Another alternative would be assuming, if equipped, that the bonus should be applied. However, a toggle would be better than assuming that, as some weapons are used in general outside of those situations. Limited accounts would experience this the most (pures/irons), but mains do in niche situations use some of these items outside of their % bonus enemies. (I.e. craws for range in many places, dhl against vasa crystals.)
I'm not 100% sure where in the formula these are applied, but it can be reasoned from the forum post and/or from Bitterkoekje's Google Sheets calc. I'm assuming you know where to find those, but I can link them if someone else wants to work on this before me. I'm interested in taking this ticket.

Do I have to do anything to make it available for other people to work on? I don’t have the time right now to implement stuff but if others want to improve that’d be awesome

You're good, I figured out how to fork it and how to get it running. I'm trying to get up to speed on how it works and figure out how best to tackle it in my free time and I can make a PR if I get anything done.


Update to use zig package manager

Changes:

Removed raylib submodule
Added build.zig.zon with raylib as dependency

Todo:

[x] Update JSON calls in generate.zig
[ ] Update or remove addTo function
[ ] Test adding as a dependency to a project

Fixes #14

I haven't read into the documentation of the package manager yet.
Not sure if I manage to find time this week to look into it.
Probably next week.
At least I fixed the JSON parsing calls today.
Thanks for the preliminary work setting up the build.zig.zon

No problem.

I haven't read into the documentation of the package manager yet.

What documenation? 😅 I had a poke through the source code in addition to reading over @andrewrk's test repo here: https://github.com/andrewrk/ffmpeg

Will this PR be reconsidered since the package manager is now supported in the latest stable release (0.11.x)?

Closing in favour of #15


[CONTINT-4412] Switch back to static client and structured types for KSM check

What does this PR do?
Switch back to static client and structured types for kubernetes_state_core check.
Motivation
In #30061, we had to migrate the kubernetes_state_core check to use the dynamic client to avoid a panic in the upstream  kube-state-metrics module: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/682846491
panic: interface conversion: interface {} is *v1.Job, not *unstructured.Unstructured [recovered]
        	panic: interface conversion: interface {} is *v1.Job, not *unstructured.Unstructured

        goroutine 456 [running]:
        k8s.io/apimachinery/pkg/util/runtime.handleCrash({0x5edd188, 0x9086b80}, {0x4508180, 0xc0012e5b90}, {0x9086b80, 0x0, 0x100000000000000?})
        	/go/pkg/mod/k8s.io/apimachinery@v0.31.1/pkg/util/runtime/runtime.go:89 +0xee
        k8s.io/apimachinery/pkg/util/runtime.HandleCrash({0x0, 0x0, 0xc00144be48?})
        	/go/pkg/mod/k8s.io/apimachinery@v0.31.1/pkg/util/runtime/runtime.go:59 +0x108
        panic({0x4508180?, 0xc0012e5b90?})
        	/usr/local/go/src/runtime/panic.go:770 +0x132
        k8s.io/kube-state-metrics/v2/pkg/util.GVRFromType({0x4cab54f?, 0xc001938f80?}, {0x4c24440?, 0xc000f74a08?})
        	/go/pkg/mod/k8s.io/kube-state-metrics/v2@v2.13.0/pkg/util/utils.go:145 +0x1a6
        k8s.io/kube-state-metrics/v2/internal/store.(*Builder).WithCustomResourceStoreFactories(0xc001939088?, {0xc00071b540, 0x5, 0xc001b10c01?})
        	/go/pkg/mod/k8s.io/kube-state-metrics/v2@v2.13.0/internal/store/builder.go:200 +0xb5
        k8s.io/kube-state-metrics/v2/pkg/builder.(*Builder).WithCustomResourceStoreFactories(0xc0007ae510?, {0xc00071b540?, 0xc001a82900?, 0x9?})
        	/go/pkg/mod/k8s.io/kube-state-metrics/v2@v2.13.0/pkg/builder/builder.go:130 +0x22
        github.com/DataDog/datadog-agent/pkg/kubestatemetrics/builder.(*Builder).WithCustomResourceStoreFactories(...)
        	/go/src/github.com/DataDog/datadog-agent/pkg/kubestatemetrics/builder/builder.go:129
        github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/ksm.(*KSMCheck).Configure(0xc00[1881](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/682846491#L1881)e60, {0x5edd8f8, 0xc0013d6180}, 0x0?, {0xc001920600, 0x193, 0x200}, {0x0, 0x0, 0x0}, ...)
        	/go/src/github.com/DataDog/datadog-agent/pkg/collector/corechecks/cluster/ksm/kubernetes_state.go:359 +0x119a

kubernetes/kube-state-metrics#2553 aims at addressing this issue so that using dynamic client and unstructured types shouldn’t be needed anymore.
As structured types are more efficient than unstructured ones, it would be better, if possible to switch back to them.
Describe how to test/QA your changes
Validate that kubernetes_state_core checks works fine.
Possible Drawbacks / Trade-offs
Additional Notes
Rely on kubernetes/kube-state-metrics#2553
As this PR partially reverts some of the changes of #30061, it might be smart to compare the code with what we had before with something like:
git diff c86d1e0bb79bf5ace65d9085917024ce52e86729^..lenaic/CONTINT-4412_2 pkg/collector/corechecks/cluster/ksm/customresources

/merge


[UI] Breakpoints window always expands

Issue Type: Bug

start python debugging
collapse breakpoints window, to have more space for watch window.
restart debugging

now breakpoints window always starts expanded, kinda annoying.
Does it happen for anyone else?
Extension version: 2021.2.633441544
VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 6.1.7601

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: unavailable_offopengl: enabled_onprotected_video_decode: unavailable_offrasterization: unavailable_offskia_renderer: disabled_off_okvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.43GB (3.28GB free)

Process Argv
--crash-reporter-id d068a291-e2ce-4726-851f-8253022ad348

Screen Reader
no

VM
0%

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
vsccppwtct:30364498
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30360495
dockerwalkthrucf:30369616
bridge0723:30353136
pythonrunftest32:30365366
pythonf5test824cf:30361778
javagetstartedc:30364665
pythonvspyt187:30365361
pydsgst2:30361792
vssid140:30363603
vssur157:30367808

This happens when there are only these two view panes visible:

@sandy081 or @sbatten I wonder whether you can suggest something here. I think what's happening is that we are setting context keys which make that first view not visible, and make other views visible. In the process of doing this, we do the remove first, hit this line:
https://github.com/microsoft/vscode/blob/f47facd3a4888d31b57f00eff777b8d9903dde67/src/vs/workbench/browser/parts/views/viewPaneContainer.ts#L1049-L1049
which forces the Breakpoints view to be visible since it is the only view (?), but then the other views are added immediately after. Is there any way to preserve the collapse state of the Breakpoints view when this happens?

This happens when you have only single view and I think this should not be executed in your case. Because you have more than one view and we remember that. So on reload we will not merge the view with view container.
Is it possible to repro?

This happens when you have only single view and I think this should not be executed in your case.

But as context keys change, there is an instant where you have removed the welcome view so there is only one view, the breakpoints view, present. But the other views are being added.
Yeah @sandy081 I can repro it. Open a workspace with no launch config, set a breakpoint in a .py file, collapse the breakpoints view, press F5 to debug the python file, see that the breakpoints view gets expanded.

It looks like views get removed before they get added, on context key change: https://github.com/microsoft/vscode/blob/7690293ae208f91f4e3612e309ac130a85244486/src/vs/workbench/services/views/common/viewContainerModel.ts#L630-L635

Ok, I can repro. It seems the views are removed and added very quickly in a random order and I do not think above ordering of events matter. As the views can be removed and added in a separate event loops. I am not sure if we can have a perfect fix for this. May I know how important it is for Debug viewlet to have the single view merged with viewlet container? If not you can opt out of that by setting mergeViewWithContainerWhenSingleView to false here:
https://github.com/microsoft/vscode/blob/f47facd3a4888d31b57f00eff777b8d9903dde67/src/vs/workbench/contrib/debug/browser/debugViewlet.ts#L58-L58
This will let views to be shown always with their headers and not merging with the viewlet title. Let me know if this tactical fix works for you?

I think we should have this for the welcome view, which will often be the only one, and I think it looks better to be merged. I thought they were added/removed in the same event loop iteration, so the order would matter, are you sure it was random?

Fixed it. Remembering the last collapsed state of merged view and retaining it if the view is not merged anymore.

Thank you!


Pip not working

No module named 'pip._vendor.six.moves'
getting this error on windows

Solved:-
py get-pip.py


feat: sortable lists

@ObaidUrRehman Can you plz check this?

hi, any news on this one? it would be really great. thanks


Sub Route Environment

We are running this on a subroute with an Angular frontend. The AddCookie options.LoginPath needs to go to /account/login but it is not honoring that.
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
              .AddCookie(options =>
              {
                  options.LoginPath = new PathString("/account/login");
              })
              .AddCAS(options =>
              {
                  options.CasServerUrlBase = Configuration["CasBaseUrl"];   // Set in `appsettings.json` file.
                  options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
                  options.CallbackPath = new PathString("/account/signin-cas");
              });

User Controller Route
[AllowAnonymous]
        [Route("account/login")]
        public async Task Login(string returnUrl)
        {
            var props = new AuthenticationProperties { RedirectUri = returnUrl };
            await HttpContext.ChallengeAsync("CAS", props);
        }

It appears to be sending to the root /login. Are we missing something? @davidmdem

I can't see anything in the setup you provided that would explain the cookie middleware failing to send you to the account/login route.
To help test and maybe find some differences in your setup, I've changed the CookieSample project to match the configuration you have above.  These changes can be found in a new test/issue-6 branch of this repository.
Are you able to clone this repo and successfully navigate the authenticated page in the CookieSample app?

Going to close this issue since I can not reproduce the behavior being asked about.  Feel free to reopen if you find that this is a consistent issue or if you can reproduce the behavior using the sample project.


TCP connect timeout errors

We're having issues with connections to our prod cluster. Sometimes a query will work, but more often than not, it will throw:
** (stop) exited in: :gen_server.call(#PID<6382.29775.0>, {:checkout, #Reference<6382.893348796.102498306.96870>, true}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (stdlib) gen_server.erl:214: :gen_server.call/3
    src/poolboy.erl:55: :poolboy.checkout/3
    lib/db_connection/poolboy.ex:41: DBConnection.Poolboy.checkout/2
    lib/db_connection.ex:920: DBConnection.checkout/2
    lib/db_connection.ex:742: DBConnection.run/3
    lib/db_connection.ex:1133: DBConnection.run_meter/3
    lib/db_connection.ex:636: DBConnection.execute/4
    lib/mongo.ex:431: Mongo.kill_cursors/3

when called directly from the server. We're not clear on what process it is saying is not alive.
Our logs show tcp connect errors that look like:
04:05:52.177 [error] Mongo.Protocol (#PID<0.388.0>) failed to connect: ** (Mongo.Error) tcp connect: unknown POSIX error - :timeout
04:05:52.270 [error] GenServer #PID<0.388.0> terminating
** (stop) exited in: :gen_server.call(#PID<0.388.0>, {:checkout, #Reference<0.893348796.90439682.33221>, true, 5000}, 5000)
** (EXIT) time out
Last message: []
State: Mongo.Protocol
04:05:52.271 [error] GenServer #PID<0.375.0> terminating
** (stop) exited in: :gen_server.call(#PID<0.388.0>, {:checkout, #Reference<0.893348796.90439682.33221>, true, 5000}, 5000)
** (EXIT) time out
Last message: {:EXIT, #PID<0.348.0>, {:timeout, {:gen_server, :call, [#PID<0.388.0>, {:checkout, #Reference<0.893348796.90439682.33221>, true, 5000}, 5000]}}}
State: {:state, #PID<0.376.0>, [#PID<0.386.0>, #PID<0.385.0>, #PID<0.384.0>, #PID<0.383.0>, #PID<0.382.0>, #PID<0.381.0>, #PID<0.380.0>, #PID<0.379.0>, #PID<0.378.0>, #PID<0.377.0>], {[], []}, #Reference<0.893348796.90570754.33113>, 10, 0, 0, :fifo}

and repeat indefinitely.
We're starting mongo in our supervision tree like:
...
  {Mongo, mongo()}
...

  defp mongo do
    config = Application.get_env(:blah, :mongo)

    if Keyword.has_key?(config, :seeds) do
      Keyword.update!(config, :seeds, fn seeds -> String.split(seeds, ",") end)
    else
      config
    end
  end

With config:
config :blah,
  mongo: [
    name: :blah_db,
    seeds: System.get_env("MONGODB_HOSTS"),
    database: System.get_env("MONGODB_NAME"),
    username: System.get_env("MONGODB_USERNAME"),
    password: System.get_env("MONGODB_PASSWORD"),
    pool: DBConnection.Poolboy,
  ]

We are not having any problems on our staging server which is using a standalone server.
We're using the current release 0.4.3.
Please help!

Did you end up testing that branch with your setup?

I'm having the same issue @ankhers , I've been investigating and debugging the code, I add more info:
This happens to me when using a remote public uri but once the replica set is updated my original host is removed from the Topology state and the servers are resolving to internal IPs (Amazon in my case), then monitors map is being updated to those keys (hosts and arbiters) as well.
I could see it in update_rs_from_primary/1 function inside topology_description.ex
Regarding this problem, I think the mongo spec explains the problem and the expected behaviour here:
https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#clients-use-the-hostnames-listed-in-the-replica-set-config-not-the-seed-list
does it sound good?
PS: I tested with the exclude_hosts branch, the error doesn't happen but it doesn't work because if I exclude the hosts, my original public host is being removed as well (reading reconcile_servers/1 code) with your fix.

I had the same issue @ankhers, and I think I resolved it by changing the options for timeout and pool_timeout.
There are two(actually three) timeout value:

timeout
used in connect timeout and receive TCP data timeout for now
pool_timeout
used in checkout connection from a pool
connect_timeout_ms
defined but not used

The problem is if connect MongoDB timeout (timeout value is 5000), checkout connection from a pool will timeout (timeout value is 5000 too) too. And checkout timeout will exit the process (https://github.com/elixir-ecto/db_connection/blob/master/lib/db_connection/connection.ex#L54). After times crash, the application will crash because of supervisor tree restart strategy. Then the Elixir node maybe down because of the application restart strategy.
So, we can modify the timeout for connect to MongoDB and checkout connection from a pool. Just like:
timeout: 5000,
pool_timeout: 8000

Actually, we should use connect_timeout_ms, but this option only defined, but not used.

Just to keep on top of this. We added the connect_timeout_ms option in 0.4.6. Unfortunately I think it should have just been called connect_timeout. but that can be fixed later.

Hey, not 100% sure, but having a similar error, must report that it totally had to do with internal (GCE) domain name resolution in my case: replacing local names with ips (which i never did with components on other platforms) totally solved my "timeout" problem.

I am getting same error after i upgrade to v5.0.x, previous version was working fine

Would anyone be willing to give me access to a database that is having this issue? I do not think there is much I can do if I am unable to see the issue firsthand.

I'm just going to leave this here. Someone asked a question on the elixir forum about this issue. I'm adding it here incase we are able to track it down from that.


Fixes #41 - listen to inventory's events

[x] added listener to which listens platform.inventory.events messages
[x] process delete event type and remove respective performance profile records from ROS DB
[ ] refactor app.py to set app context by making use of create-app

Update - tracking point (3) I will track separately under issue - https://issues.redhat.com/browse/RHIROS-62
Don't want to block deletion task due to this refactoring.

Merged, thanks @kgaikwad !


Use snupkg format

Use the new snupkg format for the symbol package.

Codecov Report

Merging #77 into master will increase coverage by 0.1%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master      #77     +/-   ##
=========================================
+ Coverage   98.82%   98.93%   +0.1%
=========================================
  Files          12       12
  Lines         939      939
  Branches      148      148
=========================================
+ Hits          928      929      +1
+ Partials       11       10      -1

Impacted Files
Coverage Δ

...pClientInterception/Bundles/BundleItemConverter.cs
99.03% <0%> (+0.96%)
:arrow_up:

Continue to review full report at Codecov.

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


[flutter-tools] [web] Service worker doesn't add the canvaskit.js and canvaskit.wasm files into the cache resource

@jonahwilliams has merged a PR here #48344 that generates the service worker js file.
when we build flutter app with the canvas kit web assembly flag :
flutter build web --dart-define=FLUTTER_WEB_USE_SKIA=true
The service worker file generated doesn't contain the canvaskit.js or canvaskit.wasm files in the RESOUCRSES.
Please make sure that these files are also cached as part of other resources of the service worker.
canvaskit.js and canvaskit.wasm come from external urls :
<EMAIL_ADDRESS><EMAIL_ADDRESS>Please add this also as part of the caching resources in the generated service worker file

This is not something we plan to add in the short term, since the current hosted canvaskit url may change on any given engine roll. Instead we should switch to bundling the canvaskit binary. fyi @dnfield

Blocked by https://github.com/flutter/flutter/issues/52588

Is this unblocked now?


Fixed some parameter discrepancy for MDAM

Fixed some parameter discrepancy for MDAM.
But the encoder still raises ValueError.
See GraphAttentionEncoder at models/zoo/mdam/encoder.py.
ValueError: too many values to unpack (expected 3); here self.attention_layer(h_old) is a single tensor
h_new, attn, V = self.attention_layer(h_old)

Note: an update was pushed but forgot to discuss here - now it seems to be working, although the beam search part is still missing. However I would consider this as lower priority at the moment