niro > routeRules > cache > getKey lost in the process of delivery

Environment

Operating System: Linux
Node Version:     v16.20.0
Nuxt Version:     3.7.0
CLI Version:      3.7.2
Nitro Version:    2.6.2
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      nitro
Runtime Modules:  -
Build Modules:    -

Reproduction
https://stackblitz.com/edit/nuxt-starter-v6wnbq?file=nuxt.config.ts
Describe the bug
I see getKey in nitro document, but in nuxt project the getKey is invalid

as in my reproduction, the cache file in .nuxt/cache/nitro/routes/my_test should be hhhiii.json, as configured in nuxt.config.ts.
but actually it's index.il7asoJjJE.json
I guess the getKey is important in nuxt project for cache control, so please fix this problem as soon as possible, thanks !!!
Additional context
No response
Logs
No response

Everything in your nuxt.config needs to be serialisable, so you can't pass functions there, which is why TS is disallowing it.

So how to contro route cache only by route pathname and not distinguishable by fragment

You can use defineCachedEventHandler or use a Nitro plugin to set the route rules.

// Cache an API handler
export default cachedEventHandler((event) => {
  // My event handler
}, options);

how to use cachedEventHandler only set cache options on second parameter, and not fix default event handler


Design proposal: Envoy filterchain dependency

Goals

Make it easier for operators to understand filter chain dependencies. Ordering dependency is often implicit and discovered by trial-and-error or imitating examples.
Improve safety of filterchain configurations and rollout by enforcing filter dependencies.
Handle missing dependencies in a consistent way across filters, and increase validation for custom header dependencies (i.e. implicit router filter dependencies).

Requirements

Catch code and config changes that break interfilter dependencies.
Dependencies are defined in a way that supports documentation flow, so filter documentation includes dependency metadata in a human-readable form.
Do not impose undue complexity or config burden to operators who don’t need this. The dependency mechanism should be optional and opt-in.
Handling of dependency violations should be explicit and well-defined.
Support directionality, i.e. specify separate dependencies for the encode and decode path.
Support multiple kinds of dependencies (e.g. FilterState, DynamicMetadata, headers)
The implementation should be simple enough that we don’t cause more problems than we prevent.

Design Proposal
tl;dr Introduce a filter dependency proto by which a filter can specify what it depends and provides. The dependency specification includes specifying dependencies and "providencies", encode and decode path, and currently three kinds of dependencies (FilterState keys, headers, and DynamicMetadata). The dependency spec will be an optional function in the filter FactoryBase, which a FilterFactory can override to include dependencies, either simply by parsing a .pb_text or with more complex modifications and config-time data. The filterchain will be assessed after the instantiation of FilterFactories, and if the chain is invalid the config is rejected.
Full design doc. Feel free to leave comments on the doc or reply here.

Note this is a dup of https://github.com/envoyproxy/envoy/issues/3286. I will close the other one and I guess we can continue tihs here.

Tagging @htuch, who's looked this over and gave me some good revisions to make it more OSS-friendly.

I took a look through the design doc and at a high level it LGTM. I left a few comments for discussion in the doc. Thank you!

I took a look through the design doc and at a high level it LGTM. I left a few comments for discussion in the doc. Thank you!


Add email optin attribute and protocol mappers to ol apps keycloak config

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5559#issuecomment-2392330230
Description (What does it do?)

This adds the email opt in field to the user profile attributes and also adds protocol mappers for this and the last name field so that those can come back on the openid-connect/userinfo API response.
How can this be tested?

I'm not aware of how to test this locally, I think we need to test it in a deployed test environment first.

Removed multivalued as it's not a valid key according to the docs and when I tried running pulumi, it threw an error stating that. Changed config as it also threw an error when trying to run pulumi to verify things:
Argument of type "dict[str, list[str]]" cannot be assigned to parameter "config" of type "Input[Mapping[str, Input[str]]] | None" in function "__init__"
  Type "dict[str, list[str]]" is not assignable to type "Input[Mapping[str, Input[str]]] | None"

@shaidar when you get a chance to re-review, it'd be good to get this out today. It relates to changes included in https://github.com/mitodl/mit-learn/pull/1727 (although things won't break).


Docker Start Error

Hi, hi have a OpenVZ VPS server... i installed docker (Debian 7)
but when i try to start docker i receive this error... and if i type
sudo service docker status
i receive:
root@dask1:~# sudo service docker status
[FAIL] Docker is not running ... failed!
The Output Error:
root@dask1:~# sudo service docker start
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail  or so
[ ok ] Starting Docker: docker.
root@dask1:~#
Thanks for support. please help me

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
For more information about reporting issues, see CONTRIBUTING.md.
You don't have to include this information if this is a feature request
(This is an automated, informational response)

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

root@dask1:~# docker version
Client:
Version:      1.10.3
API version:  1.22
Go version:   go1.5.3
Git commit:   20f81dd
Built:        Thu Mar 10 15:48:06 2016
OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
root@dask1:~# docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
Steps.

root@dask1:~# sudo service docker start
Receive a message of start + errors
root@dask1:~# sudo service docker status
Receive Fail Error

It said errors like
mount: wrong fs type, bad option, bad superblock on cgroup,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so

Have you followed above suggestions?

i installed the software for mount... etc... i bought another vps from another provider (mydigital ocean) and seem work

Thanks @Kekko991 let me close this issue then, good to hear you got it working!

nice solution. you do realise, you it in fact isn't solved at all? still not possible to run under openvz

@eeluve afaik, OpenVZ is still at kernel 2.6 (which is not supported for Docker), and only supports vfs as a graph-driver (which is strongly discouraged, and basically only useful for testing, but nothing other than that); https://openvz.org/Docker_inside_CT
I see there's some work going on to move to kernel 3.10 https://openvz.org/Download/kernel, but nothing stable yet.
In the current situation, running Docker under OpenVZ is not a supported setup

Ye, that's kind of what I said. So, as far as I understood, docker waits for parallels to move openvz to 3.10, which is logical ofc but may take forever.

Yes, don't think there's much we can do here, unless there's lots of demand from OpenVZ users to "push" Parallels

Hi, just because you answer quickly and I couldn't get any help in docker IRC and there's no docker channel in slack .. I will try to ask here. Deployed private registry v2 and issued self-signed certificate. Can login just fine from debian-based machines with 1.11 client, but from ones(atomic-host: rh-based) with 1.8 and 1.9 it also requests for "mail" during docker login procedure and then fails. Also can not, by any means, find directory where images gets stored in v2. Can't execute search against the repo as well. Official manual claims "GET /v2/" should be enough, but neither this neither other versions like /v2/_catalog or /v2/search or /v2/search?q=request are working for me. Curl -X returns unreadable rectangles to the console and docker search returns 404.

In registry "V1", search was part of the registry; in V2, a registry is (by design), only a registry, but does not have indexing / search capabilities (see the documentation here; https://docs.docker.com/registry/spec/api/). Docker Hub, and Docker Trusted Registry add this capability.
What versions of docker 1.8 and 1.9 do you have installed on your Atomic hosts? The version of docker as distributed by Red Hat / Atomic contains a lot of modifications that affect working with registries (and Docker Hub).  Have you tried installing the official packages from our repository? https://docs.docker.com/engine/installation/linux/centos/

Ok, thanks for your answer even tho my post was against the rules. May I invite you to #atomic channel @freenode IRC. There are several RH devs right now and we sort of struggle of not having any in-depth docker specialist. Only if that's possible. And should you decide to join, just address any post to ansyeblya/aweiteka/dustymabe.

@eeluve I think @runcom would be the best person for that; he's both a Docker maintainer, and employed by Red Hat (so knows of all the differences there)

Ok, "your people" in IRC helped me and I started several registries on various OS. Yet everything works fine. Locally querying the registry with docker_registry list and remotely with: curl -k -u user:pass -X GET https://domain.local:5000/v2/_catalog. Actually figured myself, somehow missed this part in API part of the manual, it's so huge. May make sense to cut abit to prevent TL issues ;)

The https://github.com/docker/distribution/issues issue tracker is for issues around the OSS docker registry; you can try the #docker-distribution IRC channel (but I think most people are in San Francisco, so may not be online yet)

Ye, I've tried distribution channel already. Will try again in couple hours. So far collected several questions about registry 2.4 and container issues in general: http://stackoverflow.com/questions/36841599/several-issues-regarding-registry-2-4 . If you could possibly link this to someone with clues, that would be great.


Fix instruction to install via Homebrew

I tried to install via Homebrew by the documented way.
However, the tap repository was wrong.
https://github.com/gesquive/homebrew-git

@giginet: Do the these instructions not work?
brew tap gesquive/git-user https://github.com/gesquive/git-user.git
brew install gesquive/git-user/git-user

If they don't work, please work with me to figure out what is wrong.
I was planning on removing my homebrew-git repository to simplify packaging for the project. Plus the formula in that repo is old.
Happy New Year and thanks for the PR!

Oh, I was half asleep. 😪
It works correctly. Sorry.
However, Markdown syntax is still corrupted. So I fixed it in this opportunity.


GremlinClient.GraphSON2MimeType - Cannot resolve symbol 'GraphSON2MimeType'

Gremlin.Net Version="3.6.2"

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: ae64443b-43d7-6683-d5b4-29f6af518656
Version Independent ID: 8dcb6a2f-97b2-2e86-90c7-01167aa85194
Content: Build an Azure Cosmos DB .NET Framework, Core application using the Gremlin API
Content Source: articles/cosmos-db/gremlin/quickstart-dotnet.md
Service: cosmos-db
Sub-service: cosmosdb-graph
GitHub Login: @manishmsfte
Microsoft Alias: mansha

@Marusyk
Thanks for your feedback! We will investigate and update as appropriate.

Hi @manishmsfte,
Could you please look into this document question. Thanks

Please use the 3.4.13 which is supported, refer the support article, https://learn.microsoft.com/en-us/azure/cosmos-db/gremlin/support
#please-close

@manishmsfte I can refer the support article but does it not make sense to update the document ?

#please-reopen

#please-open


psql init error

Hi I got the following error when deploying in azure kubernates (AKS): kubectl logs psql-init-wgwp5
Master DB: postgres Master User: postgres
Checking whether database is up...
Creating user ckan_default
ERROR DB:  role "ckan_default" already exists

Creating user datastorerw
ERROR DB:  role "datastorerw" already exists

Creating user datastorero
ERROR DB:  role "datastorero" already exists

Creating database ckan_default with owner ckan_default
ERROR DB:  database "ckan_default" already exists

Creating database datastore_default with owner datastorerw
ERROR DB:  database "datastore_default" already exists

Traceback (most recent call last):
  File "/srv/psql-init/psql-init.py", line 176, in <module>
    sql = subprocess.check_output(["/usr/bin/ckan",
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 489, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/ckan'

Was the database empty? Cause the logs say that the roles were already existing in the DB.

@pribadihcr it seems that your database already exists. It also seems like you are using a CKAN version that is older than 2.9, that's why you have the FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/ckan' error. You will need to edit the scripts for this to work, since older CKAN versions use paster --plugins=ckan... instead of just ckan.


Some fixes

Hopefully, I'll be adding more to this branch.
Fixes:

https://github.com/influxdata/docs.influxdata.com/issues/609 (Removes 0.9 from the AWS bucket that has NOAA_data.txt)
https://github.com/influxdata/docs.influxdata.com/issues/637 (Removes differences.md from Chronograf 1.0 and add update the upgrading page)
Updates the InfluxEnterprise backup and restore doc - this is almost all Mark's work and Joe's work

removed the file redirect, since it leads to a zero byte file and a .1 file:
sean@catalyst-sean:~$ wget https://s3.amazonaws.com/noaa.water-database/NOAA_data.txt > NOAA_data.txt
--2016-08-31 17:23:57--  https://s3.amazonaws.com/noaa.water-database/NOAA_data.txt
Resolving s3.amazonaws.com... <IP_ADDRESS>
Connecting to s3.amazonaws.com|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5075892 (4.8M) [text/plain]
Saving to: 'NOAA_data.txt.1'

NOAA_data.txt.1                         100%[=================================================================================>]   4.84M  3.11MB/s   in 1.6s

2016-08-31 17:23:59 (3.11 MB/s) - 'NOAA_data.txt.1' saved [5075892/5075892]

sean@catalyst-sean:~$ ll NOAA_data.txt*
-rw-r--r--  1 sean  staff        0 Aug 31 17:23 NOAA_data.txt
-rw-r--r--  1 sean  staff  5075892 Aug 31 16:40 NOAA_data.txt.1

After talking to @mark-rushakoff about backup and restore I discovered that that functionality has been updated for the 1.0 release.    https://github.com/influxdata/docs.influxdata.com/pull/636/commits/715a0b172a12af76418f5ee1f68610f7540b6ae8 is the almost new backup and restore doc. It's basically Mark's doc with some of the information from Joe's Confluence page on backup and restore.
Almost all of the issues that @goller mentioned in https://github.com/influxdata/docs.influxdata.com/issues/629 are now void.

@beckettsean, this should be good to go. I'll be doing the InfluxEnterprise updates in a different branch.

@rkuchan I'm not clear on what needs review here. The backup/restore stuff?

@beckettsean, Update backup and restore doc,  Add docs about bind parameters, #641, and Add CQ workarounds for nested functions and HAVING clauses, #351 are the main ones.


Spell Effects for PF Game Modules?

I've looked at all the tutorials, but cannot find the options to change the spell effects for PF1 spells, is this planned in the future ?

No it is not planned. my plans listed for this module are mostly listed here: https://github.com/Moerill/Mess/issues/109


Post plugin installation leaves omnisharp-none-x64-netcoreapp1.0 folder empty

I am not that familiar with how the whole dotnet ecosystem works under the hood, so apologies if this isn't enough information or just an issue on my part.
I am running Arch and wanted to fiddle with a bit with .net core, and decided to use Atom as my IDE. I installed .net core via the dotnet-cli AUR package, and am able to do a dotnet new and dotnet restore and lastly dotnet run without any issues.
Here is me running dotnet info and dotnet version if it helps:
hak8or@hak8or ~> dotnet --version
1.0.0-preview2-003121
hak8or@hak8or ~> dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     antergos
 OS Version:
 OS Platform: Linux
 RID:         antergos.-x64

Sadly, when installing the omnisharp plugin in atom, I get the following:

So I go into the directory and it's empty:
hak8or@hak8or ~/.a/p/o/n/o/omnisharp-none-x64-netcoreapp1.0> pwd
/home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-none-x64-netcoreapp1.0
hak8or@hak8or ~/.a/p/o/n/o/omnisharp-none-x64-netcoreapp1.0> ls -a -l
total 12
drwxr-xr-x  2 hak8or users 4096 Aug 25 00:18 ./
drwxr-xr-x 10 hak8or users 4096 Aug 25 00:18 ../
-rw-r--r--  1 hak8or users   11 Aug 25 00:18 .version

The other folders (omnisharp-mono and omnisharp-ubuntu14-x64-netcoreapp1.0 )have a decent bit of files in them including OmniSharp.exe.
If I just copy by doing cp -r omnisharp-ubuntu14-x64-netcoreapp1.0/* omnisharp-none-x64-netcoreapp1.0/  and restart atom, I get the following when clicking the little squiggle on the bottom left for sharp and then start:
Array[12]0: "NAME="Antergos Linux""1: "VERSION="16.6-ISO-Rolling""2: "ID="antergos""3: "ID_LIKE="arch""4: "PRETTY_NAME="Antergos Linux""5: "CPE_NAME="cpe:/o:antergosproject:antergos:16.6""6: "ANSI_COLOR="1;34;40""7: "HOME_URL="https://antergos.com/""8: "SUPPORT_URL="https://forum.antergos.com/""9: "BUG_REPORT_URL="https://github.com/antergos""10: ""11: ""length: 12__proto__: Array[0]
/home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/lib/helpers/platform.js:50 getValue("ID") antergos
/home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/lib/drivers/stdio.js:106 Connecting to child @ /usr/lib/electron/electron
/home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/lib/drivers/stdio.js:107 Path to server: /home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/omnisharp-none-x64-netcoreapp1.0/OmniSharp
/home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/lib/drivers/stdio.js:108 Selected project: /home/hak8or/Desktop/development/UDP_Parrot/csharp
/home/hak8or/.atom/packages/omnisharp-atom/node_modules/omnisharp-client/lib/drivers/stdio.js:115 Arguments: --stdio,--zero-based-indices,-s,/home/hak8or/Desktop/development/UDP_Parrot/csharp,--hostPID,7028
events.js:101 Failed to initialize CoreCLR, HRESULT: 0x80131500
emitOne @ events.js:101
text-editor-component.js:1021 ::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.

So then I try to copy the contents of the omnisharp-mono directory into the omnisharp-none-x64-netcoreapp1.0 directory, do a symbolic link from OmniSharp.exe to OmniSharp. And, then it seems to work! Meaning, autocomplete and error checking seem to work fine.
It seems though that this is using mono instead of dotnet core, even though I would prefer dotnet core. Mono is installed on this machine. I guess the issue is that the omnisharp-none-x64-netcoreapp1.0  directory is empty, even though the plugin logs during installation show something should be in there due to extracting.

I had a non-functioning omnisharp-atom plugin for several months now. This finally fixes it!
I'm using Arch Linux too.


Option to change Transfer-Encoding: chunked to Transfer-Encoding: identity

I'm trying to use hoverfly as a proxy to an API that does not support Transfer-Encoding: chunked. The reason for this is that it uses the Content-Length header to verify a signature in the Authorization header. Since chunked doesn't have this header, the API failes authentication.
Is there a way to make sure hoverfly makes its external requests using the identity transfer encoding?

Hey @michalc,
Hoverfly does not make any changes to the headers of requests being proxied to their intended destination. The only header that is added is on the response, which is ["Hoverfly": "Was-Here"].
Where is this Transfer-Encoding header coming from? This isn't something that Hoverfly adds. It might be that maybe your HTTP client is using this header by default.
You could write a piece of middleware that modifies outgoing request and changes the value of the header, this would be the best way to do it if you are expecting your Transfer-Encoding header to be changed while in transit.

Where is this Transfer-Encoding header coming from?

Well, I thought it was hoverfly! I have now upgraded to v0.10.1 (from v0.10.0), and the issue doesn't seem to happen.
My bad... apologies.


"==" instead of "is"

with "is" the condition does not get executed for me. Python 3.6.6.

Thanks, @tallero!


Unable to pass meta-data when using --load option

https://github.com/moleculerjs/moleculer-repl/blob/e78ee19f831fdd85fc8e6783534db4e3f80c2cb7/src/commands/call.js#L127
I also tried adding meta to the params file, and looking at the code for the call command, it does not look like meta is supported when loading params from file.

I've just released 0.6.4 which supports defining meta keys with #.
E.g:
moleculer λ call greeter.echo --load test.json --#user John

The user: "John" will be placed into the ctx.meta.

What if the meta object is more complicated than a simple key/value pair? In my services, I pass in an authentication object which is relatively nested in meta. Would love to define it in the params file. It would be nice if the file could just have this structure:
{
  "params" : {...},
  "meta": {...}
}

What if the meta object is more complicated than a simple key/value pair? In my services, I pass in an authentication object which is relatively nested in meta. Would love to define it in the json file. It would be nice if the file could just have this structure:
{
  "params" : {...},
  "meta": {...}
}

@ujwal-setlur Added in https://github.com/moleculerjs/moleculer-repl/pull/61


mergeCols could/should return a sparseMatrix (if input is a sparseMatrix)

Hi,
presumably, sparseMatrix is the preferred format for storing sparse count data (or it wouldn't exit?), so maybe mia functions like mergeCols should return these over base matrices? Always or only if the input is a sparseMatrix?
Best,
Bela

I support this idea but good to see if there are other arguments.

I like the idea but then started to think if it is problematic to return a different output vs. input.
Another solution would be to provide conversion option as a function argument.

I like the idea but then started to think if it is problematic to return a different output vs. input.

keeping input and output type the same is a good compromise too I think.

matrix in, matrix out
sparseMatrix in, sparseMatrix out

Thats how it should be. Only change data types if necessary.
That way less code, less bugs, more expected result, ...


fix(ngMock window.inject): Remove Error 'stack' property changes

Recent browsers, particularly PhantomJS 1.9.2 and Safari 7.0
treat the stack property as non-configurable and unwritable.
Because window.inject captures the stack at the time of the inject,
and attempts to insert it into a captured throw from the injected
function by modifying e.stack, a meaningless error message and
stack is thrown instead.
This commit inserts two tests exposing the problem, and implements
a solution passing those tests.  The solution provides an object that
mimics the old Error object, with the additional stack information, where
possible (Error is not standardized on stack, line and file information), and
then captures the toString function from the Error object prototype.
An exception is IE8 or less, which fails to yield meaningful messages
under both the status quo and this instant commit.  Accordingly, the test
memorializes the current IE8 behavior as a passing example.
modified:   src/ngMock/angular-mocks.js
modified:   test/ngMock/angular-mocksSpec.js

This seems to break Jasmine 2.x's toThrowError() function. The original exception is no longer thrown and the new error object does not inherit from Error.
Given a Jasmine expectation that looks like:
expect(myObject.throwMyExpectedError()).toThrowError(MyExpectedError);

Where the implementation of throwMyExpectedError throws an exception inheriting from Error, I see something along these lines from my Jasmine test output:
...
Expected function to throw an Error, but it threw ({ message: 'my error message', name: 'MyExpectedError', stack: 'the augmented call stack ...'}).

That's a bit of a hand-wavy example. I can try and provide more information and perhaps write a test to prove this, but I wanted to raise it first to see if anyone had any thoughts.

@markscholtz - if you feel we have an outstanding issue can you please create a new issue for it and reference this one?

+1


how to can add class to img with number image

i  do cycle with images
 {% for image in page.media.images %}
......
{{ image.html }}
......
    {% endfor %}

how i can add class to img with number images(w1,w2,w3,w4,w5........)
for example with {{ loop.index }}
sorry my engl is bad))

take a look
https://learn.getgrav.org/16 ->  answers to your question
or https://discourse.getgrav.org/ many answers to your question also
or Discord Channel https://getgrav.org/discord

{{ image.url }}  - give url e.g. /user/pages/.......     ?


Set HostZoneUnbonding's status EXIT_TRANSFER_QUEUE before burning stTokens during UndelegateCallback instead of after

Closes: #525
Context and purpose of the change
Set HostZoneUnbonding's status EXIT_TRANSFER_QUEUE before burning stTokens during UndelegateCallback instead of after
Brief Changelog

Author's Checklist
I have...

[ ] Run and PASSED locally all GAIA integration tests
[ ] If the change is contentful, I either:

[ ] Added a new unit test OR
[ ] Added test cases to existing unit tests

[ ] OR this change is a trivial rework / code cleanup without any test coverage

If skipped any of the tests above, explain.

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] manually tested (if applicable)
[ ] confirmed the author wrote unit tests for new logic
[ ] reviewed documentation exists and is accurate

Documentation and Release Note

[ ] Does this pull request introduce a new feature or user-facing behavior changes?
[ ] Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md?
[ ] This pull request updates existing proto field values (and require a backend and frontend migration)?
[ ] Does this pull request change existing proto field names (and require a frontend migration)?
How is the feature or change documented?

[ ] not applicable
[ ] jira ticket XXX
[ ] specification (x/<module>/spec/)
[ ] README.md
[ ] not documented

@ThanhNhann it looks like the PR implementation doesn't match the description. Specifically, the status is just removed, not moved.

Hey @asalzmann, sorry for the late, It's my fault to push the wrong branch, the new pr is here, can you plz check it
https://github.com/Stride-Labs/stride/pull/542


NA value error?

Hi Jan,
Running into this error here:
Less than 80% of the genes in Normal are present in the expression matrix.
Less than 80% of the genes in Tumor are present in the expression matrix.
/juno/work/greenbaum/users/rahmanj/vardhana_lab/rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but LogisticRegression was fitted without feature names
warnings.warn(
Traceback (most recent call last):
File "ikarus_cell_classifier.py", line 21, in
predictions = model.predict(adata, 'Impact_Rux')
File "rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/ikarus/classifier.py", line 375, in predict
y_pred = self.core_model.predict(scores)
File "rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 447, in predict
scores = self.decision_function(X)
File "rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 429, in decision_function
X = self._validate_data(X, accept_sparse="csr", reset=False)
File "rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/sklearn/base.py", line 577, in _validate_data
X = check_array(X, input_name="X", **check_params)
File rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/sklearn/utils/validation.py", line 899, in check_array
_assert_all_finite(
File "rux_b_cell_single_cell_analysis/rux/lib/python3.8/site-packages/sklearn/utils/validation.py", line 146, in _assert_all_finite
raise ValueError(msg_err)
ValueError: Input X contains NaN.
LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values

Hi Jahan, it is possible that the gene names are missing in your sample, you can check sample.to_df().head(2) to see whether column names are gene names.

Hello, I think I am running into this same issue.  The first warning occurs when I load the core model.
>>> model = classifier.Ikarus(signatures_gmt=signatures_file, out_dir="./../working/ikarus")
>>> model.load_core_model(trained_model_file)
/datastore/scripts/mamba/envs/ikarus/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator LogisticRegression from version 0.24.2 when using version 1.1.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(

Then, there is the ValueError seen by @JahanRahman when running the predictions.  The resulting csv is an empty, comma-separated file.  I think the key here is this warning:
UserWarning: X has feature names, but LogisticRegression was fitted without feature names

I verified that my anndata object has the correct gene names as var names, so the problem is probably coming from the pre-trained model, not the input data. There are several other similar errors on the internet - referring to utilizing a pre-trained sklearn model from a different version of sklearn than that which is currently installed.  Currently I'm testing if training the model myself will resolve the issue.

Hello @jmodlis, could you paste the full warning message?
Your insert is cut on the last line.
Nonetheless, if the error goes as
Less than 80% of the genes in Normal are present in the expression matrix.
Less than 80% of the genes in Tumor are present in the expression matrix.

you would need to check first if the gene names in your anndata actually intersect with the gene names from the signatures used in the pre-trained models. It is very rare, but it could be that the intersection is actually less than 80% of the signature genes.
The signatures themselves one can find at ikarus/tutorials/out/signatures.gmt

I agree with @melonheader, intersecting less than 80% of the genes might be the reason for the error. This threshold is introduced in the scoring algorithm we are using. After checking the intersection, you might try to circumvent the issue by removing non-overlapping genes from the gene set (knowing that this might decrease accuracy). For that, you could try the argument adapt_signatures when initializing the model object, e.g. model = classifier.Ikarus(..., adapt_signatures=True). This should be available in theGitHub version of Ikarus.

Hi,
I'm facing the same issue as JahanRahman:

_ = model.predict(adata, "HeadNNeck", save=True)
Less than 80% of the genes in Tumor are present in the expression matrix.
Less than 80% of the genes in Normal are present in the expression matrix.
/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/sklearn/base.py:443: UserWarning: X has feature names, but LogisticRegression was fitted without feature names
warnings.warn(
Traceback (most recent call last):
File "", line 1, in
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/ikarus/classifier.py", line 375, in predict
y_pred = self.core_model.predict(scores)
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 447, in predict
scores = self.decision_function(X)
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/sklearn/linear_model/_base.py", line 429, in decision_function
X = self._validate_data(X, accept_sparse="csr", reset=False)
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/sklearn/base.py", line 577, in _validate_data
X = check_array(X, input_name="X", **check_params)
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/sklearn/utils/validation.py", line 899, in check_array
_assert_all_finite(
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/sklearn/utils/validation.py", line 146, in _assert_all_finite
raise ValueError(msg_err)
ValueError: Input X contains NaN.
LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values

I checked that the gene names where stablished as columns which they are and then I checked for the overlapping:
-For tumor genes: 70% were found overlapping
-For normal genes: 84% were found overlapping
So then I decided to try the suggestion from @dohmjan, adding adapt_signatures = TRUE to the model, but then I get the following error:
_ = model.predict(adata, "HeadNNeck", save=True)
Traceback (most recent call last):
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3800, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 165, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'gene_symbol'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "", line 1, in
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/ikarus/classifier.py", line 363, in predict
signatures_gmt = check_signatures_overlap(
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/ikarus/classifier.py", line 158, in check_signatures_overlap
tumor_genes_in_var = list(set(tumor_genes) & set(adata.var["gene_symbol"].values.tolist()))
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/pandas/core/frame.py", line 3805, in getitem
indexer = self.columns.get_loc(key)
File "/home/c581z/.conda/envs/ikarus/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc
raise KeyError(key) from err
KeyError: 'gene_symbol'
And I'm not too sure how to proceed now

Hi! Could you check whether within your AnnData object the column containing the genes of the dataset is called "gene_symbol"? For example via plot(adata.var.head()), assuming your AnnData object is called adata. If not you would have to rename it to "gene_symbol", that would be necessary. As for that, the provided instructions are not very good. I'll try to make this more clear in the tutorial if a custom AnnData object is used that is not created via data.load_dense() or data.load_sparse().

Hi! Could you check whether within your AnnData object the column containing the genes of the dataset is called "gene_symbol"? For example via plot(adata.var.head()), assuming your AnnData object is called adata. If not you would have to rename it to "gene_symbol", that would be necessary. As for that, the provided instructions are not very good. I'll try to make this more clear in the tutorial if a custom AnnData object is used that is not created via data.load_dense() or data.load_sparse().

This solved the problem, thanks! The data.var was not properly formatted (it was an empty data frame with gene names stored in index) but reformatting it and adding gene_symbol as column name fixed it.

Great, I'd propose to close the issue. Feel free to re-open again!

I'd propose to close the issue for now. Feel free to re-open it again!

I'd propose to close the issue for now. Feel free to re-open again!

Dear @dohmjan
Hello! Thank you so much for sharing great tool/support to the community.
I come across with similar issues but so far haven't success in any of previous solutions worked on my data (e.g., scanpy pre-processing, changing adata.var_names to gene_symbol, etc). Any chance can you give instructions how to use user-specific h5ad?

Currently, my anndata files are processed
(1) public scRNA-seq data from diff studies-> STARsolo pipeline -> annotated R/python tools -> merged in one anndata ->
(2) split into authors for ikarus
(3) one of dataset used to make trained-model (wen through ok)
(4) rest used for model prediction but failed with following mssg.
`
ValueError: Input X contains NaN.
LogisticRegression does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values
#make prediction
#We provide the AnnData of an unknown data set, make predictions and save the results.
_ = model.predict(cdatas["Lin2021"], "/lustre/scratch126/cellgen/team283/jp27/02_tools/ikarus/livers/out/Lin2021", save=True)
#make prediction`
Here is one of anndata I generated and problematic..
https://drive.google.com/file/d/1-VHW4h6ofUbNZ92hg_khkF-dck15nEOX/view?usp=sharing
Any tips would be super appreciated,
Jun

@jpark27
Did you try --- model = classifier.Ikarus(..., adapt_signatures=True)
Had the same error as you. The above worked for me after everything else failed.


[Quarkus Main] Compatibility with Jandex 3

I actually solved this an hour ago:
https://github.com/apache/camel-quarkus/commit/9c3206d7006746887791fd938d1fb90c4d6bc199

Nice work! @jamesnetherton and just comment https://github.com/apache/camel-quarkus/commit/9c3206d7006746887791fd938d1fb90c4d6bc199#r84474553


nginx: hardening with Canary, PIE, Full RELRO and FORTIFY_SOURCE

# checksec --file /nix/store/[hash]-nginx-1.6.2/bin/nginx
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     RPATH      RUNPATH      /nix/store/[hash]-nginx-1.6.2/bin/nginx

Note that this will be implemented by #12895, also for dependent packages.


[Bug] [Module Name] Bug title 0.6.2 can not open libro web interface

Search before asking

[X] I had searched in the issues and found no similar issues.

Operating system information
Linux
Python version information

=3.11

DB-GPT version
latest release
Related scenes

[ ] Chat Data
[ ] Chat Excel
[ ] Chat DB
[ ] Chat Knowledge
[ ] Model Management
[ ] Dashboard
[X] Plugins

Installation Information

[ ] Installation From Source

[X] Docker Installation

[ ] Docker Compose Installation

[ ] Cluster Installation

[ ] AutoDL Image

[ ] Other

Device information
v100
Models information
qwen2.5
What happened
0.6.2版本新libro界面无法打开，安装了all_in_one_entrance，点进去前端无法显示，

What you expected to happen
如何操作可以打开notebook界面？
How to reproduce
直接安装点击
Additional context
No response
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

it's weird, try a new conda environment?


chore(main): release 0.19.2

:robot: I have created a release beep boop
0.19.2 (2024-02-14)
Bug Fixes

client: remove subscribe's initial delay (e77c763)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/kakao/varlog/releases/tag/v0.19.2 :sunflower:


sys.excepthook override, and GUI error dialogs

Description
This PR is just a loose proposal for discussion, and results from thinking about #616
With more complicated and open-ended features, such as the "advanced open dialog", the likelihood of errors increases (with, for instance, unexpected user input or parameter permutations).  Currently, all errors would be printed as tracebacks to the console.  But with a GUI application, it's often desirable to present a cleaner, more interpretable error message (as an example, I often hear Fiji beginners confused about the cryptic error console).  The idea here is that if there are predictable errors that a user is likely to commit (e.g. typo in filename, choosing a channel_axis with a huge size), then we raise a specific error which will be caught and shown to the user with obvious next steps.  This PR introduces two things

A start to internal exception classes with a base napari.exceptions.NapariError class
A modified sys.excepthook that shows a subset of exceptions to the user with a QMessageBox

Note that the presentation of errors in the gui is opt-in, it will currently only show a QMessageBox for certain exception classes (such as NapariError; first example in gif below))... otherwise it dumps to the console as usual (second example in gif below).  That behavior is modifiable in _qt.exceptions. ExceptionHandler.

It's also worth noting that this will only currently work when napari is the main process (for instance, by running napari on the command line or using python -m napari in development).  Ipython traps all exceptions and does not use sys.excepthook.  But I think these docs could help if we wanted it to show in ipython launched things as well.
Type of change

[x] New feature (non-breaking change which adds functionality)

References
https://docs.python.org/3/library/sys.html#sys.excepthook
How has this been tested?

[ ] example: the test suite for my feature covers cases x, y, and z
[ ] example: all tests pass with my change

Final checklist:

[ ] My PR is the minimum possible work for the desired functionality
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works

As a "counter-argument"... thinking specifically about the open dialog in #616... a more elegant (but much harder to implement) approach would be to do something like what is down with browser form validation, where an error message or indicator is shown right at the point of error:

@tlambert03 I love how you're thinking about this. I think this stuff will be really important for the long term vision of a tool useable by non coders and users of a standalone app.
I think approach 1 with the pop-up is worth exploring and may make sense for some things, plugins etc. I also really like approach 2 for these complex dialogs and think in the long run we should do as much of that as possible i.e. - don't let people even hit ok when we can know that it will fail, and point them where to fix things right away.
Another comment is - should everything print to the built-in console as opposed to the main console say when launching from a script? Sort of relates to #787 a little.

I'm reopening this PR.  I moved the instantiation to the event_loop, which is a better place for it (ipython has its own excepthook and requires different handling anyway).
from discussion in #1090, I wonder if it maybe wasn't clear exactly what this PR does... so here's a little more background:

this PR has us own the mechanism for handling uncaught exceptions.  That may mean showing an error dialog in the GUI (in a bundled or non-console situation).  Or that may mean dispatching to the standard ipython traceback printer.  That's the context-specific behavioral stuff we all need to discuss next.  The point is, by overriding sys.excepthook, we get to dispatch uncaught exceptions to the secondary handler of our choosing.

perhaps I should have been more explicit about this too: this PR solves the problem of total app crashes when napari is the main process.  We haven't discussed this much, but starting in Qt5.5, the default behavior for PyQt and PySide is to completely exit the program with qFatal() following an uncaught exception.  That's not a "crash" per se... that's just how PyQt handles things.  It's of course, unexpected for most python users... since normally in python an uncaught exception.  (See this SO post, and this email thread from Luke Campagnola for discussion).  This is not so much an issue when running in Ipython, since the ipython excepthook interferes.  And this is why the Qt app won't actually crash if you enter an error into the integrated ipython console, but it will if you introduce an error into a napari script.

re-requesting review on this one.  probably should have brought this one up at meeting.  I don't think this needs to wait on the docs that @ziyangczi is working on.  and it fixes the urgent need of preventing total crashes when an uncaught exception is raised.

fwiw, I tested this change with the windows bug of toggle volume: https://github.com/napari/napari/issues/1347 reproduced on nd_labels.py as before on a windows machine, the hard crashing is indeed avoided, however the applicataion ends up in "Not Responding" state without much information raised anywhere, I am seeing some warning message on the console:
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x000002442ED4A820>

that seems related to the error

however the applicataion ends up in "Not Responding" state without much information raised anywhere, ...., we need to be aware it is yet bulletproof on weird edge cases like the vispy issue above, which could be due to c code bugs

yep, there's a very important distinction to make here.  This is not solving the underlying problem that bugs "exist" (as mentioned before, I don't imagine that we will ever solve that problem)... It is not bulletproofing anything with regards to avoiding exceptions or inconsistent states.  It is simply equipping us with some machinery to handle them, and report them.  In this particular example of the vispy error, the "solution" in my opinion would be to either fix the vispy error itself, or at least identify what causes the error and raise a hard exception before that error occurs that would cede flow to the exception handler.  But again, none of that has to do with how we handle it (which is this PR)

opened up another PR since I can't update this branch: https://github.com/napari/napari/pull/1476


Skills Auth fails on Government cloud (Python)

See rollup Issue for details.

Blocked by lack of Gov support for Python.


Build issues on caddyserver.com

I believe the issue could be corrected by using a valid release version tag in the form v0.1.0 or v1.0.0.
Ref: https://caddy.community/t/plugins-having-build-issues-as-of-05-06-2019/5817

Closing in #17


Draw colorbar on individual axes when doing dependence_plot

When using dependence plot with a subplot, the colorbar is currently drawn in the right part of the figure rather than the individual axes.
Examples of before/after using the below code:
fig, axs = plt.subplots(1, 2, figsize=(20,8))
shap.dependence_plot("DateDaysAgo-1", shap_values, X, ax=axs[0], show=False)
shap.dependence_plot("CouponRate", shap_values, X, ax=axs[1], show=False)

Before PF:

After PR:

Excellent fix, thanks!


Allow "New Slayer Task" button on fightcaves/inferno

Allows the slayer task button to check for inferno and fightcaves activities along with monster killing.

[x] I have tested all my changes thoroughly.

Will merge after conflicts fixed

Will merge after conflicts fixed

Fixed conflicts :)


When to release a new version?

Great work! One year has already passed by the latest release version.  Do you have any plan to release a new version? Thanks.

这项目全玩兴趣和业余时间了，不知道你看过另外一个项目没？
https://github.com/skywind3000/ECDICT-ultimate/releases


Does not catch error from children components

Repro: https://svelte.dev/repl/239f64a51b1448649b591b1522cef54c?version=3.31.2
When wrapping the Boundary component around any Svelte component, the errors aren't caught by Boundary.
I'm not sure if this is a bug, or a limitation of this library, but it would be great to have this documented in the readme if it's not fixable.
Thanks!

That you for reporting this. This does indeed seem to be either a bug or – more likely – a limitation of the current implementation.
As it is now, updates that are not caused "above" the boundary won't go though it. Put another way, self contained updates (like the one caused by the on:click handler in MakeError) won't get caught as the error boundary is completely unaware of them.
These very precise updates are a main feature of Svelte, but they do indeed make catching errors a lot harder.

That you for reporting this. This does indeed seem to be either a bug or – more likely – a limitation of the current implementation.
As it is now, updates that are not caused "above" the boundary won't go though it. Put another way, self contained updates (like the one caused by the on:click handler in MakeError) won't get caught as the error boundary is completely unaware of them.
These very precise updates are a main feature of Svelte, but they do indeed make catching errors a lot harder.


feat(pubsub): configure TopicAdminConnection with Options

Part of the work for #6306
This PR adds a method to configure TopicAdminConnection using g::c::Options. Users who might have relied on calling MakeTopicAdminConnection({}) will not be broken because of the introduction of a non-constructible backwards compatibility type. (Credit to @devbww for the idea and implementation).
This PR also adds Options alternatives for CreateDefaultPublisherStub() and CreateChannel(). The old methods are still used by the rest of the Make*Connection methods. Leaving them allows for incremental changes. I put in some TODO's to remind myself to remove the old methods when I am done, though.
FYI: The same work for TopicAdminConnection will also be done for:

PublisherConnection
SubscriberConnection
SubscriptionAdminConnection
SchemaAdminConnection

(I started with TopicAdminConnection, because it didn't seem that involved)

This change is

google/cloud/pubsub/internal/backwards_compatibility_type.h, line 32 at r1 (raw file):
Previously, devbww (Bradley White) wrote…
I think I would just go with just NonConstructible (Unconstructible?), and limit the description to something about cases where we want to disallow the instantiation of an object.  (Might it sometimes not be about backwards compatibility?)  That is, I'd suggest leaving mention of "initializer list" for the particular case that uses the unconstructible type that way (and drop mention of MakeTopicAdminConnection()).  I'd also drop the PleaseIgnore.

:thumbsup: to what @devbww said.

/gcbrun

/gcbrun

/gcbrun


update examples according to latest ingest API

I had tried the Southpark-search, both readme & code are outdated. Please update~ Thanks~

The south park example is now up-to-date.


Feature Request: Nonlinear Composite Properties & Simulate Internal Pressure

Thanks again for making such an excellent & useful library. Section properties and PyNite are opening up an interesting avenue for the optimization of structures for me.
A couple of features/use cases that would help answer some edge case problems with composites.

Internal Pressure: taking advantage of  Shapely.Polygon.holes property would it be possible to apply an internal pressure to a section? This would help answer questions about how internal pressure affects/improves strenght for nonlinear materials like CFRP.

Nonlinear Tension/Compression materials: This is a pretty well understood problem but it would be great to have the ability to spec a material with different compression/tension properties.

My solution to this at present is to use different tension/compression members in PyNite to model this and then handle the load cases separately, however, there are a lot of reasons this is not ideal as it increases the size of the problem significantly by 2-3x if I'm using a composite wrapped isotropic beam.
Anyways keep up the great work and hopefully I can find something to contribute to :)

Hi @SoundsSerious, sounds like you have some interesting engineering challenges to solve!
While both of these ideas are certainly great, they are outside the scope of sectionproperties, I'll expand on each point below:

What you are describing is really a structural finite element analysis problem (plane stress or plane strain depending on your problem). sectionproperties is concerned with calculating the section properties of cross-sections and it happens to use finite elements to solve this (not to be conflated with structural finite element analysis, which for example, solves a static equilibrium problem). A simple extension is beam stress calculation, which uses the calculated section properties to calculate beam stresses. What you've described is a completely different problem and could perhaps be solved using PyNite and in-plane plate elements?
This is also out of the scope of sectionproperties which is based in linear-elastic analysis. This could be achieved by creating another sibling library to sectionproperties that extends its functionality to perform non-linear analysis. An example of this is concreteproperties which uses sectionproperties to solve non-linear reinforced and prestressed concrete problems.

@robbievanleeuwen
Thanks for the thoughtful response, I see some of the assumptions of in-plane analysis aren't able to be modeled as there are 3D components that can't be modeled without some assumptions about the loading.
I am checking out concrete-properties and this does indeed look very interesting. I hadn't checked it out prior since, well I'm not using concrete, but I think I could potentially model carbon fibre by overlapping sections of epoxy and CF materials and using mass-weighted material properties to adjust for effective volume?
From example 8.2 in https://robbievanleeuwen.github.io/concrete-properties/notebooks/composite_section.html
I would remove the line to overlap the identical sections in a similar way to section-properties
# cut hole in concrete for UC then add UC
geom = conc - uc + uc

I wonder if the functionality between sectionproperties and concreteproperties could be generalized with some kind of pluggable solver? I am speaking from ignorance because I havent done a deep dive into the code but that would be an interesting way to address a 3rd case of compositeproperties which would bring all the aero / vehicle design folks knocking :)

Do you think this could work?

Unfortunately I have zero experience in working with carbon fibre so can't really comment on a design methodology.

I wonder if the functionality between sectionproperties and concreteproperties could be generalized with some kind of pluggable solver?

I'm sure a very similar approach could be used to create a potential compositeproperties. While there is a bit of cross-over with sectionproperties (e.g. using the idea of a Geometry and getting cross-section properties), a lot of concreteproperties is also concrete specific design approaches e.g. in calculating material design capacities and non-linear moment-curvature responses. I assume a lot of similar work would need to be done with composite material design philosophies.
In terms of plug-ability, I think the best approach would be using the pre-processor from sectionproperties in determining geometries and retrieving relevant section properties where required for composite design. I'm not sure how generalised one could make it, but I'm looking forward to seeing any ideas you might have :)


Docs on integrating with other OSS

It would be nice to have docs on how to integrate zod with other OSS. This would help people:

identify whether zod will work well with their tech stack
figure out how to use zod with their tech stack
help zod validate its feature set. If the docs are hard to write, zod is probably missing something.

GraphQL
It seems like zod could be well suited for GraphQL validations. It would be handy to have a reference for the parallels of GraphQL types and their corresponding zod types, as well as any other suggestions for integrating zod into the GraphQL environment.
As a single small example:
union Fish = Salmon | Tuna | Trout
type Catch {
  fish: Fish!
}

const FishEnum = z.union([z.literal('Salmon'), z.literal('Tuna'), z.literal('Trout')]);
const Catch = z.object({
  fish: FishEnum,
});

Of course it's a bit less obvious when it comes to nullable types because GraphQL is nullable by default, and zod is required by default.
React PropTypes
Seems like an integration that would make sense for libraries. Similar docs like those for GraphQL could make sense.
formik
Formik has native support for Yup schemas. Docs on integrating zod with formik would be nice!

I think it's a good idea to create a new INTEGRATIONS.md file in the repo describing best practices/patterns for integrating Zod with other OSS libraries, especially form libraries. Anyone who wants to write up one of these mini-guides, submit a PR and I'll happily credit you (link to Twitter, etc).
I'm currently using react-hook-form for a separate project so I will document the patterns involved in doing that in the near future. Are you using Formik + Zod? If so it'd be great if you wrote up a brief guide on doing that. I'll happily credit you in the README.
A few of the ideas you mention are better as standalone libraries built on top of "zod core". I'm considering building a GraphQL  library on top of zod. I haven't found a GraphQL framework that makes it easy to define a schema type once and generate variants of it for the various mutations (create, patch, etc). LOTS of duplicative types required even in massively popular libs like typegraphql.

I'm currently using react-hook-form for a separate project so I will document the patterns involved in doing that in the near future. Are you using Formik + Zod? If so it'd be great if you wrote up a brief guide on doing that. I'll happily credit you in the README.

If you have any examples I'd love to see them. I'm currently stuck getting my resolver to work right w their useFieldArray hook

I am not using Formik + zod, but I am trying to establish what these integrations would look like before really investing in the stack. So, "not yet" is the short answer. I'm also not necessarily sold on either component just yet, since I'm trying to evaluate all the components together before making decisions.
I made a library some time ago with the main idea that it would be a single place to define the structure of objects. It was designed to be a pluggable system that allowed for modular integrations with various functions. It's old and crusty now, there are flaws in the design, it wouldn't play nicely with TS, and I don't actually use it for anything, but there may be some  ideas worth taking a look at.
Library: https://github.com/chrbala/single-schema
GraphQL integration module: https://github.com/chrbala/single-schema/blob/master/src/flatteners/graphql/README.md
Other modules, like PropTypes: https://github.com/chrbala/single-schema#modules
From a high level, a takeaway I had from building that was that if you create a single core schema with a number of tools coming out of it, you're bound to the lowest-common-denominator of functionality across the systems. e.g. if a module doesn't support unions, you can't have unions in any part of the schema unless you have a way of failing over to something that does something similar enough to unions to be compatible.

I have a bit of progress on an example. It uses the in-progress zod transformations API and not everything works – don't rely on anything in the repo for now. I'm adding this repo to share progress here, but it shouldn't be trusted to be stable at this point.

So far this works for me getting Zod to work with Formik (only semi-tested).
import * as z from 'zod'

class ValidationError extends Error {
  public name = 'ValidationError'
  inner: { path: string; message: string }[]
}

function createValidationError(e: z.ZodError) {
  const error = new ValidationError(e.message)
  error.inner = Object.keys(e.errors).map((k) => e.errors[k])
  return error
}

// Wrap your zod schema before passing it to Formik's `validationSchema` prop
export function toFormikYupSchema(schema: z.ZodSchema<any>) {
  return {
    validate(obj: any) {
      try {
        schema.parse(obj)
      } catch (err) {
        throw createValidationError(err)
      }
    },
  }
}

Formik integration would be nice, especially with Formik V3 coming soon.

I'm not sure if this belongs here or in its own card, but in my recent project I integrated Zod with Mongoose; in essence, I left the mongoose schemas empty, and added a pre-validate hook for each:
//Hotel is an inferred type from HotelSchema (referenced below), a Zod schema.
//Document is mongoose's Document
interface HotelDocument extends Hotel, Document {}

const hotelSchema = new mongoose.Schema({}, { strict: false });
hotelSchema.pre('validate', syncWithSchema(HotelSchema));

const HotelModel = mongoose.model<HotelDocument>('Hotel', hotelSchema);

syncWithSchema is meant to be generic enough to support any schema:
const documentKeys = [
  ...Object.getOwnPropertyNames(Document.prototype),
  //Added those manually; doesn't seem like there are more keys that the prototype misses
  '$__',
  'isNew',
  'errors',
  '$locals',
  '$op',
  '_doc'
];

type NonDocumentKey<T> = keyof Omit<T, keyof typeof Document.prototype>;

/**
 * Retrieves all of the keys (property *names*) of the target object, which do not belong
 * to the Document class (i.e. all non-document property keys of the object).
 * @param target the object to extract keys from.
 */
function getNonDocumentKeys<T extends Document>(target: T): NonDocumentKey<T>[] {
  const targetKeys = Object.getOwnPropertyNames(target);

  return targetKeys.filter(key => !documentKeys.includes(key)) as NonDocumentKey<T>[];
}

/**
 * Returns a *function* used for mongoose middleware validation.
 * Ideally, we could use Zod's parsing methods directly in the mongoose middleware, but since it
 * does not have the option to *return* the validated object, and instead provides it as the `this` parameter,
 * we need to iterate over `this`, after having parsed the relevant fields, assigning fields existing in the parsed response
 * and deleting those that aren't.
 *
 * @param schema the schema to parse incoming objects by.
 */
function syncWithSchema<T>(schema: z.Schema<T>) {
  return async function (this: Document & T) {
    const modelKeys = getNonDocumentKeys(this);

    const modelFields = pick(this, modelKeys);

    const model = await schema.parseAsync(modelFields);

    modelKeys.forEach((key: keyof T) => {
      if (key in model) {
        this[key] = model[key] as any;
      } else {
        delete this[key];
      }
    });
  };
}

It seems to work well at the moment, although I'll admit we didn't get to testing it rigorously.
I have not found the suggested INTEGRATIONS.md to contribute to, where could we add this to?
(of course, I'll add some more explanations & touches such that it's proper documentation)

Hey @NitzanHen I haven't created that file yet, but feel free to do so in your PR!

So far this works for me getting Zod to work with Formik (only semi-tested).
import * as z from 'zod'

class ValidationError extends Error {
  public name = 'ValidationError'
  inner: { path: string; message: string }[]
}

function createValidationError(e: z.ZodError) {
  const error = new ValidationError(e.message)
  error.inner = Object.keys(e.errors).map((k) => ({
    message: e.errors[k].message,
    path: e.errors[k].path.join('.'),
  }))
  return error
}

// Wrap your zod schema before passing it to Formik's `validationSchema` prop
export function toFormikYupSchema(schema: z.ZodSchema<any>) {
  return {
    async validate(obj: any) {
      try {
        await Promise.resolve(schema.parse(obj))
      } catch (err) {
        throw createValidationError(err)
      }
    },
  }
}

I've created a small library for this specific purpose
https://github.com/robertLichtnow/zod-formik-adapter


uclibc: Don't specialize PTRACE_O_MASK for uclibc

This constant comes from the kernel headers, so its value should not depend on the libc type.

r? @Amanieu
(rust-highfive has picked a reviewer for you, use r? to override)

That may be true but it may have a different value in the headers we check against in CI. I expect this to fail unless you update CI to use a more recent uclibc version.
@bors try

:hourglass: Trying commit c4d87be1dec471c514b73a24b181f810386ba76b with merge 0f6902fcdc4f19488b8f380e52308a5bcff540bd...

@Amanieu Does bors actually run the unit tests on targets in RUST_LINUX_NO_CORE_TARGETS? If so, I don't see where!

:broken_heart: Test failed - checks-actions

(Failure seems unrelated to this PR.)

This commit passed sparc64 test on my system. Looking at the error I kind of wonder if the virtual machine just failed to start. Maybe a re-run is needed.

Hmm you're right, I think it only checks that libc compiles, not that its definitions are valid.
In that case,
@bors r+

:pushpin: Commit c4d87be1dec471c514b73a24b181f810386ba76b has been approved by Amanieu

:hourglass: Testing commit c4d87be1dec471c514b73a24b181f810386ba76b with merge 6987bba7520d33a0e1bf647760d0fc3c85f34f5e...

The SPARC CI is a bit flaky and sometimes fails to start, we just restart it if that happens.

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing 6987bba7520d33a0e1bf647760d0fc3c85f34f5e to master...


tapdb: use the serializable isolation by default for postgres

In this commit, we start to use the serializable snapshot isolation by default for postgres. For sqlite, this is a noop as only a single writer is allowed at any time. With this mode, we should guard against all types of anomalies, at the cost of extra locking and potential perf hits.
One thing we'll need to test out is if the DB driver will automatically do retries or not if a transaction cannot be serialized.
This is an attempt at fixing #333 at a global level.

itest failure show we do indeed have an issue here:

2023-05-31 22:26:22.717 [WRN] UNIV: unable to log sync event: unknown postgres error: ERROR: null value in column "universe_root_id" violates not-null constraint (SQLSTATE 23502)

Alternative path for the last commit: https://github.com/powerman/pqx/blob/a6a4bb664f620589441e7b28d20464134af550c2/serialize.go#L16

itest failure show we do indeed have an issue here:

Fixed with the latest commit: we now retry (forever). We should log, and also consider an upper limit for retry as well.

Tacked on a proper retry loop PTAL.
Also has logging now so we can see how many times things need to be retried in practice.

Re calling rollback multiple times, looks like any second call will be a noop here due to the CAS: https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/database/sql/sql.go;l=2279-2284

Re calling rollback multiple times, looks like any second call will be a noop here due to the CAS: https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/database/sql/sql.go;l=2279-2284

Ah, yes. I overlooked that we just ignore the ErrTxDone in the defer call, so it's a no-op indeed.


GPU prediction race condition results in BasePredictionWriter observing incorrect (zero) values

🐛 Bug
When writing prediction results using a trivial BasePredictionWriter subclass with write_interval "epoch", the final batch is written as zeros when the following conditions are met:

GPU accelerator (haven't tested with other non-CPU accelerators)
Sufficiently expensive model that the CUDA stream has not completed by the time the prediction writer is called

(This is why BoringModel is not appropriate to reproduce here.)

I believe that this is a race condition resulting from non-blocking copies from GPU to CPU without explicit CUDA synchronization. This results in CPU tensors being incorrectly observed as zeros before the GPU computation completes. Details below.
To Reproduce
import argparse
import logging
import os

from torchvision.datasets import FakeData
from torchvision.models import resnet50
from torchvision.transforms import ToTensor

import pytorch_lightning as pl
from pytorch_lightning.plugins import DDPSpawnPlugin
from pytorch_lightning.callbacks import BasePredictionWriter
from torch.utils.data import DataLoader
import torch

logging.basicConfig(
    format='%(asctime)s %(levelname)-8s %(message)s',
    level=logging.INFO,
    datefmt='%Y-%m-%d %H:%M:%S')

class Model(pl.LightningModule):

    def __init__(self):
        super().__init__()
        # Arbitrary model, but this is a race, and the race needs the model to
        # be expensive enough to cause the CUDA stream to queue.
        self.model = resnet50(pretrained=False)

    def forward(self, x):
        x = self.model(x)
        # Return scalar values (easier to print), and ensure that 0s are not possible.
        # It's important that the result depends on the slow self.model(x) step.
        return (x.abs() + 0.1).sum(dim=1)

    def predict_step(self, batch, batch_idx, dataloader_idx=None):
        x, _ = batch
        y = self(x)
        return y

class InferenceWriter(BasePredictionWriter):
    """Writes predictions on epoch end."""

    def __init__(self, output_path: str):
        super().__init__("epoch")
        self.output_file = os.path.join(output_path, "predictions.pt")

    def write_on_epoch_end(
        self, trainer, module, predictions, batch_indices
    ):
        assert len(predictions) == 1
        predictions = predictions[0]
        outputs = torch.cat(predictions)
        logging.info("Saving output to %s.", self.output_file)
        torch.save(outputs, self.output_file)

    def read(self):
        return torch.load(self.output_file)

parser = argparse.ArgumentParser()
parser.add_argument("--output_path", required=True)
parser.add_argument("--batch_size", default=256, type=int)
parser.add_argument("--image_size", default=288, type=int, help="Image size for inference")

def main(args):
    dataset = FakeData(
        args.batch_size * 2,
        image_size=(3, args.image_size, args.image_size),
        transform=ToTensor(),
    )
    model = Model()
    dataloader = DataLoader(
        dataset,
        batch_size=args.batch_size,
        num_workers=2,
        persistent_workers=True,  # unnecessary here, but silences warning
    )
    writer = InferenceWriter(args.output_path)
    trainer = pl.Trainer(
        devices=1,
        num_nodes=1,
        accelerator="gpu",
        default_root_dir=args.output_path,
        strategy=DDPSpawnPlugin(find_unused_parameters=False),
        callbacks=[writer],
    )
    logging.info("Starting inference")
    trainer.predict(model, dataloaders=dataloader)
    logging.info("Loading features")
    outputs = writer.read()

    logging.info("First batch values: %s", outputs[:args.batch_size])
    logging.info("Second batch values: %s", outputs[args.batch_size:])

if __name__ == '__main__':
    args = parser.parse_args()
    main(args)

Output:
2021-12-31 05:27:38 INFO     First batch values: tensor([6145.3164, 6103.9824, 6139.4873, 6153.1626, 6133.7827, 6134.3999, ...
2021-12-31 05:27:39 INFO     Second batch values: tensor([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., ...

Expected behavior
Reproduce script: Both the first and the second batch (logged in the script above) should contain nonzero values, from the same distribution. The computation is such that zeroes are not possible outputs.
In general: Tensors returned to the user on API surfaces should contain valid values when their contents are observed.
Cause (I think)
If I understand the semantics of tensors copied from GPU to CPU with non_blocking=True, these tensors are unsafe without explicit CUDA synchronization to ensure that the CPU tensors have valid values (assuming the copy to CPU is covered by something like torch.cuda.synchronize()).
A non_blocking GPU -> CPU transfer creates a CPU tensor that is effectively a future, similar to CUDA tensors whose values have not resolved. But unlike CUDA tensors, the CPU tensor does not act like a future, and does not know that the value has not been written. As a result, operations that observe the tensor values do not wait for the tensor to be valid, and incorrect (zero) values are observed.
Since these futures are sharp edges, I suggest that we don't expose them to users unless we synchronize appropriately.
Similar bugs resulting from non-blocking GPU -> CPU copies have been reported elsewhere, for instance there are two similar reports on this thread.
Possible fixes
I think this could be done using cuda synchronization before callbacks that might see outputs that have been non-blocking moved to CPU. Calling torch.cuda.synchronize() before exposing affected tensors (CPU tensors from non-blocking copies from GPU operations) to the user might fix this.
However I think it would be better to not set non_blocking=True when copying tensors to CPU to avoid this case. It will be hard to find all the possible cases above. I don't see a strong argument to using non-blocking copies from GPU, and avoiding incorrect results due to the surprising behavior of these tensors seems like a compelling argument against. I expect that changing move_data_to_device to not set non_blocking when device is CPU should work.
Fixes I've tested
Copying tensors to CPU in predict_step: y = y.cpu(). This uses a blocking transfer, making Lightning's non-blocking .to() call a no-op.
Inspecting the result of GPU operations also fixes this, by forcing us to wait for the GPU. This has to be done on the GPU tensors, before the CPU copy. (eg. y.mean().item() in predict_step in the reproduce example).
Using CPU compute also fixes this, but is slow, since the examples need enough computation to expose the race with GPUs.
Additionally, various things to "win" the race condition here also work:

A simple sleep in write_on_epoch_end "fixes" this
Using a smaller inference size (reducing GPU compute) "fixes" this

Environment

CUDA:
- GPU:
- A100-SXM4-40GB
- A100-SXM4-40GB
- A100-SXM4-40GB
- A100-SXM4-40GB
- A100-SXM4-40GB
- A100-SXM4-40GB
- A100-SXM4-40GB
- A100-SXM4-40GB
- available:         True
- version:           11.2
Packages:
- numpy:             1.21.5
- pyTorch_debug:     False
- pyTorch_version:   1.10.0
- pytorch-lightning: 1.5.7
- tqdm:              4.62.3
System:
- OS:                Linux
- architecture:
- 64bit
- ELF
- processor:         x86_64
- python:            3.9.9

@edpizzi THanks for reporting this. I agree, that we should set non_blocking to False when the target device is CPU. Would you mind sending a PR for that?
Also: Do you have any idea, how we can test this in a preferably light way? I'm afraid that running a heavy model is not suitable within CI pipelines...

Yes, I can create a PR to omit non_blocking when copying to CPU. I have a draft, which looks like it's already linked here.
As for testing -- this is a race, which makes testing in a cheap way a bit difficult. But I haven't experimented with the limits of reproducibility. But changing the input resolution to 64x64 fixed the issue in my codebase. I personally think that omitting non_blocking for CPU tensors requires less testing than anything involving explicit synchronization. I'd be satisfied with demonstrating that the reproduce script passes as a one-off.


Tauri updater

adds updater to Tauri config
adds Tauri update keys to GitHub actions workflow

Currently, it will check for updates on the app launch. We still need to clarify UX for periodical checks and dropdown menu item for updates (check for update, install update, etc.)

We are going to abandon tauri actions in the future because it doesnt meet the requirements we have now.
I'm working on writing a new workflow and testing it, hopefully, it will finish soon.
What will happen to the updater then?

BTW, what are those requirements? Can we just submit a PR with additional capabilities to the official action or maintain a fork in the worst case?

@ozgunozerk it should work as long as we have gh actions workflow

Requirements are the following:

tauri actions only let us build the application for only one configuration (there are currently no way to provide both normal and opencl version for the same release)
tauri actions also do not let us rename the executables (we won't be able to rename them with opencl and with os_name)

When I contacted them, they suggested using a custom workflow instead of using tauri-actions.
We talked with Serge, and there may be lots of things to debug in tauri-actions. So, I went with re-writing our workflow without tauri-actions. It's here -> https://github.com/ozgunozerk/subspace-desktop-workflow/blob/main/.github/workflows/publish.yml

@ozgunozerk it should work as long as we have gh actions workflow

How to use these keys for updated without tauri-actions?

@ozgunozerk as far as I can see TAURI_PRIVATE_KEY and TAURI_KEY_PASSWORD are not used in the tauri-action itself. We just need to set these env variables when we create builds and bundles

@ozgunozerk as far as I can see TAURI_PRIVATE_KEY and TAURI_KEY_PASSWORD are not used in the tauri-action itself. We just need to set these env variables when we create builds and bundles

This doesn't make sense to me, why would we specify them if they are not used anyway?

Makes sense now :+1:


feat: Shared view between tabs

To sum up, I would love to have ionic tabs that share the same view like this:
   <ion-nav-view></ion-nav-view>

    <script id="templates/tabs.html" type="text/ng-template">
      <ion-tabs class="tabs-icon-top tabs-positive">

        <ion-tab title="Home" icon="ion-home" href="#/tab/home">
        </ion-tab>

        <ion-tab title="Profile" icon="ion-person" href="#/tab/profile">
        </ion-tab>

      </ion-tabs>
    </script>

My app have tabs that share a lot of views. For the moment, I have to create a specific state for each tab for each of these views, like I did in this codepen: http://codepen.io/mvidailhet/pen/LEeZdJ
When it's about one view it's ok, but when it's about more, it becomes a bit messy.
I don't really need to have a specific view by tab and would love it if the tabs could share the same one.
Actually, it kinda already works as is, but the history is messed up.
I managed to reset the history root each time I tap on a tab using the 'on-select' callback of ionTab.
But if I go in substates of a tab, I cannot go back to the root by taping again on the tab. I dug in the ionic code and found that if I replaced this line: https://github.com/driftyco/ionic/blob/master/js/angular/controller/tabsController.js#L69
by this line: $ionicHistory.goToHistoryRoot('root'); it worked. Seems that there is a history created for each tab. But I think the solution is not so trivial.
I tried to make a codepen whit this share view example, but it doesn't work. So I made a github project: https://github.com/mvidailhet/ionic-tabs-shared-view
If you go between tabs, you'll see that the history is reset. But If you go to the "Friends" tab and tap a friend in the list, if you try to tap the Friend tab again, it won't go back to the Friend root.
I hope I was enough explicit about my suggestion.
Love what you're doing with Ionic.

Greetings @mvidailhet!
My sensors indicate that you need to update your issue through our custom issue form. We are now requiring all issues to be submitted this way, to ensure that we have all of the information necessary to fix them as quickly as possible.
Click Here To Update Your Issue
I will have no choice but to close this issue if it is not resubmitted through the form. Please fill out the rest of the form, so that I may use my friendly robot powers to assist you.
Thank you!

Greetings @mvidailhet!
Thank you for the feature request. The humans and I will review this further and possibly add it to our Feature Request board, if we feel it is appropriate for Ionic.
Thank you for allowing me to assist you.

I would love to have this feature too, I know it is more related to angular UI router, but being able to mutualise the view and controller would be awesome, (think about a product page that is present everywhere in a retail-related app)

I there any update on this feature. please suggest a proper workaround for the smae

Any progress on this feature?


Topology view page ES node type show Unknow.

Please answer these questions before submitting your issue.

Why do you submit this issue?
[ ] Question or discussion
[x] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question

What do you want to know?

Bug

Which version of SkyWalking, OS and JRE?

Which company or project?

What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.

Requirement or improvement

Please describe about your requirements or improvement suggestions.

Should be replaced by #4386


Checking out how LFS works in GWDG Storage

On the workflow side of things https://gitlab.gwdg.de/rg-mpg-de/tei2zenodo might be an inspiration, though with different formats and target platforms in our case (ht @tboenig)

Test Repo for LFS: https://github.com/tdoan2010/test-lfs


How to automatically collect all the hard disks of a server

Consistent with the title，I have many servers. Some servers have different hard disks，maybe 37，maybe 61，maybe 13.

If you don't specify any devices in the config, they are scanned using the smartctl --scan-open command.

thanks! i will try it!

If you don't specify any devices in the config, they are scanned using the smartctl --scan-open command.

thanks! i'll try it !

If you don't specify any in the config, they are scanned using the command.devices``smartctl --scan-open

He suggested:
flag provided but not defined: -scan-open
Usage of ./smartctl_exporter:
-config string
Path to smartctl_exporter config file (default "/etc/smartctl_exporter.yaml")
-debug
Debug log output
-verbose
Verbose log output
-version
Show application version and exit


myaws ec2 ls Supports AvailabilityZone

$ myaws ec2 ls
i-xxxxxxxxxxxxxxxxx     t2.large      <IP_ADDRESS>   <IP_ADDRESS>      running 1 week ago      ap-northeast-1c test-app-server
i-xxxxxxxxxxxxxxxxx     t2.large      <IP_ADDRESS>   <IP_ADDRESS>       running 1 week ago      ap-northeast-1a test-app-server

Thanks!


push-release should use PUSH_LOCAL

Otherwise we could accidentally retag what's in the hub
@stevekuznetsov

/lgtm

Updated


FS-4251: Add "Name of asset" into Welsh form

This entire component was missing in the Welsh equivalent of the form, so adding it here
You can see the English equivalent here: https://github.com/communitiesuk/digital-form-builder/blob/116b184f96f60913a2aaeba2a336af7a36772f0c/fsd_config/form_jsons/cof/eoi/en/about-your-asset.json#L107-L126

what about the Welsh form?

This is the Welsh form, the English was already correct - if that's what you're asking?


vscode:// URLs not called when ctrl+clicking terminal output

Type: Bug
Context
I want to use vscode-URLs to directly drop into a debugging session. My script can be found at https://gist.github.com/vogelsgesang/d803377b8b143164961e08e58f5186c0
Expected behavior
When cmd-clicking this link from inside VSCode, I would expect to be dropped into the debugging session

Actual behavior
Instead, the link gets opened in VS Code's search bar

Additional information
I am sure the link itself is fine, because when I copy it from the console and paste it into Chrome's address bar, then VSCode opens my debugging session as expected.
Also see https://github.com/vadimcn/vscode-lldb/issues/755
VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:36:37.829Z)
OS version: Darwin x64 21.6.0
Modes:
Remote OS version: Linux x64 5.15.0-30-generic
Remote OS version: Linux x64 5.15.0-30-generic

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
4, 3, 2

Memory (System)
32.00GB (6.22GB free)

Process Argv
--crash-reporter-id 4660c967-d47d-475b-9e6c-050e56749010

Screen Reader
no

VM
0%

Item
Value

Remote
SSH: avogels-lx

OS
Linux x64 5.15.0-30-generic

CPUs
Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz (40 x 2200)

Memory (System)
62.50GB (33.73GB free)

VM
0%

Item
Value

Remote
SSH: avogels-lx

OS
Linux x64 5.15.0-30-generic

CPUs
Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz (40 x 2200)

Memory (System)
62.50GB (33.73GB free)

VM
0%

Extensions (7)

Extension
Author (truncated)
Version

better-cpp-syntax
jef
1.15.19

jupyter-keymap
ms-
1.0.0

remote-ssh
ms-
0.84.0

remote-ssh-edit
ms-
0.80.0

llvm
RRe
0.1.1

vscode-clangd
llv
0.1.21

vscode-lldb
vad
1.7.4

@connor4312 since the url would need to open a JS/browser debug session, would the JavaScript Debugger Companion Extension be of help here?

This is debugging with lldb, so it's not in the domain of js-debug

This is a request to essentially hook up the terminal link detector to whatever handles external custom protocol links. We may be able to just add vscode:// and vscode-insiders:// to the uri detection? This may need changes in the editor's link detector 🤔


Please include more details about the Event Log

For example, which Event "Source" or log should we expect to find these audited entries in.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7d74aa43-09f5-0079-2d7a-342fda884c82
Version Independent ID: 87a77027-3fc8-42a4-f070-b2bead59d570
Content: Test how Windows Defender ATP features work
Content Source: windows/security/threat-protection/windows-defender-exploit-guard/audit-windows-defender-exploit-guard.md
Product: w10
GitHub Login: @andreabichsel
Microsoft Alias: v-anbic

@officedocsbot assign @e0i

@itguysocal Thank you for reaching out.  You can find this in the Windows Event Log. "While the features will not block or prevent apps, scripts, or files from being modified, the Windows Event Log will record events as if the features were fully enabled. This means you can enable audit mode and then review the event log to see what impact the feature would have had were it enabled."

Right, but my question is "which" Windows Event Log? System? Security? Application? I couldn't find it. So if the documentation can please be updated to list which event log "source" (that's a type of event log)

@andreabichsel
As requested by the issue author, Lindsay needs more information regarding different types of Windows Event Log for her editing.
Could you kindly point us to a right direction?
Thanks.

I believe Applications and Services > Microsoft > Windows > Windows Defender > Operational.
@justinha Can you confirm with the product team?
@e0i I'm in another group now, and Justin's the right contact for these topics now. Thanks! :)

Andrea's right. For more info, see https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/event-views-exploit-guard

@Justinha
As requested by the issue author, Lindsay needs more information regarding different types of Windows Event Log for her editing.
Could you kindly point us to a right direction?
Thanks.

@itguysocal
With the help of your feedback, the issue has been reviewed and an update to the documentation has been published.
Thank you for your feedback.

@officedocsbot close


create a new Snapshot branch from master (#293)

There is some issue in Spring Security OAuth 2 Module. Please see here. https://github.com/spring-projects/spring-security/issues/9651
Will test further once the above issue resolve.


[compatible]  format: run dune fmt in src/app

I checked that running DISABLE_CHECK_OPAM_SWITCH=true make reformat does not make any addition changes.
Doing https://github.com/MinaProtocol/mina/pull/16117/ incrementally. It seems it will be stalled for a time, therefore porting the commits here, in case someone uses dune fmt on their machine instead of make reformat.
Explain your changes:
*
Explain how you tested your changes:
*
Checklist:

[ ] Dependency versions are unchanged

Notify Velocity team if dependencies must change in CI

[ ] Modified the current draft of release notes with details on what is completed or incomplete within this project
[ ] Document code purpose, how to use it

Mention expected invariants, implicit constraints

[ ] Tests were added for the new behavior

Document test purpose, significance of failures
Test names should reflect their purpose

[ ] All tests pass (CI will check this if you didn't)
[ ] Serialized types are in stable-versioned modules
[ ] Does this close issues? List them

Closes #0000

Closing for now. I would certainly open a new one in the future when I'll be back on Mina.


MacOS Support

For better or worse, I'll likely have a Macbook at my next job. I'd like to share parts of the work I've done in here to bootstrap and maintain a work-focused MacOS dev setup. I started some of this way back, but I have not owned a macbook for a long time now.
Ideas/Things to think about:

Only want work-focused things in the MacOS configuration (may wish to generalize this idea of work/play).
Brew supports "casks" now, which is likely my best bet for installing non-terminal applications.
Will likely want some convention of shared scripts vs mac/chromeos specific scripts.
Current beleyenv stores it's manually installed stuff in /usr/local/beleyenv/, then symlinks to /usr/local/bin. /opt may be more appropriate.
A generic way to hook into configuration/scripts in a separate private repo. The encryption approach I use now is too risky in terms of accidentally pushing secrets for some things, so I'd like two ways of handling that.

Some potentially useful stuff in https://github.com/MikeMcQuaid/strap

Initial implementation done to the point where my dev tools and configuration seemingly all works.  Will keep open until it feels it's gotten to maintenance mode.
Also need to add some docs, but the mac stuff will likely never be as well maintained for shared use as the ChromeOS side.

Add some final docs. While the implementation is not the most technically interesting thing, it's working well for my needs alongside my ChromeOS config.


Focus goes to bottom of list on search replace

When replacing the last match in a file, the focus jumps to the end of the file.
Steps to Reproduce:

Select a match that is the last in a file.
Focus jumps to the end of the file instead of jumping to the next file. :bug:

It should act like remove, which does this:

I suspect that it is because of the code here, which was originally written 6 years ago and seems to have a bug.

maybe i'm missing something, but in trying to test this, I don't see the search results showing both matches 🤔

I clicked enable and then it found all matches... though not sure why as terminalProfileQuickPick.ts should not be ignored

verified that this particular bug is fixed though 👏🏼

I clicked enable and then it found all matches... though not sure why as terminalProfileQuickPick.ts should not be ignored

terminalProfileQuickPick.ts

Did you press enter on the searchbox to manually search again after adding the string to the unsaved file? We won't be automatically refreshing/rerunning the search for changes in files that didn't previously have a match. I think what might have happened was that enabling the setting caused a search to run and catch the new changes on the dirty file.


Figure out if event trade counts as event trade

This one could be quite complex to implement, but would be so helpful. A way to figure out if all of the event trades count towards trade flairs would be great. So, if there are 11 trades that have jirachi and no other event, then only 11 count.
This will be quite complex though.

This is unnecessary now, as a trade is a trade. Closing.


Update sqlFilter & sqlExpression syntax

The syntax for this has changed.
https://stackoverflow.com/a/47903647/237723

@JoeBrockhaus : Thanks for your contribution! The author, @sethmanheim, has been notified to review your proposed change.

@JoeBrockhaus Thank you for catching that! We really appreciate it. Will get it merged right away.
#sign-off