Error on import module to test in Jest

[X] Bug
[ ] Build issue
[ ] Feature request

Version info

Angular: 7
Angular CLI: 7.3.1
countup.js-angular2:  7.1.1
Jest: 24.5.0

Description
Hi, I'm having an issue to run tests with Jest in a component that I'm using the lib. The error log from Jest is described below. Can you help me? Thanks.
src/app/components/limit-bar/limit-bar.component.spec.ts
● Test suite failed to run
Jest encountered an unexpected token

This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.

By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".

Here's what you can do:
 • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
 • If you need a custom transformation specify a "transform" option in your config.
 • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper"

config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/en/configuration.html

Details:

C:\Development\neon-pj\node_modules\countup.js\dist\countUp.min.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var i,a=1,s=arguments.length;a<s;a++)for(var n in i=arguments[a])Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);return t}).apply(this,arguments)},CountUp=function(){function t(t,i,a){var s=this;this.target=t,this.endVal=i,this.options=a,this.version="2.0.4",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:""},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.count=function(t){s.startTime||(s.startTime=t);var i=t-s.startTime;s.remaining=s.duration-i,s.useEasing?s.countDown?s.frameVal=s.startVal-s.easingFn(i,0,s.startVal-s.endVal,s.duration):s.frameVal=s.easingFn(i,s.startVal,s.e

SyntaxError: Unexpected token export

  at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:451:17)
  at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:493:19)
  at Object.<anonymous>.__assign (node_modules/countup.js-angular2/bundles/countup.js-angular2.umd.js:2:111)
  at Object.<anonymous> (node_modules/countup.js-angular2/bundles/countup.js-angular2.umd.js:5:2)

First make sure you are ignoring node_modules in your jest config:
jest.config.js
module.exports = {
  ...
  transformIgnorePatterns: ['node_modules/(?!(jest-test))'],
};

In the spec file for the component, import CountUpModule:
TestBed.configureTestingModule({
  imports: [ CountUpModule ]
})

That should do it, hopefully that resolves your issue

Hi, Jamie.
I tried this config but doesn't work. The Jest continues logging the same error.
Below my package.json where is the Jest configuration
{
...
"scripts": {
"ng": "ng",
"start": "ng serve",
"test": "jest --no-cache --coverage",
"tdd": "jest --no-cache --coverage --watch",
"lint": "ng lint",
"e2e": "ng e2e",
"build": "ng build",
"commit": "git-cz"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.4",
"@angular/common": "~7.2.4",
"@angular/compiler": "~7.2.4",
"@angular/core": "~7.2.4",
"@angular/elements": "^7.2.4",
"@angular/forms": "~7.2.4",
"@angular/platform-browser": "~7.2.4",
"@angular/platform-browser-dynamic": "~7.2.4",
"@angular/router": "~7.2.4",
"@webcomponents/custom-elements": "^1.2.1",
"@webcomponents/webcomponentsjs": "^2.2.7",
"core-js": "^2.6.4",
"countup.js-angular2": "^7.1.1",
"document-register-element": "^1.13.1",
"ng-lottie": "^0.3.2",
"rxjs": "~6.4.0",
"tiny-slider": "^2.9.1",
"tslib": "^1.9.3",
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^7.3.1",
"@angular-devkit/build-angular": "^0.13.8",
"@angular/cli": "^7.3.1",
"@angular/compiler-cli": "^7.2.7",
"@angular/language-service": "~7.2.4",
"@commitlint/cli": "^7.5.2",
"@commitlint/config-conventional": "^7.5.0",
"@types/jest": "^24.0.11",
"@types/node": "~10.12.24",
"@whizark/cz-cli": "^0.7.0",
"codelyzer": "~4.5.0",
"commitizen": "^3.0.7",
"concat": "^1.0.3",
"cz-conventional-changelog": "^2.1.0",
"fs-extra": "^7.0.1",
"git-cz": "^3.0.1",
"husky": "^1.3.1",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"jest": "^24.5.0",
"jest-preset-angular": "^6.0.2",
"protractor": "~5.4.2",
"ts-node": "~8.0.2",
"tslint": "~5.12.1",
"typescript": "3.2.4"
},
"jest": {
"verbose": true,
"coverageDirectory": "dist/test-coverage",
"collectCoverageFrom": [
"**/*.ts"
],
"transformIgnorePatterns": [
"node_modules/(?!@ngrx|angular2-ui-switch|ng-dynamic)",
"node_modules/(?!(jest-test))"
],
"globals": {
"ts-jest": {
"tsConfigFile": "./tsconfig.spec.json"
},
"TRANSFORM_HTML": true
},
"preset": "jest-preset-angular",
"setupFilesAfterEnv": [
"/src/setupJest.ts"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}

I was able to reproduce, I'll see what I can figure out

Ok, I got it working. Also I pushed up my changes in the test app included in this repo, so it has a passing test with Jest, as well as a new section in the README.
For Jest, make sure you have the following in your jest.config.js:
transform: {
  '^.+\\.(js|ts|tsx)$': 'ts-jest'
},
transformIgnorePatterns: ['node_modules/(?!countup.js)']

Hi Jamie
It works!!!
The only change I had to make was to remove the "transform". For some reason, Jest continued to receive an error if this setting was set.
Thank you for your help.
Regards.


Menu height can't be updated

When I set new menuItems to menu, menu's height can not be updated. Because _initialMenuHeight  is set when first render (didmount). It should be update when menuItems.length has changed.

@TanTan-TT This should be fixed in https://github.com/callemall/material-ui/releases/tag/v0.9.0

But width is not updated. @velveteer

Yeah it's been reported in https://github.com/callemall/material-ui/issues/805.

Thanks @TanTan-TT @velveteer - closing since we have an issue for the width.


Question about label chip

Hello, I am considering to buy niimbot label printer but I have heard that you only have to buy labels from them directly because they have some kind of chip/nfc tag protection and you can"t use unbranded labels from ali for example. When using this web print app, will it still  work only with official labels, or is there a way to deactivate this check and set label size and type manually when it can't recognise label based on the chip on it.

Hello!
It depends on the printer model. For example, the D110 can print without a tag. B1 can print without a tag, but the printer sets the density to the minimum value.
At the moment I am using the original rfid tag, which is sticked to the printer case so the printer can read it. No matter what size the tag is for, this check is not used when printing. I am using the tag for 50x30 labels and printing on 43x25 labels.
Later I want to check how the printer behaves when the number of labels printed is exhausted.
Anyway, it is possible to create and write custom rfid tag. But I don't want to describe the methods. See the discussion here: https://github.com/AndBondStyle/niimprint/issues/34

So you tear the tag from original labels and stick it on the bottom and that works. How does the counter work? When you use tag from empty/used original roll, I guess it won't work, or am I wrong? I have seen videos that the print quality is low/labels are faded because when it doesn't detect the chip, it doesn't give enough power to the print head or sets the lowest density. I am considering to get D110 the newest version which should support auto label align without wasting any labels, does that work with unoriginal labels without chip without any problem or do you need to stick the tag to it or place it inside where the antenna is? Still can't decide if I should get phomemo D30 (which apparently don't have DRM protection) or niimbot D110.

How does the counter work

Printer stores printed count of specific roll in the internal memory then writes it to rfid tag.

When you use tag from empty/used original roll, I guess it won't work, or am I wrong?

Still testing. My tag is not depleted yet and I don't want to waste the counter.

I am considering to get D110 the newest version which should support auto label align without wasting any labels, does that work with unoriginal labels without chip without any problem or do you need to stick the tag to it or place it inside where the antenna is?

I have an old version of D110. It waste label only when changing paper roll. I think new version will degrade print density with no tag or will not print at all.

Still can't decide if I should get phomemo D30 (which apparently don't have DRM protection) or niimbot D110.

 But I don't print so much to think about it. I chose NIIMBOT because it's more popular.


Consistency in plot_topomap APIs

The evoked.plot_topomap function has parameters times and average to specify the times and range to average over:
https://github.com/mne-tools/mne-python/blob/master/mne/evoked.py#L333
At the same time, the plot_topomap method in AverageTFR has parameters tmin and tmax:
https://github.com/mne-tools/mne-python/blob/master/mne/time_frequency/tfr.py#L1279
Talking with @jona-sassenhagen, I guess these two APIs should be uniformised?

See https://github.com/mne-tools/mne-python/issues/4116
:D

not clear to me


[BUG] Add dynamic suppor for AutoRound quantiztion

@wenhuach21  GPTQModel has merged dynamic per layer/module control of quantization but I don't think auto-round currently supports such per layer/module control during quantization. I know this is something AutoRound also wants. Is there anyway we can work together to standardize the data-interface to transfer the dynamic info to auto-round? Since this feature is new, I am open to changing the protocol within gptqmodel itself if autoround has better suggestions. Thanks.
https://github.com/ModelCloud/GPTQModel/blob/main/tests/test_dynamic.py
Ref: dynamic inference port to vllm (will port to sglang after vllm merge) https://github.com/vllm-project/vllm/pull/7086
Both quantizer (GPTQModel and AutoRound) and inference library (vllm, sglang) need to receive the per layer/module dynamic overrides. It would be nice if everyone can somehow agree to something close/or similar to avoid compat issues.

AutoRound has supported this for a long time with weight_config.
Yes, we can align. The problem is that the supported bits on the CUDA side are limited, typically to 2, 4, and 8, making it difficult to achieve the same flexibility as llama.cpp.

@wenhuach21  Thanks for the heads up. I did not know this. I know you asked us about per-layer/module diff quantization before and didn't actually realize it was already internalized within autoround. Will check out the weight_config param/protocol and see how we can normalize this.

The quantization process should be fine, and we set the configuration for each layer individually instead of using regex, which can be refined later. Additionally, there may be bugs in the export process for certain backends in AutoRound, as we haven't checked the supported bits yet. However, I believe this should not affect the GPTQModel repository.


Password is required on every refresh, after leaving IDE running overnight

Hi!
After successfully installing and configuring the plugin in WebStorm, the plugin works as it should during that day.
The next day, if I left the IDE running, it will ask for my Gerrit password every time I click the refresh button. If I restart the IDE, it works fine again.
I couldn't find any settings that looked relevant for this issue.
Plugin version 1.0.4-146
WebStorm version 2017.2.4
Frank

@frapaa: What have you configured in WebStrom password settings? And what's the title / content of the window of the password request window?
Do you suspend the machine overnight (before the password dialog is shown)?

WebStorm settings:

I get this dialog in WebStorm:

I have tried to fill in the password, but it keeps popping up again, three times (I think) before it goes away until next time I press refresh. It's unclear if it's asking for the Gerrit password or my password to access KeyChain, but neither of them works.
Today I clicked cancel on this twice, then I got an error:
find: An invalid record was encountered. (-67701)
java.lang.Throwable
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
	at com.intellij.credentialStore.MacOsKeychainLibraryKt.a(macOsKeychainLibrary.kt:197)
	at com.intellij.credentialStore.MacOsKeychainLibraryKt.findGenericPassword(macOsKeychainLibrary.kt:101)
	at com.intellij.credentialStore.KeyChainCredentialStore.get(macOsKeychainLibrary.kt:42)
	at com.intellij.credentialStore.CredentialStoreWrapper.get(CredentialStoreWrapper.kt:52)
	at com.intellij.ide.passwordSafe.impl.PasswordSafeImpl.get(PasswordSafeImpl.kt:53)
	at com.intellij.credentialStore.CredentialStore.getPassword(CredentialStore.java:30)
	at com.intellij.ide.passwordSafe.PasswordStorage.getPassword(PasswordStorage.java:30)
	at com.intellij.ide.passwordSafe.PasswordStorage.getPassword(PasswordStorage.java:61)
	at com.urswolfer.intellij.plugin.gerrit.GerritSettings.preloadPassword(GerritSettings.java:160)
	at com.urswolfer.intellij.plugin.gerrit.rest.GerritUtil$20.run(GerritUtil.java:716)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:314)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:416)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
	at com.intellij.ide.IdeEventQueue.f(IdeEventQueue.java:821)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Eventually I got an error message in the event log saying

Failed to get Gerrit changes.: Request not successful. Message: Bad Request. Status-Code: 400. Content: Not Signed In

Going to settings to verify (and successfully test) the settings doesn't help.
IntelliJ seems to have the same issue, but without the initial password popup dialog. I goes directly to the error message in the event log.

The dialog in your 2nd screenshot is shown by Gerrit and you should enter the Gerrit password there.
Can you please tell me how your WebStorm / IntelliJ password settings look like (Appearance and Behavior -> System Settings -> Passwords)?

Entering the gerrit password in that dialog doesn't work, it just keeps popping up. The password settings is set to Save passwords -> In native Keychain.

Hmm, I do not really have an idea here and cannot test on macOS. But it is possible that it is related to the native keychain setting. Probably the keychain gets locked after some time of inactivity? You could try one of the other password save options in IntelliJ and see if the same thin happens.

I think this have been fixed in one of your latest releases. At least I'm not experiencing this anymore.

Thanks for your feedback.

Actually I'm experiencing same bug now on latest version of the plugin

@delphikettle: Have you tried to change IntelliJ password safe settings? I know some users who have changed it and fixed issues like this.

@uwolfer It was set to "in native Keychain", then I've changed it to "In KeePass" and bug has gone. Thanks


cost-insights: avoid re-export of all of test-utils

Hey, I just made a Pull Request!
Fixes #8554
Couple of refactors in a row here lead to some catastrophic breakage :grin:
The initial refactor to use TestApiProvider was done without knowing that the src/testUtils in cost-insights was exported. That was kind of still working for a while though because react-dom was listed as a dependency, causing it to be marked as external by the build process. With the more recent restructuring to make react and react-dom peer deps, the react-dom dependency was removed as it was no longer needed, so now all of react-dom was inlined into the build output, leading to the most recent release being broken in tests.
Fix here was to get rid of the use of test-utils in the shared utils code. Not adding any other check for this kind of breakage because import/no-extraneous-dependencies should already handle it. But there is a good reason it exists and it shouldn't be ignored too hastily :grin:
:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[ ] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[x] All your commits have a Signed-off-by line in the message. (more info)

Ooh nice discovery, thanks for the fix — and sorry for leaving #8554 hanging! 😞


/Clear no longer works?

I can't get the clear command to do anything anymore, and it's not being registered when the server starts up... was it removed some time ago?

It was removed because its not working anymore


opt self-adaption adjustment of timeout time

Proposed changes
Routine load is a long-term import task, assuming that the user has set a relatively small consumption interval, as the BE load changes, there may be a timeout for a certain period of time, leading to the problem of fake death.
Adaptive adjustment of timeout time to address the issue of possible changes in execution time caused by be load.


Fix inland waterways

Bug description
Plenty of inland waterways are not rendering properly.
Repro Steps
Steps to reproduce the behavior:

Go to almost any inland waterway
See how it has missing gaps, etc. in rendering.

Screenshots & URL
If applicable, please add a screenshot that includes the URL of the page.
Here's an example from Staten Island.
https://www.openhistoricalmap.org/#map=13/40.5931/-74.1327&layers=O

This data issue remains. Here's that area in vector tiles:

https://vtiles.openhistoricalmap.org/#14/40.5719/-74.1986
There's just no river there.


refactor: ASF only dependencies on base.txt

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

PR for fixing FOSSA license checks: https://github.com/apache/incubator-superset/pull/10848

Sorry there’s a few things I don’t understand:

Why is mysqlclient not allowed in base.txt but is allowed in setup.py? Both files are included in the manifest as far as I’m aware.
I’m not sure why integration.in was incorporated into development.in. By definition this should contain the subset of packages required only to define the base integration environment for CI et al. and should be agnostic of Superset.

1 - mysqlclient is allowed on setup.py has an extra requirement, so our goal here is to make a Apache license compliant requirements file
2 - Yes that's a good point, I can re include integration.in has it was, and still have a development.in with all the necessary extras.
Extra question: Should we base development.in on base.in or branch it directly from setup.py to include the extras (like it's currently done on this PR) ?

Ideally it should be based on base.in however I believe having multiple -e file:. in the dependency chain is problematic.


Fire onDidChangeReplElements directly from ReplModel

This way debug sessions sharing a single repl will all be notified about new repl elements and UI will be updated.
@isidorn Please take a look. This is a part of #81196 which makes sense by itself.

This is a good change. Can you please just resolve the conflict with the master branch and than I will merge this in? Thanks!

Rebased on top of master.

Reveiwed again, looks great. Like how we now fire from a small number of places and it seems to cover all the cases as far as I could tell.


weave net with encryption - xfrm policy

We use kubespray installation on bare-metal with Weave Net CNI.
With the default weave net configuration it uses encryption for communication within cluster. Example from the test environment (1 master, 2 workers):
/home/weave # ./weave --local status

        Version: 2.5.1 (version check update disabled)

        Service: router
       Protocol: weave 1..2
           Name: 8e:34:57:19:fe:b9(kubespray-master-1.example.com)
     Encryption: enabled
  PeerDiscovery: enabled
        Targets: 3
    Connections: 3 (2 established, 1 failed)
          Peers: 3 (with 6 established connections)
 TrustedSubnets: none

        Service: ipam
         Status: ready
          Range: <IP_ADDRESS>/18
  DefaultSubnet: <IP_ADDRESS>/18

/home/weave # ./weave --local status connections
-> <IP_ADDRESS>:6783    established encrypted   fastdp 72:6d:50:7c:8e:39(kubespray-worker-2.example.com) encrypted=truemtu=1376
-> <IP_ADDRESS>:6783    established encrypted   fastdp a6:23:d0:09:86:7d(kubespray-worker-1.example.com) encrypted=truemtu=1376
-> <IP_ADDRESS>:6783    failed      cannot connect to ourself, retry: never

Weave net creates XFRM own policies:
root@kubespray-master-1:~# ip xfrm policy
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0x8050c3b7 reqid 0 mode transport
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0x52dbb816 reqid 0 mode transport

When we install submariner-operator, submariner-routeagent removes all these XFRM policies and Weave Net communication breaks down:
root@kubespray-master-1:~# kubectl -n submariner-operator logs submariner-routeagent-8n8tl
[...]
I0710 11:18:17.310731       1 route.go:834] Cleaning up 2 XFRM policies
I0710 11:18:17.310836       1 route.go:837] Deleting XFRM policy {Dst: <IP_ADDRESS>/32, Src: <IP_ADDRESS>/32, Proto: 17, DstPort: 0, SrcPort: 0, Dir: dir out, Priority: 0, Index: 57, Action: allow, Ifindex: 0, Ifid: 0, Mark: (0x20000,0x20000), Tmpls: [{Dst: <IP_ADDRESS>, Src: <IP_ADDRESS>, Proto: esp, Mode: transport, Spi: 0x8050c3b7, Reqid: 0x0}]}
I0710 11:18:17.310891       1 route.go:837] Deleting XFRM policy {Dst: <IP_ADDRESS>/32, Src: <IP_ADDRESS>/32, Proto: 17, DstPort: 0, SrcPort: 0, Dir: dir out, Priority: 0, Index: 49, Action: allow, Ifindex: 0, Ifid: 0, Mark: (0x20000,0x20000), Tmpls: [{Dst: <IP_ADDRESS>, Src: <IP_ADDRESS>, Proto: esp, Mode: transport, Spi: 0x52dbb816, Reqid: 0x0}]}
I0710 11:18:17.310923       1 route.go:847] Reconciling routes to gw: <IP_ADDRESS>
[...]

root@kubespray-master-1:~# ip xfrm policy
root@kubespray-master-1:~#

Anything else we need to know?:
If we disable Weave Net encryption (add "--trusted-subnets") everything works.
What are we missing? Is there a way to use Submariner and Weave Net with encryption?
Environment:

Submariner version -  v0.4.0
Kubernetes version - v1.14.3
Cloud provider or hardware configuration - bare-metal
OS - ubuntu 18.04
Kernel - 4.15.0-109-generic
Network plugin and version - Weave Net v2.5.1
Kubespray - v2.10.4

Oh @OKyHb thanks for the report, probably we need to be more careful about the xfrm policies we remove in the route agent. @sridhargaddam  ^

It's interesting we use weave in the CI pipeline, with no special configuration.  https://github.com/submariner-io/shipyard/blob/master/scripts/shared/clusters.sh#L106
@OKyHb can you look at it^ ? do we need to do anything special to enable encryption between weave nodes?

Oh @OKyHb thanks for the report, probably we need to be more careful about the xfrm policies we remove in the route agent. @sridhargaddam ^

Right. Currently, when the ActiveGateway moves from one node (say node1) to another node (say node2), route-agent flushes all the xfrm policies from node1. We should evaluate if we can selectively cleanup the xfrm rules programmed by the CableEngine and not just everything from that node. Also, we have to figure out a proper place for this kind of cleanup as its driver specific.
CC: @nyechiel

@OKyHb just one note, you will see that our implementation currently sends traffic which destination is another cluster to the gateway node. And we do this through a VXLAN tunnel (vx-submariner), so traffic from node to gateway will travel in clear text. The traffic going back (remote-cluster->pod) goes through weave normal channel.
This limitation should probably be documented, and may be we should ping the weave folks to see if they are interested in contributing something to handle that limitation.

Thanks for the explanation, I got it :)
Just in case, communication between two gateways in different clusters is always fine. Network connectivity breaks only between nodes inside the cluster.
And I tried "cable-driver=wireguard" but somehow I got the same result (Weave Net XFRM policies were deleted on one node).

Yes, we have a small part on the route-agent that does cleanup of network things, that really belong to the cable drivers and we need to refactor it, it's what @sridhargaddam mentions in his comment above (CableDriver specific).
@OKyHb If I get you an updated image during this week would you have time to validate it?

@mangelajo Yes, I'll be happy to validate it.

This is how it looks for libreswan:
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/32
        dir out priority 2088894 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16401 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/16
        dir out priority 2080734 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16393 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/14
        dir out priority 2080738 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16397 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/32
        dir fwd priority 2080734 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16393 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/32
        dir in priority 2080734 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16393 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/16
        dir out priority 2088926 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16405 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/14
        dir out priority 2088930 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16409 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/16
        dir fwd priority 2088930 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16409 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/16
        dir in priority 2088930 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16409 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32
        dir out priority 2080702 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16389 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32
        dir fwd priority 2080702 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16389 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32
        dir in priority 2080702 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16389 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/32
        dir out priority 2089918 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16413 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/14
        dir fwd priority 2089918 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16413 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/14
        dir in priority 2089918 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16413 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/32
        dir fwd priority 2080738 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16397 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/32
        dir in priority 2080738 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16397 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/16
        dir out priority 2089950 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16417 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/14
        dir fwd priority 2089950 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16417 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/14
        dir in priority 2089950 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16417 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/14
        dir out priority 2089954 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16421 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/16
        dir fwd priority 2088926 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16405 mode tunnel
src <IP_ADDRESS>/16 dst <IP_ADDRESS>/16
        dir in priority 2088926 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/14
        dir fwd priority 2089954 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16421 mode tunnel
src <IP_ADDRESS>/14 dst <IP_ADDRESS>/14
        dir in priority 2089954 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16421 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/16
        dir fwd priority 2088894 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16401 mode tunnel
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/16
        dir in priority 2088894 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp reqid 16401 mode tunnel
src ::/0 dst ::/0
        socket out priority 0 ptype main
src ::/0 dst ::/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket out priority 0 ptype main
src <IP_ADDRESS>/0 dst <IP_ADDRESS>/0
        socket in priority 0 ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
        dir out priority 1 ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
        dir fwd priority 1 ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
        dir in priority 1 ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
        dir out priority 1 ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
        dir fwd priority 1 ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
        dir in priority 1 ptype main

@OKyHb can you install with weave+encryption and before installing submariner, go into one
of the nodes and run:
ip xfrm policy  ?
I'm trying to figure out if there's a way of telling libreswan/strongswan xfrm rules appart from other's

@sridhargaddam one option could be using the cidrs... and only cleanup when src or dst is a CIDR that we know about as for a remote cluster.

@sridhargaddam one option could be using the cidrs... and only cleanup when src or dst is a CIDR that we know about as for a remote cluster.

Yeah, this should be possible. The other option is to see if we can use some marking (XfrmMark) on the flows programmed by the CableDriver and delete policies that match the mark and skip other policies.

Weave Net cluster with encryption:
kubespray-master-1 - <IP_ADDRESS>
kubespray-worker-1 - <IP_ADDRESS>
kubespray-worker-2 - <IP_ADDRESS>

root@kubespray-master-1:~# ip xfrm policy
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0xf8fb682e reqid 0 mode transport
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0x21c2bd85 reqid 0 mode transport

root@kubespray-worker-1:~# ip xfrm policy
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0xb5e55e85 reqid 0 mode transport
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0x529303ca reqid 0 mode transport

root@kubespray-worker-2:~# ip xfrm policy
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0x91f439bb reqid 0 mode transport
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
        dir out priority 0
        mark 0x20000/0x20000
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0x9724f354 reqid 0 mode transport

src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32 proto udp
dir out priority 0
mark 0x20000/0x20000
tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
proto esp spi 0x9724f354 reqid 0 mode transport

thanks @OKyHb for sharing the details. I see that weavenet is using mark 0x20000/0x20000. If we can do something similar with our CableDrivers (but use a different mark), we can easily address this issue.
The other option discussed above where we wanted to delete policies based on the subnets, will not work because Strongswan/Libreswan also program policies as shown below, where <IP_ADDRESS>/32 is the IPaddress of remoteClusterNode and this information will not be available with Submariner route-agent pods.
src <IP_ADDRESS>/32 dst <IP_ADDRESS>/32
        dir out priority 367231 ptype main
        tmpl src <IP_ADDRESS> dst <IP_ADDRESS>
                proto esp spi 0xc27ce034 reqid 1 mode tunnel

You are right about the /32 /32 used in IPSec too but we can probably figure out those are ours.
A mark would be much easier if we can ask libreswan/strongswan to use a mark

bump

bump


Fix bad Proptype for location in ScrollToTop component

@sneridagh thanks for creating this Pull Request and help improve Plone!
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.
Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:
@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.
Happy hacking!


[cinder-csi-plugin] unable to detach cinder volume when node crashes/shutdown

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:
/kind bug
/kind feature

What happened:
Pod is running on a node with volume using cinder-csi and when node goes down/crashes then pod moves to another node but stuck in "ContainerCreating" state as cinder volume is unable to detach from the crashed node and reattach on the new node where pod is shifted.
What you expected to happen:
When node crashes and pod moves to another healthy node then cinder csi should call volumedetach and then volumeattach on new node where pod moved.
How to reproduce it:
Deploy cinder csi
create a volume (pv & pvc)
create a pod with cinder pvc
shutdown the node/stop the network on the node where pod is running
pod will move to new node and remains in "ContainerCreating" state
Anything else we need to know?:
Environment:

openstack-cloud-controller-manager(or other related binary) version:  v0.0.0-master+$Format:%h$
cinder.csi.openstack.org version: 1.1.0
OpenStack version: Train
Others:

@amitbhatia1987 which cinder-csi image version are you using? is it 1.18? or latest

Its v1.1.0 which is mentioned here (https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-cinder-csi-plugin.md)

is this something should be handled by upper layer?
seems CSI cinder only used in grpc to accept request from above layer?
or there are some event missed handle in CSI cinder so that whole process is blocked..

@amitbhatia1987 Im asking the version used in manifest file for deploying the plugin. But Its fine. Could you clarify few things , from the openstack side , is the volume still attached to node . If the volume is detached from openstack side, it should work fine I suppose. From csi, if its already attached to different node, it will throw error as its not expected.  IMO detach cant be called from csi, as we wont be sure that is expected or not

I was expecting when node crashes csi should invoke volumedetach so that it can be re-attached to another node where pod is moved

@amitbhatia1987 could you share container logs of cinder-csi ?

@amitbhatia1987 when the pods are evicted , its the responsibility of CO/external-attacher sidecar to initiate the unpublish volume on node. If its is called from the CO side , plugin would initiate the same . If you are seeing any error in the calls related to that , we can fix the issue . If its not at all called, I believe its outofscope for this project.

Hi ,
We are suffering from similar problem - it happens randomly after node power off/on.
Details below - but the main question is if there is some graceful way to recover from "status is detaching" state, so without data loss? I aiming here to the production level solution.
docker images | grep -i csi
/csi/node-driver-registrar                                v1.1.0              ac600e3a2ccd        3 months ago        71.3MB
/csi/csi-resizer                                          v0.3.0              ac6c108281b1        3 months ago        97.3MB
/csi/cinder-csi-plugin                                    v1.17.0             08e406993f07        4 months ago        194MB
/csi/csi-snapshotter                                      v1.2.2              3fd37ea4a27a        6 months ago        98.8MB
/csi/csi-provisioner                                      v1.4.0              59cf39a91efa        6 months ago        105MB
/csi/csi-attacher                                         v2.0.0              325e151614b2        6 months ago        97.4MB
---------------- Problematic pod
kubectl get pod  -n nbam | grep  -i cfat
cfat-master-cfat-57b884cd45-dq9kk              0/1     ContainerCreating   0          6h47m
kubectl describe pod cfat-master-cfat-57b884cd45-dq9kk  -n nbam
Events:
Type     Reason              Age                       From                           Message

Warning  FailedAttachVolume  18m (x44315 over 6h48m)   attachdetach-controller        AttachVolume.Attach failed for volume "pvc-6070e307-091a-48cd-b123-358b02ee3330" : rpc error: code = Internal desc = ControllerPublishVolume Attach Volume failed with error disk d2a0a416-6696-442a-b93f-19eb7b376db5 is attached to a different instance (c085eedb-6846-4a33-a787-dfa183a7f213)
Warning  FailedMount         3m53s (x169 over 6h25m)   kubelet, node-2003-control-02  (combined from similar events): Unable to attach or mount volumes: unmounted volumes=[cfat-backup cfat-repo], unattached volumes=[bcmt-path cfat-backup-cluster docker-socket cfat-master-cfat-token-5wnm6 cfat-backup cfat-repo helm-home certs host-timezone kubectl ncm-secret helm-cli ncm-cli helm3-cli]: timed out waiting for the condition
Warning  FailedAttachVolume  3m2s (x45833 over 6h48m)  attachdetach-controller        AttachVolume.Attach failed for volume "pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6" : volume attachment is being deleted
---------------- Problematic pvc
kubectl get pv,pvc | grep cfat
persistentvolume/pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6   50Gi       RWO            Delete           Bound    nbam/cfat-master-cfat-repo                                              cinder-az-nova            14d
kubectl get volumeattachments.storage.k8s.io  | grep pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6
csi-95f4ef5cb2b525a243c760af9cf45f1376c487a49312733b0be2eba32bb5b334   cinder.csi.openstack.org   pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6   node-2003-control-03   true       4d1h
csi-ac1d7c21eb540c6aaf68494ec62a1bdddc24097e7b993bff5b7fe85355bf5402   cinder.csi.openstack.org   pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6   node-2003-control-02   false      4h39m
csi-cd836d5ca230a14f6746468f1e5c51680fb45c482df816d561e40c302c366680   cinder.csi.openstack.org   pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6   node-2003-control-01   false      4d
---------------- On node-2003-control-03 volume couldn't detach:
kubectl describe volumeattachments.storage.k8s.io  csi-95f4ef5cb2b525a243c760af9cf45f1376c487a49312733b0be2eba32bb5b334
Name:         csi-95f4ef5cb2b525a243c760af9cf45f1376c487a49312733b0be2eba32bb5b334
Namespace:
Labels:
Annotations:  csi.alpha.kubernetes.io/node-id: c085eedb-6846-4a33-a787-dfa183a7f213
API Version:  storage.k8s.io/v1
Kind:         VolumeAttachment
Metadata:
Creation Timestamp:             2020-06-29T12:32:20Z
Deletion Grace Period Seconds:  0
Deletion Timestamp:             2020-06-29T12:35:37Z
Finalizers:
external-attacher/cinder-csi-openstack-org
Resource Version:  6817146
Self Link:         /apis/storage.k8s.io/v1/volumeattachments/csi-95f4ef5cb2b525a243c760af9cf45f1376c487a49312733b0be2eba32bb5b334
UID:               9f0ba5f2-470f-4b4f-8077-13198dbc09c8
Spec:
Attacher:   cinder.csi.openstack.org
Node Name:  node-2003-control-03
Source:
Persistent Volume Name:  pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6
Status:
Attached:  true
Attachment Metadata:
Device Path:  /dev/vdg
Detach Error:
Message:  rpc error: code = Internal desc = ControllerUnpublishVolume Detach Volume failed with error can not detach volume pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6, its status is detaching
Time:     2020-07-03T13:45:23Z
Events:
---------------- On node-2003-control-01 & node-2003-control-01 volume couldn't attach , as:
#1
kubectl describe volumeattachments.storage.k8s.io  csi-ac1d7c21eb540c6aaf68494ec62a1bdddc24097e7b993bff5b7fe85355bf5402
Name:         csi-ac1d7c21eb540c6aaf68494ec62a1bdddc24097e7b993bff5b7fe85355bf5402
Namespace:
Labels:
Annotations:  csi.alpha.kubernetes.io/node-id: 148a746e-6b1d-4afb-937c-72764ed87167
API Version:  storage.k8s.io/v1
Kind:         VolumeAttachment
Metadata:
Creation Timestamp:             2020-07-03T09:07:41Z
Deletion Grace Period Seconds:  0
Deletion Timestamp:             2020-07-03T09:35:29Z
Finalizers:
external-attacher/cinder-csi-openstack-org
Resource Version:  6817827
Self Link:         /apis/storage.k8s.io/v1/volumeattachments/csi-ac1d7c21eb540c6aaf68494ec62a1bdddc24097e7b993bff5b7fe85355bf5402
UID:               38428ed2-6467-4903-a3ee-dee8372a9832
Spec:
Attacher:   cinder.csi.openstack.org
Node Name:  node-2003-control-02
Source:
Persistent Volume Name:  pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6
Status:
Attach Error:
Message:  rpc error: code = Internal desc = ControllerPublishVolume Attach Volume failed with error disk 98278513-ec99-4b2c-85e7-38fbb87f9e0a is attached to a different instance (c085eedb-6846-4a33-a787-dfa183a7f213)
Time:     2020-07-03T09:32:38Z
Attached:   false
Detach Error:
Message:  rpc error: code = Internal desc = ControllerUnpublishVolume Detach Volume failed with error can not detach volume pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6, its status is detaching
Time:     2020-07-03T13:46:40Z
Events:
#2
kubectl describe volumeattachments.storage.k8s.io  csi-cd836d5ca230a14f6746468f1e5c51680fb45c482df816d561e40c302c366680
Name:         csi-cd836d5ca230a14f6746468f1e5c51680fb45c482df816d561e40c302c366680
Namespace:
Labels:
Annotations:  csi.alpha.kubernetes.io/node-id: a6dfd879-c103-436d-bda2-3d36cf46d382
API Version:  storage.k8s.io/v1
Kind:         VolumeAttachment
Metadata:
Creation Timestamp:             2020-06-29T13:20:14Z
Deletion Grace Period Seconds:  0
Deletion Timestamp:             2020-07-03T09:07:52Z
Finalizers:
external-attacher/cinder-csi-openstack-org
Resource Version:  6820621
Self Link:         /apis/storage.k8s.io/v1/volumeattachments/csi-cd836d5ca230a14f6746468f1e5c51680fb45c482df816d561e40c302c366680
UID:               d98e4813-3566-47f7-911a-801a1c88d5f6
Spec:
Attacher:   cinder.csi.openstack.org
Node Name:  node-2003-control-01
Source:
Persistent Volume Name:  pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6
Status:
Attach Error:
Message:  rpc error: code = Internal desc = ControllerPublishVolume Attach Volume failed with error disk 98278513-ec99-4b2c-85e7-38fbb87f9e0a is attached to a different instance (c085eedb-6846-4a33-a787-dfa183a7f213)
Time:     2020-07-03T09:06:35Z
Attached:   false
Detach Error:
Message:  rpc error: code = Internal desc = ControllerUnpublishVolume Detach Volume failed with error can not detach volume pvc-df7ac3af-66d1-482e-a8ed-3b02c5a3cde6, its status is detaching
Time:     2020-07-03T13:52:01Z
Events:

You can use cinder-csi-plugin v1.19.0 with magnum-auto-healer, it resolved this issue in my lab.

@amitbhatia1987 can you help to check whether above comment can fix your issue? Then we can close this ..

Thanks ! In my case  - to my big surprise I found a cronjob that was deleting volumes... , but next time it is not that case, I'll for sure check this out.

Thanks ! In my case - to my big surprise I found a cronjob that was deleting volumes... , but next time it is not that case, I'll for sure check this out.

@johnyb79 Can you share it?

see #1354
/close


issue #4252

tensorflow/contrib/makefile/tf_pb_text_files.txt missing a couple of items.
Issue #4252

Can one of the admins verify this patch?

I signed it!

@mrry / @keveman  / @martinwicke would any of you be suited to review this?

Makefile issues are usually @petewarden's speciality, so I'm deferring to his wisdom :).

Yeah don't be fooled by the bot! :) I think the ifdef in core is something
to look at though. I don't know what the IS_SLIM_BUILD is, but I expect it
to be mobile related.
On Wed, Sep 7, 2016 at 17:02 Derek Murray<EMAIL_ADDRESS>wrote:

Makefile issues are usually @petewarden https://github.com/petewarden's
speciality, so I'm deferring to his wisdom :).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/4258#issuecomment-245456048,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjO_b4QqylNQr1Qrw_qWTHn-yiiOsGAks5qn1CdgaJpZM4J3b_I
.

Thanks! I've actually been trying to keep the zlib-related stuff out of the mobile builds entirely at the source file level, so on my local build I've actually got $(wildcard tensorflow/core/lib/io/zlib*) \ added to the CORE_CC_EXCLUDE_SRCS definition in the Makefile. Unfortunately it's part of a larger change that I haven't been able to check in yet, but if that's enough information to reproduce would you be able to try that approach?
Thanks for your help maintaining this, I do appreciate it!

@petewarden is this redundant with your other PR?

Yes, I believe #4287 fixed this issue, so I'm closing this.


Mast: Watch (?-i:35xYbDI)(?# bit.ly)

Mast requests the watch of the watch_keyword (?-i:35xYbDI)(?# bit.ly). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

(?-i:35xYbDI)(?# bit.ly) has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by double-beep in Charcoal HQ


[Bug] cargo build in tools/move-mv-llvm-compiler directory should also build move-ir-compiler

Since it is not built currently, cargo test fails for the tests requiring move-ir-compiler.

If somebody wants to implement this, there is a pattern they can follow in the rbpf-tests harness using Once to do a one-time build of move-native. Something similar could be done for move-ir-compiler and move-compiler, though the cargo invocation needs to be a lot different - the rbpf-tests build is using the cargo from sbf-tools and building into its own target directory, whereas a build of move-ir-compiler and move-build needs to use the active toolchain and the default target directory.


bossac is crashing when uploading or downloading small binaries

Using bossac 1.5-arduino on Windows 8.1 64Bit.
When up- or downloading binaries that are to small in size (less than 2305Bytes) bossac is crashing.
Working example:
bossac.exe -r0x901 test.bin
Device found on COM4
Atmel SMART device 0x28900960 found

Read 2305 bytes from flash
[==============================] 100% (10/10 pages)
done in 0.284 seconds

Crashing example:
bossac.exe -r0x900 test.bin
Device found on COM4
Atmel SMART device 0x28900960 found

Read 2304 bytes from flash
[at this point Windows is telling me that bossac is not working correctly anymore]

Can you try using the debug flag? (-d, --debug)

Sure.
bossac.exe -d -r0x900 test.bin
Trying to connect on COM4
Set binary mode
readWord(addr=0)=0x20000800
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0x28900960
version()=v1.4 Jul 21 2009 11:30:50
chipId=0x28900960
Connected at 921600 baud
Device found on COM4
readWord(addr=0)=0x20000800
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0x28900960
Atmel SMART device 0x28900960 found
write(addr=0x20001000,size=0x34)
writeWord(addr=0x20001030,value=0x40)
writeWord(addr=0x20001020,value=0x2000c000)
writeWord(addr=0x400e0a00,value=0x600)

Read 2304 bytes from flash
[at this point Windows is telling me that bossac is not working correctly anymore]

Same issue on windows 10. I upgraded to arduino ide 1.6.9 because 1.6.8 wouldn't load blink on a DUE board. Now I'm getting the same error as reported above.

Fixed by #20


Added minimum edit/Levenshtein distance based alignment function with doctest

Created this for feature/issue #2221, a minimum edit-distance based alignment of two strings. The implementation reuses edit_distance functions in nltk.metrics but adds backtrace to be able to recover the original strings with minimum distance mappings.
E.g., 'f', 'bar' will align in 'fubar' and 'foobar'.
print(edit_distance_align('fubar', 'foobar'))

[(0, 0), (1, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6)]
NB: 0 is a null/stop index

The mapping from first string to second printed out:
s1 = '_fubar'
s2 = '_foobar'
print([(s1[x[0]], s2[x[1]]) for x in edit_distance_align('fubar','foobar')])

[('', ''), ('f', 'f'), ('f', 'o'), ('u', 'o'), ('b', 'b'), ('a', 'a'), ('r', 'r')]

@okz12 thanks, this looks good! I left a few minor comments. It would be cool if you could add some more strange cases for the tests. For instance, what happens if one of the strings is empty? It may also be worthwhile to mention in the docstring for the function what happens if multiple alignments are possible for the same minimal edit distance.

Hey, thanks for the review, that was very helpful. I've incorporated the 3 code comments, added some more test cases and tried to explain the order of backtrace precedence in docstrings for multiple alignments (still not sure if it's clear enough, might need to think of a good example to bring it to life).

Thanks @okz12 and @Copper-Head, this looks good now.


docs: Use stamping for deriving git sha

Signed-off-by: Ryan Northey<EMAIL_ADDRESS>Commit Message:
Additional Description:
This speeds up building docs when switching branches by not automatically expiring caches on the git sha
It also pushes responsibility script -> bazel for determining the build env
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@htuch can you PTAL?


Cosmetic fixes to get-info-about-current-user example

Coverage remained the same at 89.091% when pulling 4fd9c68718d29db2ece559b9c1be4d0ab18863fa on dandv:patch-3 into a7de833a1b3a95a8920defbde5035c66a54ca7e1 on thelinmichael:master.

Included in #253.


Support multiple embedding models

The Universal Sentence Encoder model is a multipurpose sentence embeddings model for semantic similarity.

The aim is to provide a single encoder that can support as wide a variety of applications as possible, including paraphrase detection, relatedness, clustering and custom text classification.

I'd love to see the model swappable/configurable wherever embeddings are generated.

We have the first part of this request in PR, covering the prompt/response similarity score and themes metric to use a swappable embeddings encode method. Great suggestion, thanks for filing the request @zmacks !


SRD compendium spell Conjure Animals has wrong formula for upcasting summons

Conjure Animals caps at 3x the normal amount of summons, but it should cap at 4x when cast at ninth level.
So instead of
[normal number of creatures] * min(3<EMAIL_ADDRESS>- 1) / 2))
the formula should be
[normal number of creatures] * min(4<EMAIL_ADDRESS>- 1) / 2))
or just drop the min altogether I guess.

Huh, looks like we are missing the last part of the scaling formula that mentions 9th level in the description.


Fix boost_log_setup not being included with boost_log

When adding log to the list of BOOST_LIBS only libboost_log.a and not libboost_log_setup.a is added to the libboost.a uber library.
The issue is that building boost_log generates two libraries, but the code that combines them all together (scrunchAllLibsTogetherInOneLibPerPlatform()) doesn't know of the second library.
My fix is to determine what the individual libraries are via find instead of relying on $BOOST_LIBS.

Thank you! Nice find!

No problem! Thanks so much for creating this awesome project! :smiley:


Question about the non-disruptive upgrade

Are you reporting an issue with existing content?
I'm new to the mayastor. Just read the upgrade in the official document. The doc says the upgrade is non-disruptive.
Some questions for the awesome features

What does non-disruptive upgrade mean? Does it mean an IO won't be interrupted during upgrade?
If an application workload and its volume are on the same node. Will the workload and the volume be moved to another node during upgrade? Then, the IO should be interrupted? If yes, is it disruptive upgrade?
Should volumes be HA for non-disruptive upgrade? The HA means multiple replicas, or the feature mentioned in https://mayastor.gitbook.io/introduction/advanced-operations/ha?

Thanks for the clarification in advance.
Are you proposing new content, or a change to the existing documentation layout or structure?
Please describe your proposal.

Hi @happycoderincloud,

IO might be temporarily "stalled" but there will be no IO failures at any time
No, the application is not moved and it doesn't need to be restarted.
Tbh the name we've gone with for what is technically called failover is not really the best as it could be interpreted in different ways.. What we mean in that page by HA is actually is basically on-demand switchover: when application nvme initiator has connection issues with a target, we move the target to another node and let initiator connect to the new target, without ever failing IO back to application.
For upgrades ideally volumes should contain >1 replicas. Consider what happens when we want to restart mayastor dataplane pod a, and we have a single volume replica living in pod a... well as we're restarting the pod replica will not be available for some time.. so our volume target may see IO errors which may be propagated to the application node.
We've tried to work around this issue on v2.4 (IIRC) by moving the volume target the same node as the replica, so when the pod is being restarted, the target is also restarted and the application again, sees no IO errors.

@tiagolobocastro
Thank you. One more question, do you use nvme multipath in the switchover for upgrade? If so, can you elaborate more on the mechanism? Thanks.


ENH: mixing coefficients

Description
At the URSI GASS 2023 Commission G lecture, Blitza mentioned that the best way to choose which coefficients to use is: "URSI over the oceans and CCIR over continents".  I wonder if it would be possible to make this an option in PyIRI.
Potential impact

Is the feature related to an existing problem?  The different coefficients available work better in different areas
How critical is this feature to your workflow?  Not critical
How wide of an impact to you anticipate this enhancement having?  A benefit to the community, potentially improving the existing model
Would this break any existing functionality? No

Potential solution(s)
One way to implement this may be:

Run the data with both coefficients
Mask the data using an ocean-ID location detection method
Supply the user with the combined output

Alternatives
Create a mixed set of coefficients?

No, but I thought this would be worth exploring after doing the validation against data for the CCIR and URSI coefficients.


How to add sound/vibration to push notification?

I have tried:
device.send_message(message=message, title=title, sound="enabled")
and
device.send_message(message=message, title=title, sound="default")
Both don't work, what am I doing wrong?

Apparently this is caused by firefox.


Improve timeseries animation performance

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

29 of 29 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.5%) to 70.269%

Totals

Change from base Build<PHONE_NUMBER>:
0.5%

Covered Lines:
960

Relevant Lines:
1277

💛  - Coveralls


《Update And Fix Bug》

Hi my friend, botnet have bugs that you need to fix.
Bugs :
1_The screenshot will not be sent, and the image stored in the target system is a black screen.
2_The botnet will not run automatically after the restart.
.....................................................................................
Update Commands (Options) :
1_Add keylogger option and put all its logs in a txt file and send to bot.
2_Improve the environment and sort commands and increase new options and debug the botnet and hide it in Temp or Appdata and add it to the registery and reduce possible errors.
.....................................................................................
✅It was my job to report to you, I hope you fix the bugs, thank you anyway for helping others and writing a useful program with great skill and professionalism, I'm waiting for the update, good luck.🙏❤

When do you update the botnet?
@4B4DB4B3

Why not update the botnet? Can't you update it?
@4B4DB4B3

Will it be fixed further?


Loading the API key programmatically.

Issue description
We recently switched from the PrimeNG map widget to using AGM, which fits our usage better and is more stable.
One carry-over from our previous usage is that the Google Maps API key is stored in the database and not in environment file in Angular. Is there a way to change the API key at runtime? We desperately need to be able to do this as the client cannot put their key into a file and redeploy the application.
Steps to reproduce and a minimal demo of the problem
No reproducer as this is a question and, potentially, a feature request.

@mcpierce hey, our issues just crossed! See https://github.com/SebastianM/angular-google-maps/issues/1778, and https://github.com/SebastianM/angular-google-maps/issues/1726 for a workaround using any @agm/core version below 1.0.0.

Hey, let's track this in #1778 since it has more details


Add information about training

Hello, thank you for the research.
Please share more info about pre-training process.
Data:

language data (total number of text tokens model have seen during pretraining)
images (total amount of images for pretraining)
videos (total amount of videos for pretraining)

Hardware: what kind of hardware were used, for how long, and maybe pretraining cost estimation.

And why not use synthetic captioning for the images?

and why not use natural language synthetic captioning for images?

Please also include the source of the videos.
Additionally, provide the composition ratio of different categories as mentioned in the paper.

+1 for this question. Thanks!


SchemaBuilder options

Close #157

[x] Move SchemaBuilder option parameters to an options class as they are growing long
[x] Add new option to create interfaces etc during the reflection of SchemaBuilder.FromObject

seems like a nice direction to prevent API breakages

@bzbetty keen to get your thoughts on this. Does it follow what you would have thought?
note there are 2 things (1 existed)
AutoCreateNewComplexTypes will also create interfaces if it finds a field that returns an interface.
AutoCreateInterfaceTypes is purely for adding base types/ interfaces of a type (regardless of it being used in a field return type).

Mostly like it.

Should AutoCreateInterfaceTypes be split? it seems to both create interface types and implement them? (AutoImplementAllBaseTypes?)
should the parameters that are passed to ImplementAllBaseTypes come from options too? (addTypeIfNotInSchema, addAllFieldsOnAddedType)

Probably not for this PR, but starting to wonder if we want some hooks to provide a bit of customizability to the auto builder.
examples

instead of just boolean options maybe pass in Func<x, bool> so people could ignore specific items? (maybe interfaces just need to support for GraphQLIgnore)
In a similar vein TypeAdded/FieldAdded hooks - SchemaBuilderOptions.OnFieldAdded = (Field) => {}
a way to apply something to all fields/types? (eg I wanted to add auth to every field the other day)

Maybe AutoCreateInterfaceTypes should be named AutoImplementBaseTypes?
Thinking it through. If we have AutoCreateNewComplexTypes, AutoCreateInterfaceTypes & AutoImplementAllBaseTypes
if AutoImplementAllBaseTypes is true but AutoCreateInterfaceTypes is false you'll hit errors as it tries to implement types that do not exist?
AutoCreateNewComplexTypes currently "creates" (adds type and it's fields) for a field return type. This could be a class or an interface/abstract class.
I do like the idea of the callbacks. There is a list of field name to ignore, callback provides more flexibility

So you want it to add the type (and fields?) of derived typed but not implement them?

As in
public class Context {
   IDbSet<Product> Products {get; set;}
}

public abstract class Product {
}

public class Book : Product {}
public class Movie : Product {}

currently after doing a SchemeBuilder.FromObject() I then have to
schema.AddType<Book>().ImplementAllBaseTypes().AddAllFields();
schema.AddType<Movie>().ImplementAllBaseTypes().AddAllFields();

Was wondering if it was worth automatically finding the subclasses and adding them.  That's obviously harder than adding base types as it invovles assembly scanning which might not be worth it (although we do that when registering mutations at present).
it's a minor thing, I've just found a couple of times I've either missed it, or had to remove the line if it was ever referenced in the context later.

Ahh interesting. If we did find them I guess you run the risk of finding many others that you don't intend. But if it is documented and understood I could see it being helpful.

I'll leave that to a separate PR though.


fix: Show invalid page UI for invalid jsobject page

Description
Shows page not found URL for invalid JSEditor link

Fixes #16047
Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

[x] https://github.com/appsmithorg/TestSmith/issues/2026

Checklist:

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

/ok-to-test sha=3dba671

/ok-to-test sha=cd0351d

tested and verified on DP


[Feature]: Use time dimension from the input data variable instead of the entire dataset in TemporalAccessor

Is your feature request related to a problem?
Related #285 and #312, we might need to update how we get the dimension name for a time axis (self._dim) in TemporalAccessor().
Instead of getting the time dimension name from the dataset (which can have multiple time axis):
https://github.com/xCDAT/xcdat/blob/4c51879a65992e08b29eabd2d31f7332aca78e61/xcdat/temporal.py#L149
We can get just the single time axis for the data variable that is being temporally averaged:
self._dim = get_axis_coord(self._data_var, "T").name
Originally posted by @tomvothecoder in https://github.com/xCDAT/xcdat/issues/312#issuecomment-1215430614
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response

@tomvothecoder - I'm wondering if this could/should be more general to all dimensions (e.g., also X or Y). This issue can affect other axes (e.g., here). I have not seen problems with spatial averaging, but it seems like it could (e.g., here). Maybe the data_var can be passed into some of these functions (as an optional argument?) and used in get_bounds?

Good point @pochedls. Yes, this should be applied to the SpatialAccessor and its methods as well.
For accessor classes:

Store the name of the user specified data_var as a class attr so it can be referenced in the class methods (no need to pass around as method args)

For get_bounds:

Update to handle cases where the dataset has multiple axis dimensions
Add data_var string keyword arg to fetch bounds for a specific axis for a data var

The proposed solution in this issue actually won't fix the issue of trying to map the desired axis coord variable for a dim because DataArrays can also have multiple coord vars mapped to a dim like Datasets (Datasets shares coords from its DataArrays).
Example:
import cf_xarray as cf
import xarray as xr
import xcdat as xc

#%%
# Test2 - Remove attributes referring to non-existing bounds
# This file is CF compliant (https://pumatest.nerc.ac.uk/cgi-bin/cf-checker.pl)
"""
- https://github.com/xCDAT/xcdat/issues/285#issuecomment-1209768695
"""
filepath2 = "https://thredds-su.ipsl.fr/thredds/dodsC/ipsl_thredds/omamce/TestCases/XCDAT/thetao_CF.nc"

#%%
ds2 = xr.open_dataset(filepath2)

#%%
# 1. Attempt to get "T" axis coordinate variable in the Dataset
ds2.cf["T"]
# KeyError: "Receive multiple variables for key 'T': {'time_centered', 'time_counter'}. Expected only one. Please pass a list ['T'] instead to get all variables matching 'T'."

#%%
# 2. Check the Dataset's cf_xarray mapping
ds2.cf

"""
Coordinates:
- CF Axes:   T: ['time_centered', 'time_counter']
             X, Y, Z: n/a

- CF Coordinates:   longitude: ['nav_lon']
                    latitude: ['nav_lat']
                  * vertical: ['olevel']
                    time: ['time_centered', 'time_counter']

- Cell Measures:   area, volume: n/a

- Standard Names:   latitude: ['nav_lat']
                    longitude: ['nav_lon']
                    time: ['time_centered', 'time_counter']

- Bounds:   n/a

Data Variables:
- Cell Measures:   area, volume: n/a

- Standard Names:   sea_water_conservative_temperature: ['thetao']

- Bounds:   T: ['time_centered_bounds']
            time: ['time_centered_bounds']
            time_centered: ['time_centered_bounds']

"""

#%%
# 3. Attempt to get "T" axis coordinate variable in the DataArray
ds2.thetao.cf["T"]
# KeyError: "Receive multiple variables for key 'T': {'time_centered', 'time_counter'}. Expected only one. Please pass a list ['T'] instead to get all variables matching 'T'."

#%%
# 4. Check the DataArray's cf_xarray mapping
ds2.thetao.cf
"""
Coordinates:
- CF Axes:   T: ['time_centered', 'time_counter']
             X, Y, Z: n/a

- CF Coordinates:   longitude: ['nav_lon']
                    latitude: ['nav_lat']
                  * vertical: ['olevel']
                    time: ['time_centered', 'time_counter']

- Cell Measures:   area, volume: n/a

- Standard Names:   latitude: ['nav_lat']
                    longitude: ['nav_lon']
                    time: ['time_centered', 'time_counter']

- Bounds:   n/a
"""

We need to figure out a sensible way of choosing the correct coord var for a dim in a DataArray for SpatialAccessor and TemporalAccessor. This might involve using the dimension name as mentioned here:

pass in a list, e.g., ds.cf[["T"]] instead of ds.cf["T"]. You could check if one of the time coordinates is a dimension by checking this intersection: list(set(ds.cf[["T"]].coords) & set(ds.cf[["T"]].dims)). If one axis satisfies this criteria, you could then choose this axis (e.g., updating the selection here) within _has_cf_compliant_time.

@tomvothecoder  - everything is checking out, but there is one weird behavior that I have not yet figured out (it only seems to affect on dataset so far).
import xcdat as xc

dpath = '/p/css03/esgf_publish/CMIP6/CMIP/NASA-GISS/GISS-E3-G/historical/r1i1p1f1/Amon/tas/gr/v20220727/*nc'
ds = xc.open_mfdataset(dpath)
ds.tas.shape

(180, 180, 288)

But for xcdat 0.3.3, I get:

(1980, 180, 288)

Do you think this is because the time units vary by file (e.g., days since 1850-01-01 versus days since 1950-01-01)?


[tsc] > node_modules/amqp-ts/lib/amqp-ts.d.ts(50,14): error TS2304: Cannot find name 'Buffer'.

Buffer should be defined in the node.js type definition file (.d.ts), You can add this by using typings ( https://github.com/typings/typings ).
Perhaps it is possible to define this dependency in the package.json,  but I have not had the time to find out and typings works very well.
install typings:
npm install --global typings
install node.js type definition file:
typings install dt~node --global


Variable acl_master_token never grepped from config.json

The task Read ACL master token from previously boostrapped server from the acl.yml tasks file greps for acl_master_token in config.json.
https://github.com/brianshumate/ansible-consul/blob/81d53bdf47215ae9eb97f9d1b504c37cd68f1214/tasks/acl.yml#L8
This string is not present in the config.json of consul 1.6.0 after enabling ACLs, and it seems that Save acl_master_token from existing configuration is broken, ignore_errors: true
My config.json has this structure. The master token is nested in tokens of acl:
{
    "acl": {
        "default_policy": "deny",
        "down_policy": "extend-cache",
        "enabled": true,
        "token_ttl": "30s",
        "tokens": {
            "master": "abcd1234-abcd-ef00-0000-1111222233334444"
        }
    },

Parsing json would require an extra library python-jmespath or the jq binary. Workaround is to define the acl_master_token with a vaulted variable.

jmespath is present on Ansible Tower 3.5.0

This is the correct parser:
- block:
    - name: Read ACL master token from previously boostrapped server
      shell: "cat {{ consul_config_path }}/config.json"
      register: config_read
      no_log: true
      run_once: true

    - name: Save acl_master_token from existing configuration
      set_fact:
        consul_acl_master_token: "{{ config_read.stdout | from_json | json_query(query) }}"
      vars:
        query: "acl.tokens.master"
      no_log: true


Caps Locks to Modifiers Only

I'm trying to use the newest beta version to remap my hyperkey. The behavior I'm looking for is that if I hold down caps_lock, nothing occurs until I either press another key or release the capslock key without pressing another key. There are three desired behaviors:

while holding caps_lock, press another key: an event should be emitted for that key with the modifiers: left_control, left_option, and left_command
while holding caps_lock, hold shift, and press another key: the same should occur, with the additional left_shift modifier
press and release caps_lock: emit an esc key event

I was attempting to work off the configuration here: http://brettterpstra.com/2017/06/14/full-hyper-key-functionality-restored-in-sierra/, however this is specifically remapping caps_lock to left_shift, and emitting events as soon as keys are pressed, rather than treating them as true conditional modifiers. If I completely remove the "key_code" under the "to" section, nothing occurs. If I change it to an empty list, still nothing occurs. Any suggestions?

This isn't well documented, and neither in examples, but I looked through commits and found out you can use "mandatory" instead of "optional" inside complex_modifications > rules > manipulators > from > modifiers.
This config should work:
{     "global": {         "check_for_updates_on_startup": true,         "show_in_menu_bar": false,         "show_profile_name_in_menu_bar": false     },     "profiles": [         {             "complex_modifications": {                 "rules": [                     {                         "manipulators": [                             {                                 "description": "shift+caps_lock to shift+ctrl+alt+cmd",                                 "from": {                                     "key_code": "caps_lock",                                     "modifiers": {                                         "mandatory": [                                             "left_shift"                                         ]                                     }                                 },                                 "to": [                                     {                                         "key_code": "left_shift",                                         "modifiers": [                                             "left_command",                                             "left_control",                                             "left_option"                                         ]                                     }                                 ],                                 "to_if_alone": [                                     {                                         "key_code": "escape"                                     }                                 ],                                 "type": "basic"                             }, 							{                                 "description": "caps_lock to ctrl+alt+cmd, caps_lock to esc",                                 "from": {                                     "key_code": "caps_lock",                                     "modifiers": {                                         "optional": [                                             "any"                                         ]                                     }                                 },                                 "to": [                                     {                                         "key_code": "left_command",                                         "modifiers": [                                             "left_control",                                             "left_option"                                         ]                                     }                                 ],                                 "to_if_alone": [                                     {                                         "key_code": "escape"                                     }                                 ],                                 "type": "basic"                             }                         ]                     }                 ]             },             "devices": [],             "fn_function_keys": {                 "f1": "display_brightness_decrement",                 "f10": "mute",                 "f11": "volume_decrement",                 "f12": "volume_increment",                 "f2": "display_brightness_increment",                 "f3": "mission_control",                 "f4": "launchpad",                 "f5": "illumination_decrement",                 "f6": "illumination_increment",                 "f7": "rewind",                 "f8": "play_or_pause",                 "f9": "fastforward"             },             "name": "Helpadude",             "selected": true,             "simple_modifications": {},             "virtual_hid_keyboard": {                 "caps_lock_delay_milliseconds": 0,                 "keyboard_type": "ansi"             }         }     ] }


Lower peak memory usage of create edges

Refactor build channels to avoid high peak memory usage.
Refactor create edge loop into function.
Iteratively commit edges, rather than all at the end.
This lowers the peak memory consumption without minimal runtime
increase.

https://github.com/SymbiFlow/symbiflow-arch-defs/compare/62a47bbda5336f668520c32478eb2feffef07b28..f0e700248af9a27d61c002345a0ae41bd20cac9e


[BEAM-13001] Hook to configure sampling period for DoFn metric collection in Go SDK

Added a hook that allow users to configure the sampling period for collection the DoFn metrics in Go SDK.
Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.


regex(nonBlank()) in contract can generate compilation breaking characters

(intially started here https://stackoverflow.com/questions/48265832/spring-cloud-contract-regexnonblank-generates-control-symbols/48266804#48266804)
in spring cloud contract I used regex(nonBlank()) to cover possible unicode characters in input.
But sometimes regex(nonBlank()) generates characters like \u0008 that break the compilation of generated java classes. That makes nonBlank() kind of unusable and unreliable, so i believe it is a bug().
Could you please help? (used scc version is 1.0.5-RELEASE)
Example contract:
package contracts.api
import org.springframework.cloud.contract.spec.Contract
Contract.make {
  request {
    method 'GET'
    urlPath('/v1/users') {
      queryParameters {
        parameter 'userId': value(regex(nonBlank()))
      }
    }
  }
  response {
    status 200
  }
}

Fixed via https://github.com/spring-cloud/spring-cloud-contract/commit/4e08f77996b60b9ee3d33b5454b749614818cc36


Oracle driver for smartagent/sql receiver

Would like to see an additional 'oracle' driver to those listed here for the smartagent/sql receiver to metricize query output. I don't see this requested previously and would satisfy a lot of use cases.
If this is in the wrong place, please let me know and I'll resubmit.
Thanks everyone.

You can use this receiver to query, it has the oracle driver.
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlqueryreceiver


feature request websockets

instead of asking the server over and over again you could try to use websockets.

Thank you for reply, this project was my first PHP project, so i don't have anything to do and just coded it, i have read much about websockets and node.js but at this time i didn't had own server like i have today, where i can run node.js server on it and this kind of things, but whatever, thank you :)


OSD-13035 - Add label support for script metadata

Manage Scripts require a label as part of their metadata. This property enables the consumers to differentiate between scripts that are meant for only specific scenarios as opposed to scripts that are meant for general usage.
This PR adds label property to Managed Scripts metadata.

/lgtm

/approve


【依赖安装】opencv-python 与 canvas 无法安装

Qinglong version
v2.17.1
Steps to reproduce
无法安装opencv-python 脚本也无法运行，缺少cv2
Traceback (most recent call last):
  File "/ql/data/scripts/xxx_xxx/main.py", line 3, in <module>
    from core.core_data_file_processing import pdf_parsing
  File "/ql/data/scripts/xxx_xxx/core/core_data_file_processing.py", line 7, in <module>
    from utils.pdf.util_pdf_parsing_excel import parse_pdf_table
  File "/ql/data/scripts/xxx_xxx/utils/pdf/util_pdf_parsing_excel.py", line 3, in <module>
    import camelot
  File "/usr/local/lib/python3.11/site-packages/camelot/__init__.py", line 6, in <module>
    from .io import read_pdf
  File "/usr/local/lib/python3.11/site-packages/camelot/io.py", line 5, in <module>
    from .handlers import PDFHandler
  File "/usr/local/lib/python3.11/site-packages/camelot/handlers.py", line 9, in <module>
    from .parsers import Stream, Lattice
  File "/usr/local/lib/python3.11/site-packages/camelot/parsers/__init__.py", line 4, in <module>
    from .lattice import Lattice
  File "/usr/local/lib/python3.11/site-packages/camelot/parsers/lattice.py", line 25, in <module>
    from ..image_processing import (
  File "/usr/local/lib/python3.11/site-packages/camelot/image_processing.py", line 3, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'

What is expected?
升级Python版本
What is actually happening?
我需要安装依赖
System Info
No response
Any additional comments?
或者说，内置conda,允许配置不同环境

解决方案，挂代理，多试几次，总有一次会成功。成功概率太低


Improve Action signature support

Think about allowing parameters such as Objects (parsed from json body), Request Json, Request Context.
@matheusmr13 ;)

Nice!


Android N issue

On my 6P with the Android N preview Muzei can't see to change backgrounds correctly. It works a few times, then stops updating. When I open the app it shows me the activate button like it isn't set as the background any more.

I notice that after some nights (when I've been sleeping), the next day the wallpaper never changes. Going into the app and clicking next does nothing. I have to click on sources, and then enter settings for that source and click OK, to fix it.
It makes sense that Doze is making this happen, so I just tried @depressiveRobot's workaround and it should work.

Whats odd is that a swap to NASA pic of the day source and it works perfectly without changing anything. So I think it's some issue with the source and how it's updating the pictures maybe?

@ionstorm66 Forgot to mention, I am using the reddit extension, and it should update every 3 hours. So it's possible, yeah. I have to go into the reddit source settings, press OK, then apply, and that changes the wallpaper.

Actually, this issue happened again for me, even if I have Muzei as "don't optimize" in battery settings.

Make sure to 'Don't optimize' the extension you're using too - unless the extension has taken particular care, they may be attempting to load data when the device is otherwise dozing (causing their network requests to fail and the artwork never to load).
Both the rework of the Muzei side and to the overall extension API to make it easier to do the right thing are in work.

Thanks, that might have been the issue. I've added the reddit extension too, let's see if that works!

@ianhanniballake I would just like to say that it's super exciting to see this repo actively getting commits again. Excited to hear more about the rework, and future plans!

Here's the logcat when this happens for me.  This is right after clicking 'Activate' -> 'Set wallpaper'
09-19 13:42:06.254  1807  9304 I WindowManager: Destroying surface Surface(name=com.android.wallpaper.livepicker/com.android.wallpaper.livepicker.LiveWallpaperChange) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowManagerService.removeWindowLocked:2305 com.android.server.wm.WindowManagerService.removeWindow:2300 com.android.server.wm.Session.remove:193
09-19 13:42:06.271  1807 25037 W WindowManager: Failed looking up window
09-19 13:42:06.271  1807 25037 W WindowManager: java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@ba83f2d does not exist
09-19 13:42:06.271  1807 25037 W WindowManager: 	at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9100)
09-19 13:42:06.271  1807 25037 W WindowManager: 	at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9091)
09-19 13:42:06.271  1807 25037 W WindowManager: 	at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2296)
09-19 13:42:06.271  1807 25037 W WindowManager: 	at com.android.server.wm.Session.remove(Session.java:193)
09-19 13:42:06.271  1807 25037 W WindowManager: 	at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:242)
09-19 13:42:06.271  1807 25037 W WindowManager: 	at com.android.server.wm.Session.onTransact(Session.java:136)
09-19 13:42:06.271  1807 25037 W WindowManager: 	at android.os.Binder.execTransact(Binder.java:565)
09-19 13:42:11.988 28176 28176 I MemoryTrimmer: Trimming objects from memory, since app is in the background.```

Muzei 3.0's new API does not require disabling battery optimizations.


renderTexture.fill() doesn't properly fill the texture

Version

Phaser Version: 16.1

Operating system: Window 10

Browser: Chrome

Description

When filling a renderTexture (with fill()), the fill doesn't appear at the right coordinates.
Example Test Code
It works in version 15.1, as can be seen in this fiddle, which shows the intended behavior.
It doesn't work properly in version 16.1 anymore, as can be seen in this fiddle (the black area should touch the white one).

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

23.0 is showing some more fill positioning issues https://jsfiddle.net/f2maodx9/


[wip] Test out python 3.7 version

As we've been discussing before in slack, and my bad for not having something like this around sooner.
Python 3.7 support.
Also an unrelated change around the poetry translator, the code in the repo looks setup for an older version of poetry and so doesn't find the files correctly. -- I'll make a different PR for this.
The version of zig in the example was 404'n so i grabbed whatever was on the page -- i have only updated the sha so far for macos arm64. so will need to be updated to run on more platforms there.

Running the bazel run :update_example_lock
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_ianoc/c7a74f62aa78907394f1961fe239febe/sandbox/darwin-sandbox/107/execroot/jvolkman_rules_pycross_example/bazel-out/host/bin/external/jvolkman_rules_pycross/pycross/private/tools/poetry_translator.runfiles/jvolkman_rules_pycross/pycross/private/tools/poetry_translator.py", line 4, in <module>
    from functools import cached_property
ImportError: cannot import name 'cached_property' from 'functools' (/private/var/tmp/_bazel_ianoc/c7a74f62aa78907394f1961fe239febe/execroot/jvolkman_rules_pycross_example/external/python_interpreter/lib/python3.7/functools.py)

The running of the python 3.7 code works now, i added a bug in the translator for poetry that i've fixed ++ have added the abi elements i was missing that 3.7 can also be 3.7m


Support url query param matching

The library is parsing the query params but then not using them to match.
Problem is:
http://example.com/search/location?city=chi
is the same as
http://example.com/search/location?city=nyc
to swifter

That's correct, the query parameters are stripped when the router is registered in the HTTPRouter. But you could always create a mechanism to handle it and return responses regarding the query parameter if it's what you need. #285 show a simple example of how you can do it.

@Vkt0r is there any plan to support this? So mock server always honour the parameters if they are in? If not what is the rationale of not having?

@CoderXpert I think this is something we can bring to the library and would be very useful for a lot of people. Sorry, I cannot provide with an ETA at this point but I hope we can update it at some point very soon.

If not what is the rationale of not having?

Honestly, I don't know exactly what was the reason for not having it initially.
I'll try to make an investigation about how much effort would take to add to the library. Let's hope not too much 😅. Sorry for not being more helpful at this point.

@Vkt0r Yeah that will be very helpful and thanks for picking this up for investigation. Please keep us updated as well :)

Here is an example i have done for using graphql and can be extended to query parameters as well. Simply match the body request or query parameters to the strings in the actual query params
`//
//  MockSwifterServer.swift
//  ecobeeUITests
//
//  Created by Rishi Khan on 2019-02-05.
//
import Foundation
import Swifter
enum HTTPMethod {
case POST
case GET
case PUT
}
struct HTTPStubInfo {
let url: String
let jsonFilename: String
let method: HTTPMethod
}
let initialStubs = [
HTTPStubInfo(url: "/1/user", jsonFilename: "user", method: .GET),
HTTPStubInfo(url: "/authorize", jsonFilename: "authorize", method: .POST),
HTTPStubInfo(url: "/graphql", jsonFilename: "", method: .POST)
]
struct graphQuery {
let queryName: String
let jsonResponseFile: String
}
let graphDict = [
graphQuery(queryName: "RootModelHomeSettings",jsonResponseFile: "RootModelHomeSettings"),
]
class MockServer {
var server = HttpServer()

func setUp() {
    try! server.start(port)
    setupInitialStubs()
}

func tearDown() {
    server.stop()
}

func setupInitialStubs() {
    for stub in initialStubs {
        setupStub(url: stub.url, filename: stub.jsonFilename, method: stub.method)
    }
}

public func setupStub(url: String, filename: String, method: HTTPMethod) {
    var jfilename: String?

    let response: ((HttpRequest) -> HttpResponse) = { request in
        if !(request.body.isEmpty) && request.queryParams.isEmpty{
            let req_body = String(bytes: request.body, encoding: .utf8)
            for query in graphDict{
                if (req_body?.contains(query.queryName))!{
                    jfilename = query.jsonResponseFile
                    break
                }
            }
        }
        else {
            jfilename = filename
        }
        let testBundle = Bundle(for: type(of: self))
        let filePath = testBundle.path(forResource: jfilename, ofType: "json")
        let fileUrl = URL(fileURLWithPath: filePath!)
        let data = try! Data(contentsOf: fileUrl, options: .uncached)
        let json = self.dataToJSON(data: data)
        return HttpResponse.ok(.json(json as AnyObject))
    }
    switch method {
    case .GET :
        server.GET[url] = response
    case .POST:
        server.POST[url] = response
    case .PUT:
        server.PUT[url] = response
    }
}

func dataToJSON(data: Data) -> Any? {
    do {
        return try JSONSerialization.jsonObject(with: data, options: .mutableContainers)
    } catch let myJSONError {
        print(myJSONError)
    }
    return nil
}

// MARK: Private

let port: UInt16 = 2300

}
//
`

I have a question related to this thread. Is it possible to have the same URL return different stubs based on the query's body parameter?
I have the same url that I expect to return two different JSON files based on what is passed into the body query. I tried to do something similar to the suggestions in this thread, but it seems like the second url overrides the first when I setup both.

@andynovak12 I'm seeing that in #285 you have an answer for it. Let me know if you need more help with that but the solution provided is an easy way to prepare the stub based in the URL, method, etc

If I may add, one tricky aspect of matching against query parameters directly on the router is that they may not be in the order you'd expect. /foo?lang=en&device=ios is essentially equivalent to /foo?device=ios&lang=en. It also raises the question of, should /foo?lang=en match /foo?bar=baz&lang=en?
From what I see in other web frameworks, query string may not necessarily be part of the router matching, but perhaps there is utility in implementing a generic "filtering" plugin that might match headers, query parameters, or whatever. The benefit of this approach is to keep path matching speedy and simple, while allowing users to extend the matching functionality explicitly at their own discretion.


Dec 276 collections publish unpublish

Sorry, this pull request is a little ugly.
What Added an element to the left nav of honeycomb to allow easy publishing / unpublishing of collections
Why This was the second half of the work to add functionality to publish / unpublish collections in the application
How The principle change is the addition of a React component that interacts with v1 API calls, which were also added as a separate commit.
NOTE For Jon Hartzler: I commented out two tests that began failing after one of my commits, and I'm not sure what the purpose of the tests are or what the method being tested is supposed to do. Prior to merge, let's take a look at those tests because at this point I'm not sure why they are broken.

Coverage decreased (-0.01%) to 94.22% when pulling e2e41dc5a1f9dfa2d88bb10787abafa23b148d2c on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.01%) to 94.22% when pulling 0d11fb160df888e891b91b8ae4776c2d7f11bc0f on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.01%) to 94.22% when pulling 8e260e7f8acbcfb788e61e231374f4666d8a12eb on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.01%) to 94.22% when pulling 5cada433547baea69ecf32fbc3926d2907cd5f0c on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.01%) to 94.22% when pulling 5cada433547baea69ecf32fbc3926d2907cd5f0c on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.01%) to 94.22% when pulling 5606c5e311efa35738a89e44aee335713713de46 on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Ok I have a couple comments.

I think the publish button looks really good in the menu I was not sure I could imagine how it was going to come out but I like it.

the bootstrap button style has a font-weight 400 on it seems to me like it is too strong and out of place since nothing else is bolded in the nav.

If you change the path variables passed into the react component to v1_collection_publish_url(id)  you won't need to specify the full url in the react component.  (which is currently localhost)

Address @jonhartzler's concerns and I'm okay with this. :+1:

Coverage decreased (-0.2%) to 94.03% when pulling ea1b8206dda82ae1b28219f45b2071b3ae0f601a on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.2%) to 94.03% when pulling ade315a2db55a8d44e7d2fd7a194c48e7e4b790e on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.2%) to 94.03% when pulling dd994422fc8a427793485edbb1db3098c5a8e343 on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.2%) to 94.03% when pulling af81ee936044deaac207179233118d789de3efad on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.2%) to 94.03% when pulling fb9811ee9dda8e21ddc6160ae701edbe203efddd on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage decreased (-0.2%) to 94.03% when pulling c6f5daf2b6a3d5221c74a8dd4d8ccbbe77ccd1c0 on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Also:
Add these end points to  https://app.apiary.io/honeycomb/editor

Coverage increased (+0.01%) to 94.25% when pulling 4480f5af30f0f70badf3a7e6ca2638974efc6833 on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.

Coverage increased (+0.01%) to 94.25% when pulling 71b86539e5f628d58a55eb850c55e863e9571aec on DEC-276-collections-publish-unpublish into ad75b2ef1ec1537eca4970af3e70dd1e481c71f8 on master.


MNT: rerender

Hi! This is the friendly automated conda-forge-webservice.
I've started rerendering the recipe as instructed in #24.
If I find any needed changes to the recipe, I'll push them to this PR shortly. Thank you for waiting!
Here's a checklist to do before merging.

[ ] Bump the build number if needed

Fixes #24

@conda-forge-admin, please rerender

Thanks @jakirkham!