install hook failed: ModuleNotFoundError: No module named 'keystoneauth1'

cs:~canonical-bootstack/openstack-service-checks-11
unit-openstack-service-checks-0: 20:40:25 INFO unit.openstack-service-checks/0.juju-log Reactive main running for hook install
unit-openstack-service-checks-0: 20:40:26 ERROR unit.openstack-service-checks/0.juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-openstack-service-checks-0/.venv/lib/python3.6/site-packages/charms/reactive/init.py", line 70, in main
bus.discover()
File "/var/lib/juju/agents/unit-openstack-service-checks-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 424, in discover
_register_handlers_from_file(search_path, filepath)
File "/var/lib/juju/agents/unit-openstack-service-checks-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 454, in _register_handlers_from_file
_load_module(root, filepath)
File "/var/lib/juju/agents/unit-openstack-service-checks-0/.venv/lib/python3.6/site-packages/charms/reactive/bus.py", line 442, in _load_module
return importlib.import_module(package + module)
File "/var/lib/juju/agents/unit-openstack-service-checks-0/.venv/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "/var/lib/juju/agents/unit-openstack-service-checks-0/charm/reactive/service_checks.py", line 3, in
import keystoneauth1
ModuleNotFoundError: No module named 'keystoneauth1'
Unit logs: http://paste.ubuntu.com/p/2Chk5VYBbv/
For reference: no problem appeared when downgraded (e.g redeployed) the same charm on -9 version.

Imported from Launchpad using lp2gh.

date created: 2019-03-06T15:27:47Z

owner: vlgrevtsev

assignee: afreiberger

the launchpad url

(by afreiberger)
This was identified as a race-condition between layer-apt package install and the reactive handlers importing the keystoneauth1 module.  We've moved the installation of the pre-req apt packages into layer-basic in layer.yaml.
This has been fix-released as cs:~canonical-bootstack/openstack-service-checks-12.  Please test.


passing value to a field on saving

hello, how do i pass a value to a field in code without using a text field on the interface

search for getSaveEntity in issues


Tidy release package

Moved lib outside of the binary output (so it won't get packaged).
Removed redistributable installer from the package.
Added installing instructions in Readme.md

/atz run


Deflake nodeagent health check integration test

How to categorize this PR?

/area testing
/kind flake
What this PR does / why we need it:
Deflakes Node Agent Healthcheck controller tests.
We don't need to wait for the node.Status.Addresses to be empty, we are patching it to be empty. We just need to wait for it to be eventually re=populated.
Before:
❯ stress -p 32 ./test/integration/nodeagent/healthcheck/healthcheck.test --ginkgo.progress --ginkgo.show-node-events
...
30s: 39 runs so far, 4 failures (10.26%)
35s: 57 runs so far, 4 failures (7.02%)

After:
❯ stress -p 64 ./test/integration/nodeagent/healthcheck/healthcheck.test --ginkgo.progress --ginkgo.show-node-events
...
9m5s: 1829 runs so far, 0 failures
9m10s: 1851 runs so far, 0 failures
9m15s: 1868 runs so far, 0 failures

Which issue(s) this PR fixes:
https://prow.gardener.cloud/view/gs/gardener-prow/pr-logs/pull/gardener_gardener/8989/pull-gardener-integration/1739169070156091392
https://prow.gardener.cloud/view/gs/gardener-prow/pr-logs/pull/gardener_gardener/8989/pull-gardener-integration/1739148641521635328
https://prow.gardener.cloud/view/gs/gardener-prow/pr-logs/pull/gardener_gardener/8976/pull-gardener-integration/1738459207314706432
https://prow.gardener.cloud/view/gs/gardener-prow/pr-logs/pull/gardener_gardener/8989/pull-gardener-integration/1738130025422524416
https://prow.gardener.cloud/view/gs/gardener-prow/pr-logs/pull/gardener_gardener/8979/pull-gardener-integration/1738106648322379776
Special notes for your reviewer:
Introduced with https://github.com/gardener/gardener/pull/8786
/cc @majst01
Release note:

NONE

/retest

/retest

/retest

The flake is too frequent. Let's get this in.
/approve

Thanks @shafeeqes 😄


Add graphql support

https://github.com/aPureBase/KGraphQL
https://github.com/ExpediaGroup/graphql-kotlin/

KGraphQL looks pretty nice, but unfortunately it doesn't support subscription.
graphql-kotlin is used for the current GraphQL support.


G6 - Solution for Language Detector exercise (b9-pyp-g1)

G6
Amar
Delio

Your approach is very similar to ours... so, of course, I liked it! It was a good idea to use .lower() on word. I didn't think of that. Great formatting and comments. Good job.


updating doc with links for licenses

The experiance for new users is not very obvious as to where they will receive their license. I've included links for Download and Install to help the user find the information.  I will be adding another commit when I have fleshed out the various ways that users get the GHES license.

Why: As a Field Solution Engineer, our customers are having trouble figuring out where they can download their GHES licenses.

What's being changed: I am including some hyperlinks to our download, and install documentation for GHES, as well as a sentence around where they might be able to find their licenses depending on their situation.

Check off the following:

[ ] I have reviewed my changes in staging. (look for the deploy-to-heroku link in your pull request, then click View deployment)
[x] For content changes, I have reviewed the localization checklist
[x] For content changes, I have reviewed the Content style guide for GitHub Docs.

Thanks for opening a PR @Moose0621! Let me know when you're ready for a writer review ✨

Thanks for opening a PR @Moose0621! Let me know when you're ready for a writer review ✨

Thanks for opening a PR @Moose0621! Let me know when you're ready for a writer review ✨

@janiceilene I'm ready and could use some help, I updated the PR Comments as to the Why and What changed and looking forward to feedback around this!

Thanks for opening a PR @Moose0621! Let me know when you're ready for a writer review ✨

@janiceilene I'm ready and could use some help, I updated the PR Comments as to the Why and What changed and looking forward to feedback around this!

Pull req is tatics

It looks like our new action inadvertently closed this :upside_down_face: Sorry about that! Reopening and triaging this for review :yellow_heart:

Thanks for raising this PR @Moose0621 - I've made a few small tweaks, and will merge this once the checks have passed ✨


Increase usability of forget password link on login page

User Story
As a user I would like to see the password update/forget password link in a more prominant position on the login page.

Is the 'consent' message hard-coded or done via the wagtail admin (configured by staff)? Will the extra text always be below the 'forgot your password' message, and could it be configured in the wagtail admin?

Just tested, looks great! 🔥


Configure Azure Pipelines

This pipeline configuration builds the application and produces a build for the Release configuration.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: brunobee-bit sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


CommandPalette git clone crashes vscode

Issue Type: Bug
Hey,
first things first: awesome edoitor i ditched atom  ;)
after updating vscode to 1.26.0 today it crashes everytime i try to git clone a repository.
i invoke the palette and git clone and he asked me for the url.
normaly the next step is vscode asking for a location where to clone, unfortunally it crashes.
As suggested i tested with all extensions disabled crashes still.
the only other thing i did today was installing sshfs extension.
OS: Arch Linux
Installation Source: aur/visual-studio-code-bin 1.26.0-2 [installed] [699+] [33.95%] [14 Aug 2018]
VS Code version: Code 1.26.0 (4e9361845dc28659923a300945f84731393e210d, 2018-08-13T16:25:59.521Z)
OS version: Linux x64 4.17.14-arch1-1-ARCH

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz (4 x 2634)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: unavailable_softwarevideo_encode: unavailable_softwarewebgl: enabledwebgl2: enabled

Load (avg)
1, 1, 1

Memory (System)
15.58GB (10.75GB free)

Process Argv
/opt/visual-studio-code/code

Screen Reader
no

VM
0%

Extensions: none

i can also confirm a second installation where it happens and it seems the folder/open dialog causes the crash.
my second maschine is my private gamingrig (also arch) and i had vscode 1.25 installed. unfortunally i didn't tried it before the update to 1.26 but now trying to open a folder crashes vscode.

starting in a terminal session i got:
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Numix/16/status/image-missing.svg: Bildlader-Modul konnte nicht geladen werden: /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /opt/visual-studio-code/glibc/usr/lib/libc.so.6: version `GLIBC_2.28' not found (required by /usr/lib/libxml2.so.2) (gdk-pixbuf-error-quark, 5) Server response: <?xml version="1.0" encoding="UTF-8" Abgebrochen (Speicherabzug geschrieben)
sorry part i the message is in german ;)
maybe someone can give me a hint, maybe starting code with a static linked lib?
thx

@Jorval this could be an issue with our Electron version, can you try this build that uses a newer Electron version: https://az764295.vo.msecnd.net/exploration/e6caa88a0261e72c41c76ab2ff454b8763a19f73/code-exploration-1534224413.tar.gz

Duplicate of https://github.com/Microsoft/vscode/issues/55934


mitmdump: temporarily running out of diskspace corrupts dumpfile

Problem Description
ofcourse the world would be a better place if everybody always responsibly managed their filesystem space,
but we have to face that fact that mitmdump, as a non-interactive dumping tool, is often going to be the program that fills up the last available block on a filesystem.
currently it deals with that situation very badly:

it keeps running, and keeps trying to write to the file

which in part is good, because it will resume saving data when space becomes available again

the last flow it tried to write is left in the file half-written and truncated, which due to the length-prefixed data format leads to the file being corrupt and not loadable with the provided tools.

due to this situation i already learned more about the file format than i ever wanted to ;)
the key to recovering data in such a corrupted file is:
grep -oE --binary-files=text --byte-offset '[0-9]+:7:version;'

(and i wrote a script that automates the process)
but it would be better to fix this in mitmdump itself.
suggestions:

on a failed write, truncate the file back to it's previous length
on a failed write, exit with an error
maybe provide a tool to recover data from corrupted files

Steps to reproduce the behavior:
log more data than is good for you
System Information
any version i ever used

Good point - I think we should fail visibly and exit with an error on a failed write.
Optionally we can also consider checking shutil.disk_usage on top and exit at 99% disk usage already, that should make recovery much easier in many cases. This is not available on all platforms, but we can just ignore the check if we don't get any stats.

Is it good idea to show a warning when the filesystem is say 95% filled up?

@sw9719: that might make sense for interactive usage of mitmproxy,
but for a non-interactive program like mitmdump (which this ticket explicitly mentions), a warning (most likely ending up in some logfile) is unlikely to be noticed.
(also, with today's mult-terabyte size disks, demanding 5% free space is excessive. - maybe create a metric from the rate of the free space, divided by the amount data being logged/time-unit, in relation to the time-units the process is running for? ("you've been logging for six hours, and in two more hours, available space will be exceeded") - wonder where the balance between sensible and excessively complicated lies.)
but really... the only critical part of the issue (that makes mitmdump's behaviour a bug) is that mitmdump's ignoring of the error leads to corrupt files that cannot be read back, as mentioned in the original description.
any further improvements would at best be nice-to-haves on top.

Got it. For now, ill focus on exiting with an appropriate error.

Created PR for this.

i'm afraid what the code in #4888 does doesn't seem ready for production.
it does a fixed percentage diskspace check, which i argued against above,
and does that on every write (it seems), where it could also simply check if the write succeeds.
(fun sidenote: at that point you do know the exact amount of data to be written, and could compare that against available space.)
the root of the bug is that mitmdump will at some point call write(), which will return "no space left on device".
the bug is that that error return is ignored instead of being handled (typically programs print an error on exit).

So If I understand correctly, Detecting failure to write to disk and exiting gracefully should work right?

the baseline should be to not ignore the error and exit.
creating a warning in advance could be nice to have on top,
as also pointed out by mhils:

Optionally we can also consider checking shutil.disk_usage on top and exit at 99% disk usage already

mitmproxy now at least exits on a full disk. Truncating the file back to its previous length isn't trivial unfortunately, calling f.truncate(pos) on a full disk just raises another disk full error. Not sure what's the best way to approach this as we can't easily reopen from within FlowWriter. 🙃


Issues within the Luckperms gui

when I go to delete a prefix it tells me I do not have the permissions to do so

I assume with "Luckperms gui" do you mean an in-game GUI?
In that case please contact the author of the plugin as we do not provide support for unofficial LuckPerms Add-ons.


Add support for Origins-Pattern

Add support for the unattended-upgrade Unattended-Upgrade::Origins-Pattern
configuration feature.
This feature has been supported since unattended-upgrade=0.70.0, which
is available in all supported platforms. (Debian 7+, Ubuntu 12.04+)

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.
GitHub Users Who Are Not Authorized To Contribute
The following GitHub users do not appear to have signed a CLA:

@bjk-soundcloud

Please sign the CLA here.

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

@tas50 Ping :)


[QUESTION] Empty Commit Message?

Is this a question or a feature request? If so please start the title with [QUESTION] or [REQUEST].
Are you on a windows machine and do you have trouble pushing to remote repositories? Check out this thread first because it probably has the solution and answers.
Are you having problems using submodules in atom with this package? Check out this thread.
Are you running MacOs 10.12 Sierra and having issues pulling/pushing? Check out this comment.
Did you update the package and you are seeing this message Failed to load the git-plus package? Run apm install from the package's directory and restart atom.
[Description of issue here]
Updated to the latest update released yesterday and now when I add + commit and save the commit, it says my commit message is empty, when I clearly title it.
Steps to reproduce:

-- Add + Commit a file
-- Enter Git Commit Title
-- Save

I can't reproduce this. Can you attach a gif or video please? Also is there anything logged related to this in the devtools?

https://glaremasters.me/i/umqs74c.gif

haha that's an unexpected way to write commit messages. The latest update switched to behave more like the scissors mode for git commit cleanup, meaning everything below the line with >8 gets removed. The reason for this is that it allows more flexibility in what can be included in the commit message like starting lines with the commit character and it is simpler to handle in the package than trying to strip out comments.


Regenerate for otel 1.15 and add hatch as a host dep

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.
Here's what I've got...
For recipe:

The "test" section was expected to be a dictionary, but got a NoneType.
The recipe must have some tests.
The "test" section was expected to be a dictionary, but got a NoneType.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Update manifest to support setup url

According to @wilhelmklopp, support for this being included in manifests was added recently!

Excuse me @stale[bot]?

Hm I'm not really sure why Stale closed this one, honestly. Will have to see if there's an exception in how it's processing the pinned label. (adding support for line annotations to Stale so it can leave comments on bad lines of yaml is something I very much want to implement ASAP for reasons like that)

I'll try to address this as part of https://github.com/probot/probot/issues/1435


Handle unknown event types with fallback value

Add support for the new birthday event type and also gracefully handle new unknown event types.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.23%. Comparing base (e948380) to head (4fe1683).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #599      +/-   ##
==========================================
+ Coverage   97.19%   97.23%   +0.03%
==========================================
  Files           9        9
  Lines         964      975      +11
==========================================
+ Hits          937      948      +11
  Misses         27       27

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


export '__spreadArray' was not found in 'tslib'

What happened?
While first time trying to run this project I see a warning
WARN  Compiled with 1 warnings                                                                                friendly-errors 00:04:31

 WARN  in ./node_modules/.pnpm/@polkadot+ui-keyring<EMAIL_ADDRESS>                friendly-errors 00:04:31

"export '__spreadArray' was not found in 'tslib'

Please reproduce in steps
git clone https://github.com/kodadot/nft-gallery.git nft-gallery
cd nft-gallery;
pnpm i;
pnpm dev;

Expected Behavior
No warnings
What browsers are you seeing the problem on?
Chrome
Are you logged in?
No
At which address did you encounter bug?
No response
Screenshots

Relevant log output
> PORT=9090 nuxt dev

   ╭───────────────────────────────────────╮
   │                                       │
   │   Nuxt @ v2.16.0-27358576.777a4b7f    │
   │                                       │
   │   ▸ Environment: development          │
   │   ▸ Rendering:   client-side          │
   │   ▸ Target:      static               │
   │                                       │
   │   Listening: http://localhost:9090/   │
   │                                       │
   ╰───────────────────────────────────────╯

ℹ Preparing project for development                                                                                00:03:43
ℹ Initial build may take a while                                                                                00:03:43
ℹ Discovered Components: .nuxt/components/readme.md                                                                                00:03:43
✔ Builder initialized                                                                                00:03:43
✔ Nuxt files generated                                                                                00:03:43

✔ Client
  Compiled successfully in 47.53s

 WARN  Compiled with 1 warnings                                                                                friendly-errors 00:04:31

 WARN  in ./node_modules/.pnpm/@polkadot+ui-keyring<EMAIL_ADDRESS>                friendly-errors 00:04:31

"export '__spreadArray' was not found in 'tslib'                                                                                friendly-errors 00:04:31
                                                                                friendly-errors 00:04:31
ℹ Waiting for file changes                                                                                00:04:32
ℹ Memory usage: 874 MB (RSS: 1.23 GB)                                                                                00:04:32
ℹ Listening on: http://localhost:9090/                                                                                00:04:32
✔ Nitro built in 195 ms                                                                                00:04:32

Payment link for reward
https://kodadot.xyz/transfer?target=DrndbNCcF89v7AEH1NoVwoFG2pJTmtPXcYeC3bm8mjyoER7
Code of Conduct

[X] I agree to follow this project's Code of Conduct

@brano-hozza
not reproducible over here with fresh install

maybe consider updating your node version? i'm currently running v16.14.2

Tried to change it, still same warning

Same for me, can't reproduce it on fresh install.
Are you sure you're using node v16.14.2?
you can type node -v in your project folder to check it

Maybe need to delete ./node_modules and reinstall?

Yes thank you :) Deleting node_modules helped


Test for Model with DateTime field

I've added a unit test for a model with DateTime fields.
Sometimes this test can fail because of the execution time between saving the new entry and crating the timestamp for the assertion.
Attach to #132 - but this will not bring light into the issue because the test doesn't fail.

@all-contributors add @sbidy for test

@all-contributors add @sbidy for test

@sbidy Thanks to this PR I fixed bug and added some tests in 5f7aaaed33901703e03ccdd54ff5a6f42a5f20d3. Closing this PR.

@sbidy Thanks to this PR I fixed bug and added some tests in 5f7aaaed33901703e03ccdd54ff5a6f42a5f20d3. Closing this PR.


updates newly added owner with confirmation flag as default value. up…

…dates default owner type to Owner

Coverage remained the same at 0.0% when pulling badd75695d02a189b5101b86380397561cf76632 on theseyi:dataset-owner-updates into 7eee9ecf398c3c2f624199e53138dcfd445aa04a on linkedin:linkedin.


Bug 1744724: Bump library-go to fix CVE-2019-10213

Pin glide.yaml for 4.1.z streams
Bump library-go

/lgtm
@adambkaplan patch approver won't approve this until the 4.2 BZ gets verified, so i'm guessing it won't merge this week.

/bugzilla refresh

/close
ocm-o is not affected by the CVE.


[OAP-1471] [OAP-MLlib] Package all oneCCL libs into jar and change related loading logics

#1470
What changes were proposed in this pull request?
Package all oneCCL libs into jar and change related loading logics
How was this patch tested?
Manual tests

can you please resolve the conflict?

cherry-picked to branch-0.9-spark-3.x


Add e2e test to test docker build failure when the registry is down

ref #https://github.com/deis/dockerbuilder/pull/54

is there someone tackling this or can we punt to post-2.0?

ping @kmala and @mboersma re @bacongobbler's inquiry above ^^

Punted, although I would like to see this implemented before the v2.0 release.

This issue was moved to teamhephy/workflow-e2e#11


Fixing Linting issue for code.

@sudhirverma

The dependency weakness show absent even though it exists.
The line graph is not getting displayed

we will fix this in next release


Add Contribution guide

hey @dunxen . let me know how we can work together to get this site up :)

Thanks for offering your time! 😄
I think at this stage we just need an idea for the inaugural meet-up which we'll need to have an idea for numbers. Not sure if we're going to go the meetup.com route as most other BitDevs do.
For the site I was just thinking basically of an 11ty statically generated site hosted on Cloudflare Pages. Pretty used to that. Don't have any specific ideas for designs or such but could base it on something simple that just lists the previous and upcoming meet-ups.
I'll give some more concrete stuff closer to the end of the day.
P.S. Also looking for organisers who can assist with planning.

Cool. I think meetup.com would do :)

Sorry. Have been meaning to get to this. I will likely only have time on Friday or this weekend. I'll get the repo and contributor guide set up. :)


ITS profiling?

Can sylph profile ITS dataset? I downloaded the UNITE fasta file and converted it to the syldb. Then, I tested this tool with some ITS dataset and didnt get any luck to get some outputs. Thanks

Unfortunately,  sylph doesn't work with its or 16s sequences, only whole genome.


[stable/fluent-bit] need help to parse container log into multi field

Describe the bug
I just need to help to parse my log into multi field
Version of Helm and Kubernetes:
$ helm version
Client: &version.Version{SemVer:"v2.13.1", GitCommit:"618447cbf203d147601b4b9bd7f8c37a5d39fbb4", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}

Which chart:
[stable/fluent-bit]

What happened:
I have a container produce log like this:
I, [2019-08-13T15:19:16.656167 #8]  INFO -- : [629a8fd6-e2e6-4c37-a824-89ac46977001] {"method":"GET","path":"/healthz","format":"html","controller":"Api::ApplicationController","action":"healthz","status":200,"duration":1.07,"view":0.3,"request_id":"629a8fd6-e2e6-4c37-a824-89ac46977001","headers":{"SCRIPT_NAME":"","QUERY_STRING":"","SERVER_PROTOCOL":"HTTP/1.1","SERVER_SOFTWARE":"puma 3.12.1 Llamas in Pajamas","GATEWAY_INTERFACE":"CGI/1.2","REQUEST_METHOD":"GET","REQUEST_PATH":"/healthz","REQUEST_URI":"/healthz","HTTP_VERSION":"HTTP/1.1","HTTP_HOST":"<IP_ADDRESS>:80","HTTP_USER_AGENT":"kube-probe/1.12+","HTTP_ACCEPT_ENCODING":"gzip","HTTP_CONNECTION":"close","SERVER_NAME":"<IP_ADDRESS>","SERVER_PORT":"80","PATH_INFO":"/healthz","REMOTE_ADDR":"<IP_ADDRESS>","ROUTES_47312431283840_SCRIPT_NAME":"","ORIGINAL_FULLPATH":"/healthz","ORIGINAL_SCRIPT_NAME":""},"params":{"controller":"api/application","action":"healthz"},"response":{"version":"backend-ror-v1130158476892455-rc.5","timestamp":"2019-08-13T15:19:16.654Z"},"@timestamp":"2019-08-13T15:19:16.655Z","@version":"1","message":"[200] GET /healthz (Api::ApplicationController#healthz)"}
I, [2019-08-13T15:19:46.689062 #8]  INFO -- : [c5cbc505-2e72-403e-ae75-01af77eecada] {"method":"GET","path":"/healthz","format":"html","controller":"Api::ApplicationController","action":"healthz","status":200,"duration":1.2,"view":0.38,"request_id":"c5cbc505-2e72-403e-ae75-01af77eecada","headers":{"SCRIPT_NAME":"","QUERY_STRING":"","SERVER_PROTOCOL":"HTTP/1.1","SERVER_SOFTWARE":"puma 3.12.1 Llamas in Pajamas","GATEWAY_INTERFACE":"CGI/1.2","REQUEST_METHOD":"GET","REQUEST_PATH":"/healthz","REQUEST_URI":"/healthz","HTTP_VERSION":"HTTP/1.1","HTTP_HOST":"<IP_ADDRESS>:80","HTTP_USER_AGENT":"kube-probe/1.12+","HTTP_ACCEPT_ENCODING":"gzip","HTTP_CONNECTION":"close","SERVER_NAME":"<IP_ADDRESS>","SERVER_PORT":"80","PATH_INFO":"/healthz","REMOTE_ADDR":"<IP_ADDRESS>","ROUTES_47312431283840_SCRIPT_NAME":"","ORIGINAL_FULLPATH":"/healthz","ORIGINAL_SCRIPT_NAME":""},"params":{"controller":"api/application","action":"healthz"},"response":{"version":"backend-ror-v1130158476892455-rc.5","timestamp":"2019-08-13T15:19:46.654Z"},"@timestamp":"2019-08-13T15:19:46.655Z","@version":"1","message":"[200] GET /healthz (Api::ApplicationController#healthz)"}

And when i use fluent-bit to send log into es, this is what i saw from kibana:
{
  "_index": "kubernetes_cluster-2019.08.13",
  "_type": "flb_type",
  "_id": "TCiDi2wBAe00JR8uELAv",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2019-08-13T15:05:16.655Z",
    "log": "I, [2019-08-13T15:05:16.655092 #8]  INFO -- : [c87e46ed-7e75-4918-afb8-5eb1eee74920] {\"method\":\"GET\",\"path\":\"/healthz\",\"format\":\"html\",\"controller\":\"Api::ApplicationController\",\"action\":\"healthz\",\"status\":200,\"duration\":0.76,\"view\":0.24,\"request_id\":\"c87e46ed-7e75-4918-afb8-5eb1eee74920\",\"headers\":{\"SCRIPT_NAME\":\"\",\"QUERY_STRING\":\"\",\"SERVER_PROTOCOL\":\"HTTP/1.1\",\"SERVER_SOFTWARE\":\"puma 3.12.1 Llamas in Pajamas\",\"GATEWAY_INTERFACE\":\"CGI/1.2\",\"REQUEST_METHOD\":\"GET\",\"REQUEST_PATH\":\"/healthz\",\"REQUEST_URI\":\"/healthz\",\"HTTP_VERSION\":\"HTTP/1.1\",\"HTTP_HOST\":\"<IP_ADDRESS>:80\",\"HTTP_USER_AGENT\":\"kube-probe/1.12+\",\"HTTP_ACCEPT_ENCODING\":\"gzip\",\"HTTP_CONNECTION\":\"close\",\"SERVER_NAME\":\"<IP_ADDRESS>\",\"SERVER_PORT\":\"80\",\"PATH_INFO\":\"/healthz\",\"REMOTE_ADDR\":\"<IP_ADDRESS>\",\"ROUTES_47312431283840_SCRIPT_NAME\":\"\",\"ORIGINAL_FULLPATH\":\"/healthz\",\"ORIGINAL_SCRIPT_NAME\":\"\"},\"params\":{\"controller\":\"api/application\",\"action\":\"healthz\"},\"response\":{\"version\":\"backend-ror-v1130158476892455-rc.5\",\"timestamp\":\"2019-08-13T15:05:16.653Z\"},\"@timestamp\":\"2019-08-13T15:05:16.654Z\",\"@version\":\"1\",\"message\":\"[200] GET /healthz (Api::ApplicationController#healthz)\"}\n",
    "stream": "stdout",
    "time": "2019-08-13T15:05:16.655350218Z",
    "kubernetes": {
      "pod_name": "backend-ror-dev4-6468598bcf-q7vbp",
      "namespace_name": "dev4",
      "pod_id": "da931afa-bd9f-11e9-b932-42010a8a0180",
      "labels": {
        "app_kubernetes_io/instance": "backend-ror-dev4",
        "app_kubernetes_io/name": "backend-ror-dev4",
        "pod-template-hash": "6468598bcf"
      },
      "annotations": {
        "checksum": "YXBpVmVyc2lvbjogdjEKa2luZDogU2VjcmV0Cm1ldGFkYXRhOgogIG5hbWU6IGJhY2tlbmQtcm9yLWRldjQ.......U1Q6IE1UQXVNVFkzTGpFME55NHoKICBEQVRBQkFTRV9QT1JUOiBOVFF6TWc9PQpzZWNyZXQvYmFja2VuZC1yb3ItZGV2NC1zZWNyZXQgY29uZmlndXJlZAo=",
        "checksum/secret": "backend-ror-dev4-secret"
      },
      "host": "gke-k8s-develop-k8s-develop-pool0-4fb8513d-hf7h",
      "container_name": "backend-ror",
      "docker_id": "b61399708b1db45484b6e1e8991e13043f758c8722f87975d19e71797aa84c72"
    }
  },
  "fields": {
    "@timestamp": [
      "2019-08-13T15:05:16.655Z"
    ],
    "time": [
      "2019-08-13T15:05:16.655Z"
    ]
  },
  "sort": [
<PHONE_NUMBER>655
  ]
}

I want to seperate the field "log" into multi field using parser from fluent-bit, i can show in below link:
https://rubular.com/r/xBUkrCuQK9h2UF
Because the log which is produced be the container is not in json format so I can not just parser log with json.
Anybody can help me with this issue?
Thanks in advance !!!
👍
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:

Can you post your values file?

Can you post your values file?

My log is very log and i found a better way to parse my log:

Instead of finding a way to parse a defined log, i find way to change the log 's format to the json
And then i just specify the parser 'docker' for fluent-bit can parse by itself.
Sr for late reply.
Below is my log:

    "log": "{\"method\":\"GET\",\"path\":\"/api/v2/products/167/reviews\",\"format\":\"*/*\",\"controller\":\"Api::V2::GetProductReviewsController\",\"action\":\"call\",\"status\":200,\"duration\":93.77,\"view\":0.76,\"db\":29.78,\"request_id\":\"e39c2c5a-70e7-4552-9fa5-bc9d18b5acc1\",\"headers\":{\"SCRIPT_NAME\":\"\",\"QUERY_STRING\":\"per_page=5\",\"SERVER_PROTOCOL\":\"HTTP/1.1\",\"SERVER_SOFTWARE\":\"puma 3.12.1 Llamas in Pajamas\",\"GATEWAY_INTERFACE\":\"CGI/1.2\",\"REQUEST_METHOD\":\"GET\",\"REQUEST_PATH\":\"/api/v2/products/167/reviews\",\"REQUEST_URI\":\"/api/v2/products/167/reviews?per_page=5\",\"HTTP_VERSION\":\"HTTP/1.1\",\"HTTP_HOST\":\"backend-ror-dev4.trfstg.com\",\"HTTP_USER_AGENT\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36\",\"HTTP_ACCEPT\":\"*/*\",\"HTTP_ACCEPT_ENCODING\":\"gzip\",\"HTTP_ACCEPT_LANGUAGE\":\"en-US,en;q=0.9\",\"HTTP_CDN_LOOP\":\"cloudflare\",\"HTTP_CF_CONNECTING_IP\":\"<IP_ADDRESS>\",\"HTTP_CF_IPCOUNTRY\":\"VN\",\"HTTP_CF_RAY\":\"50ab562b08d8d1d7-HKG\",\"HTTP_CF_VISITOR\":\"{\\\"scheme\\\":\\\"https\\\"}\",\"HTTP_IF_NONE_MATCH\":\"W/\\\"683cdda4f971541e04d63993b86374fa\\\"\",\"HTTP_ORIGIN\":\"https://frontend-dev4.trfstg.com\",\"HTTP_REFERER\":\"https://frontend-dev4.trfstg.com/product-3d-glasses-p167.html\",\"HTTP_SEC_FETCH_MODE\":\"cors\",\"HTTP_SEC_FETCH_SITE\":\"same-site\",\"HTTP_X_FORWARDED_FOR\":\"<IP_ADDRESS>, <IP_ADDRESS>\",\"HTTP_X_FORWARDED_HOST\":\"backend-ror-dev4.trfstg.com\",\"HTTP_X_FORWARDED_PORT\":\"443\",\"HTTP_X_FORWARDED_PROTO\":\"https\",\"HTTP_X_FORWARDED_SERVER\":\"traefik-7c5d6cdcf5-l9xpq\",\"HTTP_X_REAL_IP\":\"<IP_ADDRESS>\",\"SERVER_NAME\":\"backend-ror-dev4.trfstg.com\",\"SERVER_PORT\":\"443\",\"PATH_INFO\":\"/api/v2/products/167/reviews\",\"REMOTE_ADDR\":\"<IP_ADDRESS>\",\"ROUTES_47022479874260_SCRIPT_NAME\":\"\",\"ORIGINAL_FULLPATH\":\"/api/v2/products/167/reviews?per_page=5\",\"ORIGINAL_SCRIPT_NAME\":\"\"},\"params\":{\"per_page\":\"5\",\"controller\":\"api/v2/get_product_reviews\",\"action\":\"call\",\"product_id\":\"167\"},\"response\":{\"data\":[{\"id\":9,\"created_at\":1563952891,\"updated_at\":1564136315,\"rating\":4,\"content\":\"Tớ review nhé\",\"user\":{\"id\":244,\"name\":\"Thùy 100\"},\"review_replies\":[{\"id\":45,\"created_at\":1564136341,\"updated_at\":1564136341,\"content\":\"Test nè\",\"user\":{\"id\":244,\"name\":\"Thùy 100\",\"type\":2},\"edited\":false}],\"edited\":false}],\"paging\":{\"prev_page\":null,\"next_page\":null,\"current_page\":1,\"total_count\":1,\"total_pages\":1}},\"@timestamp\":\"2019-08-23T07:22:39.386Z\",\"@version\":\"1\",\"message\":\"[200] GET /api/v2/products/167/reviews (Api::V2::GetProductReviewsController#call)\"}\n",

PARSER: (default by fluent-bit, use to parse json log format)
[PARSER]
    Name         docker
    Format       json
    Time_Key     time
    Time_Format  %Y-%m-%dT%H:%M:%S.%L
    Time_Keep    On
    # --
    # Since Fluent Bit v1.2, if you are parsing Docker logs and using
    # the Kubernetes filter, it's not longer required to decode the
    # 'log' key.
    #
    # Command      |  Decoder | Field | Optional Action
    # =============|==================|=================
    #Decode_Field_As    json     log

And this is the output after we parse:
"message_method": "GET",
    "message_path": "/api/v2/products/167/reviews",
    "message_format": "*/*",
    "message_controller": "Api::V2::GetProductReviewsController",
    "message_action": "call",
    "message_status": 200,
    "message_duration": 93.77,
    "message_view": 0.76,
    "message_db": 29.78,
    "message_request_id": "e39c2c5a-70e7-4552-9fa5-bc9d18b5acc1",
    "message_headers": {
      "SCRIPT_NAME": "",
      "QUERY_STRING": "per_page=5",
....
      "ORIGINAL_SCRIPT_NAME": ""
    },

And I apply this flow for frontend too, I make the format log input is json format, so we can use the parser 'docker' apply to this. This is the example to make nginx log to json format:
https://stackoverflow.com/questions/25049667/how-to-generate-a-json-log-from-nginx

Tks @Towmeykaw for your kindness
👍


remove the no longer needed ignore: cancel_subscriptions

This has been fixed: https://github.com/dart-lang/linter/issues/317
/cc @alexeieleusis @cbracken

Reverted by https://github.com/flutter/flutter/pull/7582


is it possible to have some sort of state that shows if its sunny or not

If its sunny, I'd like to close my curtains at specific azimuth's (so while working at home I dont have the sun shining on me)
However its almost impossible to see if its sunny or not from the states that come back.
My current rules are based on looking at the current state when I get to hot, and its getting ridiculous
here's the current version of rules
condition: and
conditions:

condition: numeric_state
entity_id: sensor.sun_azimuth
above: '180'
below: '335'
condition: or
conditions:

condition: state
entity_id: weather.jan_juc
state: Mostly sunny.
condition: state
entity_id: weather.jan_juc
state: sunny
condition: state
entity_id: weather.jan_juc
state: exceptional
condition: state
entity_id: weather.jan_juc
state: Showers. Windy.
condition: state
entity_id: weather.jan_juc
state: Showers increasing. Windy.
condition: state
entity_id: weather.jan_juc
state: Partly cloudy.
condition: state
entity_id: weather.jan_juc
state: Early shower. Sunny afternoon.
condition: state
entity_id: weather.jan_juc
state: Becoming sunny.
condition: state
entity_id: weather.jan_juc
state: Mostly clear.
condition: state
entity_id: weather.jan_juc
state: Cloud clearing.
condition: state
entity_id: weather.jan_juc
state: windy

condition: sun
before: sunset

Not sure if this can be resolved or not :-)

Hey Dave, I’ve tried to do something similar to this in the past, what I used was ARPANSA which is great if you live in a capital city. They have UV detectors and publish their values on their website and also through an API. If you live near one of the sensors you may be able to use it to estimate current sun exposure. One problem I had with this data is it will fluctuate for example if a cloud rolls over.
https://www.arpansa.gov.au/our-services/monitoring/ultraviolet-radiation-monitoring/ultraviolet-radation-data-information

I started using a custom component (illuminate) that looks at the weather.home state provided by met.no (HA Default) as well as a Template Sensor using the weather condition from Brendans sensor = both guess the outside illuminance and I then use an automation to turn on an interior light at 4PM if the light is low. It actually works much better than I expected so perhaps you can use those for this purpose.
I provide the package and automation with my weather card and also if you look on my own github repo you can find it and see how I use it for this... Still tweaking but pretty happy so far.

Another option if you felt like a little bit of DIY, you could hook a LDR up to a raspberry pi or a NodeMCU and have it publish illuminance values to home assistant, if you could situate the device near a window or even outside.
https://www.amazon.com.au/s?k=Light+Dependent+Resistor&linkCode=ll2&linkId=6a316e975ca4d67443b30ee7f8da82a6&tag=pimylifeup-22&ref=as_li_ss_tl

thanks for all this, will need to have a local sensor I think
On Wed, 3 Feb 2021 at 09:44, bremor<EMAIL_ADDRESS>wrote:

Another option if you felt like a little bit of DIY, you could hook a LDR
up to a raspberry pi or a NodeMCU and have it publish illuminance values to
home assistant, if you could situate the device near a window or even
outside.
https://www.amazon.com.au/s?k=Light+Dependent+Resistor&linkCode=ll2&linkId=6a316e975ca4d67443b30ee7f8da82a6&tag=pimylifeup-22&ref=as_li_ss_tl
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bremor/bureau_of_meteorology/issues/72#issuecomment-772064367,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACI7MZ7MZS2F6LPKJLDT7LTS5B54BANCNFSM4W4OZAWA
.

Another idea would be to get solar panels. You could use the energy generation to tell you if it’s sunny or not 😁

ha ha
On Thu, 18 Feb 2021 at 06:57, bremor<EMAIL_ADDRESS>wrote:

Another idea would be to get solar panels. You could use the energy
generation to tell you if it’s sunny or not 😁
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bremor/bureau_of_meteorology/issues/72#issuecomment-780813122,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACI7MZ6IIHB3J54BT3XAPVTS7QNQ7ANCNFSM4W4OZAWA
.


Geometry normals are flipped

Currently, to have materials display correctly, you need to set side as BackSide or DoubleSide. I don't think this is particularly intuitive. I reversed the array in geometry.js and it works fine now. Not sure if this is something you want fixed but I thought it was worth mentioning! Haven't tested with UVs yet.

That would be great. I know i did a bit of fudging with the numbers to get something on screen, and usually DoubleSide is a smell when doing geometries.


Volume bug since 0.7.3

Volume bug was introduced in 0.7.3 by checking for isLoaded and we had to do this to circumvent:
class FixedSound extends Sound {
play (...args) {
this.setVolume(this.getVolume());
return super.play(...args);
}
}
Any chance to fix it soon?

Can you elaborate on the volume bug? And how is it related to the isLoaded function?

We used const actionSound = new Sound('action.mp3'); actionSound.setVolume(0.5); to get it attenuated for later uses. It stopped to work because of the isLoaded check.
Now that we use  actionSound = new Sound('action.mp3', null, () => actionSound.setVolume(0.5)); it works.
Nevertheless, this._volume is never actually used and volume is only _actually_ set when sound is loaded, which _is_ strange.

setVolume works if the sound is loaded. I agree the docs could be clearer on this point.


Better error message and docs for

"Terminal Name Not Found" Error.
Fixes #656

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Shahar Soel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Coverage remained the same at 100.0% when pulling c8f8937e7d0cb31ebd660e787ee380133590bfcc on issue656 into 75fae619ce30b024462a21e9f85c4868bfeffc60 on master.


grafana: move component code to subfolders

To avoid git conflicts moving grafana configurations of services to sub-folders.
Action required -> if you have update set in .tekton folder then update file path.

/lgtm

@skabashnyuk @scoheb Please update your .tekton push.yaml with new path.

Created redhat-appstudio/release-service#167


E2: Implement helper functions about current context (debugging)

I am aiming at something such as debug library.
Functions that provide basic information about currently executing Expression 2, such as: current line, file name/path, function name, function definition start/end line, function return type (ID), list(array/table) of argument names and their type (IDs), trace (call stack), all function signatures that are defined within executing E2[, if function takes vararg ("is variadic function")?], etc.
It would be ideal to have those functions, a big plus at debugging E2 (especially at user-defined functions level).
Edit:
Perhaps introduce a new kind of "special syntax" for accessing such information, or a function that returns a table with all those values presented in it...?
I am thinking of, code:
# Returns current line/row number and store it to local variable named "Line". I guess the value can be figured out at compile-time.
local Line = $CurrentLine # Or $["CurrentLine", number] or global/entity function: number=currentLine(), in this case 2. Single-line comment above is the first line/row, meaning this is the second line.
# Returns file name of this E2 script (relative to data/expression2 directory name), e.g. "filename.txt"
local Path = $FileName # Or $["FileName", string] or global/entity function: string=fileName()
function angle entity:testFunc123(FirstArg:bone, ImplicitNumberArg, ThirdArg:string) # Line 5
{ # Line 6
    # Function name, returns "testFunc123" in this case
    local FuncName = $FunctionName # Or $["FunctionName", string]
    # Function type, returns "entity" in this case
    local FuncType = $FunctionType # Or $["FunctionType", string]
    # Function type ID, returns "e" in this case
    local FuncTypeID = $FunctionTypeID # Or $["FunctionTypeID", string]
    # Return type, returns "angle" in this case
    local RetType = $ReturnType # Or $["ReturnType", string]
    # Return type ID, returns "a" in this case
    local RetTypeID = $ReturnTypeID # Or $["ReturnTypeID", string]
    # Returns an array consisting of function's arguments names, in this case array("FirstArg", "ImplicitNumberArg", "ThirdArg")
    local ArgNames = $ArgumentNames # Or $["ArgumentNames", array]
    # Returns an array consisting of function's arguments types, in this case array("bone", "number", "string")
    local ArgTypes = $ArgumentTypes # Or $["ArgumentTypes", array]
    # Returns an array consisting of function's arguments type IDs, in this case array("b", "n", "s")
    local ArgTypeIDs = $ArgumentIDs # Or $["ArgumentIDs", array]
    # Returns a table of arguments, key = argument name and value = argument type, in this case table("FirstArg" = "bone", "ImplicitNumberArg" = "number", "ThirdArg" = "string")
    local ArgumentList = $Arguments # Or $["Arguments", table]
    # Returns a table of arguments, key = argument name and value = argument type ID, in this case table("FirstArg" = "b", "ImplicitNumberArg" = "n", "ThirdArg" = "s")
    local ArgumentListID = $ArgumentsID # Or $["ArgumentsID", table]
    # Returns the start line/row number at which this function is defined (line number where curly-brace of this function's body starts the scope of it), in this case 5
    local LineNumber = $StartDefinition # Or $["StartDefinition", number]
    # Returns the end line/row number at which this function's definition ends (line number where curly-brace of this function's body ends the scope of it), in this case 38
    local LastLineNumber = $EndDefinition # Or $["EndDefinition", number]
    # Returns (short) signature string of this function, in this case: "a=e:testFunc123(b,n,s)"
    local Signature = $FunctionShortSignature # Or $["FunctionShortSignature", string]
    # Returns (long) signature string of this function, in this case: "angle=entity:testFunc123(bone,number,string)"
    local LongSignature = $FunctionLongSignature # Or $["FunctionLongSignature", string]
    # Returns (super long) signature string of this function, in this case: "angle=entity:testFunc123(bone,number,string)@5,38"
    local SuperLongSignature = $FunctionSuperLongSignature # Or $["FunctionSuperLongSignature", string]
    return ang() # Line 37
} # Line 38
# Line 39

perhaps it would be easier to just make a debugger? :P


Add germlinecnvcaller

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/createpanelrefs branch on the nf-core/test-datasets repository.
[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

I don't think this cohort mode analysis will find use other pipelines, since its something an user will run occasionally to create references.. In that case, its probably easier to use this pipeline to create those files.. But this workflow calling cnvs in case mode could be of use to others.. I can polish that one a bit and add it to modules.


How to restrict access to swagger/* folder?

Greetings everyone,
I was wondering if someone found a way to restrict access to swagger/* folder, I tried DelegatingHandler as mentioned in https://github.com/domaindrivendev/Swashbuckle/issues/334 but I could not succeed. Also I tried to add location in web.config for swagger, it didn't work as well.
Anyone has any idea how to restrict access to documentation if the user is not authenticated?

Found a pretty solution:
Created new folder: swagger

If you have the authentication in MVC project, then the user have to be logged in to view the documentation.
Thanks:)

Obviously this doesn't work if you're using OWIN or not using built in authentication. It would be really nice if there was a way to do the equivalent of [Authorize] at the top of the controller in a line of code in the config. Obviously using a Delegate handler is possible but it's a brute force approach to what should be a simple solution.

Any solution? I am using OWIN, and am looking for a way to hide/secure the swagger ui from the general public, but am coming up short.
I also have to say, it took some doing to configure for OWIN, but once I had Swashbuckle up and running, I am amazed! Truly an incredibly useful utility for documenting and testing Web API implementations.

I do an environment check. Each environment has a configuration file so we know where we are and if I detect that the code is in production, I don't execute the Register method in my Startup.cs.

Thanks jreames9,
Great idea!
I had a similar thought, and will probably go with this solution in the short term.
However, it would be nice to have this functionality in production for troubleshooting, but this resource would definitely need to be a protected resource.

I see the issue is closed, but I don't see the solution for those of us running under OWIN.  Did I miss it?

As suggested - a DelegatingHandler is the easiest way to do this and should work with or without OWIN. See the example below which I've successfully tested with "Forms Authentication":
public class SwaggerAccessMessageHandler : DelegatingHandler
{
    protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        if (IsSwagger(request) && !Thread.CurrentPrincipal.Identity.IsAuthenticated)
        {
            var response = request.CreateResponse(HttpStatusCode.Unauthorized);
            return Task.FromResult(response);
        }
        else
        {
            return base.SendAsync(request, cancellationToken);
        }
    }

    private bool IsSwagger(HttpRequestMessage request)
    {
        return request.RequestUri.PathAndQuery.StartsWith("/swagger");
    }
}

Wire up the handler in your SwaggeConfig.cs just before enabling Swagger as follows:
httpConfig.MessageHandlers.Add(new SwaggerAccessMessageHandler());

httpConfig.EnableSwagger(c =>
{
    ...
});

thank you for the example and as soon as I can I will try it out in my setup and let you know if it works.
much appreciated !

just tried this change and there is an issue I have.
to add the httpconfig inside the swaggerconfig.Register() method  I need to pass in the httpconfiguration if this is to work like other .register() methods.
this throws a runtime error for me.
checking to see how to solve or if I made an error.

Ahhh, ok the sample should read like this:
GlobalConfiguration.Configuration.MessageHandlers.Add(new SwaggerAccessMessageHandler());
not like this:
httpConfig.MessageHandlers.Add(new SwaggerAccessMessageHandler());
reason: the default swagger nugget package uses the "GlobalConfiguration.Configuration"
not "httpConfig"
I am now getting a 401 when I try to get the swagger folder.
I am using Identity Server V3  so now I just have to see how to get it to have me authenticate and i'll be good to go.
interestingly the swashbuckler / swagger setup is using Identity Server to allow access to the actual api calls in the swagger pages... now I just need to have it do that before I get to the swagger page.
may just need to setup a login page or something....

@figuerres , have you get it setup successfully? In my case, the Thread.CurrentPrincipal.Identity.IsAuthenticated always return false..
I call the swagger UI like this:
HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = "/swagger/ui/index" }, WsFederationAuthenticationDefaults.AuthenticationType);

I also tried adding following part in Global.asax.cs but still not working...
protected void Application_PostAuthenticateRequest()
        {
            if (Request.IsAuthenticated)
            {
                Thread.CurrentPrincipal = HttpContext.Current.User;
            }
        }

Please help @domaindrivendev

@domaindrivendev - the DelegationHandler sample code you provided works for me.  Thanks!
I am using IdentityServer3 + Asp.Net Identity on a Web API 2 solution.

I figured out the way to do this. Use the latest swashbuckle version and add the below div tag in the injected index.html

This will show an Authorize button in the swagger UI which can be used for authentication and once Authenticated, for all the requests to the API, the JWT token will be passed from the swagger UI

@domaindrivendev I reviewed the numerous issues here as well as posts on StackOverflow.
You're adding HttpModules to an Web API project. This breaks the convention below. Like many others, I was surprised to see the /swagger endpoints magically ignore all attempts at securing them.
config.SuppressHostPrincipal();
config.Filters.Add(new AuthorizeAttribute());

The next problem comes from your code which you tested via Forms Authentication. This is outdated magic that happens at the front of the ASP.NET routing chain. Like the static files nonsense, here be dragons.
Similarly the DelegatingHandler and DocumentFilter code you wrote doesn't apply in many scenarios. These filters run before AuthorizationFilters so authorization hasn't happened and the Principal isn't filled in. (Forms Authentication hides this from you.)
And having spent about six hours figuring out these simple truths, I do not blame you one bit for not being aware of it. This whole thing (and especially the slightly different interfaces for MVC and Web API handlers that still linger) remain an utter disaster.
I don't know how you want to handle this architecturally. I'd be happy to just add the routes myself, setting whatever paths and authentication I desire, at which point you'd be at the right point of the chain. That may raise the issue that those controllers then appear in the docs, which I'm sure some people would like and some people would not.

Seems like the best path should be owin / katana as that is what Web api uses and does not get into the old Web forms and isapi mess. .  Just my thought.

I understand why he used a HttpModule (it keeps stuff out of the Web API namespace). Besides, depending on what year they first created their project, who knows what web gunk people are running.
Creating a HttpModule would seem to solve it regardless of what legacy path is at play. (Though I wouldn't wager on it.)
To get started add the Hexasoft.BasicAuthentication package to get the warm fuzzy feeling of seeing a handler actually run ahead of the swagger endpoints.
You can swipe the code from the top of this routine and rig up what you need:
https://github.com/hexasoftuk/Hexasoft.BasicAuthentication/blob/master/Hexasoft.BasicAuthentication/Hexasoft.BasicAuthentication/BasicAuthentication.cs
It's ugly but it works. Please put this in the README at least?

In .NET Core you use middleware, instead of a DelegatingHandler:
public class SwaggerAuthorizedMiddleware
{
    private readonly RequestDelegate _next;

    public SwaggerAuthorizedMiddleware(RequestDelegate next)
    {
        _next = next;
    }

    public async Task Invoke(HttpContext context)
    {
        if (context.Request.Path.StartsWithSegments("/swagger")
            && !context.User.Identity.IsAuthenticated)
        {
            context.Response.StatusCode = StatusCodes.Status401Unauthorized;
            return;
        }

        await _next.Invoke(context);
    }
}

You will also need an extension method to help adding to pipeline:
public static class SwaggerAuthorizeExtensions
{
    public static IApplicationBuilder UseSwaggerAuthorized(this IApplicationBuilder builder)
    {
        return builder.UseMiddleware<SwaggerAuthorizedMiddleware>();
    }
}

Then add to Configure method in Startup.cs just before using Swagger:
app.UseSwaggerAuthorized();
app.UseSwagger();
app.UseSwaggerUi();

@chadwackerman, sure it works, but installing Hexasoft.BasicAuthentication applies Basic Authentication across my site. I tried creating a swagger subdirectory with a web.config to enable this module only for swagger, but IIS gets in the way and when it sees a swagger directory it no longer invokes the swagger module and gives the "listing access denied" page instead of the swagger documentation.  Therefore this doesn't look like a great solution unless there is another way to enable basic auth only for the swagger path.

@cptndave I posted it as a quick example of getting anything to run ahead of Swagger. There's probably a way to do it with web.config but I'd just modify the code to look at the request url instead.

Is there also a way to secure the API docs (eg /swagger) with BasicAuth, while the actual API requires JWT auth?
We have the situation where we secure the application with JWT via IdentityServer4, but want the API Docs to be independently secured.

@chadwackerman so, is there some right solution to protect subdirectory ? (with Basic Auth)

@mguinness Thanks for that solution.
Additionally, if the site uses OpenIdConnect authentication, this line in the SwaggerAuthorizedMiddleware class:
context.Response.StatusCode = StatusCodes.Status401Unauthorized;

can successfully be replaced with
await context.ChallengeAsync();

This works by invoking the DefaultChallengeScheme configured with services.AddAuthentication in Startup.cs, and will trigger the OpenIdConnect login flow.

@Structed I also want that. Any solutions?

@mihaj No, not really. We ended up turning off swagger docs in prod for now, until we open up the API to customers. We'll probably go a different route from there and have a central API gateway instead.

I only need swagger in development/staging, but still would like to password protect it with minimal effort. The above solution is ok, but I need to create manual HTML to prompt the user to login to Oauth provider.

I tried @mguinness solution but context.User.Identity.IsAuthenticated is always returning false for me :( kinda lost

@imxzjv The order of middleware is important, check that app.UseAuthentication() occurs before your swagger config.

I have enhanced @mguinness solution to use a very simple Basic Auth for only the swagger paths. Basically we wanted the swagger stuff to be hidden in prod, unless you enter a known/shared username/password. This solution does just that, it pops up asking for auth details, which if correct lets you view the swagger stuff. - It also skips the authentication locally for dev.
I've copied the basic auth code from here: https://www.johanbostrom.se/blog/adding-basic-auth-to-your-mvc-application-in-dotnet-core
Please note - I haven't tested it with oAuth authentication turned on for swagger... this most likely will overwrite the basic auth header and stop you accessing swagger... You could probably enhance it then to also check if the request is authenticated via oAuth.. etc.
Anyways, its simple and gets the job done.
public class SwaggerBasicAuthMiddleware
{
    private readonly RequestDelegate next;

    public SwaggerBasicAuthMiddleware(RequestDelegate next)
    {
        this.next = next;
    }

    public async Task InvokeAsync(HttpContext context)
    {
        //Make sure we are hitting the swagger path, and not doing it locally as it just gets annoying :-)
        if (context.Request.Path.StartsWithSegments("/swagger") && !this.IsLocalRequest(context))
        {
            string authHeader = context.Request.Headers["Authorization"];
            if (authHeader != null && authHeader.StartsWith("Basic "))
            {
                // Get the encoded username and password
                var encodedUsernamePassword = authHeader.Split(' ', 2, StringSplitOptions.RemoveEmptyEntries)[1]?.Trim();

                // Decode from Base64 to string
                var decodedUsernamePassword = Encoding.UTF8.GetString(Convert.FromBase64String(encodedUsernamePassword));

                // Split username and password
                var username = decodedUsernamePassword.Split(':', 2)[0];
                var password = decodedUsernamePassword.Split(':', 2)[1];

                // Check if login is correct
                if (IsAuthorized(username, password))
                {
                    await next.Invoke(context);
                    return;
                }
            }

            // Return authentication type (causes browser to show login dialog)
            context.Response.Headers["WWW-Authenticate"] = "Basic";

            // Return unauthorized
            context.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
        }
        else
        {
            await next.Invoke(context);
        }
    }

    public bool IsAuthorized(string username, string password)
    {
        // Check that username and password are correct
        return username.Equals("SpecialUser", StringComparison.InvariantCultureIgnoreCase)
                && password.Equals("SpecialPassword1");
    }

    public bool IsLocalRequest(HttpContext context)
    {
        if (context.Connection.RemoteIpAddress.Equals(context.Connection.LocalIpAddress))
        {
            return true;
        }
        if (IPAddress.IsLoopback(context.Connection.RemoteIpAddress))
        {
            return true;
        }
        return false;
    }
}

public static class SwaggerAuthorizeExtensions
{
    public static IApplicationBuilder UseSwaggerAuthorized(this IApplicationBuilder builder)
    {
        return builder.UseMiddleware<SwaggerBasicAuthMiddleware>();
    }
}

Startup.cs
app.UseAuthentication(); //Ensure this like is above the swagger stuff

app.UseSwaggerAuthorized();
app.UseSwagger();
app.UseSwaggerUI(

@Thwaitesy, thanks for the code. It seems to only work on Firefox. Keep getting auth prompts on Safari, Chrome, and Edge. Any ideas why?

@bcpi id start by debugging the auth header check.. if its coming through there then I have no idea why its not working.. But if it's not coming through there then something is striping the auth header out of the request... I've only tested this in chrome, but will try others and see what the results are..

Hi @Thwaitesy I tried your solution but I always get 401 Unauthorized.

@jsantanders if you give me some more details I might be able to help?
It's been working great for us in all browsers....
Have you debugged it to see if its getting into the check login part? and its successful?
Outside of this, its possible some other auth is affecting the outcome.

As suggested - a DelegatingHandler is the easiest way to do this and should work with or without OWIN. See the example below which I've successfully tested with "Forms Authentication":
public class SwaggerAccessMessageHandler : DelegatingHandler
{
    protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        if (IsSwagger(request) && !Thread.CurrentPrincipal.Identity.IsAuthenticated)
        {
            var response = request.CreateResponse(HttpStatusCode.Unauthorized);
            return Task.FromResult(response);
        }
        else
        {
            return base.SendAsync(request, cancellationToken);
        }
    }

    private bool IsSwagger(HttpRequestMessage request)
    {
        return request.RequestUri.PathAndQuery.StartsWith("/swagger");
    }
}

Wire up the handler in your SwaggeConfig.cs just before enabling Swagger as follows:
httpConfig.MessageHandlers.Add(new SwaggerAccessMessageHandler());

httpConfig.EnableSwagger(c =>
{
    ...
});

I had to do: return request.RequestUri.PathAndQuery.StartsWith("/swagger", StringComparison.OrdinalIgnoreCase);  instead because I could bypass it by going to /SWAGGER

@sbrown345 , I'm trying to accomplish the same thing for the swagger specification that I'm generating using Swashbuckle and I'm not on .Net core. I'm on .Net Framework 4.7.1
Your code above returns 401 - Unauthorized response.. Which is technically fine. How did you manage to have the user enter the necessary credentials? Did you manage to pop open a user credentials pop-up on the browser so that the user can enter the username and password?
Thanks,
Vinay

I have below code for protecting the API's by using Azure AD B2C
services.AddAuthentication(options =>
            {
                options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme;
            })
                    .AddJwtBearer(jwtOptions =>
                    {
                        jwtOptions.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters
                        {
                            // Accept only those tokens where the audience of the token is equal to the client ID of this application
                            ValidAudience = Configuration["AzureAdB2C:ClientId"],
                            AuthenticationType = Configuration["AzureAdB2C:Policy"]
                        };
                        jwtOptions.Authority = $"https://login.microsoftonline.com/tfp/{Configuration["AzureAdB2C:Tenant"]}/{Configuration["AzureAdB2C:Policy"]}/v2.0/";
                        jwtOptions.Audience = Configuration["AzureAdB2C:ClientId"];
                        jwtOptions.Events = new JwtBearerEvents
                        {
                            OnAuthenticationFailed = AuthenticationFailed
                        };

                    });

With the SwaggerAuthorizedMiddleware as @rwatjen  posted. The code inside the middleware is like below:
public async Task Invoke(HttpContext context)
        {
            if (context.Request.Path.StartsWithSegments("/swagger")
                && !context.User.Identity.IsAuthenticated)
            {
                await context.ChallengeAsync("Bearer");

                return;
            }

            await _next.Invoke(context);
        }

The flow is not popping up the login page but always bringing 401 state. It hits the  What am I missing? Should sign-in scheme causing issue? @Thwaitesy

@Thwaitesy provided an excellent answer for .NET core.
Here's an adapted solution for ASP.NET using DelegatingHandler
  public class SwaggerAccessMessageHandler : DelegatingHandler
  {
    protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
      if (IsSwagger(request) && !request.IsLocal())
      {
        IEnumerable<string> authHeaderValues = null;

        request.Headers.TryGetValues("Authorization", out authHeaderValues);
        var authHeader = authHeaderValues?.FirstOrDefault();

        if (authHeader != null && authHeader.StartsWith("Basic "))
        {
          // Get the encoded username and password
          var encodedUsernamePassword = authHeader.Split(' ')[1]?.Trim();

          // Decode from Base64 to string
          var decodedUsernamePassword = Encoding.UTF8.GetString(Convert.FromBase64String(encodedUsernamePassword));

          // Split username and password
          var username = decodedUsernamePassword.Split(':')[0];
          var password = decodedUsernamePassword.Split(':')[1];

          // Check if login is correct
          if (IsAuthorized(username, password))
          {
            return await base.SendAsync(request, cancellationToken);
          }
        }

        var response = request.CreateResponse(HttpStatusCode.Unauthorized);
        //response.Headers.Location = new Uri("http://www.google.com.au");
        response.Headers.Add("WWW-Authenticate", "Basic");

        return response;
      }
      else
      {
        return await base.SendAsync(request, cancellationToken);
      }
    }

    public bool IsAuthorized(string username, string password)
    {
      // Check that username and password are correct
      return username.Equals("SpecialUser", StringComparison.InvariantCultureIgnoreCase)
              && password.Equals("SpecialPassword1");
    }

    private bool IsSwagger(HttpRequestMessage request)
    {
      return request.RequestUri.PathAndQuery.StartsWith("/help");
    }
  }

I made a small change to code to redirect in login page:
context.Response.StatusCode = StatusCodes.Status307TemporaryRedirect;
context.Response.Headers.Add("Location", "/Identity/Account/Login?returnUrl=/swagger");

I'm using .net5.0 preview with Identity.

see https://stackoverflow.com/a/65094653/6795110 for how I got it working using Swashbuckle and OpenIdConnect.

I came up with a super simple way to extend this using query string for those who dont wish to go the authentication route. Have confirmed this works with localhost as well as dns hostname
public bool IsLocalRequest(HttpContext context)
{
//Handle running using the Microsoft.AspNetCore.TestHost and the site being run entirely locally in memory without an actual TCP/IP connection
if (context.Connection.RemoteIpAddress == null && context.Connection.LocalIpAddress == null)
{
return true;
}
        if (context.Connection.RemoteIpAddress.Equals(context.Connection.LocalIpAddress))
        {
            return true;
        }

        if (IPAddress.IsLoopback(context.Connection.RemoteIpAddress))
        {
            return true;
        }

        if (context.Request.Query.ContainsKey("secure"))
        {
            if (context.Request.Query["dbg"] == "yes") //set whatever value you want here
            {
                return true;
            }
        }

        var files = new HashSet<string>
            {
                "swagger-ui-standalone-preset.js"
                ,"swagger-ui-bundle.js"
                ,"swagger-ui-bundle.js"
                ,"swagger-ui-standalone-preset.js"
                ,"swagger-ui.css"
                ,"favicon-32x32.png"
                ,"favicon-16x16.png"
                ,"swagger.json"
            };

        if (files.Any(f => context.Request.Path.Value.Contains(f)))
        {
            return true;
        }

        return false;
    }

How to customize this to accept boolean "allow unauthenticated access from local connection for production" and accept username and password as parameters in StartUp.cs/Program.cs?

How to customize this to accept boolean "allow unauthenticated access from local connection for production" and accept username and password as parameters in StartUp.cs/Program.cs? Edit: do it probably like this: https://stackoverflow.com/questions/40876333/how-do-i-usemiddlewaretype-and-pass-in-options#answer-49045033

We are doing it like this. In a Startup.cs file under Configure method, you can have a section like the one below.
Show Swager UI only if DEV env (or any other). Additionally, protect it with Basic Authentication. You can also make basic auth optional.
if (env.IsDevelopment())
{
    app.MapWhen(context => context.Request.Path.ToString().Contains("/swagger"), swaggerApp =>
    {
        swaggerApp.UseMiddleware<BasicAuthMiddleware>(
            Configuration.GetValue<string>($"Swagger:Username"),
            Configuration.GetValue<string>($"Swagger:Password"));

        swaggerApp.UseSwagger();
        swaggerApp.UseSwaggerUI(c =>
        {
            foreach (var description in provider.ApiVersionDescriptions.OrderByDescending(o => o.GroupName))
            {
                c.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json",
                    description.GroupName.ToUpperInvariant());
                c.OAuthClientId(configuration["Swagger:ClientId"]);
            }
        });
    });
}

Adding an enhancement to @mguinness solution by remove the cache from session after closing the browser and requiring reauthorization to login again to view swagger, it requires a few lines in the SwaggerBasicAuthMiddleware class.
public class SwaggerBasicAuthMiddleware
{
    private readonly RequestDelegate next;

    public SwaggerBasicAuthMiddleware(RequestDelegate next)
    {
        this.next = next;
    }

    public async Task InvokeAsync(HttpContext context)
    {
        //Make sure we are hitting the swagger path, and not doing it locally as it just gets annoying :-)
        if (context.Request.Path.StartsWithSegments("/swagger") && !this.IsLocalRequest(context))
        {
           ....
                // Split username and password
                var username = decodedUsernamePassword.Split(':', 2)[0];
                var password = decodedUsernamePassword.Split(':', 2)[1];

                //remove cache
                context.Request.Headers.Remove("Authorization");
                context.Response.GetTypedHeaders().CacheControl =
                new Microsoft.Net.Http.Headers.CacheControlHeaderValue()
                {
                    Public = false,
                    MaxAge = TimeSpan.FromSeconds(0)
                };

                // Check if login is correct
                if (IsAuthorized(username, password))
                {
                    await next.Invoke(context);
                    return;
                }
            }

            ....
        }
}


feat(auto-delete-snapshot): add auto-snapshot deletion below checkpoint

This PR re-introduces the auto-snapshot deletion feature for auto-generated snapshots.
Approach:

Mark a snapshot as committed. Over here committed means all the replicas are synced till this point. We don’t need to sync snapshots created before this.
Snapshot is marked as committed by the controller once the replication factor number of replicas are in RW.
Now we can delete snapshots below this point without any issue.
This reduces our sync time also.
To perform deletion of snapshot, replica checks with controller to make sure that they are all having same checkpointed snapshot.

Complete design and various approaches thought through:
Snapshot deletion in jiva

also mention in description that: To perform deletion of snapshot, replica checks with other replicas to make sure that they are all having same checkpointed snapshot

This PR has been split into the following PRs: https://github.com/openebs/jiva/pull/319 and https://github.com/openebs/jiva/pull/321


Adding updates without adding topics

If an update we add relates to a topic not yet existed in our database now it throws an error
We need to add such topics before the related updates

The problem was that we has been merging users, groups, topics and updates in parallel instead of doing it sequentially.


Only show info panel for fsharp files

As discussed in #1176
I noticed 2 issues when opening C# projects with vscode after installing ionide extension:

With "FSharp.infoPanelShowOnStartup": true, InfoPanel launches for a C# project & displays a blank panel (because of .sln activation). Closing the panel, then closing & re-opening C# project in vscode does not resolve the issue. A blank info panel is displayed.
With "FSharp.showExplorerOnStartup": true, when launching a C# project the F# solution explorer triggers it's startup, grabs focus but then reports a failure in attempting to load csproj files.

A more ideal behaviour would be to try and have a minimal ionide fsharp launch when opening C# projects.
This fix resolves issue 1), by only showing the InfoPanel if there is an fsharp compatible file open in a window. I imagine issue 2) is by design, and can easily be resolved by setting "FSharp.showExplorerOnStartup": false.
Behaviour before code change:

Behaviour after code change:

Thanks to @baronfel for excellent instructions in #1176 👍

Lovely, thanks for this!  I just pushed a preview ahead of the US holiday coming up, but if I get a moment I'll see about pushing out another.


Removed all my functions and will not fix issues.

Describe the bug
Unable to repair damage done but trying to fix errors typescript errors..Bolt has removed all my progress and functions and is nownot progessing at all. Wasted all my upgraded credits very disapointed. So far have not completed a project and looking at now renewing
Link to the Bolt URL that caused the error
https://bolt.new/~/sb1-fy1tjw
Steps to reproduce
Too many to reproduce error
Expected behavior
Absolute dissapointment
Screen Recording / Screenshot
No response
Platform
Browser name = Chrome
Full version = <IP_ADDRESS>
Major version = 132
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
performance.memory = {
  "totalJSHeapSize": 127228728,
  "usedJSHeapSize": 121505844,
  "jsHeapSizeLimit":<PHONE_NUMBER>
}
Username = stevejford
Chat ID = 391261ab1a09

Additional context
No response

@stevejford issue #678 is the best collection of tips and tricks to get better performance


Proper way of handling scalar (np) v. 0-dimensional array (cp)

It's talked about in the documentation how CuPy returns 0-dimentional cupy.ndarrays rather than scalars, as in
np.array([np.sin(10)]*3)
# [-0.5440211108893698, -0.5440211108893698, -0.5440211108893698]

whereas
[cp.sin(10)]*3
# [array(-0.54402111), array(-0.54402111), array(-0.54402111)]

and thus calling
cp.array([cp.sin(10)]*3)
# Throws an error

A workaround is to explicitly cast the array:
cp.array([cp.sin(10)]*3, dtype = cp.float64)
# [-0.5440211108893698, -0.5440211108893698, -0.5440211108893698]

but I'm just curious if this is killing performance by forcing the GPU to sync with the CPU. Does there exist a protocol for handling this type of scenario (which also happens with reduction functions such as np.sum/cp.sum)?

cp.array([cp.sin(10)]*3)

cp.array will accept array of CuPy arrays in the next release (v7.0.0b1, #2081). In this case array concatenation will run on GPU.

Feel free to reopen the issue if you need further discussions.


Cannot Manipulate or View Storage Tables

Cannot manipulate or view storage tables.

It would be sweet to update many records at once. What a concept!

This extension needs this enhancement ... like yesterday. PLEASE!

Unfortunately we don't support these features with tables.  As a workaround, you can use the Azure Storage Explorer or the portal.

This feature request is now a candidate for our backlog. The community has 240 days to upvote the issue. If it receives 5 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!

This issue has become stale and is at risk of being closed. The community has 60 days to upvote the issue. If it receives 5 upvotes we will keep it open and take another look. If not, we will close it. To learn more about how we handle issues, please see our documentation.
Happy Coding!

:slightly_frowning_face: In the last 60 days, this issue has received less than 5 community upvotes and we closed it. Still a big Thank You to you for taking the time to create it! To learn more about how we handle issues, please see our documentation.
Happy Coding!


Fix #8738: Handles Re-assignment of Exported Clause Member

This Pull Request Fixes #8738.
When exporting a clause directly, TypeScript emits the member assignment to exports after the variable declaration of the member. This ignores all assignment statement afterwards.
Patch Summary:
When there is assignment operator expression =, +=, etc, check if the target is a member of export clause. If it is, make sure that the export clause is updated.
Behaviour before patch:
var foo = 2;
foo = 3;
export { foo }

compiles to
var foo = 2;
exports.foo = 2;
foo = 3;

Compile result after patch:
var foo = 2;
exports.foo = 2;
exports.foo = foo = 3;

Export alias are updated as well, I use the same code for variable declaration.

Hi @evansb, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

The latest commit handles postfix and prefix ++ and -- operator.
For postfix it will be compiled to foo += 1 before prepended with alias exports.foo = foo += 1

thanks @evansb!


Context flag

@stevedlawrence You had been requesting this feature.  Any thoughts on its implementation?

Testing it out, it seems to work, but I'm also seeing some odd behavior.
An example where it's working as I would expect, without context I get the error:

(E): Nonexistent type (unlabeled_t) listed in fc_entry (E-005

And with context I get

(S): Type unlabeled_t is declared in module kernel, but used in file context here. (S-002)

However, both with and without context, I see this error for everyone one of my fc contexts:

(E): Nonexistent user (system_u) listed in fc_entry (E-003)
(E): Nonexistent role (object_r) listed in fc_entry (E-004)

So even with context, it doesn't seem to know about system_u and object_r.
Another thing that is odd, is I get very different messages for out of order lines when I provide context. I wouldn't think context would change how it determines order. I'll see if I can create a minimal example that shows what I'm seeing.

Found a way to reproduce using https://github.com/TresysTechnology/clip
Clone that repo, run git submodule init && git submodule update. Then run the following:
cd packages/clip-selinux-policy/
diff -Naur \
  <(selint -r clip-selinux-policy) \
  <(selint -r --context refpolicy clip-selinux-policy)

There's a handful of different line out of order warnings. Warnings about system layer ordering I guess could make sense since --context might teach selint which layer an interface is in, but others I don't understand why there would be a difference.

I think these are all expected behavior.
The E-003 and E-004 errors are a result of not specifying a config file (either having one in SYSCONFDIR/selint.conf or specified on the comand line with -c).  You're the second person to complain about that, so maybe I need to find some way to make things more clear.  The idea is to make the existence of those configurable rather than just hardcoding them.  Maybe a warning about a lack of a config file would be a helpful addition.
I didn't go through everything in the clip example, but I think those ordering changes are all expected (and for the better).  I see two changes:

Interface layers, as you notice
Correct identification of transform interfaces.  For example, without --context it reports an issue on oscap.te:11, but --context makes it go away.  No issue is correct there, because application_domain is a transform interface that is grouped with definitions.  I'm getting a little weirdness in corenet stuff, because corenetwork.if hasn't been created yet, but that's to be expected (it doesn't see corenet interfaces as real interfaces, and decides they must be macros).

I didn't go line by line through everything in clip, but that seems to be the majority of what I see in there.  Do you see something I'm missing?

All makes sense.
Perhaps just having a reasonable built-in config if one isn't provided that assume system_u/object_r  would be helpful. And maybe even hardcode object_r in the check since that's currently hardcoded in the kernel.
+1 :+1:


[docs] Improve configuration details of functions worker

Fixes #6086
Motivation
The documentation for functions worker were lacking, as it didn't cover how to configure the functions worker in a variety of possible configurations of Pulsar, such as when the functions worker is run standalone or with TLS and/or authentication.
Modifications
This document expands the details for how to configure the functions
worker based on a variety of scenarios.
Verifying this change
This is just docs, no test changes needed
Does this pull request potentially affect one of the following parts:
It doesn't effect anything other than docs :)
Documentation

Does this pull request introduce a new feature? ho

@Anonymitaet here are the docs for #6086, let me know who else should review with you being out :)

@wolfstudy could u pls help review? Thanks

@Anonymitaet Thanks for all the great feedback as well as links to style, that is really helpful :)

@addisonj thank you so much for providing this helpful information :-D


Free mercenaries!

Hooray, free fighters for everybody! :tada:
Or perhaps that's not so ideal...
As this Steam report mentions, there is a mercenary available for a cost of 0 (credits, money, lootz??)
The offending mercenary is the IK-2 Escort from the Federal module:

The IK-2 Escort ship is missing a hirePrice attribute, in-case anyone wants to fix this issue in the future. Since most ships seem to omit this attribute, it might be worth changing the default value to be the same as the sell price.
https://github.com/MovingBlocks/DestinationSol/blob/6d93ffa817dbf26493c684971aa242b9c1f77d9b/engine/src/main/java/org/destinationsol/files/HullConfigManager.java#L180-L181


upgrade: drivelist to v5.0.19

https://github.com/resin-io-modules/drivelist/pull/161
https://github.com/resin-io-modules/drivelist/pull/156
https://github.com/resin-io-modules/drivelist/pull/153

Change-Type: patch
Changelog-Entry: Various fixes for when drive descriptions contain special characters.
Signed-off-by: Juan Cruz Viotti<EMAIL_ADDRESS>

So, you're happy that Etcher is still able to cope okay with the ASCII escape codes that https://github.com/resin-io-modules/drivelist/pull/161 allows through?

Yeah, looks line new lines are the only problematic one, for which I created another GH issue: https://github.com/resin-io/etcher/issues/1325


Update Roadmap

Description
This pr updates the roadmap for the Liqo v0.8 release.

/test

/merge


Feature Requests: dequeue multiple and group queues

Hi Mike,
Thanks for keeping your node always updated .. I use it on couple of hobby projects and it is very useful.
Couple of features that I really would like to see (if I have the hang of the code happy to contrib) is

trigger multiple messages with one control command, that is sending a trigger 2 for example will dequeue 2 messages, and sending trigger 5 will dequeue 5 messages.
internal multiple queues , that is an array of queues ! grouped by a key such as topic. So messages actually end up in different internal arrays. This is I think a massive design change, but it will be really nice to have a dynamic queue , the way I want it. For example, in my project I want to be able to process 5 messages in parallel at the same time but wait for those 5 to be processed before dropping them. So first I want to be able to release 5 at a time (obviously I can do that with a little loop in a function or so unless we include feature 1), but most importantly I need to group them and release one from each queue at one time. I can't use FIFO approach, and also I dont know in advance how many queues would I need (otherwise I would have possibly created multiple nodes in the flow). This feature might not be a great idea but in all cases just thought to share..

thanks

I'm glad you find the node useful. The use case you describe makes sense and does not have an obvious solution, at least when the number of queues cannot be determined in advance. I have two thoughts.
First, dequeueing multiple messages is probably best handled by using additional nodes to input multiple copies of the trigger command. Since the user can define an arbitrary triggerCmd string, separating the command segment from the numerical (message count) part could get tricky and end up forcing the user to follow special rules to avoid errors.
Having multiple queues (for example, by topic) is not that difficult in principle, but it might not fit gracefully into the design of the queue-gate node. Preserving the gating function while adding this feature would raise issues such as whether an open, close, toggle or default command should apply to all queues or only selected ones. There are a number of other difficulties, as well. If it would meet your needs, I would be willing to work on a new node based on the queue-gate that would do queueing only and provide some independent control of each queue. Please let me know what you think.

@drmibell thanks for response. Makes sense to me.
Yes the multiple queues is an area I am currently investigating.
It turns out that the Delay node with Rate Limit option could group messages by topic which effectively provide the feature I need. The issue is that the delay is based on a fixed time span in the configuration unlike your node which has a way to control the dequeue. It looks to me the easiest path is to extend the Delay node and add the option to control release of messages with a control message like yours.. Thoughts ? I am happy to contrib code for that one too, it does not sound like a massive extension for a new node..

I had forgotten that delay has the "by topic" feature. It seems that trigger also has an option ("handling/each") that selects by topic or whatever message property you choose. You might be able to cobble together something with these nodes (unmodified) to do what you want.
A quick look at the code for trigger suggests that it could be the basis for a multiple queue node, and I suspect that's the case for delay also. Still, two things argue in favor of starting from queue-gate. First, it has many features, like peek, drop, and keep newest message, that users have requested. Second, or maybe first for me, is that I am totally familiar with the code and therefore comfortable making major changes. In the next day or two, I will look at delay and trigger to see how they handle the "by property" feature, in case there is a better way than what I have in mind.
If you decide to have a go at one of the core nodes, let me know how you get on. For now, I will work on queue-gate and post here when there is anything to report.

I have uploaded node-red-contrib-multiple-queue, which is based on the queue-gate node. It supports multiple, independent queues with most of the features of the queueing mode of queue-gate and a few besides. The documentation is not quite complete, and not all the minor features have been completely tested. If you have an opportunity to try it out and report your impressions, I would be very grateful.

@nileio, I have just pushed version 0.1.1, which fixes bugs and rough edges in the initial commit. I plan to upload to npm shortly, so if you have any feedback it would be good to have it before then. Thanks for your help.

@nileio, I have just pushed version 0.1.1, which fixes bugs and rough edges in the initial commit. I plan to upload to npm shortly, so if you have any feedback it would be good to have it before then. Thanks for your help.

Version 0.2.0 adds a few features and (more or less) finishes the documentation. I plan to publish to npm tomorrow (US time).

thanks @drmibell for the update . I will get to test soon and let you know.
Really awesome work.. inspired me to publish the nodes that are sitting collecting dust for past two years!

thanks @drmibell for the update . I will get to test soon and let you know.
Really awesome work.. inspired me to publish the nodes that are sitting collecting dust for past two years!

I have updated node-red-contrib-multiple-queue to version 0.2.1 and have had no bug reports. I don't anticipate doing anything more with it, except possibly a scrub of the documentation. I hope you find it useful.


dynamic resource allocation concepts

This will add a concept description for dynamic resource allocation.

Hey @pohly , 1.26 Docs Lead here 👋 !
The deadline (November 15th) for PRs ready to review has passed.
Please complete https://github.com/kubernetes/website/pull/37766 and request a review as soon as possible.
cc: @cathchu

@pohly  Please change the PR against dev-1.26 branch

Hey @pohly 🙂 what is the status on this? We need to start with the documentation & review process ASAP. We cannot add this feature without documentation! Thanks

/assign @klueska
Please review.

Hi @pohly. This PR needs a doc review by Mon Nov 28th to get this into the release. Please reach out to required SIGs to get their review. Thank you!

/lgtm
/approve