How to prevent expanded row getting collapsed on state update in mui-datatable (^2.15.0)

I'm trying to display nested rows , which includes expandable rows. The inner level rows has a button click on a cell, which is doing a setState onClick of it.
Expected Behavior
If User has clicked on the Expand row (outer row) which then lists out all the inner rows which has an onClick function in a cell.
So, if User has already expanded a row, And then click on Button displayed in the inner level of rows.
Then Expanded row should not collapse . (Basically TableState for expandedRows should be remembered and only if the User clicks on that Expand/Collapse icon, the row should be expanded/collapsed accordingly.)
Current Behavior
The expanded row is getting collapsed on a State Update that happens in the inner level of nested rows, onClick of button stateUpdate is resetting the expandedRows of tableState.
Steps to Reproduce (for bugs)

Click on Expand Icon - This expands all the rows
Click on Attach Icon - Opens the dialog does some setState
But this collapses already expanded rows

UI

Tech
Version

Material-UI
^4.11.3

MUI-datatables
^2.15.0

React
^16.13.1

@gabrielliwerant Could you please help with this issue?

@KRBhat Did you ever find a solution to this problem. I am having the same issue.

Same issue

The solution i found was to update the props of the object stored in state not the state it self
For example instead of doing setUser(userObj) i do userObj.name = 'Phil'..
It work because the state is actually a reference to an object so i can modify the properties whithout re-render.

any updates on this issue? because this becomes almost impossible to workaround if you're using redux states

You can easily use rowsExpanded along with a state to store your expanded rows.
For example
// some options here...
expandableRows: true,
expandableRowsHeader: false,
expandableRowsOnClick: true,
rowsExpanded: expandedRows,
onRowExpansionChange: (curExpanded, allExpanded) => {
  const expandedRowsIndexes = allExpanded.map((row) => row.index);
  setExpandedRows(expandedRowsIndexes);
},
// some other options here...

You can easily use rowsExpanded along with a state to store your expanded rows. For example
// some options here...
expandableRows: true,
expandableRowsHeader: false,
expandableRowsOnClick: true,
rowsExpanded: expandedRows,
onRowExpansionChange: (curExpanded, allExpanded) => {
  const expandedRowsIndexes = allExpanded.map((row) => row.index);
  setExpandedRows(expandedRowsIndexes);
},
// some other options here...

This worked beautifully


how convert widget to ByteData

I want convert widget to bytedata without makeit  inside build ?
please help

Questions like these are better suited for Q&A sites like StackOverflow or on one of the flutter community sites at https://flutter.dev/community


Ban the try catch rule.

This is a subset of the custom-rules branch.
r: @jcorbin @Matt-Esch @malandrew

The whole point of standard is to not have a bunch of configuration files in the project.
i.e. no .jshint no .eslint no .editorconfig
If you really want the file I can put it back but it seems against the spirit of the standard project.

It serves a different purpose than the linter. The linter highlights things. The editorconfig on filesave actually cleans up all trailing characters and inserts a newline. I wish the linter could do that.
Once the esformatter stuff is solid and can fix that stuff automatically, we should be able to remove editorconfig (insofar as JS files are concerned, but it also cleans up markdown files and other file types).

people should just configure their editors once and comply with the linter.
the editor config file is just noise.
But if you want to keep it i'll revert that commit.

Updated; added editor config back.

LGTM


Added docstring for WordNetLemmatizer lemmatize

Resolves #2818
Hello!
Pull request overview

Added documentation to WordNetLemmatizer's lemmatize method. (Including Python 3.5+ typing)
Modified import slightly, to use from nltk.corpus import wordnet as wn as is commonly used in practice.

The changes speak for themselves with this PR. Feel free to suggest modifications to the docstring.

Tom Aarsen

Thanks @tomaarsen


Task redispatch queue

What changed?
Add a re-dispatch queue to transfer/timer queue processor

Why?

When using the new priority task processor, it's possible that there are lots of tasks with low priority and the channel for that priority becomes full. Instead of blocking tasks with other priority, those tasks should be buffered elsewhere, so that it can be re-dispatched later.
If the processing logic for a task keeps failing for a long time, instead of infinity retry, that task should also be put in to the re-dispatch queue and be retried later.

How did you test it?
Unit test

Potential risks
No risk right now as the implementation for priority task processor has not been wired up yet.

Coverage increased (+0.1%) to 67.182% when pulling ea2d505a9a4ed7c4221f4951af2f4a4453a38641 on yycptt:task-redispatch-queue into 1e52f96921a3861f59e70d80feba29a7c19f0838 on uber:master.


Fix dynamic answers functional test

What is the context of this PR?
Some changes had to be in introduced to the "dynamic answers based on list" tests to make it pass in current circumstances. Added refactoring plus extra checks to make it less flaky when using the new chromedriver version, user journeys are untouched, mainly refactoring for readability and to reduce repetition but also new elements in generate_pages.
How to review
See if you are happy with the changes, I've tested many variants of this fix and tried to minimise the amount of extra code but this seems to be minimum we need for it to pass.
Checklist

[ ] New static content marked up for translation
[ ] Newly defined schema content included in eq-translations repo

 Bug: Functional tests with a dropdown can fail if the component doesn't load

I have all the attached func tests failing - the test affected by your change passed fine it seems.
Ran pipenv install --dev and yarn install, yarn generate_pages and make build prior to running the tests - anything I missed there?

I have all the attached func tests failing - the test affected by your change passed fine it seems. Ran pipenv install --dev and yarn install, yarn generate_pages and make build prior to running the tests - anything I missed there?

@kylelawsonAND must be old design system version or just rebuild the templates or even (most probable thing) restart runner, sometimes you have old version running eg. from before changing your branch.

Did notice github actions is using chromedriver 114 while locally its 113 for me. But not sure if its relevant here

Or maybe it was version 114 of chrome browser? I have similar setup: chrome 114 and chromedriver 113..

Did notice github actions is using chromedriver 114 while locally its 113 for me. But not sure if its relevant here

Or was it version 114 of chrome browser? I have similar setup: chrome 114 and chromedriver 113..

Oh thats what it is. My chrome browser is 113 while GA is 114. My bad 😅

Did notice github actions is using chromedriver 114 while locally its 113 for me. But not sure if its relevant here

Or was it version 114 of chrome browser? I have similar setup: chrome 114 and chromedriver 113..

Oh thats what it is. My chrome browser is 113 while GA is 114. My bad 😅

You might need to update your chrome to keep functional tests happy..


Fixes #370 - Password requirements

fixes #370
I've added a base PasswordRequirements class to contain the password options as constants which can then be referenced where needed through the application.
I've linked the RegisterViewModel in the Register action as this was missing previously and added a string to the model which uses the PasswordRequirements generated user friendly string to give password guidance. Hopefully this then allow easier changes to these settings in the future without having to remember to make multiple changes to annotations etc if this is used.
I've also applied this on the reset password model and view as well.
It's my first go at contributing a pull request and hoping this is correct + the code makes sense!

Hi Steve,
Thanks and congrats on your first PR!
I don't think this aligns exactly with where we want to go on this (I think we were looking for text on the page, and if moving towards supporting changes more easily, we would have preferred a config approach).
That said, your contributions are valued, and we need more like them for this project to exist. I have a couple of suggestions on how to move this branch forward and would like to offer some time to work with you to make it happen. Would you be interested in doing some pair-programming on this?

Also...we won't close this PR, we can keep adding commits to it to get it where we like, if you'd like to continue (not sure if you knew we could do that or not). Hope to chat soon!

Hi James. No problem. Understand I went off at a bit of a tangent here. I'd like to continue and your offer of some time to work through it is much appreciated. I don't want to hold things up though if this is needed to move things forward. If we can find time to get this done right I'm certainly up for that.

@stevejgordon Let's set up for next Saturday...what timezone are you in? Can you reach out to me via twitter or email?

@MisterJames I've just sent an updated email about this Saturday.

I'm going to close this and submit a fresh PR with a clean branch.


Any plans for TridentNet ?

Thanks for amazing work!
Maybe TridentNet is the most accurate two-stage object detection algorithm so far, it is implemented in simpledet, which is a mxnet based framework and only supports coco dataset.
A student is trying to translate TridentNet into Pytorch, which is in a-new-scale-aware-loss-.

No recent plan for that, and community contribution is welcome.
If you are just looking for a high-performance method, you may also have a try for Hybrid Task Cascade.

Thanks for your reply^_^


[Instagram] Fix extraction when logged in

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through contributing guidelines including yt-dlp coding conventions
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[x] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.
Fixes https://github.com/yt-dlp/yt-dlp/issues/2435
Note: uploader_id is changed from username to numeric internal id/pk and username is moved to channel

https://github.com/yt-dlp/yt-dlp/issues/2547


Report memory usage and correct CPU percentage in heartbeat messages

I am picking up the work related to #165 an will be splitting it out into smaller more digestible PRs as requested.
The CPU percent change is to bring the stats in line with CPU utilization numbers as reported by tools like top. Usually CPU percentage isn't normalized by CPU count, but it is allowed to exceed 100% if it is loading across multiple cores.

The CPU percentage is intentionally normalized by CPU count, to match the behavior of locust. Do you think we need to change this?

I can switch it back. If locust normalizes it by default I think that is a mistake that can lead to confusion, but that confusion may be less than the confusion that comes from diverging from normal locust behavior.
In either case I didn't make any changes to the commits I cherry picked in from the previous PR so I'm not specifically attached to the design change as long as we get things reporting good enough numbers. I'll normalize the percentage by CPU count tomorrow when I get in to work.

Because locust can't make use of multiple cores with gevent, so the CPU percentage collected by locust won't go beyond 100% most of the time.

I have reverted the CPU usage change.


GeoIP MaxMind DB support

It is possible to use it with angie?

Hi,
It's possible to use 'angie-module-geoip2' module with MaxMind GeoIP2 Databases:
https://angie.software/install/#dynamic-modules
https://www.maxmind.com/en/geoip2-databases


reddit module

use django-th-ansible to bootstrap the module from the skelton django-th-ansible, then use reddit api
then, info to collect:

is oauth used (v1 or v2 ) ??
is there any date that permits to grab only the data we need ?

if yes :
in the model Reddit, a subreddit field should be enough for a beginning.

made a Wiki page as "a Box of Ideas" https://github.com/foxmask/django-th/wiki/Modules-To-Do

Okay, I'll pick up this one. Please label it as hacktoberfest.
I'll try to check it out by tomorrow. 👍

Brave!

Hi,
We should get the title when just the url is posted or the title and the content of the post when it's not just an url that is shared

Ho my god, my posted has been truncated

Hi,
We need to test that the Oauth workflow is triggered to get the precious token that will be used all along the exchange the the API.
once the token is grab the reddit.com, we store it in UserService for the current user and for the ServiceReddit.
As with reddit we can create posts or share links.
So I think that the data we can get from Reddit is Link or Post (we have to have a look at the api to see what is provided for that)
the read_data will allow us to get the data. I hope that with the API we could spot if it"s just a normal post (with a title and a content) or a post to share just a link. (with no content)
the save_data will allow us to create a post to share link or not. To know if we post a share link or a complet post with title and content, it's the role of the ServiceReddit omdel where I imagine we just need to add a boolean field "share_link".
Then  in the ConsumerForm we will just need to add this field. When the user tick the boolean field, then the data that save_data will handle will be just to create post with link. Otherwise , a normal post.
If i'm not clear just tell me I will show you example.
Regards
the save_data

i'm going to make a summary of how the project work :) that could be fine to see how things communicate with each others.

did that https://blog.trigger-happy.eu/pages/TriggerHappy.pdf
hope this could be helpful

I've updated my PR. Review please.

For the moment I dont close the issue because the API is blocking during posting ...

Found the correct scope to be able to create post.


Need for Developer Authenticated Identities?

I am struggling to understand the need for creating your own backend authentication system because it seems to me that cognito by itself handles signing up and signing in functionality by itself. For example in the Cognito Your User Pool Example it seems that this handles all sign in/ sign up functionality without a secondary authorization process. Is this correct? Any insight into this would be much appreciated. Thanks.

developer authenticated identities is different from cognito user pools. You can use one or the other. If you use cognito user pools then you dont need to create your own backend authentication system.


[ALLUXIO-2426] Consolidate SetAndRestore with Rules

https://alluxio.atlassian.net/browse/ALLUXIO-2426
A follow up PR of https://github.com/Alluxio/alluxio/pull/4817 to consolidate SetAndRestore with Rules to simplify the code

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13872/
Test PASSed.

@jsimsa after a few attempts, I still keep the code largely as my original structure instead of having two instance methods toRule() and a toResource(). This is the reason and I am happy to take your suggestion:
This is the code before the change of this PR:
@Rule
public SystemPropertyRule mDisableHdfsCacheRule =
      new SystemPropertyRule("fs.hdfs.impl.disable.cache", "true");

This will be the correct pattern to code if we have toRule and toResource methods, so far so good.
@Rule
public TestRule mDisableHdfsCacheRule =
      new SetAndRestoreSystemProperty("fs.hdfs.impl.disable.cache", "true").toRule();

The problem is this code will also pass the compile time build:
@Rule
public SetAndRestoreSystemProperty sDisableHdfsCacheRule =
      new SetAndRestoreSystemProperty("fs.hdfs.impl.disable.cache", "true");

And it will only fail in test time.
So I feel this can be confusing since @Rule annotation provides no type-safety check. I would rather make SetAndRestoreSystemProperty a qualified TestRule so user could always use it directly with @Rule, rather than require users to make one more convert.
What do you think?

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/14077/
Test PASSed.

Merged build finished. Test PASSed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/14078/Failed Tests: 1org.alluxio:alluxio-tests: 1alluxio.master.file.ConcurrentFileSystemMasterTest.rootConcurrentRename
Test FAILed.

Jenkins, test this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/14082/
Test PASSed.


absent_score

🚀 Feature
Motivation
In previous versions of torchmetrics I was using absent_score=1.0, now I don't see this parameter anymore.
Considering a case like:
preds = torch.ones((10,))
y = torch.ones((10,))
metric = torchmetrics.JaccardIndex(task="multiclass", num_classes=3)
metric_noavg = torchmetrics.JaccardIndex(task="multiclass", num_classes=3, average="none")
print(metric(preds, y))
print(metric_noavg(preds, y))
tensor(0.3333)
tensor([0., 1., 0.])

It seems wrong to me not to have 100% scoring when the model correctly predicts 100% of the instances. I have many cases where in a segmentation task I don't have all the classes and I think the scoring on these images is confusing.
Pitch
I would like or to have back the absent_score parameter or to have a behavior where if the model is 100% right the score is 1.

preds = torch.ones((10,))
y = torch.ones((10,))
metric = torchmetrics.JaccardIndex(task="multiclass", num_classes=3)
metric_noavg = torchmetrics.JaccardIndex(task="multiclass", num_classes=3, average="none")
print(metric(preds, y))
print(metric_noavg(preds, y))
tensor(0.3333)
tensor([0., 1., 0.])

Thanks for the answer @SkafteNicki !
I think micro is a more natural extension of the binary case for the reason already mentioned and for consistency:
preds = torch.ones((10,))
y = torch.ones((10,))
metric_binary = torchmetrics.JaccardIndex(task="binary")
metric_multiclass_macro = torchmetrics.JaccardIndex(task="multiclass", num_classes=2)
metric_multiclass_micro = torchmetrics.JaccardIndex(task="multiclass", num_classes=2, average="micro")
print(metric_binary(preds, y))
print(metric_multiclass_macro(preds, y))
print(metric_multiclass_micro(preds, y))
tensor(1.)
tensor(0.5000)
tensor(1.)

binary and multiclass when num_classes=2 should be equivalent (at least in the default setting), what do you think?

@mnslarcher until v0.10 the default for average was actually "micro" however, we often encountered that users was complaining about the scores being the same for accuracy, precision, recall e.g.:
from torchmetrics.classification import MulticlassAccuracy, MulticlassRecall, MulticlassPrecision
from torchmetrics import MetricCollection
import torch
metrics = MetricCollection(
  MulticlassAccuracy(num_classes=2, average='micro'),
  MulticlassRecall(num_classes=2, average='micro'),
  MulticlassPrecision(num_classes=2, average='micro')
)
metrics(torch.randint(2, (20,)), torch.randint(2, (20,)))
# prints
# {'MulticlassAccuracy': tensor(0.3500),
#  'MulticlassRecall': tensor(0.3500),
#  'MulticlassPrecision': tensor(0.3500)}

which is correct as the scores collapse to the same definition under the average="micro" reduction. For that reason we changed the default to "macro" in v0.10, which does not have this "problem", but still have other problems (as you are describing). Thus, again there is really no right way to do it. sklearn goes around the problem by forcing you to set the average argument yourself in the multiclass case, which I do not think is the solution for torchmetrics.
I am thinking to keep the default "macro" for the moment. If more users report that it is confusing, then we can reconsider what the default should be.

Thanks for the answer @SkafteNicki ! Let's see what other users think then, maybe in the meantime it would be helpful to make this more explicit in the doc if not forcing the user to choose like in sklearn

@SkafteNicki :
I notice that micro is not equivalent of macro + absent_score=1.0 (so is not an alternative for absent_score that is still useful and I would set to 1.0 by default).
In particular micro is not good for an imbalanced problem where macro + absent_score=1.0 is OK and it has the good properties already written above.
For example (I use accuracy just because is easier to interpret):
from torchmetrics import Accuracy
import torch

pred = torch.zeros(1000)
target = torch.zeros(1000)
target[:10] = 1

acc_none = Accuracy(task="multiclass", num_classes=3, average="none")
acc_macro = Accuracy(task="multiclass", num_classes=3, average="macro")
acc_micro = Accuracy(task="multiclass", num_classes=3, average="micro")
# acc_macro_absent_score = JaccardIndex(task="multiclass", num_classes=3, average="macro", absent_score=1.0)

print(acc_none(pred, target))
print(acc_macro(pred, target))
print(acc_micro(pred, target))
# print(acc_macro_absent_score(pred, target))

# none
tensor([1., 0., 0.])

# macro
# The model is penalized for the absence of a class in the target
tensor(0.3333)

# micro
# too much weight to the highest frequency class
tensor(0.9900)

# macro + absent_score=1.0
# assigns the model a score of 100% for the absent class that did not predict (correctly)
# don't "overweight" the highest frequency class
# tensor(0.6333).

So the request is, can we have the absent_score back (possibly set to 1.0 by default)?


Activating extension saviorisdead.RustyCode failed: spawn EACCES

For some time now, I can't get this extension to work. It worked very well a few weeks ago, but something broke (either with racer, vscode, or my machine).
Looking at the developer tools, I see a bunch of  errors like this:
[Plugin Host] Activating extension `saviorisdead.RustyCode` failed: spawn EACCES.
(anonymous function) @ //Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:90

sometimes followed by:
Here is the error stack:  Error: spawn EACCES
    at exports._errnoException (util.js:837:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at Object.exports.spawn (child_process.js:351:9)
    at SuggestService.start (/Users/pascal/.vscode-insiders/extensions/saviorisdead.RustyCode-0.11.0/out/src/services/suggestService.js:45:31)
    at activate (/Users/pascal/.vscode-insiders/extensions/saviorisdead.RustyCode-0.11.0/out/src/extension.js:15:57)
    at Function.t._callActivateOptional (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:14:10092)
    at Function.t._callActivate (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:14:9877)
    at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:14:9749
    at Object.p [as _notify] (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:5:11249)
    at Object.__dirname.undefined.L.enter (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/pluginHostProcess.js:5:14411)

I'm unsure what spawn EACCES wants to tell me.
My settings are
"rust.rustLangSrcPath": "/Users/pascal/Projekte/rust-bitrust/rust/src",
"rust.racerPath": "/Users/pascal/.multirust/toolchains/nightly/cargo/bin"

and vscode can definitely access both racer and the rust sources:
$ ls -lah `which racer`
-rwxr-xr-x  1 pascal  staff   4.1M Mar  7 13:35 /Users/pascal/.multirust/toolchains/nightly/cargo/bin/racer
$ ls -lah /Users/pascal/Projekte/rust-bitrust/rust/ | grep src
drwxr-xr-x  65 pascal  staff   2.2K Mar  1 10:50 src

I'm using OS X 10.11.3 and have tested with Visual Studio Code Version 0.10.10-insider (as well as 0.10.9). I just reinstalled racer after multirust update, so I have racer 1.2.6 and rustc 1.9.0-nightly (998a6720b 2016-03-07).

rust.racerPath must point to racer executable.

Damn, of course I didn't try that. I'm pretty sure I moved racer (I didn't install it with cargo install previously) and messed this up.
The setting is kinda weirdly named, by the way. It didn't occur to me to put the trailing racer in. Maybe call it "pathToRacer" instead? But, well, it doesn't really matter. Don't make such a large breaking change just because of me.


Adding pandas dependency for lesson4-collab

Cell #3 won't run without import

I think maybe you have an out of date fastai? pandas is already part of what's imported.


liftrqumulo release

https://github.com/Azure/sdk-release-request/issues/3544

/azp run prepare-pipelines


Enhancement/will/bug submit

Add bug submission, which will backup the file to ok server, and try to copy the URL to the ok submission into the clipboard. If failed, print the URL in a new line to make copying it easier.

Just to be clear, is this cp method just to save students from selecting the url and copying it manually? It seems like a lot of work (and perhaps introduces dangerous things) for something that doesn't save students that much work.

@brianhou Yes, cp is only for copying the URL. The idea came up during the staff meeting where we tried to come up with something like bug-submit so we can better help to debug the students' code.

After some discussion, I think we decided to not do copy pasting since it seems too difficult to do right for not a huge improvement. @20015jjw - I'll message you with a discussion of an alternative that you could implement.


Add podman support

Add podman image source, enabling podman:<image> parsing
Add podman image provider, enabling tarball extraction from the podman ~via it's varlink api~

podman's libpod uses CGO: https://github.com/containers/podman/blob/main/libpod/lock/shm/shm_lock.go#L5

Another way to support podman is through a docker client. Podman is docker-compatible making docker podman-compatible :)
A docker client can use podman to work, however it needs an ssh tunnel. Syft looks for DOCKER_HOST while setting its docker client.
The process looks like: Syft --> Docker client --> podman daemon --> image pull.
Proof of dockerCLI<-->podman compatibility:
// start podman daemon AND make sure docker daemon is not running
$ podman machine start

// check its connection port
$ podman system connection ls
Name                         Identity                                  URI
podman-machine-default*      /Users/user/.ssh/podman-machine-default  ssh://core@localhost:[PORT]/run/user/1000/podman/podman.sock
podman-machine-default-root  /Users/user/.ssh/podman-machine-default  ssh://root@localhost:[PORT]/run/podman/podman.sock

// make a tunnel to podman socket
$ ssh -nNT -L/tmp/podman.sock:/run/user/1000/podman/podman.sock -i ~/.ssh/podman-machine-default ssh://core@localhost:[PORT]

// on another terminal
$ export DOCKER_HOST=unix:///tmp/podman.sock
$ docker version // server should be a podman engine

// explicitly tell syft to use docker daemon
$ syft docker:alpine:latest -vv
...
[0000] DEBUG image: source=DockerDaemon location=alpine:latest from-lib=stereoscope
...

I am not sure why the tunnel is necessary since the socket file is in the same file system of the host. Also dropping the tunnel reduces complexity.

[1]
Podman uses a tunnel to handle communication with its daemon. That is why the tunnel above was necessary, and why for stereoscope to talk to podman we should have a param to pass an ssh key.
[1] - https://www.redhat.com/sysadmin/podman-clients-macos-windows

Docker client has an option to customize the ssh call made during each request:
			if sshKeyPath := os.Getenv("PODMAN_SSH_KEY_PATH"); sshKeyPath != "" {
				helper, err = connhelper.GetCommandConnectionHelper("ssh", "-i", sshKeyPath, "-l", "core", "-p", "63753", "--", "localhost")

error:
~/code/stereoscope/examples(main ✗) go run basic.go docker:alpine:latest -vv
DEBU[0000] image: source=DockerDaemon location=alpine:latest
panic: unable to inspect existing image: error during connect: Get "http://docker/v1.24/images/alpine:latest/json": net/http: HTTP/1.x transport connection broken: malformed HTTP status code "CoreOS"

goroutine 1 [running]:
main.main()
        stereoscope/examples/basic.go:29 +0x5f3
exit status 2

That connection worked, however http client is hitting the wrong address, if I can fix we are one step closer to integrating podman via the golang docker cli

Code changes available on https://github.com/jonasagx/stereoscope/

We'll set this aside for the time being, but we'll come back to it before too long!


fix(blog): outdated links and examples in "Falco on Kind"

What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area blog
What this PR does / why we need it:
Just some old links and examples that need to be fixed in the "Falco on Kind with Prometheus and Grafana" blog post.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

LGTM label has been added.  Git tree hash: 77b0fb00e4fb8ff9b419ac35e9577b361c6f4861

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: leodido
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [leodido]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Primary functionalities

Changes made in this PR

React app initialised.
Building blocks are set as re-usable components.
React Router is used for the app's navigation.
HTML content is dynamically loaded.
BookList component is created to show the list of all books with a several buttons (no functionality yet).
Book component is created to display a single book and it's been reused in BookList for displaying all books.
BookForm component is created for adding new books (no functionality yet).
Categories component is created to dynamically load another page which displays only Check Status button.
Styling is not done.

Changes made after first review

Returned form component from BookForm


feat(platform): Adding EKS platform in generic experiments

Signed-off-by: shubhamchaudhary<EMAIL_ADDRESS>
What this PR does / why we need it:

Adding EKS platform in generic experiments

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Checklist

[ ] Does this PR have a corresponding GitHub issue?
[ ] Have you included relevant README for the chaoslib/experiment with details?
[ ] Have you added debug messages where necessary?
[ ] Have you added task comments where necessary?
[ ] Have you tested the changes for possible failure conditions?
[ ] Have you provided the positive & negative test logs for the litmusbook execution?
[ ] Does the litmusbook ensure idempotency of cluster state?, i.e., is cluster restored to original state?
[ ] Have you used non-shell/command modules for Kubernetes tasks?
[ ] Have you (jinja) templatized custom scripts that is run by the litmusbook, if any?
[ ] Have you (jinja) templatized Kubernetes deployment manifests used by the litmusbook, if any?
[ ] Have you reused/created util functions instead of repeating tasks in the litmusbook?
[ ] Do the artifacts follow the appropriate directory structure?
[ ] Have you isolated storage (eg: OpenEBS) specific implementations, checks?
[ ] Have you isolated platform (eg: baremetal kubeadm/openshift/aws/gcloud) specific implementations, checks?
[ ] Are the ansible facts well defined? Is the scope explicitly set for playbook & included utils?
[ ] Have you ensured minimum/careful usage of shell utilities (awk, grep, sed, cut, xargs etc.,)?
[ ] Can the limtusbook be executed both from within & outside a container (configurable paths, no hardcode)?
[ ] Can you suggest the minimal resource requirements for the litmusbook execution?
[ ] Does the litmusbook job artifact carry comments/default options/range for the ENV tunables?
[ ] Has the litmusbooks been linted?

Special notes for your reviewer:

Logs node memory hog
2020-03-15 10:47:02.408281 ************ BRACE YOURSELF, EXPERIMENT BEGINS! ************

2020-03-15 10:47:03.055679 Step: Gathering Facts
task path: /experiments/generic/node_memory_hog/node_memory_hog_ansible_logic.yml:2
META: ran handlers

2020-03-15 10:47:03.425861 Step: Identify the chaos util to be invoked
task path: /experiments/generic/node_memory_hog/node_memory_hog_ansible_prerequisites.yml:1
details => {"changed": true, "checksum": "05311cb7e309713865c76d348dc9ad466dc28e52", "dest": "./chaosutil.yml", "gid": 0, "group": "root", "md5sum": "b2c1b1fb739f6064f372fbe57fbc3af2", "mode": "0644", "owner": "root", "size": 66, "src": "/root/.ansible/tmp/ansible-tmp-1584269223.09-157598750293109/source", "state": "file", "uid": 0}

2020-03-15 10:47:03.486735 Step: include_vars
task path: /experiments/generic/node_memory_hog/node_memory_hog_ansible_logic.yml:25
details => {"ansible_facts": {"c_util": "/chaoslib/litmus/platform/gke/node_memory_consumption.yml"}, "ansible_included_var_files": ["/experiments/generic/node_memory_hog/chaosutil.yml"], "changed": false}

2020-03-15 10:47:03.548974 Step: Construct chaos result name (experiment_name)
task path: /experiments/generic/node_memory_hog/node_memory_hog_ansible_logic.yml:29
details => {"ansible_facts": {"c_result": "engine2-node-memory-hog"}, "changed": false}
included: /utils/runtime/update_chaos_result_resource.yml for <IP_ADDRESS>

2020-03-15 10:47:03.803971 Step: Generate the chaos result CR to reflect SOT (Start of Test)
task path: /utils/runtime/update_chaos_result_resource.yml:3
details => {"changed": true, "checksum": "5b21b222437cf01ebcfaa1ee2da1bac18e23ff40", "dest": "/utils/runtime/chaos-result.yml", "gid": 0, "group": "root", "md5sum": "c82241ee11869627de0201503badcc54", "mode": "0644", "owner": "root", "size": 316, "src": "/root/.ansible/tmp/ansible-tmp-1584269223.64-247748851059427/source", "state": "file", "uid": 0}

2020-03-15 10:47:04.362153 Step: Apply the chaos result CR
task path: /utils/runtime/update_chaos_result_resource.yml:13
details => {"changed": true, "cmd": "kubectl apply -f /utils/runtime/chaos-result.yml -n shubham", "delta": "0:00:00.352688", "end": "2020-03-15 10:47:04.343300", "failed_when_result": false, "rc": 0, "start": "2020-03-15 10:47:03.990612", "stderr": "", "stderr_lines": [], "stdout": "chaosresult.litmuschaos.io/engine2-node-memory-hog configured", "stdout_lines": ["chaosresult.litmuschaos.io/engine2-node-memory-hog configured"]}
included: /utils/common/status_app_pod.yml for <IP_ADDRESS>

2020-03-15 10:47:04.672904 Step: Checking whether application pods are in running state
task path: /utils/common/status_app_pod.yml:2
details => {"attempts": 1, "changed": true, "cmd": "kubectl get pods -n shubham -l run=nginx -o custom-columns=:.status.phase --no-headers", "delta": "0:00:00.104122", "end": "2020-03-15 10:47:04.654148", "rc": 0, "start": "2020-03-15 10:47:04.550026", "stderr": "", "stderr_lines": [], "stdout": "Running", "stdout_lines": ["Running"]}

2020-03-15 10:47:04.904121 Step: Get the container status of application.
task path: /utils/common/status_app_pod.yml:9
details => {"attempts": 1, "changed": true, "cmd": "kubectl get pod -n shubham -l run=nginx --no-headers -o jsonpath='{.items[*].status.containerStatuses[*].ready}' | tr ' ' '\\n' | uniq", "delta": "0:00:00.108003", "end": "2020-03-15 10:47:04.886261", "rc": 0, "start": "2020-03-15 10:47:04.778258", "stderr": "", "stderr_lines": [], "stdout": "true", "stdout_lines": ["true"]}
included: /utils/common/generate-kubernetes-chaos-events.yml for <IP_ADDRESS>

2020-03-15 10:47:05.160641 Step: Obtain the date in ISO8601 format
task path: /utils/common/generate-kubernetes-chaos-events.yml:1
details => {"changed": true, "cmd": "date --iso-8601=seconds", "delta": "0:00:00.030277", "end": "2020-03-15 10:47:05.145469", "rc": 0, "start": "2020-03-15 10:47:05.115192", "stderr": "", "stderr_lines": [], "stdout": "2020-03-15T10:47:05+00:00", "stdout_lines": ["2020-03-15T10:47:05+00:00"]}

2020-03-15 10:47:05.198593 Step: set_fact
task path: /utils/common/generate-kubernetes-chaos-events.yml:5
details => {"ansible_facts": {"ts": "2020-03-15T10:47:05Z"}, "changed": false}

2020-03-15 10:47:05.797186 Step: Create an test event on the chaosengine
task path: /utils/common/generate-kubernetes-chaos-events.yml:8
details => {"changed": true, "method": "patch", "result": {"apiVersion": "v1", "count": 1, "eventTime": null, "firstTimestamp": "2020-03-15T10:47:05Z", "involvedObject": {"apiVersion": "litmuschaos.io/v1alpha1", "kind": "ChaosEngine", "name": "engine2", "namespace": "shubham", "uid": "45655ce4-66aa-11ea-bfd0-02229b3e7eec"}, "kind": "Event", "lastTimestamp": "2020-03-15T10:18:30Z", "message": "AUT is Running successfully", "metadata": {"creationTimestamp": "2020-03-15T09:47:27Z", "name": "event-\"PreChaosCheck\"", "namespace": "shubham", "resourceVersion": "159496", "selfLink": "/api/v1/namespaces/shubham/events/event-%22PreChaosCheck%22", "uid": "fabe43cf-66a1-11ea-957e-0a797003d228"}, "reason": "PreChaosCheck", "reportingComponent": "", "reportingInstance": "", "source": {"component": "node-memory-hog-kgxvjm-d7jvg"}, "type": "Normal"}}
included: /chaoslib/litmus/platform/gke/node_memory_consumption.yml for <IP_ADDRESS>

2020-03-15 10:47:06.413550 Step: Getting the pre-chaos application pod name
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:4
details => {"changed": false, "resources": [{"apiVersion": "v1", "kind": "Pod", "metadata": {"annotations": {"kubernetes.io/psp": "eks.privileged"}, "creationTimestamp": "2020-03-14T10:10:24Z", "generateName": "nginx-6546cd7545-", "labels": {"pod-template-hash": "6546cd7545", "run": "nginx"}, "name": "nginx-6546cd7545-8xqtr", "namespace": "shubham", "ownerReferences": [{"apiVersion": "apps/v1", "blockOwnerDeletion": true, "controller": true, "kind": "ReplicaSet", "name": "nginx-6546cd7545", "uid": "054b2601-65dc-11ea-bfd0-02229b3e7eec"}], "resourceVersion": "3598", "selfLink": "/api/v1/namespaces/shubham/pods/nginx-6546cd7545-8xqtr", "uid": "054d21c2-65dc-11ea-bfd0-02229b3e7eec"}, "spec": {"containers": [{"image": "nginx:latest", "imagePullPolicy": "Always", "name": "nginx", "ports": [{"containerPort": 80, "protocol": "TCP"}], "resources": {"limits": {"ephemeral-storage": "4Gi"}, "requests": {"ephemeral-storage": "2Gi"}}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "volumeMounts": [{"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", "name": "default-token-xtrtq", "readOnly": true}]}], "dnsPolicy": "ClusterFirst", "enableServiceLinks": true, "nodeName": "ip-192-168-164-65.ap-south-1.compute.internal", "priority": 0, "restartPolicy": "Always", "schedulerName": "default-scheduler", "securityContext": {}, "serviceAccount": "default", "serviceAccountName": "default", "terminationGracePeriodSeconds": 30, "tolerations": [{"effect": "NoExecute", "key": "node.kubernetes.io/not-ready", "operator": "Exists", "tolerationSeconds": 300}, {"effect": "NoExecute", "key": "node.kubernetes.io/unreachable", "operator": "Exists", "tolerationSeconds": 300}], "volumes": [{"name": "default-token-xtrtq", "secret": {"defaultMode": 420, "secretName": "default-token-xtrtq"}}]}, "status": {"conditions": [{"lastProbeTime": null, "lastTransitionTime": "2020-03-14T10:10:24Z", "status": "True", "type": "Initialized"}, {"lastProbeTime": null, "lastTransitionTime": "2020-03-14T10:10:32Z", "status": "True", "type": "Ready"}, {"lastProbeTime": null, "lastTransitionTime": "2020-03-14T10:10:32Z", "status": "True", "type": "ContainersReady"}, {"lastProbeTime": null, "lastTransitionTime": "2020-03-14T10:10:24Z", "status": "True", "type": "PodScheduled"}], "containerStatuses": [{"containerID": "docker://f519c761f868839e5748831e3852370ae82a7f51924eeb5fe3c059381cf95dfa", "image": "nginx:latest", "imageID": "docker-pullable://nginx@sha256:2539d4344dd18e1df02be842ffc435f8e1f699cfc55516e2cf2cb16b7a9aea0b", "lastState": {}, "name": "nginx", "ready": true, "restartCount": 0, "state": {"running": {"startedAt": "2020-03-14T10:10:32Z"}}}], "hostIP": "<IP_ADDRESS>", "phase": "Running", "podIP": "<IP_ADDRESS>", "qosClass": "BestEffort", "startTime": "2020-03-14T10:10:24Z"}}]}

2020-03-15 10:47:06.458535 Step: Recording the node name of application pod
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:12
details => {"ansible_facts": {"node_name": "ip-192-168-164-65.ap-south-1.compute.internal"}, "changed": false}

2020-03-15 10:47:06.616449 Step: Generate a run id if not passed from the engine/experiment
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:17
details => {"changed": true, "cmd": "echo $(mktemp) | cut -d '.' -f 2 | cut -c -6", "delta": "0:00:00.031584", "end": "2020-03-15 10:47:06.600371", "rc": 0, "start": "2020-03-15 10:47:06.568787", "stderr": "", "stderr_lines": [], "stdout": "3CLF3e", "stdout_lines": ["3CLF3e"]}

2020-03-15 10:47:06.657517 Step: set_fact
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:21
details => {"ansible_facts": {"run_id": "3clf3e"}, "changed": false}
included: /utils/common/generate-kubernetes-chaos-events.yml for <IP_ADDRESS>

2020-03-15 10:47:06.849138 Step: Obtain the date in ISO8601 format
task path: /utils/common/generate-kubernetes-chaos-events.yml:1
details => {"changed": true, "cmd": "date --iso-8601=seconds", "delta": "0:00:00.030521", "end": "2020-03-15 10:47:06.833923", "rc": 0, "start": "2020-03-15 10:47:06.803402", "stderr": "", "stderr_lines": [], "stdout": "2020-03-15T10:47:06+00:00", "stdout_lines": ["2020-03-15T10:47:06+00:00"]}

2020-03-15 10:47:06.885767 Step: set_fact
task path: /utils/common/generate-kubernetes-chaos-events.yml:5
details => {"ansible_facts": {"ts": "2020-03-15T10:47:06Z"}, "changed": false}

2020-03-15 10:47:07.388489 Step: Create an test event on the chaosengine
task path: /utils/common/generate-kubernetes-chaos-events.yml:8
details => {"changed": true, "method": "patch", "result": {"apiVersion": "v1", "count": 1, "eventTime": null, "firstTimestamp": "2020-03-15T10:47:06Z", "involvedObject": {"apiVersion": "litmuschaos.io/v1alpha1", "kind": "ChaosEngine", "name": "engine2", "namespace": "shubham", "uid": "45655ce4-66aa-11ea-bfd0-02229b3e7eec"}, "kind": "Event", "lastTimestamp": "2020-03-15T10:18:32Z", "message": "Injecting node-memory-hog chaos on ip-192-168-164-65.ap-south-1.compute.internal node", "metadata": {"creationTimestamp": "2020-03-15T09:47:28Z", "name": "event-\"ChaosInject\"", "namespace": "shubham", "resourceVersion": "159499", "selfLink": "/api/v1/namespaces/shubham/events/event-%22ChaosInject%22", "uid": "fbb85515-66a1-11ea-bfd0-02229b3e7eec"}, "reason": "ChaosInject", "reportingComponent": "", "reportingInstance": "", "source": {"component": "node-memory-hog-kgxvjm-d7jvg"}, "type": "Normal"}}

2020-03-15 10:47:07.601291 Step: Patch the engine uid
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:35
details => {"changed": true, "checksum": "976b8352b29035ad21af00134f873732efb64582", "dest": "/chaoslib/litmus/platform/gke/node-memory-hog-job.yml", "gid": 0, "group": "root", "md5sum": "aeda2c3ed56ee498d35343a6be8a7821", "mode": "0644", "owner": "root", "size": 593, "src": "/root/.ansible/tmp/ansible-tmp-1584269227.43-158521368813210/source", "state": "file", "uid": 0}

2020-03-15 10:47:08.112654 Step: Creating Job for memory-hog
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:49
details => {"changed": true, "method": "create", "result": {"apiVersion": "batch/v1", "kind": "Job", "metadata": {"creationTimestamp": "2020-03-15T10:47:08Z", "labels": {"app": "memory-hog", "chaosUID": "45655ce4-66aa-11ea-bfd0-02229b3e7eec"}, "name": "node-memory-hog-3clf3e", "namespace": "shubham", "resourceVersion": "159500", "selfLink": "/apis/batch/v1/namespaces/shubham/jobs/node-memory-hog-3clf3e", "uid": "512dd28a-66aa-11ea-bfd0-02229b3e7eec"}, "spec": {"backoffLimit": 6, "completions": 1, "parallelism": 1, "selector": {"matchLabels": {"controller-uid": "512dd28a-66aa-11ea-bfd0-02229b3e7eec"}}, "template": {"metadata": {"creationTimestamp": null, "labels": {"app": "memory-hog", "chaosUID": "45655ce4-66aa-11ea-bfd0-02229b3e7eec", "controller-uid": "512dd28a-66aa-11ea-bfd0-02229b3e7eec", "job-name": "node-memory-hog-3clf3e"}}, "spec": {"containers": [{"args": ["--vm", "1", "--vm-bytes", "90%", "-t", "120s"], "image": "alexeiled/stress-ng:latest", "imagePullPolicy": "Always", "name": "memory-hog", "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File"}], "dnsPolicy": "ClusterFirst", "nodeSelector": {"kubernetes.io/hostname": "ip-192-168-164-65.ap-south-1.compute.internal"}, "restartPolicy": "Never", "schedulerName": "default-scheduler", "securityContext": {}, "terminationGracePeriodSeconds": 30}}}, "status": {}}}
FAILED - RETRYING: Checking the status of Job (180 retries left).
 [WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ job_pod |
json_query('resources[0].status.phase') == 'Succeeded' }}
FAILED - RETRYING: Checking the status of Job (179 retries left).
FAILED - RETRYING: Checking the status of Job (178 retries left).
FAILED - RETRYING: Checking the status of Job (177 retries left).
FAILED - RETRYING: Checking the status of Job (176 retries left).
FAILED - RETRYING: Checking the status of Job (175 retries left).
FAILED - RETRYING: Checking the status of Job (174 retries left).
FAILED - RETRYING: Checking the status of Job (173 retries left).
FAILED - RETRYING: Checking the status of Job (172 retries left).
FAILED - RETRYING: Checking the status of Job (171 retries left).
FAILED - RETRYING: Checking the status of Job (170 retries left).
FAILED - RETRYING: Checking the status of Job (169 retries left).
FAILED - RETRYING: Checking the status of Job (168 retries left).
FAILED - RETRYING: Checking the status of Job (167 retries left).
FAILED - RETRYING: Checking the status of Job (166 retries left).
FAILED - RETRYING: Checking the status of Job (165 retries left).
FAILED - RETRYING: Checking the status of Job (164 retries left).
FAILED - RETRYING: Checking the status of Job (163 retries left).
FAILED - RETRYING: Checking the status of Job (162 retries left).
FAILED - RETRYING: Checking the status of Job (161 retries left).
FAILED - RETRYING: Checking the status of Job (160 retries left).
FAILED - RETRYING: Checking the status of Job (159 retries left).
FAILED - RETRYING: Checking the status of Job (158 retries left).
FAILED - RETRYING: Checking the status of Job (157 retries left).
FAILED - RETRYING: Checking the status of Job (156 retries left).
FAILED - RETRYING: Checking the status of Job (155 retries left).
FAILED - RETRYING: Checking the status of Job (154 retries left).
FAILED - RETRYING: Checking the status of Job (153 retries left).
FAILED - RETRYING: Checking the status of Job (152 retries left).
FAILED - RETRYING: Checking the status of Job (151 retries left).
FAILED - RETRYING: Checking the status of Job (150 retries left).
FAILED - RETRYING: Checking the status of Job (149 retries left).
FAILED - RETRYING: Checking the status of Job (148 retries left).
FAILED - RETRYING: Checking the status of Job (147 retries left).
FAILED - RETRYING: Checking the status of Job (146 retries left).
FAILED - RETRYING: Checking the status of Job (145 retries left).
FAILED - RETRYING: Checking the status of Job (144 retries left).
FAILED - RETRYING: Checking the status of Job (143 retries left).
FAILED - RETRYING: Checking the status of Job (142 retries left).
FAILED - RETRYING: Checking the status of Job (141 retries left).
FAILED - RETRYING: Checking the status of Job (140 retries left).
FAILED - RETRYING: Checking the status of Job (139 retries left).
FAILED - RETRYING: Checking the status of Job (138 retries left).
FAILED - RETRYING: Checking the status of Job (137 retries left).
FAILED - RETRYING: Checking the status of Job (136 retries left).
FAILED - RETRYING: Checking the status of Job (135 retries left).
FAILED - RETRYING: Checking the status of Job (134 retries left).
FAILED - RETRYING: Checking the status of Job (133 retries left).
FAILED - RETRYING: Checking the status of Job (132 retries left).
FAILED - RETRYING: Checking the status of Job (131 retries left).
FAILED - RETRYING: Checking the status of Job (130 retries left).
FAILED - RETRYING: Checking the status of Job (129 retries left).
FAILED - RETRYING: Checking the status of Job (128 retries left).
FAILED - RETRYING: Checking the status of Job (127 retries left).
FAILED - RETRYING: Checking the status of Job (126 retries left).
FAILED - RETRYING: Checking the status of Job (125 retries left).
FAILED - RETRYING: Checking the status of Job (124 retries left).
FAILED - RETRYING: Checking the status of Job (123 retries left).
FAILED - RETRYING: Checking the status of Job (122 retries left).
FAILED - RETRYING: Checking the status of Job (121 retries left).
FAILED - RETRYING: Checking the status of Job (120 retries left).
FAILED - RETRYING: Checking the status of Job (119 retries left).
FAILED - RETRYING: Checking the status of Job (118 retries left).
FAILED - RETRYING: Checking the status of Job (117 retries left).
FAILED - RETRYING: Checking the status of Job (116 retries left).
FAILED - RETRYING: Checking the status of Job (115 retries left).
FAILED - RETRYING: Checking the status of Job (114 retries left).
FAILED - RETRYING: Checking the status of Job (113 retries left).
FAILED - RETRYING: Checking the status of Job (112 retries left).
FAILED - RETRYING: Checking the status of Job (111 retries left).
FAILED - RETRYING: Checking the status of Job (110 retries left).
FAILED - RETRYING: Checking the status of Job (109 retries left).
FAILED - RETRYING: Checking the status of Job (108 retries left).
FAILED - RETRYING: Checking the status of Job (107 retries left).
FAILED - RETRYING: Checking the status of Job (106 retries left).

2020-03-15 10:49:13.301286 Step: Checking the status of Job
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:57
details => {"attempts": 76, "changed": false, "resources": [{"apiVersion": "v1", "kind": "Pod", "metadata": {"annotations": {"kubernetes.io/psp": "eks.privileged"}, "creationTimestamp": "2020-03-15T10:47:08Z", "generateName": "node-memory-hog-3clf3e-", "labels": {"app": "memory-hog", "chaosUID": "45655ce4-66aa-11ea-bfd0-02229b3e7eec", "controller-uid": "512dd28a-66aa-11ea-bfd0-02229b3e7eec", "job-name": "node-memory-hog-3clf3e"}, "name": "node-memory-hog-3clf3e-2jb27", "namespace": "shubham", "ownerReferences": [{"apiVersion": "batch/v1", "blockOwnerDeletion": true, "controller": true, "kind": "Job", "name": "node-memory-hog-3clf3e", "uid": "512dd28a-66aa-11ea-bfd0-02229b3e7eec"}], "resourceVersion": "159756", "selfLink": "/api/v1/namespaces/shubham/pods/node-memory-hog-3clf3e-2jb27", "uid": "512ea15a-66aa-11ea-bfd0-02229b3e7eec"}, "spec": {"containers": [{"args": ["--vm", "1", "--vm-bytes", "90%", "-t", "120s"], "image": "alexeiled/stress-ng:latest", "imagePullPolicy": "Always", "name": "memory-hog", "resources": {}, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "volumeMounts": [{"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount", "name": "default-token-xtrtq", "readOnly": true}]}], "dnsPolicy": "ClusterFirst", "enableServiceLinks": true, "nodeName": "ip-192-168-164-65.ap-south-1.compute.internal", "nodeSelector": {"kubernetes.io/hostname": "ip-192-168-164-65.ap-south-1.compute.internal"}, "priority": 0, "restartPolicy": "Never", "schedulerName": "default-scheduler", "securityContext": {}, "serviceAccount": "default", "serviceAccountName": "default", "terminationGracePeriodSeconds": 30, "tolerations": [{"effect": "NoExecute", "key": "node.kubernetes.io/not-ready", "operator": "Exists", "tolerationSeconds": 300}, {"effect": "NoExecute", "key": "node.kubernetes.io/unreachable", "operator": "Exists", "tolerationSeconds": 300}], "volumes": [{"name": "default-token-xtrtq", "secret": {"defaultMode": 420, "secretName": "default-token-xtrtq"}}]}, "status": {"conditions": [{"lastProbeTime": null, "lastTransitionTime": "2020-03-15T10:47:08Z", "reason": "PodCompleted", "status": "True", "type": "Initialized"}, {"lastProbeTime": null, "lastTransitionTime": "2020-03-15T10:49:12Z", "reason": "PodCompleted", "status": "False", "type": "Ready"}, {"lastProbeTime": null, "lastTransitionTime": "2020-03-15T10:49:12Z", "reason": "PodCompleted", "status": "False", "type": "ContainersReady"}, {"lastProbeTime": null, "lastTransitionTime": "2020-03-15T10:47:08Z", "status": "True", "type": "PodScheduled"}], "containerStatuses": [{"containerID": "docker://b5f6e75aa04a7f3279547eafb5c146637b5d371f7b3c004f486bffaf8b09bc68", "image": "alexeiled/stress-ng:latest", "imageID": "docker-pullable://alexeiled/stress-ng@sha256:51adb68b679b6ec424729482d9a0c6fe8eb74a5c030a854f96e5dc14122d99c7", "lastState": {}, "name": "memory-hog", "ready": false, "restartCount": 0, "state": {"terminated": {"containerID": "docker://b5f6e75aa04a7f3279547eafb5c146637b5d371f7b3c004f486bffaf8b09bc68", "exitCode": 0, "finishedAt": "2020-03-15T10:49:11Z", "reason": "Completed", "startedAt": "2020-03-15T10:47:11Z"}}}], "hostIP": "<IP_ADDRESS>", "phase": "Succeeded", "podIP": "<IP_ADDRESS>", "qosClass": "BestEffort", "startTime": "2020-03-15T10:47:08Z"}}]}

2020-03-15 10:49:13.561984 Step: Getting the pod logs
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:69
details => {"changed": true, "cmd": "kubectl logs node-memory-hog-3clf3e-2jb27 -n shubham", "delta": "0:00:00.120859", "end": "2020-03-15 10:49:13.547783", "rc": 0, "start": "2020-03-15 10:49:13.426924", "stderr": "", "stderr_lines": [], "stdout": "stress-ng: info:  [1] dispatching hogs: 1 vm\nstress-ng: info:  [1] successful run completed in 120.09s (2 mins, 0.09 secs)", "stdout_lines": ["stress-ng: info:  [1] dispatching hogs: 1 vm", "stress-ng: info:  [1] successful run completed in 120.09s (2 mins, 0.09 secs)"]}

2020-03-15 10:49:13.818253 Step: Getting the node status
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:80
details => {"changed": true, "cmd": "kubectl get nodes ip-192-168-164-65.ap-south-1.compute.internal | awk '{print $2}' | tail -n1", "delta": "0:00:00.105241", "end": "2020-03-15 10:49:13.802392", "rc": 0, "start": "2020-03-15 10:49:13.697151", "stderr": "", "stderr_lines": [], "stdout": "Ready", "stdout_lines": ["Ready"]}

2020-03-15 10:49:14.061879 Step: Deleting the Memory Hog Job
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:85
details => {"changed": true, "cmd": "kubectl delete -f /chaoslib/litmus/platform/gke/node-memory-hog-job.yml -n shubham", "delta": "0:00:00.117715", "end": "2020-03-15 10:49:14.046567", "rc": 0, "start": "2020-03-15 10:49:13.928852", "stderr": "", "stderr_lines": [], "stdout": "job.batch \"node-memory-hog-3clf3e\" deleted", "stdout_lines": ["job.batch \"node-memory-hog-3clf3e\" deleted"]}

2020-03-15 10:49:14.543328 Step: Confirm that the Memory Hog Job is deleted successfully
task path: /chaoslib/litmus/platform/gke/node_memory_consumption.yml:91
details => {"attempts": 1, "changed": false, "resources": []}
included: /utils/common/status_app_pod.yml for <IP_ADDRESS>

2020-03-15 10:49:14.815551 Step: Checking whether application pods are in running state
task path: /utils/common/status_app_pod.yml:2
details => {"attempts": 1, "changed": true, "cmd": "kubectl get pods -n shubham -l run=nginx -o custom-columns=:.status.phase --no-headers", "delta": "0:00:00.104039", "end": "2020-03-15 10:49:14.796486", "rc": 0, "start": "2020-03-15 10:49:14.692447", "stderr": "", "stderr_lines": [], "stdout": "Running", "stdout_lines": ["Running"]}

2020-03-15 10:49:15.058036 Step: Get the container status of application.
task path: /utils/common/status_app_pod.yml:9
details => {"attempts": 1, "changed": true, "cmd": "kubectl get pod -n shubham -l run=nginx --no-headers -o jsonpath='{.items[*].status.containerStatuses[*].ready}' | tr ' ' '\\n' | uniq", "delta": "0:00:00.108752", "end": "2020-03-15 10:49:15.038925", "rc": 0, "start": "2020-03-15 10:49:14.930173", "stderr": "", "stderr_lines": [], "stdout": "true", "stdout_lines": ["true"]}
included: /utils/common/generate-kubernetes-chaos-events.yml for <IP_ADDRESS>

2020-03-15 10:49:15.336873 Step: Obtain the date in ISO8601 format
task path: /utils/common/generate-kubernetes-chaos-events.yml:1
details => {"changed": true, "cmd": "date --iso-8601=seconds", "delta": "0:00:00.030783", "end": "2020-03-15 10:49:15.321289", "rc": 0, "start": "2020-03-15 10:49:15.290506", "stderr": "", "stderr_lines": [], "stdout": "2020-03-15T10:49:15+00:00", "stdout_lines": ["2020-03-15T10:49:15+00:00"]}

2020-03-15 10:49:15.385708 Step: set_fact
task path: /utils/common/generate-kubernetes-chaos-events.yml:5
details => {"ansible_facts": {"ts": "2020-03-15T10:49:15Z"}, "changed": false}

2020-03-15 10:49:15.883554 Step: Create an test event on the chaosengine
task path: /utils/common/generate-kubernetes-chaos-events.yml:8
details => {"changed": true, "method": "patch", "result": {"apiVersion": "v1", "count": 1, "eventTime": null, "firstTimestamp": "2020-03-15T10:49:15Z", "involvedObject": {"apiVersion": "litmuschaos.io/v1alpha1", "kind": "ChaosEngine", "name": "engine2", "namespace": "shubham", "uid": "45655ce4-66aa-11ea-bfd0-02229b3e7eec"}, "kind": "Event", "lastTimestamp": "2020-03-15T10:20:40Z", "message": "AUT is Running successfully", "metadata": {"creationTimestamp": "2020-03-15T09:49:36Z", "name": "event-\"PostChaosCheck\"", "namespace": "shubham", "resourceVersion": "159771", "selfLink": "/api/v1/namespaces/shubham/events/event-%22PostChaosCheck%22", "uid": "482693db-66a2-11ea-bfd0-02229b3e7eec"}, "reason": "PostChaosCheck", "reportingComponent": "", "reportingInstance": "", "source": {"component": "node-memory-hog-kgxvjm-d7jvg"}, "type": "Normal"}}

2020-03-15 10:49:15.924208 Step: set_fact
task path: /experiments/generic/node_memory_hog/node_memory_hog_ansible_logic.yml:144
details => {"ansible_facts": {"flag": "Pass"}, "changed": false}
included: /utils/runtime/getting_failure_step.yml for <IP_ADDRESS>

2020-03-15 10:49:16.162285 Step: Record the name of failed step
task path: /utils/runtime/getting_failure_step.yml:43
details => {"ansible_facts": {"failStep": "N/A"}, "changed": false}
included: /utils/common/generate-kubernetes-chaos-events.yml for <IP_ADDRESS>

2020-03-15 10:49:16.357973 Step: Obtain the date in ISO8601 format
task path: /utils/common/generate-kubernetes-chaos-events.yml:1
details => {"changed": true, "cmd": "date --iso-8601=seconds", "delta": "0:00:00.030208", "end": "2020-03-15 10:49:16.342369", "rc": 0, "start": "2020-03-15 10:49:16.312161", "stderr": "", "stderr_lines": [], "stdout": "2020-03-15T10:49:16+00:00", "stdout_lines": ["2020-03-15T10:49:16+00:00"]}

2020-03-15 10:49:16.412794 Step: set_fact
task path: /utils/common/generate-kubernetes-chaos-events.yml:5
details => {"ansible_facts": {"ts": "2020-03-15T10:49:16Z"}, "changed": false}

2020-03-15 10:49:16.912479 Step: Create an test event on the chaosengine
task path: /utils/common/generate-kubernetes-chaos-events.yml:8
details => {"changed": true, "method": "patch", "result": {"apiVersion": "v1", "count": 1, "eventTime": null, "firstTimestamp": "2020-03-15T10:49:16Z", "involvedObject": {"apiVersion": "litmuschaos.io/v1alpha1", "kind": "ChaosEngine", "name": "engine2", "namespace": "shubham", "uid": "45655ce4-66aa-11ea-bfd0-02229b3e7eec"}, "kind": "Event", "lastTimestamp": "2020-03-15T10:20:41Z", "message": "node-memory-hog Experiment Passed!", "metadata": {"creationTimestamp": "2020-03-15T09:49:37Z", "name": "event-\"Summary\"", "namespace": "shubham", "resourceVersion": "159772", "selfLink": "/api/v1/namespaces/shubham/events/event-%22Summary%22", "uid": "48c521ed-66a2-11ea-bfd0-02229b3e7eec"}, "reason": "Summary", "reportingComponent": "", "reportingInstance": "", "source": {"component": "node-memory-hog-kgxvjm-d7jvg"}, "type": "Normal"}}
included: /utils/runtime/update_chaos_result_resource.yml for <IP_ADDRESS>

2020-03-15 10:49:17.243322 Step: Update the chaos result CR to reflect EOT (End of Test)
task path: /utils/runtime/update_chaos_result_resource.yml:23
details => {"changed": true, "checksum": "8bbd6318f5ee57191ec10cadac133741f6fe69e7", "dest": "/utils/runtime/chaos-result.yml", "gid": 0, "group": "root", "md5sum": "7d610ecabb22bb47857821befc3941fc", "mode": "0644", "owner": "root", "size": 333, "src": "/root/.ansible/tmp/ansible-tmp-1584269357.04-269874459921805/source", "state": "file", "uid": 0}

2020-03-15 10:49:17.617016 Step: Apply the chaos result CR
task path: /utils/runtime/update_chaos_result_resource.yml:33
details => {"changed": true, "cmd": "kubectl apply -f /utils/runtime/chaos-result.yml -n shubham", "delta": "0:00:00.230058", "end": "2020-03-15 10:49:17.599311", "failed_when_result": false, "rc": 0, "start": "2020-03-15 10:49:17.369253", "stderr": "", "stderr_lines": [], "stdout": "chaosresult.litmuschaos.io/engine2-node-memory-hog configured", "stdout_lines": ["chaosresult.litmuschaos.io/engine2-node-memory-hog configured"]}
META: ran handlers
META: ran handlers

2020-03-15 10:49:17.622592 ************ RELAX, EXPERIMENT ENDS! ************
<IP_ADDRESS>                  : ok=47   changed=23   unreachable=0    failed=0


sinon and sinon-chai should be listed as dependencies (webpack compilation error)

I tried using this plugin and on my first run, I got this:
Oops...we found an error preparing this test file:

  cypress/support/index.js

The error was:

Error: Webpack Compilation Error
./node_modules/cypress-fail-on-console-error/dist/index.js
Module not found: Error: Can't resolve 'sinon' in '.../node_modules/cypress-fail-on-console-error/dist'
resolve 'sinon' in '.../node_modules/cypress-fail-on-console-error/dist'
  Parsed request is a module

If your plugin requires sinon to run, it should be listed as a dependency, not a dev dependency.
After fixing that (by adding sinon to my package.json), I got the same error for sinon-chai. Both packages should be dependencies if they're required at runtime.

fixed with version 2.0.4:
https://github.com/nils-hoyer/cypress-fail-on-console-error/releases/tag/2.0.4
commit hash: https://github.com/nils-hoyer/cypress-fail-on-console-error/commit/8c8425bef1e0c885b0885a66ea9b6362e0a19ca0


view jx 3.x boot jobs in the UI nicely

so you can view the installation of Jenkins X 3.x from scratch via octant

its mostly working now - other than the Manual Retrigger doesn't work

/hold

lets see how the kuberhealthy installation view looks

we can now at least view boot jobs in the admin UI


[26.x][WFLY-16120] Upgrade Agroal to 1.15

Fixes https://issues.redhat.com/browse/WFLY-16120
Upstream
https://github.com/wildfly/wildfly/pull/15288
https://github.com/wildfly/wildfly/pull/15097

The errors are related to a missing JPMS module. It's fixed in JBoss Modules 2.0.2. This PR can only be merged after https://github.com/wildfly/wildfly-core/pull/4987


feat(VBMS): SEC-1698 Add dependabot config 🤖

https://brandingbrand.atlassian.net/browse/SEC-1698

We don't manage any code in this repo directly anymore -- we use shipit to port code from shipyard onto this repo.


WIP: Create Helm charts deployment

Signed-off-by: Ilya Lobkov<EMAIL_ADDRESS>
Description
Add initial supporting of Helm
Motivation and Context
According to issue https://github.com/networkservicemesh/networkservicemesh/issues/747
Types of changes

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

@lobkovilya can you please check #830 and see with @ivanayov how these two can be aligned so we don't double the work?

@lobkovilya can you please add the description in this PR as a MarkDown in docs?


React and React-Dom versions

Hi. Why is React @alpha and React-Dom 16.7? Referring to react-dom here and react here.
Is it possible to override the versions set by react-static?
I would like to use hooks, but as far as I'm aware both react and react-dom need to be 16.7@next

Using @numso solution with forced resolutions worked like a charm. I don't feel 100% 'comfortable' with it, but it works.


JavaScript setup asks me to replace nonexistent variable

After adding a JavaScript logger, I get this:

It looks like the code was copy/pasted from somewhere, and that comment needs to be removed because the replacement was already done.

Hey, thanks for pointing this out! It's committed to the code base, and should go live soon!


Parameter not defined

Excuse me! I have been reading this paper of yours recently, and I am very interested in your experimental content.But I have a question.
The get_video_from_video_info in utils.py file is not defined. What should it be?
Hope to get your answer!Thanks!

Excuse me! I have been reading this paper of yours recently, and I am very interested in your experimental content.But I have a question.
The get_video_from_video_info in utils.py file is not defined. What should it be?
Hope to get your answer!Thanks!

Hi zyw,

Excuse me! I have been reading this paper of yours recently, and I am very interested in your experimental content.But I have a question.
The get_video_from_video_info in utils.py file is not defined. What should it be?
Hope to get your answer!Thanks!

Hi zyw,

Excuse me! I have been reading this paper of yours recently, and I am very interested in your experimental content.But I have a question.
The get_video_from_video_info in utils.py file is not defined. What should it be?
Hope to get your answer!Thanks!

Hi zyw,
Thanks for your interest.  Factually, only the 'get_video_fusion_from_video_info_rgb_depth_object' function defined in the utils.py is used.  You can just ignore the 'get_video_from_video_info'.


Ignore messages for assert, panic, and unreachable macros

Description of changes:
We've had a myriad of issues related to the processing of messages for the assert, panic, and unreachable macros using the format_args macro. The purpose of using format_args in an unreachable (if false) block was to make sure the args are checked for errors/warnings. However, the usage of format_args caused Kani to fail to compile crates that use assert and panic in const contexts (e.g. https://github.com/time-rs/time/blob/4c13327d5fed8571316b181e828067fc54038e05/time/src/lib.rs#L362). Fixing this would require using a macro that has the following properties:

It processes the format args and checks for errors
It can be used in a const context
It is not overridden by Kani

We're unaware of a macro that satisfies those 3 properties. The format_args macro seems to be on its way to be usable in const contexts as the error message indicates:
error: `std::fmt::Arguments::<'a>::new_v1` is not yet stable as a const fn
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/time-0.3.17/src/lib.rs:356:5
    |
356 |     panic!("{}", message)
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add `#![feature(const_fmt_arguments_new)]` to the crate attributes to enable
    = note: this error originates in the macro `format_args` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)

so in the meantime, we've decided to drop the processing of arguments. This may cause Kani to not produce compile-time errors in some cases.
Resolved issues:
Resolves #1586
Related RFC:

Optional #ISSUE-NUMBER.
Call-outs:

This PR will reintroduce two issues that were previously addressed by processing the messages using the format_args macro:

#803
#1556

Testing:

How is this change tested?

Is this a refactor change?

Checklist

[x] Each commit message has a non-empty body, explaining why the change was made
[x] Methods or procedures are documented
[x] Regression or unit tests are included, or existing tests cover the modified code
[x] My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Didn't we talk about updating the documentation?

Added.

We should also mention that we don't invoke the fmt() function of the arguments, since they could introduce some bad behavior or side effect.

Can you clarify what you mean?

I found a way to make #1918 work fully, so might abandon this PR!

Closing in favor of #1918.


Bug on Regression Test 942210-31

https://github.com/coreruleset/coreruleset/blob/34e672c337498334201b1632c80529af6d25403b/tests/regression/tests/REQUEST-942-APPLICATION-ATTACK-SQLI/942210.yaml#L518-L534
the payload after transformation function should be:
pay=1 OR 2+

it should match the 942210 rule regex on ARGS_NAMES, but the test has the output:
no_log_contains: id "942210"

is it a bug or am I missing something here?
PHP get the body as:
Array
(
    [pay=1_OR_2+] =>
)

You're right, that is weird. I quickly checked the regex and it should match...

Modsec is doing something wrong while URL decoding. I tested with this rule:
# This condition is here only to filter my reuqest to a specific host
SecRule SERVER_NAME "@streq example.com" \
    "id:100,\
    phase:1,\
    pass,\
    t:none,\
    logdata:'Matched Data: %{MATCHED_VAR} found within %{MATCHED_VAR_NAME}',\
    chain"
    SecRule ARGS_NAMES "@unconditionalMatch" "t:none,t:urlDecodeUni"

Request:
curl -v http://example.com/?pay%3D1+OR+2%2B
...
> GET /?pay%3D1+OR+2%2B HTTP/1.1
...

Access log:
... "GET /?pay%3D1+OR+2%2B HTTP/1.1" 200 526 "-" "curl/7.81.0" 19
And this was logged by modsec:
Matched Data: pay=1 OR 2  found within ARGS_NAMES:pay=1 OR 2+
Seems like it was URL decoded twice.

What ModSec version?

Apache/2.9.6

This is really strange.

I actually don't see the issue. What is the output you expect?

@theseion Rule 942210 matches payload from test above with data pay=1_OR_2+ but test is still using no_log_contains . It passes (rule 942210 is not triggered) because modsec seems to urldecodeing payload twice into pay=1_OR_2  (which doesn't trigger the rule 942210).

Right. So the issue is the terminating +, which is converted to a space when t:urlDecodeUni is executed. Removing t:urlDecodeUni from the rule makes the test fail, which is what it should do, as you correctly point out. The output condition for the test is wrong. This change also affects test 41 (decoded payload: pay=AND+value+=+').
Do you all agree that the t:urlDecodeUni appears to be the culprit? That transformation has been there since the move to Git at least. The only downside I can see is that only args would be URI decoded automatically, while cookies etc. wouldn't. However, I think it's safe to say that if values were URI encoded, then the would need to decode them for an attack payload to become active, so I think the responsibility would lie with the application.

@theseion But it is strange that + at the end is removed. Why is it removed? This is the data which modsec receives:
pay%3D1+OR+2%2B
URL decode should transform it into this:
pay=1 OR 2+
Another, second, URL decode should create this:
pay=1 OR 2
And, as you can see in my logs, modsec seems to URL decode it also without t:urlDecodeUni:
Matched Data: pay=1 OR 2  found within ARGS_NAMES:pay=1 OR 2+

ModSecurity decodes all arguments by default, that's pass one. From that you would get pay=1 OR 2 +. Then, t:urlDecodeUni does the second pass and converts + to  . So from my point of view it does exactly what the rule tells it to.

Are you referring to the output maybe? I would be careful with interpreting the output in logs verbatim. I know for a fact that ModSecurity does some conversions sometimes.

Didn't know modsec is automatically URL decoding ARGS and ARGS_NAMES, found this in the docs for t:urlDecode:
The transformation function should not be used against variables that have already been URL-decoded (such as request parameters) unless it is your intention to perform URL decoding twice!
So we really should remove t:urlDecode and t:urlDecodeUni from rule 942210 and lots of other rules in this case. We probably don't wnat to URL decode ARGS and ARGS_NAMES twice.

In fact, by doing URL decode twice, we are potentially opening lots of holes in the firewall - like the one in the test above, we are simply not detecting such payload (and, for example, any other payload which contains a + sign).

Can I help with resolving this, are is this now on good tracks?

I'm trying to get other stuff done at the moment, so yes, would be great if you would take it. First thing we need, I believe, is a list of affected rules.

I was thinking what will happen if we remove t:urlDecode(uni) as our regexes are counting with it. Hope our regression tests are going to catch any different behaviour.

Unfortunately, this problem is really big. I sent one PR which is related and will send another one (after the first is merged). Then i will post more info and propose a solution.

Same problem is with test 942210-44.


add new eventbrite service

References #1790
Adding an Eventbrite service.
The reason for this is that the public API for Eventbrite doesn't allow us to get the sold_out information.
The plan is to have the secrets as ENV vars, and then somehow to ECS to inject them at container start.
In the future, I can see this being useful for having Prismic create the Eventbrite events, cutting down on the content' team's work considerably.
GET /eventbrite/events/:id/ticket_classes =>
{
	"tickets": [{
			"onSaleStatus": "unavailable",
			"ticketType": "standard"
		},
		{
			"onSaleStatus": "unavailable",
			"ticketType": "waitinglist"
		},
		{
			"onSaleStatus": "unavailable",
			"ticketType": "comp"
		}
	]
}

@wellcometrust/experience-dev out of WIP.
Next up
Terraform / Build / Deploy

The URIs are not great, but I am just mimicking EB for consistency.
Maybe if this service expands, we can make it a little nicer.


error C3861: 'assert': identifier not found

Trying to compile with cmake, vscode and visual studio 2022, I get this error message:
error C3861: 'assert': identifier not found.
know any quick fix? thanks

For any reason this was solved after I integrated vcpkg with cmake
-DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg/scripts/buildsystems/vcpkg.cmake


Improve saved_model.load.get_config

This PR makes two minor, nonfunctional improvements to the saved_model.load.get_config function:

it’s easier to ask for forgiveness than permission:
Idiomatic python: It's better to catch the exception of the exceptional case, rather than checking if the attribute exists beforehand. more on this
Error description:
The NotImplementedError now describes two likely root causes of the problem.

Also opened this in the tensorflow repo, before noticing this probably belongs here:
https://github.com/tensorflow/tensorflow/pull/53457

@MiWeiss Can you please check @fchollet's comments and keep us posted ? Thanks!

As indicated by @fchollet, this is missing an adaption the test which checks for the raised exception to also check for the new message, which should be reasonable quick.
However, it appears that not only there is no such test, but moreover the file keras.saving.saved_model has no test class yet. At the moment, I do not have sufficient spare time to familiarize myself enough with saved_model internals to set up such a class, Thus, @fchollet @gbaned feel free to close or keep open as you prefer.


Not beeing able to get scope vars, neither hovering over the vars brings a tooltip

Hey, just installed node-inspector and launched a session via node-debug.
First I noticed, that the script is automatically stopped at the beginning and I have to resume the app manually.

So if I resume everything works fine. If I stop then, there is nothing listed in the "scope" tab and I can't hover over my vars in the source tab.

But, the scope tab was filled with my vars before I initially resumed the app.
Am I missing anything?
Or is that an issue?
node v5

Thought I've added a breakpoint, but I didn't. Issue done.


add .dockerignore from operator-sdk

operater-sdk generates a .dockerignore file that looks like this:
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/

We should start with this.

Fixed as part of #219


request to add blush command

add a blush command pls
I'll be grateful to you!
thanks.

If provided by nekos.life, no problem.


SW-4593 DO NOT MERGE: Enable planting season notifications

Remove the feature flag for notifications about scheduling planting seasons, which
will enable them in all environments.

Current dependencies on/for this PR:

main

PR #1573   👈

This stack of pull requests is managed by Graphite.

Putting this up as a PR so it's ready to go when we're ready to turn planting season scheduling on everywhere, but marking it as a draft so it doesn't get merged prematurely.

Superseded by #1615


CSS fix based on new layout/css changes from Google

Added #music-content selector to properly override new layout/css changes.

Bump :p


Fix for lime build won't read .build if git is present

This fixes issue #1409.

This change causes the following exception when I run lime rebuild tools:
Called from ? line 1
Called from CommandLineTools.hx line 1895
Called from CommandLineTools.hx line 22
Called from a C function
Called from CommandLineTools.hx line 390
Called from CommandLineTools.hx line 1888
Called from CommandLineTools.hx line 1250
Called from hxp/StringTools.hx line 457
Called from /usr/local/lib/haxe/std/StringTools.hx line 241
Uncaught exception - Invalid field access : length

The call to StringTools.startsWith() now fails when buildNumber is null.

I reverted this commit for now so that it doesn't prevent anyone from working on Lime.

I understand why this happens: if buildNumber is null, it can't be a string.
So the working code should first check if buildNumber is null (and nothing else).
Then, if it's null, should check for the .build file.
Then, if EITHER it's still null OR it's a string that starts with "git", should calculate the git build number.
The fix should not be about changing OR into AND (that was wrong) but about changing the order of the ifs
I'm preparing a PR with the fix.

Yeah, that sounds like the right way to do it to me.

Sounds good.
It's worth noting that git/svn users may have old .build files lying around, so we should mention this in the release notes. "If your build number changes unexpectedly, try removing the .build file from your output folder."


Remove selected Q from search dropdown

After a user has selected a question from the search dropdown menu, it should be removed from the list so they can't try selecting it again, which currently causes the system to get stuck.

I rather fixed the bug so the system is not stuck - #56.
We don't have the pageid of a question in the search results, so it would a bit more complicated to filter the search results, and I also like the behaviour that clicking on a search result moves existing question to the top (e.g. if I would have 20 questions open and want to navigate to that particular one when it catches my eye in search results)...


not isinstance() doesn't affect the detected type of a variable

 Environment data

Language Server version: 2022.1.4-pre.1
OS and version: win32 x64
Python version (and distribution if applicable, e.g. Anaconda): 3.10
python.analysis.indexing: null
python.analysis.typeCheckingMode: basic

 Expected behaviour
Type of an object property is detected when using not instance()
 Actual behaviour
Type of object property is not detected as the type specified in isinstance()
 Logs
Python Language Server Log
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] parsing: c:\Users\soput\Desktop\BHBot\main.py (295ms)
[FG] binding: c:\Users\soput\Desktop\BHBot\main.py (65ms)
Background analysis message: analyze
[BG(1)] analyzing: c:\Users\soput\Desktop\BHBot\launch.py ...
[BG(1)]   checking: c:\Users\soput\Desktop\BHBot\launch.py ...
[BG(1)]     parsing: c:\Users\soput\Desktop\BHBot\main.py (241ms)
[BG(1)]     binding: c:\Users\soput\Desktop\BHBot\main.py (98ms)
[BG(1)]   checking: c:\Users\soput\Desktop\BHBot\launch.py (452ms)
[BG(1)] analyzing: c:\Users\soput\Desktop\BHBot\launch.py (452ms)
Background analysis message: getDiagnosticsForRange
Background analysis message: getSemanticTokens delta
[BG(1)] getSemanticTokens delta previousResultId:1643246495652 at c:\Users\soput\Desktop\BHBot\main.py (4642ms)
[Info  - 7:22:20 PM] [BG(1)] Long operation: getSemanticTokens delta previousResultId:1643246495652 at c:\Users\soput\Desktop\BHBot\main.py (4642ms)
Background analysis message: resumeAnalysis
[BG(1)] analyzing: c:\Users\soput\Desktop\BHBot\main.py ...
[BG(1)]   checking: c:\Users\soput\Desktop\BHBot\main.py (424ms)
[BG(1)] analyzing: c:\Users\soput\Desktop\BHBot\main.py (424ms)
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: resumeAnalysis
[BG(1)] indexing: c:\Users\soput\Desktop\BHBot\main.py [found 137] (11ms)
Indexing Done: c:\Users\soput\Desktop\BHBot\main.py
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange

 Code Snippet / Additional information
if not isinstance(interaction.user, discord.User | discord.Member):
        return
# Still reports interaction.user could be User, Member, or None

https://gyazo.com/d95ef574f912ebfccb35c62a48d6dd0c

Thanks for filing the issue.
I'm not able to repro the problem because your sample references symbols like interaction and discord. Your comment also mentions None, but the code doesn't provide enough context for me to tell where that type comes from. If you can provide a self-contained, minimal example that exhibits the problem, I'll take a closer look.
Pylance does perform type narrowing for isinstance conditional expressions, but it requires knowledge of the types. If discord.User or discord.Member are unknown types or derive from unknown types, it will not be able to apply type narrowing in this case.
class A: ...
class B: ...

def func(x: A | B | None):
    if not isinstance(x, A | B):
        reveal_type(x) # None
    else:
        reveal_type(x) # A | B

I'm using the disnake library (as discord), I wrote up a small bot that should work fine, although it's a little hard to test due to the speed at which Discord syncs commands (not related to this issue).
import disnake as discord
from disnake.ext import commands

bot = commands.Bot(command_prefix=".")
@bot.slash_command(name="test")
async def test(interaction: discord.CommandInteraction):
    if not isinstance(interaction.user, discord.User | discord.Member):
        print(interaction.user.__class__)
        return await interaction.response.send_message("hi")
    print(interaction.user.__class__)
    return await interaction.response.send_message("hi2")

bot.run("token") # Replace token with a bot token

In this example though, the issue doesn't occur, only in my actual code. This isn't all of it, just the not isinstance() to the line where a warning occurs.
if not isinstance(interaction.user, discord.User | discord.Member):
    return
await interaction.response.defer()
if str(arg).isnumeric():
    try:
        cursor.execute("select * from cases where id=:iarg or rid like :sarg or rid=:sarg2 or did like :sarg or did=:sarg2 order by id DESC", {"iarg": int(arg), "sarg": "%|" + arg + "|%", "sarg2": "|" + arg})
        rows = cursor.fetchall()
        if rows.__len__() <= 0:
            embed = await create_embed("jd")
            embed.title = "BH JD Case Search"
            embed.description = "No results found"
            return await interaction.response.send_message(embed=embed, delete_after=15)
        def mcheck(msg: discord.Message):
            return msg.author.id == bot.user.id
        async def generatecase(index: int, originalmessage: discord.Message):
            mainview = view()
            close = closebutton()
            caseselect = None
            if rows.__len__() > 1:
                options = []
                optionindex = 0
                for rec in rows:
                    if rec[0] == rows[index][0]:
                        continue
                    options.append(discord.SelectOption(label=f"Low Case {rec[0]}", description=f"**STATUS: {rec[2]}**", value=str(optionindex)))
                    optionindex = sum((optionindex, 1))
                caseselect = casepageselect(options)
                mainview.add_item(caseselect)
            mainview.add_item(close)
            embed = await create_embed("jd")
            embed.title = f"Case ID: {str(rows[index][0])}"
            embed.description = f"[Requested by {interaction.user.mention}] | STATUS: {str(rows[index][2])}" # Warning about mention not being a valid member of None

The above is from my code, and all comes from a function. generatecase is called later on, but interaction.user shouldn't be detected as None, as it would've returned the command function this is all executing in if it were to be None, and so the code where the warning occurs would never execute if it was None.

The problem in the simplified sample is that the conditional check is located within another execution context (an inner function), and it's referencing captured variables in the outer scope. Type narrowing is applied only within a single scope.
It's effectively as though your code was like this:
async def hi(interaction: discord.CommandInteraction):
    if not isinstance(interaction.user, discord.User | discord.Member):
        return

async def test(interaction: discord.CommandInteraction):
    await hi(interaction)
    print(interaction.user.__class__)
    return await interaction.response.send_message("hi2")

In this case, I recommend that you add an assert statement after the await statement to tell the type checker about the assumption you are making.
assert isinstance(interaction.user, discord.User | discord.Member)

In any case, this is expected behavior for the type checker, not a bug.


global: add .gitignore to cookiecutter

closes #55
This should then be merged into v0.7.0 . I am treating https://github.com/inveniosoftware/invenio-cli/issues/121 as a bug and making the fixes go to the march release. A dependency problem also needed to be fixed anyway.

Coverage remained the same at ?% when pulling 127972d76bd3dc6cc5862d63ea5a4b05479370b2 on fenekku:ignore_cli_invenio_private into b09fa0fa65a39064919a379d7ad4f6dce692f636 on inveniosoftware:master.

Coverage remained the same at ?% when pulling 127972d76bd3dc6cc5862d63ea5a4b05479370b2 on fenekku:ignore_cli_invenio_private into b09fa0fa65a39064919a379d7ad4f6dce692f636 on inveniosoftware:master.


Adding Azure rules around security center

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: brandon-bailey-rc:x: brandon-baileyYou have signed the CLA already but the status is still pending? Let us recheck it.

Thanks @brandon-bailey


-bash error

RPi x 4
Buster
i have done sudo git clone and have made the my-cluster dir in the inventory. I have changed the host.ini and the all.yml.
I keep getting this. Super new to this stuff and do not know what i have done. thank you for your help.
-bash: ansible-playbook: command not found

This looks like more like local installation issue.
To use this you'll need to install ansible, so make sure that ansible is installed on the host where you want execute the playbooks from.


Enable interface as IPsec endpoint

Hi David,
I'm working with develop branch (I need netlinks).
Based on documentation, old l3fw module it was possible to enable interface as IPsec Endpoint with interfaces > enable_vpn option.
Using actual engine module, this option disappear.
How to enable IPsec endpoint using engine module?
(My engine does not have a classic default route but two or more Netlinks and an Outbound Multi Link.)
Best regards,
Sébastien B.

Hi David,
Do you had time to work on this feature?
Best regards,

Hi Sebastien,
I will have this feature and contact address available in the next couple of days. Will reply back once tested and posted.

Hi Sebastien,
I implemented this but due to some changes in v6.5.x will need to make some additional modifications for policy_vpn functionality. What version of SMC are you currently using?

Hi David,
I have both 6.4.5 and 6.5.1 for development tests, but I think end-customer is running 6.5.

Hi David,
Customer SMC is already in 6.5.1.

Hi sebasstien,
The latest develop branch resolves this issue. Here is an example:
- name: Firewall Template
  hosts: localhost
  gather_facts: no
  tasks:
  - name: Layer 3 FW template
    engine:
      smc_logging:
        level: 10
        path: ansible-smc.log
      antivirus: false
      bgp:
        enabled: false
        router_id: null
      default_nat: false
      enable_vpn:
      - <IP_ADDRESS>
      file_reputation: false
      interfaces:
      - interface_id: '0'
        interfaces:
        - nodes:
          - dynamic: true
            dynamic_index: 1
      - interface_id: '1'
        interfaces:
        - nodes:
          - address: <IP_ADDRESS>
            network_value: <IP_ADDRESS>/24
            nodeid: 1
      - interface_id: '2'
        interfaces:
        - nodes:
          - address: <IP_ADDRESS>
            network_value: <IP_ADDRESS>/24
            nodeid: 1
          vlan_id: '2'
      name: foofw
      ospf:
        enabled: false
        router_id: null
      primary_mgt: '1'
      type: single_fw

The docs have been updated also.
You can add the top level param enable_vpn as a list of IP addresses for which to enable VPN.

Hi David,
We work on it, I'll let you know.

Hi Sebastien,
Just checking back on whether you had a chance to verify this.
The contact address portion has been added to smc-python and updated on dev branch to conform to latest API. Changes for contact address in ansible are forthcoming.

Hi David,
Sorry for the delay.
It works fine for both static and dynamic interfaces (devel branch).
Thanks for your help !


Export other types used by TestScheduler in 'rxjs/testing'

RxJS version:
<EMAIL_ADDRESS>Code to reproduce:
import { Epic } from 'redux-observable';
import { TestScheduler } from 'rxjs/testing';
// This is BAD! Should be available in 'rxjs/testing' as part of TestScheduler interface
import { RunHelpers } from 'rxjs/internal/testing/TestScheduler';

export const testEpic = (epic: Epic, mockedDependencies: (helpers: RunHelpers) => object) => {
  const testScheduler = new TestScheduler((actual, expected) => {
    expect(actual).toEqual(expected);
  });
  testScheduler.run(helpers => {
    const deps = mockedDependencies(helpers);
    // ...
  });
};

Expected behavior:
'rxjs/testing' should have all types (in my case RunHelpers) used in public interface of TestScheduler, allowing to declare variable/parameter with this type.
Actual behavior:
'rxjs/testing' have only TestScheduler itself, if I want to declare RunHelpers in my code I need to import it from 'rxjs/internal/testing/TestScheduler' what is bad.
Additional information:
There are few workarounds, but none is perfect:

Importing from 'rxjs/internal/testing/TestScheduler' - importing from internal is always bad idea
Declaring RunHelpers in app - there are two different declarations which may eventually became inconsistent
Using following expression to pick RunHelpers from typeof TestScheduler.prototype.run:type RunHelpers = Parameters<Parameters<typeof TestScheduler.prototype.run>[0]>[0];

but it's complicated to understand and messed
passing TestScheduler instance instead of RunHelpers - but it introduces different interface than RunHelpers.

Closing per comment https://github.com/ReactiveX/rxjs/pull/5323#issuecomment-608262542

Closing per comment https://github.com/ReactiveX/rxjs/pull/5323#issuecomment-608262542