feat(docs): Add initial /package & /package/[name] routes

While working on #56 I wanted to create a route /package/[name]/error/[name].
It couldn't be done without creating the parent routes first.
For starters, I think it's also best practice to use as much metadata as possible.
So we can directly focus on the content inside the /packages directory.
In the current state, what's used for each package route is:

package.json
README.md content

Oh and also, I've removed /examples in favour of package/*

@ciscorn  Is there any way I could see the logs from Cloudflare Pages building?
I suspect the errors might be related to usage of node:* modules.

@xeho91 Unfortunately, there isn’t an easy way for you to view the logs from Cloudflare Pages builds, as Cloudflare Pages doesn’t offer granular permissions for individual deployments. Essentially, it’s an all-or-nothing access to my account.
Here are the logs:
17:01:13.316 | file:///opt/buildhome/repo/apps/docs/.svelte-kit/output/server/entries/pages/package/_name_/_page.server.ts.js:2
-- | --
17:01:13.316 | import path$1, { join, dirname, win32, resolve as resolve$2 } from "pathe";
17:01:13.317 | ^^^^^
17:01:13.317 | SyntaxError: The requested module 'pathe' does not provide an export named 'win32'
17:01:13.317 | at ModuleJob._instantiate (node:internal/modules/esm/module_job:171:21)
17:01:13.317 | at async ModuleJob.run (node:internal/modules/esm/module_job:254:5)
17:01:13.317 | at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:482:26)
17:01:13.317 | at async Promise.all (index 8)
17:01:13.317 | at async analyse (file:///opt/buildhome/repo/node_modules/.pnpm/@sveltejs+kit@2.14.0_@sveltejs+vite-plugin-svelte@5.0.3_svelte@5.14.4_vite@6.0.5_@types+node@_bctgs6rfkwdn6dzcwakpnp7huq/node_modules/@sveltejs/kit/src/core/postbuild/analyse.js:74:16)
17:01:13.317 | at async MessagePort.<anonymous> (file:///opt/buildhome/repo/node_modules/.pnpm/@sveltejs+kit@2.14.0_@sveltejs+vite-plugin-svelte@5.0.3_svelte@5.14.4_vite@6.0.5_@types+node@_bctgs6rfkwdn6dzcwakpnp7huq/node_modules/@sveltejs/kit/src/utils/fork.js:23:16)
17:01:13.317 |
17:01:13.317 | Node.js v22.8.0
17:01:13.392 | ELIFECYCLE  Command failed with exit code 1.
17:01:13.424 | Failed: Error while executing user command. Exited with error code: 1
17:01:13.435 | Failed: build command exited with code: 1
17:01:14.243 | Failed: error occurred while running build command

@ciscorn Would it be okay to ask you to take over this PR?
Given the limitation of not being able to see the logs from Cloudflare Pages, I'm unable to figure out what's going wrong there.
I suspect currently it might be related to monorepo & Vite setup - Cloudflare Pages cannot see or blocks the access to /packages/ directory.

@xeho91 Sure, no problem 🫡
I’ll take a look at it tonight!

I can reproduce the build error on my Mac by running pnpm run build in the apps/docs:
/apps/docs/.svelte-kit/output/server/entries/pages/package/_name_/_page.server.ts.js:7
import path$1, { join, dirname, win32, resolve as resolve$2 } from "pathe";
                                ^^^^^
SyntaxError: The requested module 'pathe' does not provide an export named 'win32'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:180:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:263:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26)
    at async Promise.all (index 8)

I admit I haven't tested with pnpm build script. My bad. Still, error message is puzzling me. Could it be really issue with pathepackage?
I can investigate it soon, I'm on the way to my hometown and in around 1h I'll land in the coffee shop, so I can get my hands on my laptop finally.

Blocked by: https://github.com/unjs/pathe/pull/193

@ciscorn There's one issue left, which I suspect might be on the Sveltepress side. I've reported it on their Discord. But I'll leave you to decide if this should block us from moving further.

@xeho91 It seems like the styles might be broken 🤔

Yeah, that's what I meant in the previous comment. I realised now I wasn't descriptive enough.
My initial hopes was to help support svelte ecosystem and use what exist already. I fear the timing might be inconvenient for us (holiday season and the project isn'tthat active), and I probably wouldn't be that much blocked with using existing UI libraries. Together with shiki, remark, rehype, etc.
tl;dr; I don't feel any productivity boost from using Sveltepress.
P.S. Do you mind hop up for a chat on Discord? I'd like to settle on decision regarding the UI components library.

I’ve been thinking the same thing for a while.
I’m out right now, but I’ll check Discord later. Sorry for the wait.
Here’s an example of my setup for reference: https://svelte-maplibre-gl.mierune.dev/examples/side-by-side
(SvelteKit + mdsvex + Shiki + shadcn-svelte)

I'm sold on this setup.
I wanted to ask you which one of UI libraries you felt the most comfortable with. But I think I have the answer. I have a faith that based on your setup this will work better without too much digging into internals, like with Sveltepress.
I'm okay to ditch Sveltepress in another PR. I don't think we're losing too much, as most of the code is basically using SvelteKit features.
I can work on this another PR.
P.S. I'm in awe of how much effort was put into this project, looks slick, and those examples are amazing!!! You and your team definitely know how to show a value!

I’m glad to see how both projects are influencing each other.
If you’re okay with it, how about starting by copying this setup? I probably won’t have enough time again today until late evening, so it’s totally fine if you set it up yourself. (Our docs is still WIP, so there’s much room for improvement). Feel free to copy the styles as well.
Here’s a short explanation for the choice of components:

SSR/SSG Framework → SvelteKit is the obvious choice.
Markdown integration → MDsveX is specifically designed for embedding Svelte components in Markdown, which is ideal for documentation.
Syntax highlighter → Shiki is modern and comes with neat default themes.
UI components → The shadcn-svelte family (Bits UI and Melt UI) is well-maintained and already supports Svelte 5.

I think using the README as the package description in the docs is a great idea!

I’m glad to see how both projects are influencing each other.
If you’re okay with it, how about starting by copying this setup? I probably won’t have enough time again today until late evening, so it’s totally fine if you set it up yourself. (Our docs is still WIP, so there’s much room for improvement). Feel free to copy the styles as well.
Here’s a short explanation for the choice of components:

SSR/SSG Framework → SvelteKit is the obvious choice.
Markdown integration → MDsveX is specifically designed for embedding Svelte components in Markdown, which is ideal for documentation.
Syntax highlighter → Shiki is modern and comes with neat default themes.
UI components → The shadcn-svelte family (Bits UI and Melt UI) is well-maintained and already supports Svelte 5.

Please allow me to work on this PR. I'm about to finish my errands, then I can start working on it.
I'll be studying and copying the bits from svelte maplibre project. This will also allow me to have a chance to understand how it works, and get used to this setup faster ☺


3321: allow for localised routes

The route_translator gem allows route names to be moved into the locale dictionaries. Redirects will need to have I18n.locale passed through manually.

Looks good :+1:


local file mounted as folder in container on flatcar docker swarm node

Description
[ 1 paragraph concisely describing the bug ]
A deploy of SigNoz to a docker swarm node running flatcar 3815.2.3 fails, because apparently some local configuration files are being mounted as folders instead of files in a container.
Impact
[ 1 sentence detailing the impact this bug is creating for you ]
For now the impact is minor, as we are just in the initial phase of testing SigNoz.
Environment and steps to reproduce

Set-up: [ describe the environment Flatcar/Lokomotive/Nebraska etc was running in when encountering the bug; Platform etc. ]
The Flatcar instance is running on a bare-metal x86_64 server.
The instance has been initialized as a docker swarm master node.

Task: [ describe the task performing when encountering the bug ]
I was trying to deploy SigNoz to the swarm node, using docker compose and the docker-compose file provided by the SigNoz GitHub repository.

Action(s): [ sequence of actions that triggered the bug, see example below ]
a. git clone -b main https://github.com/SigNoz/signoz.git
b. cd signoz/deploy/docker-swarm
c. docker compose -f clickhouse-setup/docker-compose.yaml up -d

Error: [describe the error that was triggered]

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "****/docker-swarm/signoz/clickhouse-setup/clickhouse-config.xml" to rootfs at "/etc/clickhouse-server/config.xml": mount ****/docker-swarm/signoz/clickhouse-setup/clickhouse-config.xml:/etc/clickhouse-server/config.xml (via /proc/self/fd/7), flags: 0x5000, data: context="system_u:object_r:container_file_t:s0:c392,c505": not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Expected behavior
[ describe what you expected to happen at 4. above but instead got an error ]
All containers would start running.
Additional information
Please add any information here that does not fit the above format.
The same deployment has been tested towards a docker swarm node running on AlmaLinux 9, where the files are correctly mounted as files in the container, and all containers starts running.
The section in the docker-compose.yaml file, that results in the error, looks as follows:
  clickhouse:
    <<: *clickhouse-defaults
    hostname: clickhouse
    # ports:
    #   - "9000:9000"
    #   - "8123:8123"
    #   - "9181:9181"
    volumes:
      - ./clickhouse-config.xml:/etc/clickhouse-server/config.xml
      - ./clickhouse-users.xml:/etc/clickhouse-server/users.xml
      - ./clickhouse-cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
      #- ./clickhouse-storage.xml:/etc/clickhouse-server/config.d/storage.xml
      - ./data/clickhouse/:/var/lib/clickhouse/

In my debugging, I tried modifying the above section slightly, to have a peek into the container filesystem:
   clickhouse:
    <<: *clickhouse-defaults
    hostname: clickhouse
    # ports:
    #   - "9000:9000"
    #   - "8123:8123"
    #   - "9181:9181"
    command: "ls -la /etc/clickhouse-server"
    volumes:
      - ./clickhouse-config.xml:/etc/clickhouse-server/config1.xml
      #- ./clickhouse-users.xml:/etc/clickhouse-server/users.xml
      #- ./clickhouse-cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
      ## - ./clickhouse-storage.xml:/etc/clickhouse-server/config.d/storage.xml
      #- ./data/clickhouse/:/var/lib/clickhouse/

Which resulted in the following output from the container:
clickhouse-1               | total 124
clickhouse-1               | drwxrwxrwx    1 1000     1000          4096 Jun 22 14:08 .
clickhouse-1               | drwxr-xr-x    1 1000     1000          4096 Jun 22 14:08 ..
clickhouse-1               | drwxrwxrwx    1 root     root          4096 Feb  2 11:46 config.d
clickhouse-1               | -rw-rw-rw-    1 1000     1000         78357 Feb  1 13:43 config.xml
clickhouse-1               | drwxr-xr-x    2 root     root          4096 Jun 21 20:03 config1.xml
clickhouse-1               | drwxrwxrwx    2 root     root          4096 Feb  2 11:46 users.d
clickhouse-1               | -rw-rw-rw-    1 1000     1000          5672 Feb  1 13:43 users.xml

As can be seen, the config1.xml file has been mounted as a directory!!
Docker Engine Info (with docker host running on AlmaLinux 9):
Client: Docker Engine - Community
Version:           26.1.4
API version:       1.45
Go version:        go1.21.11
Git commit:        5650f9b
Built:             Wed Jun  5 11:30:53 2024
OS/Arch:           linux/amd64
Context:           default
Server: Docker Engine - Community
Engine:
Version:          26.1.4
API version:      1.45 (minimum version 1.24)
Go version:       go1.21.11
Git commit:       de5c9cf
Built:            Wed Jun  5 11:29:11 2024
OS/Arch:          linux/amd64
Experimental:     false
containerd:
Version:          1.6.33
GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
runc:
Version:          1.1.12
GitCommit:        v1.1.12-0-g51d5e94
docker-init:
Version:          0.19.0
GitCommit:        de40ad0
Docker Engine Info (with docker host running on Flatcar):
Client: Docker Engine - Community
Version:           26.1.4
API version:       1.43 (downgraded from 1.45)
Go version:        go1.21.11
Git commit:        5650f9b
Built:             Wed Jun  5 11:30:53 2024
OS/Arch:           linux/amd64
Context:           default
Server:
Engine:
Version:          24.0.9
API version:      1.43 (minimum version 1.12)
Go version:       go1.20.12
Git commit:       fca702de7f71362c8d103073c7e4a1d0a467fadd
Built:            Tue May 21 11:03:41 2024
OS/Arch:          linux/amd64
Experimental:     false
containerd:
Version:          v1.7.13
GitCommit:        99b8088b873ba42b788f29ccd0dc26ebb6952f1e
runc:
Version:          1.1.12
GitCommit:        51d5e94601ceffbbd85688df1c928ecccbfa4685
docker-init:
Version:          0.19.0
GitCommit:        de40ad007797e0dcd8b7126f27bb87401d224240

FYI, the issue appears to also be present when deploying to a flatcar instance which has not been initialized for docker swarm usage.
The steps:
a. git clone -b main https://github.com/SigNoz/signoz.git
b. cd signoz/deploy/docker
c. docker compose -f clickhouse-setup/docker-compose.yaml up
Results in the following error being shown:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "***/signoz/deploy/docker/clickhouse-setup/clickhouse-config.xml" to rootfs at "/etc/clickhouse-server/config.xml": mount ***/signoz/deploy/docker/clickhouse-setup/clickhouse-config.xml:/etc/clickhouse-server/config.xml (via /proc/self/fd/7), flags: 0x5000, data: context="system_u:object_r:container_file_t:s0:c336,c904": not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Thanks, @tormath1
Actually, your question "Is the Git repository cloned with a specific user (different from core)" makes me realize that my problem is probably caused by the fact that I have checked out the code on my workstation, while I'm trying to deploy to a flatcar instance running on a remote host.
So basically, I guess I'm trying to do something that docker compose is not meant to do in the first place :/
Please feel free to close this bug report.


Will docker-mailserver support podman?

RHEL/CentOS 8 provide podman and buildah as the default container tools. So will docker-mailserver support podman?

Hi @OrwillT,
the whole podman eco-system is meant to be compatible with the Docker world, so I would suspect for it to work. But the only way to really find out is for you to try and then lets us know.
It should either fail early or not at all.

And the answer is no.
I can't deploy the docker-compse file with podman-compose, and also can't use setup.sh to visit container.

This is a community effort and the docker image itself might run even if the compose scripts (which are only provided as a template anyway) fail. If you can make it work we'll be happy to consider a PR and/or to update the documentation! Personally I don't intend to use podman any time soon, though.

I believe I'll give it a try when I could as soon as possible.

Nov 21 19:11:53 los00 amavis[261]: Net::Server: Group Not Defined.  Defaulting to EGID '111 111'
Nov 21 19:11:53 los00 amavis[261]: Net::Server: User Not Defined.  Defaulting to EUID '109'

Is this correct?
Not only amavis have this issue, opendmarc, opendkim, dovecot have this user/group not defined issues too.

I get that error as well with docker. I don't like it, but as you say everything seems to work regardless.

@erik-wramner  @fbartels  #1327 Here it is.


Multilayer

For #349, adds --layer to cat and dump.  fio cat layer indexing is by name only to keep things simple.
The layer test function in test_fio_cat.py isn't very comprehensive but I didn't want to add a new test data source and couldn't seem to get any features out of test_gpx.gpx.  I did a better feature count test against a temp .gdb created with:
$ fio cat coutwildrnp.shp \
| fio filter "f.properties.NAME[:5] == 'Mount'" \
| fio collect \
| fio load multilayer.gdb --driver FileGDB --layer mountains

$ fio cat coutwildrnp.shp \
| fio filter "f.properties.NAME[:5] != 'Mount'" \
| fio collect \
| fio load multilayer.gdb --driver FileGDB --layer others

$ fio cat multilayer.gdb --layer "1.mountains,1.others" | wc -l
67

@smnorris I tested this and it's looking good. It can be used on a directory of files as well as a geodatabase.
$ fio cat --layer 1.coutwildrnp tests/data/

I'd like to see ':' as the separator between dataset and layer because '.' is generally valid in directory and file names (not true for ':') and the split will fail in some cases.
I just tried an unrealistic file index and got GeoJSON out:
$ fio cat --layer 200000.coutwildrnp tests/data/

This should probably fail, yes?

Hmm, that should definitely fail. Probably want to raise one of these: http://click.pocoo.org/5/api/#click.BadParameter
Too bad the indexes can't be validated in the callback.
Thanks for your patience!

Great work @smnorris!


Add support to enable Mercure when running php-server

Adds Mercure with the default options when running php-server --mercure (no option to extend the config at the moment, but that can come later, maybe when #413 is implemented)

Thanks!!


adding checks for conflicting extensions

accept a list of conflicting extensions via .ini. If a conflicting extension is loaded, do not initialize opentelemetry.

It's not pretty code, but seems to do the job.
I think that because module init runs pretty early in the PHP lifecycle, not everything is initialized yet - trying to create a HashTable or other prettier ways to iterate through modules seems to segfault. I ripped off the parsing logic from another part of php source code.

LGTM


Chore: Fix license in nix flake

Description
https://github.com/GlareDB/glaredb/blob/8a943f518bda7e8da98ecae9d527a537584f7351/flake.nix#L37
agpl3 doesn't exist; only agpl3Only or agpl3Plus are valid

@cmoog as per the PR that added this


Import rewrite not picking up the extension in modules. TS Monorepo support

Describe the bug
Our use-case is to run vite in the context of a typescript+vue monorepo. So far, working great except for an issue we've been noticing:
When importing a typescript workspace module (same treatment as a regular node module), we don't want to bundle it so we add it in the exclude config optimizeDeps: { exclude: ['module-ts-lib'] } for obvious reasons: we want to treat those modules as part of our app (with watchers etc..).
However, we noticed .ts files inside workspace module in this case are not transpiled correctly.
It seems they are treated as .js file and are not piped through esbuild because import rewriting behave differently depending if the file is in a module or part of your src app.
inside a workspace module

inside a regular src file

As you can see the import rewriting loses the extension when the file is inside a module. We believe it is because of this implementation https://github.com/vuejs/vite/blob/3355bc8f1c1e7a5b2e51fc333104bf1dff8b2cc1/src/node/resolver.ts#L47 which uses fs (can't work for module)
As a consequence, the path without extension is not able to assert this condition https://github.com/vuejs/vite/blob/master/src/node/server/serverPluginEsbuild.ts#L22
and is not transpiled.
We believe our use-case is legitimate because we see there is already code to support it here https://github.com/vuejs/vite/blob/ead7c93335b3a04558e159a763c66c922e7eace1/src/node/server/serverPluginModuleResolve.ts#L38
Finally, here is our own take on a very naive fix to workaround the issue (very likely to be trash but fixes issue locally): https://github.com/jamiealex/vite/commit/b50b17a2f1a6043c91cba175780f0ab0389f0470
Keep up the good work! Vite is already awesome!
Reproduction
https://github.com/jamiealex/vite-monorepo-repro
Logs
vite:rewrite     "./local-test" --> "/local-ts-lib/local-test.ts" +2ms
vite:resolve (extension) /vitetest/local-ts-lib/local-test -> /vitetest/local-ts-lib/local-test.ts
vite:rewrite     "./module-test" --> "/@modules/module-ts-lib/module-test?import"
vite:resolve (node_modules) module-ts-lib/module-test -> module-ts-lib/module-test.ts

https://github.com/vitejs/vite/issues/195#issuecomment-637725505


Accept wss in addition to https for x-forwarded-proto

What kind of request is this (question/bug/enhancement/feature request):
Bugfix
Steps to reproduce (least amount of steps as possible):
Access Rancher behind a reverse proxy that sets the x-forwarded-proto header to wss when a websocket request is made to it over HTTPS.
Result:
Rancher looks for a value of https in the x-forwarded-proto header at
https://github.com/rancher/rancher/blob/7a898ff87276951d95310b4dacb87020aa9e0de9/pkg/dynamiclistener/server.go#L505-L507
to determine whether to serve the request; otherwise it falls through to a redirect on error condition. Rancher should also accept wss as a valid forwarded protocol. For reference, Traefik sets its value for this header at https://github.com/containous/traefik/blob/a20a6636b4582e4e7b562fc01f64567775fc8a9a/pkg/middlewares/forwardedheaders/forwarded_header.go#L143-L149
Other details that may be helpful:
This is a continuation of the self-closed ticket at https://github.com/rancher/rancher/issues/24202, and a much more in-depth background is offered by that user on Traefik's issue queue at https://github.com/containous/traefik/issues/5533#issuecomment-553823512.
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.3.3
Installation option (single install/HA): HA, behind Traefik 2.0 (as noted above)

Updated - this code is now at https://github.com/rancher/rancher/blob/4ff98cc603ea47528062ee6994d2a5e58a29ed5a/pkg/clusterrouter/proxy/proxy_server.go#L214-L221

Not stale.

Not stale.

Not stale


Update Client SDK

Add updated client SDK code for new collections
Add DxUtils class for using SDK with DX components

Build finished.

Build finished.


Process put in state sleep after a few minutes

commit: 85007157fdea6aad5a387f474f4ec89bc0b21a31
I ran this command to run NAS locally on my computer:
mpirun -np 2 python -m deephyper.search.nas.nas_a3c_sync --evaluator subprocess --problem 'deephyper.benchmark.nas.linearReg.problem.Problem' --run 'deephyper.search.nas.model.run.alpha.run'

The code start to run, the logger print good stuff in deephyper.log, the training of submodels is starting, 1, 2, 3 epochs then all processes are put in SLEEP state.
Not any error is returned.

Made modifications to:
deephyper/deephyper/evaluator/_subprocess.py
Prevents processes from being put to sleep by parsing stdout and saving result temporarily
Thanks to @Deathn0t for the brains!
Commit id: 2be7a2424151268cdd22bde38e3f9dd741f026b7


Improvement while checking sha256sum

Probably not very relevant for our use case but see comment on SO for buffering large files.
Originally posted by @sed-i in https://github.com/canonical/loki-operator/pull/42#discussion_r758411039

Not worth doing as promtail is about 50MB unzipped.


Sketch of reading from GeoArrow struct encoding

This is a sketch (only point and multipoint are implemented for now) of reading from the proposed struct encoding in the geoarrow spec.
GeoArrow is undecided as of now whether the point object should be represented by a logical "struct" (physically, the x and y arrays are distinct in memory) or a logical "fixed size list" (physically, x and y coordinates are interleaved). This PR implements the struct approach; it's not hard to switch between the two, so we could implement both for now and then remove one if/when the geoarrow spec chooses one for the standard.
Notes:

If feedback is good, I'd work to add the rest of the types. It's pretty straightforward, though ensuring offsets are all correct can be a little tedious (and will need tests ofc)
Arrow extension types are used to clarify the meaning of various data types. For example a List<Struct<x: f64, y: f64>> (i.e. a logical type representing a variable size list of x,y structs) could either represent a multipoint or a linestring, so we need some metadata to describe which it is. Arrow2 has an example here of using extension types. Geoarrow extension type names are defined here.
Not sure how to represent null geometries through geozero. In arrow, every value has a null bitmap, so every geometry can be null
In the long term, I still want to work towards geo traits, but this seems a worthwhile stepping stone.

Related to https://github.com/georust/geozero/issues/37

Code looks fine for me so far!
geozero has very limited support for empty (null) geometries. See this discussion for more details: https://github.com/georust/geozero/pull/20#discussion_r840003700

For now I switched to prototyping a geoarrow implementation as a crate in geopolars so that I could iterate faster, and in the future I think it would make sense to come back and figure out how to integrate with geozero.
I suppose I could also just implement GeomProcessor in the geoarrow crate and keep it as a separate implementation, like the flatgeobuf crate is.

Closing this because this was implemented in https://github.com/geoarrow/geoarrow-rs


Point to corrected swagger URL

What does this pull request do?
Corrects the API docs URL to point to:

What is the intent behind these changes?
Make the link work

i just pushed a branch with the exact same change - thanks!

Oops, sorry @tomsmyers


Feature Request: Required configuration settings

A useful feature would be to specify which configuration settings are required. If the setting is missing, an error is raised on retrieval or on read.
Currently, I use:
config.fetch(:email) { raise "Missing required email field" }

Maybe something like this?
config.required(:email)

Hi Michael,
Thanks for using this gem!
I'm not sure this is something that should be included. I wish to keep things minimal. Validation logic is best kept outside of the library.
I also wonder if this is a good thing to be checking for a value when you're fetching/reading it. Probably, it's best if your application checks/forces the email to be set first. You can further enforce that it is not nil by using validate. You can also use the block form so that the value is checked on read.
config.validate(:email) do |key, val|
  raise "BOOM" if val.nil?
end
config.set(:email) { nil } # delayed evaluation
config.fetch(:email) # => raises "BOOM"

That's understandable. I don't think validation should be in the gem either, since that's up to the user's requirements. I figured it might be useful to have a short way to specify that a field is required. For multiple required fields, it gets boilerplatey to repeat raising exceptions.
I was unaware that you could use #validate for fields that aren't set. I thought it only checked the field if it was present. If that's the case, then I can probably rewrite some of my code.


parser+test: Fix precedence of ranges

This changes the parsing rules for ranges, which lets them have a more correct precedence when used in more situations. The common one this will fix is when a range is used in a match separated by | to say "one of these ranges match".
Example:
match abc {
    100..200 | 300..400 => println("success")
    else => println("failure")
}

...is what I would normally say, but looks like we have some non-"operand"s in the codebase...

@alimpfard ahh looks like we'll need to stop treat or like an operator at least somewhat.
Will try to take another look in a bit but if other folks want to have a try please do.

Okay, for ranges expressions as an endpoint will need parens. Otherwise we just assume it's an operand. Had to update a couple places in selfhost but hopefully that fixes it.

...and we're green. Going ahead and landing. cc @awesomekling


Fix/new-app Makefile rule for old xcode

This PR fixes an issue with XCode < 14.3 that fails when we run yarn expo prebuild in the new-app Makefile rule.
See https://github.com/expo/expo/issues/25905#issuecomment-1926852042

👀

APP_NAME=MyApp make new-app now works. When I do npx react-native run-ios, it give the following error. (The same error if I build the project in Xcode.)
In file included from /Users/remap/gnonative/examples/js/react-native/MyApp/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp:10:
In file included from /Users/remap/gnonative/examples/js/react-native/MyApp/ios/Pods/Headers/Public/React-debug/react/debug/react_native_assert.h:52:
/Users/remap/gnonative/examples/js/react-native/MyApp/ios/Pods/Headers/Public/glog/glog/logging.h:512:1: fatal error: import of module 'glog.glog.log_severity' appears within namespace 'google'
#include "glog/log_severity.h"
^
/Users/remap/gnonative/examples/js/react-native/MyApp/ios/Pods/Headers/Public/glog/glog/logging.h:509:1: note: namespace 'google' begins here
namespace google {
^

Fixing this issue is no longer our priority, closing for now.


ENV interpolation confusion

Description
Given a dockerfile such as
FROM docker/whalesay

ENV a var_a
ENV b var_b
ENV c "${a} and ${b}"

CMD echo a is ${a} | cowsay \
    && echo b is ${b} | cowsay \
    && echo c is \(a and b\) is ${c} | cowsay

And a command line
docker run -e "a=env_arg" whale-env
Describe the results you received:
ENV var ${a} contains the expected value as passed to docker run, however ENV var ${c} contains the variables set in dockerfile and not the new value of ${a}
Describe the results you expected:
ENV  var ${c} should contain the updated variable value.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   78d1802
 Built:        Tue Jan 10 20:31:39 2017
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   78d1802
 Built:        Tue Jan 10 20:31:39 2017
 OS/Arch:      linux/amd64

Output of docker info:
Containers: 22
 Running: 1
 Paused: 0
 Stopped: 21
Images: 31
Server Version: 1.12.6
Storage Driver: devicemapper
 Pool Name: docker-8:6-661585-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 1.645 GB
 Data Space Total: 107.4 GB
 Data Space Available: 2.128 GB
 Metadata Space Used: 4.19 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.128 GB
 Thin Pool Minimum Free Space: 10.74 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
  During docker build, a = env_a, b = env_b, and c = env_a and env_b.
The CMD is the default command that's executed when running the image. When docker starts the container, it takes the env-vars that were defined in the image (with the values set during docker build), and sets those in the container.
If you set an env-var during docker run, the value for that environment variables is overridden, but the steps performed during docker build are not re-evaluated (as those are baked into the image you created).
Hope this makes it clearer!
Please keep in mind that the GitHub issue tracker is not intended as a general support forum,
but for reporting bugs and feature requests. For other type of questions, consider using one of;

https://forums.docker.com
the Docker community Slack channel
StackOverflow

I'm going to close this issue because this is not a bug, but feel free to continue the conversation 👍

Ah, so this is classed as a feature :) Unfortunately this sort of dockerfile implementation would be a very common pattern in many configuration management tools or shell scripts, using ENV variables and inheriting them from one to another is really so fundamental that i think docker build and docker run should alert the user at the very least that run time time overrides wont be honoured. A documentation update or warning would also be useful, I'll look into contributing that.

The problem here is that not only is the Dockerfile no longer known at runtime (i.e., if I docker pull an image, the contents of the Dockerfile that was used to build the image is not known), re-evaluating them at runtime (even without the substitution in $c) will not solve such issues, e.g.;
FROM foo
ENV major=1
ENV minor=1
RUN curl -o foo https://example.com/packages/foo-${major}.${minor}.tar.gz

docker build -t myapp .
docker run --env minor=2

Would not execute the RUN command, unless the entire image is built again.
Improving the docs around this may be good though, given that it was not clear to you, so looking forward to a pull request.

Using your example above, it is not the evaluation by RUN it would be evaluation by ENV that is not happening at run time
FROM foo ENV major=1 ENV minor=1 ENV version=${major}.${minor} CMD curl -o foo https://example.com/packages/foo-${version}.tar.gz
docker build -t myapp . docker run --env minor=2
Is more indicative of the problem in my mind. RUN and similar declarative items are more obviously build time only options, but we are told environment variables are settable but the above would fail to do expected.
Perhaps, a variable such as BUILDENV would have been a better name for this specific variable, perhaps ARG was introduced for this but the docs didn't reflect it. Unfortunately my knowledge of docker history is very limited.

Is more indicative of the problem in my mind.

True, the basic problem would be the same though;
$ docker build -t repro-30458 -<<EOF
FROM busybox
ENV major=1
ENV minor=1
RUN echo \${major}.\${minor} > /version.txt
CMD echo "env says installed version is \${major}.\${minor}, but it actually is:" && cat /version.txt
EOF

$ docker run --rm repro-30458
env says installed version is 1.1, but actually it is:
1.1

$ docker run -e minor=2 --rm repro-30458
env says installed version is 1.2, but actually it is:
1.1

Perhaps, a variable such as BUILDENV would have been a better name for this specific variable

I can see it being confusing, given that for some commands, these variables are interpolated at build time (e.g, ENV), but for others they are interpolated at runtime. Interpolation of variables was an a later addition to the existing ENV command. Renaming that command would be too much of a breaking change, but improving the docs is a good suggestion.
ARG was introduced to set shell variables at build-time, but don't persist them in the image as an environment variable. This allows you to, e.g.;
FROM foo
ARG major=1
ARG minor=1
RUN echo ${major}.${minor} > /version.txt
CMD echo "env says installed version is ${major}.${minor}, but it actually is:" && cat /version.txt

docker build --build-arg minor=2 -t myapp:1.1 .

docker run --rm myapp:1.1
env says installed version is ., but it actually is:
1.1


Error when leaving server

I get this error when I close a connection
[08:24:59] [Render thread/INFO]: [STDERR]: java.io.IOException: Invalid file path [08:24:59] [Render thread/INFO]: [STDERR]: 	at java.base/java.io.File.createNewFile(File.java:1041) [08:24:59] [Render thread/INFO]: [STDERR]: 	at kaptainwutax.seedcrackerX.config.StructureSave.saveStructures(StructureSave.java:30) [08:24:59] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_638.handler$bid000$disconnect(class_638.java:3123) [08:24:59] [Render thread/INFO]: [STDERR]: 	at net.minecraft.class_638.method_8525(class_638.java) ...
Am I missing a config setting or have something set wrong?

Are you using a custom file path for your minecraft instance or a custom launcher?

Yes - using MultiMC

Multimc is fine, maybe your worldname contains invalid characters for a file path

Correct, I see that there are files with world names with .txt when they're single-player, and servernames with an underscore and IP (but no extension).  Almost all these files are empty though.

Yes, it appears to happen for all servers, everytime, but not in single player.


Refactor code

@qur786 Please review and test thoroighly

@maneetgoyal sir did you run storybook after implementing the above changes ? Code looks okay but the storybook is not rendering and throwing error in browser console.

@maneetgoyal sir did you run storybook after implementing the above changes ? Code looks okay but the storybook is not rendering and throwing error in browser console.

try to resolve https://github.com/manufac-analytics/reactjs-calendar-heatmap/pull/7#discussion_r861549667 on high prioroty, that should fix this


Support type="email" and others in theme.css

Currently the ones supported are type="text" and type="password".

These have been added.


General JobType Coverage

This adds additional tests for the JobType class and increases coverage without modifying the JobType class itself.

@guidow, PTAL at 23cb112162b1cfbd849a423c54f295ec81a88141 when you get a chance.  This is one potentially breaking change I think this CL will be introducing.  The current implementation IMHO is currently broken because it ignores broken configuration entries (which in turn could break a job/task).

@guidow, PTAL.  There's still some places I can add coverage, and plan to, but I figured this was probably complete enough that it's ready for review.

There is a bit of a lull in my current project, so I'm taking some time to look at these PRs. Sorry again for keeping you waiting this long.
This one fails a test on my machine:
[FAIL]
Traceback (most recent call last):
File "/home/guido/git/pyfarm/pyfarm-agent/tests/test_jobtypes/test_core_jobtype.py", line 567, in test_uses_provided_create_time
    filename
File "/var/tmp/virtualenv/pyfarm-agent-python2/lib/python2.7/site-packages/twisted/trial/_synctest.py", line 437, in assertEqual
    super(_Assertions, self).assertEqual(first, second, msg)
File "/usr/lib64/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
File "/usr/lib64/python2.7/unittest/case.py", line 508, in _baseAssertEqual
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: '2016-1-28_14-47-56_1_0c6d2ebffb0c402aadab173b633a79bf' != '2016-01-28_14-47-56_1_0c6d2ebffb0c402aadab173b633a79bf'

tests.test_jobtypes.test_core_jobtype.TestJobTypeGetCSVLogPath.test_uses_provided_create_time

Other than that, this looks okay.

No worries, production can be like that so I understand.  Looks like #352 should fix the test above so we can probably merge that PR and this one once #353 merges.


Feat: align resource selector across policies

Signed-off-by: Somefive<EMAIL_ADDRESS>Description of your changes

Fixes #4594
I have:

[x] Read and followed KubeVela's contribution process.
[ ] Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
[x] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

/cc @fourierr

It covers my usage completely. How about exposing an operator to provide the ability of chossing "and" , "or" for user.

It covers my usage completely. How about exposing an operator to provide the ability of chossing "and" , "or" for user.

I actually think for a while, but this exposure might be a bit complex for user. The AND case is more reasonable I think, as you proposed in apply-once previously. The OR case on the other hand, can be implemented through configuring multiple rules, which is a bit more complex but available. By far, I haven't seen cases use OR actually. We can leave this for future implementation if we encountered lots of such usage.

It covers my usage completely. How about exposing an operator to provide the ability of chossing "and" , "or" for user.

I actually think for a while, but this exposure might be a bit complex for user. The AND case is more reasonable I think, as you proposed in apply-once previously. The OR case on the other hand, can be implemented through configuring multiple rules, which is a bit more complex but available. By far, I haven't seen cases use OR actually. We can leave this for future implementation if we encountered lots of such usage.

👌


Incorrect bounds on VFlow if using .frame(maxHeight:)

If using maxHeight instead of height on a VFlow in a ScrollView, the bounds is incorrect and the view is cut off.
    ScrollView {
        VFlow {
            ForEach(1...21, id: \.self) {
                Text("Item \($0)")
                    .padding(4)
                    .background(.orange)
            }
        }
        .frame(maxHeight: 300)
        .padding(16)
    }

.frame(maxHeight: 300)

.frame(height: 300)`:

Thanks @thedruid for reporting this issue. I can confirm this is a bug.
Unfortunately I haven't discovered a solution so far. Let me offer a workaround instead: .frame(maxWidth: .infinity, maxHeight: 300).
Let me describe the details so somebody might have an idea for a fix.
HFlow & VFlow has the same underlying implementation, they only differ in the axis parameter, so – I thought – their behavior should be identical in SwiftUI. However, when embedded into ScrollView, they behave differently.
SwiftUI tries various size proposals first to determine the flexibility of the view.
With the .frame(width: 300) modifier, the proposals are

Proposes 0.0x300.0, the layout returns 169.5x280.0
Proposes infx300.0, the layout returns 169.5x280.0
Proposes 600.0x300.0, the layout returns 169.5x280.0
Proposes 169.5x300.0, the layout returns 169.5x280.0
Eventually it settles with 169.5x300.0 when it calls placeSubviews (with bounds of size 169.5x280.0).
In the .frame(maxWidth: 300) case
Proposes 0.0 x unspecified, the layout returns 54.5x664.0
Proposes inf x unspecified, the layout returns 54.5x664.0
Proposes 600.0 x unspecified, the layout returns 54.5x664.0
Proposes 54.5 x unspecified, the layout returns 54.5x664.0
Proposes 54.5x300.0, the layout returns 169.5x280.0 (out of bounds, I think this is why we see the clipping behavior)
Eventually it settles with 54.5x300.0 for placeSubviews (with bounds of size 169.5x280.0)

What is interesting that SwiftUI probes the width but not the height, regardless of HFlow/VFlow being used. Maybe it deems that the width is not flexible enough so it stops.
The reason it returns 54 if because all subviews can fit into one column when the height is unconstrained.


iControlRESTSession needs to support the token=true argument for token auth

Starting with version 12.0 of TMOS token based authentication and authorization is supported by iControl REST.
BIG-IP remote-users access via iControl REST requires token based authorization. f5-common-python access to BIG-IP needs to support token authorization when access BIG-IP devices which are configured for remote-user support. This is a base requirement for all MSPs and most enterprises.
Use of token based authorization needs to be an option parameter for the connection as support for TMOS versions prior to 12.0 is also a requirement.

I'm surprised this hasn't been implemented yet. Is there any planned support for this to be implemented in the f5-common-python code?

@lasko yes. we will need to figure out what is required so that we can test and implement it.

a good read that should point us in right direction, shows usage of POSTMAN but should help out with working on this issue:
https://github.com/f5devcentral/f5-postman-collections/blob/master/F5 Automation %26 Orchestration - Introduction.pdf


Select all button not working

Hi, thank you for coding this really useful app. Im trying to unfollow about 3K accounts, but the option "select all"is not working, tried incognito, deleting browsing data, and still not allowing me to select all. Do you have any solution or work around this?

I just realized that also even tho is says completed, the bar at the top doesnt get to full and the select all option is grayed out
Thanks in advance!

Hi, thank you for coding this really useful app. Im trying to unfollow about 3K accounts, but the option "select all"is not working, tried incognito, deleting browsing data, and still not allowing me to select all. Do you have any solution or work around this?

Its an open issue already, but i didnt start checking it..

Totally understand, how can you pause it?

@WilmeRodas666

@davidarroyo1234 @WilmeRodas666 I tried using inspect element to fix it, it works, but ends up with some error

@WilmeRodas666  What has worked for me is right clicking the grey select all button, inspecting it, and editing the attribue from "disabled" to enabled. It has worked for me without any issue


Create a variable in the script for the share name

Docs Build status updates of commit 29ecf04:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/example-scenario/wvd/windows-virtual-desktop-fslogix-content.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit a062c1b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/example-scenario/wvd/windows-virtual-desktop-fslogix-content.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

@Heidilohr,
Can you review the proposed changes?
IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#Sign-Off


DEVX-147: microservices enhancements/bugs

Addresses:
https://github.com/confluentinc/kafka-streams-examples/issues/132
https://github.com/confluentinc/kafka-streams-examples/issues/130
https://github.com/confluentinc/kafka-streams-examples/issues/129
@benstopford : you said you addressed some of these, but I didn't see the commits and the GH issues are still open.  Not sure if anything is redundant here...

Yeah - looks good. I raised a separate PR for these with a few other fixes but i can pick it apart.


Sik-Ho Tang | Brief Review -- Self-Supervised Feature Learning by Learning to Spot Artifacts.

Sik-Ho Tang. Brief Review — Self-Supervised Feature Learning by Learning to Spot Artifacts.

Overview
Use GAN to Spot Artifact, Pretrained Discriminator Uses for Downstream Tasks.

A mixture of real images (green border) and images with synthetic artifacts (red border). Is a good object representation necessary to tell them apart?
Self-Supervised Feature Learning by Learning to Spot Artifacts, Spot Artifacts, by University of Bern, 2018 CVPR, Over 100 Citations (
Sik-Ho Tsang
@ Medium).
Self-Supervised Learning, GAN, Image Classification, Object Detection.

A discriminator network is trained to distinguish real images from images with synthetic artifacts.
This pretrained discriminator is then used for downstream tasks.

require prior knowledge...


The plugin isn't use in vite serve model

Clear and concise description of the problem
when using the command npm run dev, it doesn't work, tips: http://localhost:8000/_app.config.js status is 404
but the build type is normally
Suggested solution
We need support serving model running
Alternative
No response
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Thanks for the feedback, this will be fixed in version 0.1.5!

thanks, I watched your source code, When the application is development model should implant config code to an HTML file

Does the plugin only use build model?

Yes, this plugin was designed to only work at build time

If you are in a development environment, you should use the variables of the development environment.
https://github.com/kirklin/celeris-web/blob/master/packages/web/utils/src/config.ts

thanks, and I have some advice, on building a config JavaScript file that shouldn't remove space

user need usually edit it


Make Concuss::Runner return results

Right now, results from the runner are just spit out to the console. This issue should be solved with a few different changes:

Make the runner return a hash of results or some type of Results object that has the results of the test.
Add some configuration that lets the runner know when it's running in CLI mode so it outputs results immediately.

Fixed in https://github.com/PatrickTulskie/concuss/pull/5


[usability] improved docstring in the amp module

Improved the docstring for functions/classes exposed to the user so that it looks better on the ReadTheDocs.


Breadcrumbs: should be able to interact with folders in unfocused list

Issue Type: Bug
While typing, the search box maintains focus, but users can still use Enter to open files from the unfocused list view. However, you cannot operate on folders in the unfocused list view. It would be nice if you could use Enter or RightArrow to unfold a collapsed folder in the unfocused list view.
VS Code version: Code - Insiders 1.26.0-insider (b48367a8652bd0aa862638bbc24555a70823d3bd, 2018-07-17T05:18:46.758Z)
OS version: Windows_NT x64 10.0.16299

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: enabledvideo_encode: enabledvpx_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
15.93GB (7.77GB free)

Process Argv
C:\Users\t-jakea\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe .

Screen Reader
no

VM
0%

Extensions (8)

Extension
Author (truncated)
Version

Bookmarks
ale
9.0.0

gitlens
eam
8.5.0

tslint
eg2
1.0.34

Go
ms-
0.6.85-symbol-optimized

debugger-for-chrome
msj
4.8.0

subtle-brackets
raf
2.1.1

vscode-multiclip
sle
0.1.4

code-spell-checker
str
1.6.10

(1 theme extensions excluded)

It would be nice if you could use Enter or RightArrow to unfold a collapsed folder in the unfocused list view.

Tricky... Left/RightArrow has a meaning in text boxes because it moves the cursor.

closing as designed


suggest-commit-title-limit: Suggest length of PR title during creation / editing

Description
The suggest-commit-title-limit suggests the length of a commit title when a PR is about to be merged.
It would be nice to have a length warning also during creation and editing of the PR, to warn as early as possible and make it easier to merge things later (could also be a default-off option)
Screenshot
No response
Example URL
https://github.com/refined-github/refined-github/pull/5365

This already kind of happens if your window is large enough, the field is sized to fit exactly the limit, so you know how many characters are left by just treating the field as a progress bar:

However it's slightly off currently:

https://github.com/refined-github/refined-github/issues/3998

@fregante I think the feature request is about extending suggest-commit-title-limit to the "Compare" page and the conversation header (when editing the PR title).

Yes, sorry if that was unclear, I meant during creation and editing of the PR, not during merge.

The PR title limit is only a consequence of the commit title limit, which we kind of backport to the PR title with our other feature. I don’t think that exposing this limit when writing a PR title makes sense though:

The PR title is too long
Because the commit title is limited to 72 characters
And there's a feature that maybe will suggest shortening the commit title
And maybe the maybe-changed commit title will be set as a PR title

Ok, not sure I completely understand all of the details written above, but if I'm understanding correctly I guess the gist of it is:
"we already have a limit when squash merging, and having a limit in other cases often doesn't make logical sense"

More like "The PR title does not have a limit; the length only ever comes into play in a very specific set of circumstances that happen much later"

So I keep coming back to this, since some kind of feature would be a huge help to workflows with squash merging.
Eg. consider this situation:

A team is using squash merging
A team wants to know as early as possible about possible errors, not when they are in the process of merging

For this use case, I would be great to have an error earlier in the process.
Is it possible to detect squash merging and enable for this use case?
Or, another alternative which would also work: add a floating character counter in the input of the PR title during pull request creation, so that someone can just visually verify this, if it fits their workflow.
@fregante @cheap-glitch thoughts?

Reopened on the basis that super-long PR titles aren't exactly ideal either, however we can't show a red color in this case, maybe an orange or yellow is better if available.
A character count wouldn't be particularly helpful because it cannot/does not include the PR number " (#123) so: at what magic number do you have to stop on the PR #123? It's not 72, not 70, not 68, etc… so we need to use a similar logic to the commit title, except we silently subtract " (#123)".length from the total.


python311Packages.apprise: 1.7.6 -> 1.8.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python311Packages.apprise is: Push Notifications that work with just about every platform
meta.homepage for python311Packages.apprise is: https://github.com/caronc/apprise
meta.changelog for python311Packages.apprise is: https://github.com/caronc/apprise/releases/tag/v1.8.0
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.8.0 with grep in /nix/store/yzg0lv342lcrmh5bjaf5qjxsk97kvsn0-python3.11-apprise-1.8.0
found 1.8.0 in filename of file in /nix/store/yzg0lv342lcrmh5bjaf5qjxsk97kvsn0-python3.11-apprise-1.8.0

Rebuild report (if merged into master) (click to expand)

12 total rebuild path(s)

12 package rebuild(s)

First fifty rebuilds by attrpath

apprise
borgmatic
changedetection-io
healthchecks
home-assistant-component-tests.apprise
mealie
moonraker
python311Packages.apprise
python312Packages.apprise
sabnzbd
unifi-protect-backup

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/yzg0lv342lcrmh5bjaf5qjxsk97kvsn0-python3.11-apprise-1.8.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python311Packages.apprise https://github.com/r-ryantm/nixpkgs/archive/89aa9786127886d217367bafd62dd364b6ff1a70.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/89aa9786127886d217367bafd62dd364b6ff1a70#python311Packages.apprise

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/yzg0lv342lcrmh5bjaf5qjxsk97kvsn0-python3.11-apprise-1.8.0
ls -la /nix/store/yzg0lv342lcrmh5bjaf5qjxsk97kvsn0-python3.11-apprise-1.8.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

16 packages built:

apprise (python311Packages.apprise)
apprise.dist (python311Packages.apprise.dist)
borgmatic
borgmatic.dist
changedetection-io
changedetection-io.dist
healthchecks
home-assistant-component-tests.apprise
mealie
mealie.dist
moonraker
python312Packages.apprise
python312Packages.apprise.dist
sabnzbd
unifi-protect-backup
unifi-protect-backup.dist

Maintainer pings

Result of nixpkgs-review pr 310967 run on x86_64-linux 1

16 packages built:

apprise (python311Packages.apprise)
apprise.dist (python311Packages.apprise.dist)
borgmatic
borgmatic.dist
changedetection-io
changedetection-io.dist
healthchecks
home-assistant-component-tests.apprise
mealie
mealie.dist
moonraker
python312Packages.apprise
python312Packages.apprise.dist
sabnzbd
unifi-protect-backup
unifi-protect-backup.dist


[e2e]: generic schedule main default slsa3

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/10104993219
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.generic.schedule.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.generic.schedule.main.default.slsa3.yml
Trigger: schedule
Branch: main
Date: Fri Jul 26 03:04:12 UTC 2024

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/10104993219
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.generic.schedule.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.generic.schedule.main.default.slsa3.yml
Trigger: schedule
Branch: main
Date: Fri Jul 26 20:20:13 UTC 2024
Tests are passing now. Closing this issue.


Failure logs from scripts (like New-TestResources.ps1) do not show line numbers

This makes it pretty hard to narrow down where issues are coming from, as often the exceptions thrown and logged are from dependencies.

I think we need to set the ErrorPreference to get that extra context.

Will reproduce the error first.
Figure out where the place to hide the line.


fix: set the consistency parameter correctly in OpenFGAClient

Description
In #129 I somehow overlooked setting the consistency parameter on the underlying API request body, this correctly does that and then adds tests to ensure that this is carried through as expected.
References

Review Checklist

[x] I have clicked on "allow edits by maintainers".
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected

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

Project coverage is 88.13%. Comparing base (15829c3) to head (1370a12).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #143   +/-   ##
=======================================
  Coverage   88.13%   88.13%
=======================================
  Files          19       19
  Lines        1003     1003
  Branches      150      133   -17
=======================================
  Hits          884      884
  Misses         82       82
  Partials       37       37

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


plot_sky error

Every call to the function astroplan.plots.plot_sky raises an exception.
Even with the tutorial example.
Here a minimal code that triggers the error:
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import astropy.units as u
import astroplan, astroplan.plots, astropy.time

apo = astroplan.Observer.at_site('APO')
vega = astroplan.FixedTarget.from_name('Vega')
observe_time = astropy.time.Time(['2000-03-15 15:30:00'])

astroplan.plots.plot_sky(vega,apo, observe_time)
plt.show()

Expected behaviour: a nice polar plot with the position of Vega.
Actual outcome:
Traceback (most recent call last):
  File "./plots-10.py", line 12, in <module>
    astroplan.plots.plot_sky(vega,apo, observe_time)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/astropy/units/decorators.py", line 234, in wrapper
    return_ = wrapped_function(*func_args, **func_kwargs)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/astroplan/plots/sky.py", line 216, in plot_sky
    ax.set_thetagrids(range(0, 360, 45), theta_labels)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/matplotlib/projections/polar.py", line 1346, in set_thetagrids
    self.set_xticklabels(labels)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 63, in wrapper
    return get_method(self)(*args, **kwargs)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper
    return func(*args, **kwargs)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/matplotlib/axis.py", line 1793, in _set_ticklabels
    return self.set_ticklabels(labels, minor=minor, **kwargs)
  File "/opt/anaconda3/envs/astroplan/lib/python3.8/site-packages/matplotlib/axis.py", line 1714, in set_ticklabels
    raise ValueError(
ValueError: The number of FixedLocator locations (8), usually from a call to set_ticks, does not match the number of ticklabels (7).

My working station is running conda 4.8.3 on Debian 10,
# Name                    Version                   Build  Channel
astroplan                 0.6                        py_1    conda-forge
astropy                   4.0.1.post1      py38h1e0a361_0    conda-forge
matplotlib-base           3.3.1            py38h91b0d89_1    conda-forge
numpy                     1.19.1           py38hbc27379_2    conda-forge
python                    3.8.5           h1103e12_5_cpython    conda-forge

The error is the same when I use the the current master branch commit:001a1e123500d96979287db3a817d891cb87bd11

Similar issues reported with upgrade to matplotlib 3.3.x:
https://stackoverflow.com/questions/62953704/valueerror-the-number-of-fixedlocator-locations-5-usually-from-a-call-to-set

Here's the official issue:
https://github.com/matplotlib/matplotlib/issues/17736

I don't have a ton of time to dig into code editing on this unfortunately, at least not for a few days.
But lets' close #469 that just appends a label and try to match up with the preferred matplotlib solution (whatever that is, I didn't really dig too much into it, sorry).

I confirmed that both examples work fine with matplotlib<3.3.

It looks like this issue was fixed at 7a4c0f3.


Cannot use 'in' operator to search for 'stack' in No Route for service

Using tsp compile with @azure-tools/typespec-csharp": "^0.2.0-beta.20230501.3".
Previously reported as https://github.com/microsoft/typespec/issues/1891.
I'm interested in just generating only models. There are no routes since I'm not writing a spec for a http service.
// import "./routes.tsp";
import "./models.tsp";

Here is the error.
PS C:\Users\cataggar\ms\avs\src\conveyor\ConsumptionWorker\client> tsp compile .
TypeSpec compiler v0.43.0

Internal compiler error!
File issue at https://github.com/microsoft/typespec
TypeError: Cannot use 'in' operator to search for 'stack' in No Route for service ConsumptionWorker    at runEmitter (file:///C:/Users/cataggar/ms/avs/src/conveyor/ConsumptionWorker/client/node_modules/@typespec/compiler/dist/core/program.js:537:25)       at async compile (file:///C:/Users/cataggar/ms/avs/src/conveyor/ConsumptionWorker/client/node_modules/@typespec/compiler/dist/core/program.js:238:9)     at async Object.handler (file:///C:/Users/cataggar/ms/avs/src/conveyor/ConsumptionWorker/client/node_modules/@typespec/compiler/dist/core/cli/cli.js:118:25)

MS internal Teams thread

resolve in PR https://github.com/Azure/autorest.csharp/pull/3400


Update liberty assembly artifact to microprofile zip and move management to top level.

Update liberty assembly artifact to microprofile zip and move management to top level.
Signed-off-by: Kate Stanley<EMAIL_ADDRESS>

That must have been an ebay style merge ;-) ...Emily won


[FEATURE REQUEST] properties macro: automatically prepend is_ on generated getter functions on bool properties

I believe it makes it more consistent with the generated bindings and it sounds more natural.
Example:
mod imp {
    #[derive(glib::Properties, Default)]
    #[properties(wrapper_type = super::Item)]
    pub struct Item {
        #[property(get, set)]
        pub(super) new: Cell<bool>,
    }

    ...
}

...

should have a generated getter of obj.is_new() instead of just obj.new().

Why don't you name you property is-new then? As you say, that sounds much more natural :)

I keep it consistent with how the bindings handle bool properties like sensitive and visible, where the property does not have is- prefix, but the getter function has. Not a big deal, but maybe something to consider

I keep it consistent with how the bindings handle bool properties like sensitive and visible, where the property name does not have is- prefix, but the getter function do. Not a big deal, but maybe something to consider.

Right, except those are part of the C API that is being adapted to Rust

There's also a lot of C API that prefixes the property names. is- has- etc.

I guess it is not worth it then to make the macro more complex just for this, I think I'll close this

Or it's possible to use is or has keywords instead of get

Or it's possible to use is or has keywords instead of get

No. Please name your properties as wish them to be named. Regarding naming your property as loop, see https://github.com/gtk-rs/gtk-rs-core/issues/1067

But I want setter to have normal name set_loop

is prefix is used for many places in standart library: https://doc.rust-lang.org/std/?search=is_


Fix typo causing syntax error on install

Thanks for spotting it! :)

@soamaven Sorry, been busy and forgot to push the update to pip. Should work now :)


Tabs and Accordions in the content

Hi,
First off, love Active Admin (thank you for creating it).  Question.... Is there an easy way for the content to not just be a grid but have tabs/accordions that split the content up? i.e.

If there isn't can I put in a feature request.  Thank you.

This is not built in, but you certainly could implement. I have an open pull request adding a :toggle option to the panel view that might interest you as well.


Verify phone number never loads on second run without force quitting application

Describe your environment

Xcode version: 10.1
Firebase SDK version: 5.17.0
Firebase Component: Auth, Phone, Firestore
Component version: Auth 5.3.1, Phone 5.4.0 , Firestore 1.0.2

Describe the problem
When logging in, then logging out, then logging in, the application will not pass the "Verify phone number". The page has a spinning wheel with no error without ever completing.
Steps to reproduce:

Boot up application
Log in with prebuilt UI with phone number and email hidden
Sign out
Sign in again
On the verify phone number page, when the 6 digit code is entered and next is pressed, the spinning never finishes

Relevant Code:
override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)

        let db = Firestore.firestore()
        let currentUser = Auth.auth().currentUser

        if Auth.auth().currentUser != nil {
            db.collection("Users").document((currentUser?.uid)!).getDocument{ (document, error) in
                if let document = document, !document.exists {
                    let storyboard = UIStoryboard(name: "Main", bundle: nil)
                    let controller = storyboard.instantiateViewController(withIdentifier: "NavigationController")
                    self.present(controller, animated: false, completion: nil)
                }
                else{
                    self.checkLocationServices()
                }
            }
        }
        else {
            let authUI = FUIAuth.defaultAuthUI()
            //            authUI?.isSignInWithEmailHidden = true
            FUIAuth.defaultAuthUI()?.shouldHideCancelButton = true
            authUI?.delegate = self
            let providers: [FUIAuthProvider] = [FUIPhoneAuth(authUI:FUIAuth.defaultAuthUI()!)]
            authUI?.providers = providers
            let authViewController = authUI!.authViewController()

            self.present(authViewController, animated: false, completion: nil)
        }

    }

    func logOut(){
        do {
            try Auth.auth().signOut()
        } catch let error {
            // handle error here
            print("Error trying to sign out of Firebase: \(error.localizedDescription)")
        }
        if self.storyboard != nil {
            let authUI = FUIAuth.defaultAuthUI()
            //                authUI?.isSignInWithEmailHidden = true
            FUIAuth.defaultAuthUI()?.shouldHideCancelButton = true
            authUI?.delegate = self
            let providers: [FUIAuthProvider] = [FUIPhoneAuth(authUI:FUIAuth.defaultAuthUI()!),]

            authUI?.providers = providers
            let authViewController = authUI!.authViewController()
            self.present(authViewController, animated: false, completion: nil)
        }
    }

@stephenfung98 please list your FirebaseUI version as well.

FirebaseUI (6.1.1)

Hi @stephenfung98 , seems I cann't reproduce this issue on my end. Could you add a completion block into self.present(authViewController, animated: false, completion: nil) to see if there is any error returned?

Closing due to inactivity; will re-open on new comments.


Batch insert/update with Hibernate & HikariCP

Hi everyone
I'm using HikariCP 2.5.1 & Hibernate 5.2.3
I try to make Hibernate batch the update/insert, but no matter what I try, I can't succeed.
Here is my XML config:
<bean id="hikariConfig" class="com.zaxxer.hikari.HikariConfig">
	<property name="poolName" value="springHikariCP" />
	<property name="driverClassName" value="org.postgresql.Driver" />
	<property name="jdbcUrl" value="${database.jdbcUrl}" />
	<property name="username" value="${database.username}" />
	<property name="password" value="${database.password}" />
	<property name="maximumPoolSize" value="10" />
</bean>

<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
	<constructor-arg ref="hikariConfig" />
</bean>

<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
	<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>

<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
	<property name="persistenceUnitName" value="persistenceUnit" />
	<property name="dataSource" ref="dataSource" />
	<property name="packagesToScan" value="com.myAwesomeCompany" />
	<property name="jpaVendorAdapter">
		<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
	</property>
	<property name="jpaProperties">
		<props>
			<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
			<prop key="hibernate.show_sql">false</prop>
			<prop key="hibernate.format_sql">false</prop>
			<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>

			<!-- bulk insert and update statements -->
			<prop key="hibernate.jdbc.batch_size">200</prop>
			<prop key="hibernate.order_inserts">true</prop>
			<prop key="hibernate.order_updates">true</prop>
			<prop key="hibernate.jdbc.batch_versioned_data">true</prop>

			<!-- jdbc driver hint for number of fetched rows for select statement -->
			<prop key="hibernate.jdbc.fetch_size">200</prop>

			<!-- improve app startup performance -->
			<prop key="hibernate.temp.use_jdbc_metadata_defaults">false</prop>
		</props>
	</property>
</bean>

Then my test case is simply to create 10 simple objects, and I would expect only 1 statement, but I have 10 instead.
Apparently there is another way of setting things up (https://github.com/brettwooldridge/HikariCP/wiki/Hibernate4) but I can't find how it works.
Does someone know how to make it work?
Thanks a lot!

Sounds more like you are using entities not compatible with batching. My guess is your entity uses an identity id generator, e.g.
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

JDBC batching will be disabled by JPA / Hibernate without notice when using this ID generation strategy because it requires asking the DB for the auto generated ID for each inserted row. You would need to use sequence or table id generator instead, so that JPA / Hibernate can allocate more than a single ID at once before actually executing the batch insert.

@jnehlmeier ty for your idea
it's not that though
here is my id:
@Id
@Column(name = "id")
@Access(AccessType.PROPERTY)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "account_gen")
@SequenceGenerator(name = "account_gen", sequenceName = "account_seq", allocationSize = 1)
private Long id;

actually, the simplest way to help me would be to give me a working configuration :)
@brettwooldridge do you have an example of a working config?
there is this link (https://github.com/brettwooldridge/HikariCP/wiki/Hibernate4), but it's not the entire config, and I'm unable to understand how it's supposed to work

@cvaliere I do not have a working configuration.  However, if you are using MySQL, you will not get batching behavior even if the code uses the JDBC batching API unless the MySQL rewriteBatchedStatements property is set to true.
See http://stackoverflow.com/questions/26307760/mysql-and-jdbc-with-rewritebatchedstatements-true

I am using PostGreSQL, not MySQL
Can you let this issue open, in case someone has a working config? I guess it would also be useful for other people to have
@lburgazzoli if I understand well, you are the creator of the HikariCPConnectionProvider, do you have a working complete configuration for batching statements with that?
Sorry to bother you guys, but I searched for days, and I can't find any tutorial that works...

@cvaliere unfortunately no, I don't

@cvaliere Have you tried asking on the Hibernate forums?  Are there any secondary tables involved?  https://hibernate.atlassian.net/browse/HHH-5797
Have you tried setting autoCommit in HikariCP to false?

This answer:
http://dba.stackexchange.com/questions/58155/optimize-postgresql-for-a-lot-of-inserts-and-bytea-updates
Says that PgJDBC doesn't do anything useful with batching, and just runs each statement...

actually I may have misunderstood the concept of "batch inserts"
I was expecting that, if I'm inserting 2 objects
insert into account values (1,'John');
insert into account values (2,'Jane');

batching them would transform it into a single multi-insert statement
insert into account values (1,'John'), (2, 'Jane');
but, from what I read on a lot of forums, "batching" does NOT do that; it just sends the 2 inserts in a single round-trip to the database, but still with 2 statements
and, in addition to the batching, we can ask the JDBC to transform the batches into multi-insert statements, with rewriteBatchedStatements (MySQL) or reWriteBatchedInserts (PostGreSQL)
am I right?
if so, I'm not sure I understand the benefit of batching

@cvaliere Technically, JDBC defines two kinds of "batching".  One is defined by the Statement API, which simply states:

Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.

Some drivers have the ability to optimize the query as you described, but coalescing the values into a single statement.  I.e. "rewriting" the batched statements.
The second kind of batching is typically much more performant and requires the use of the PreparedStatement.
PreparedStatement ps = connection.prepareStatement("INSERT INTO account VALUES (?,?)");
ps.setInt(1, 1);
ps.setString(2, "John");
ps.addBatch();
ps.setInt(1,2);
ps.setString(2, "Jane");
ps.addBatch();
...
ps.executeBatch();

Until recently, MySQL did not support server-side prepared statements, so this kind of batching couldn't work there.
Note that the PostgreSQL reWriteBatchedInserts driver property was just introduced in 9.4.1209, which was released on 15-Jul-2016.  Here is the pull request discussion.  Note that there are caveats in that some forms of INSERT can disable the batch rewriting, for example the use of the RETURNING keyword, or if the PreparedStatement is created with Statement.RETURN_GENERATED_KEYS.
I recommend enabling Hibernate query logging so that you can check to see what is being generated.  Keep in mind that the query re-writing is taking place in the driver which is "below" Hibernate.   statements, but the driver might still rewrite them.
You can also enable PgJDBC debug logging by setting the driver URL property logLevel=2 (or maybe it's logLevel=debug?).

@brettwooldridge thank you for all your explanations!
So, if I understand well, here are the 4 ways of making 100 INSERTs, ordered by the less performant to the most performant:

Make 100 INSERTs, like a tard
Make a "batch" of 100 INSERTs (why faster? because of the single round-trip to the database?)
Make a "batch" of 1 prepared statement with 100 "datasets", which will still generate 100 INSERTs, but faster (why faster? because the query plan is only made once?)
Make a single multi-insert of 100 datasets (why faster? because it's only 1 statement, and a statement has some overhead?)

Am I right if I say that Hibernate does the n°3? (when hibernate.jdbc.batch_size is defined)
Am I right if I say that the new reWriteBatchedInserts in PostGres Driver transforms that n°3 into n°4?

I suspect that Hibernate requires that the generated IDs be returned from the inserts, because it uses the object IDs everywhere internally, so that is basically going to disable batching on PostgreSQL,

I don't think so. Hibernate gets the ID from the sequence before the INSERT, and sends the ID inside the INSERT, so it doesn't need to retrieve the ID from the INSERT because it already has it.

I recommend enabling Hibernate query logging so that you can check to see what is being generated. Keep in mind that the query re-writing is taking place in the driver which is "below" Hibernate.  statements, but the driver might still rewrite them.

yes, that's why, in my tests, I don't look at the log ; instead, I wrote a TRIGGER AFTER STATEMENT on my table and see how many times it gets executed
to insert 100 objects:

With hibernate configuration, no matters what I do, the trigger is executed 100 times
With reWriteBatchedInserts, it is executed 3 times. So it seems that the rewrite works! But why 3 times and not 1? Well, I don't know, but I noticed that it's the number of "1" in the binary representation of the number of INSERTs. 100 is "1100100" in binary, so it generates 3 statements; but 128 would generate only 1; there must be a reason behind it, I don't know which one

@cvaliere You've got it basically right.  In a well optimized JDBC driver, such as Oracle, or even going back in the day jTDS for SQL Server, a prepared statement with batching is the most performant way of mass insert through the JDBC interface.  Of course, database-specific bulk loading methods are most performant but are not abstracted by JDBC.
A well optimized driver will:

Prepare the query.  One network roundtrip to the DB.
Stage (buffer) data added through the addBatch() API in the driver, to minimize roundtrips.
Send tuples of pure data to the database when the staging buffer crosses some threshold (often internal) to avoid consuming too much client-side memory.
Flush the remaining tuples at executeBatch() time, and send the exec command to execute the query plan.

Less optimized drivers will, as the PgJDBC driver is doing by default, simply implement the batching API as a series of individual inserts -- basically defeating the purpose of batching.
Muddying the waters is that these less optimized drivers include optimizations that recognize multiple sequential identical inserts (same table, same columns), and transform them into single inserts with multiple tuples.  This is the "rewrite" that is supported by MySQL and PostgreSQL.
Then you combine the less optimized case, where the driver is going to transform a batch insert into individual inserts, and then pump that through the optimization that recombines them into a single insert with multiple tuples, and you get a kinda in-between performance.
The thing is that there is a length limit to a SQL statement, different for every database.  So, for some queries the driver might be able to combine 100 inserts into a single insert with 100 tuples, but other queries it can only combine 20 inserts into a single insert with 20 tuples -- because of the size of the data.
So, to answer the questions in your 1-4 ranking.

Yes, tard-ish.
Yes, faster because of fewer roundtrips.
Yes, faster because of fewer roundtrips plus a single prepare/query compile.  Unless the data is "too big" and the driver breaks the 100 inserts up into N batches rather than 1.  Then you likely prepare the statement N times -- better than 100, worse than 1.
Yes, fastest (if supported natively by the database).  A single query plan, tuples streamed to the database (based on some buffer threshold) in N number of roundtrips until execution.

It might be interesting to try pgjdbc-ng, but I would strongly recommend building it from master rather than using 0.6 from a year ago.

May be this would be useful for someone.
Springboot, Hibernate, postgres
With settings below I have inserts performed like
insert into table (id, name) values ($1, $2), ($3, $4) ...
This ?reWriteBatchedInserts=true actually bring inserts to batch on postgres side.
application.yml
spring:
  jpa:
    properties:
      hibernate:
        generate_statistics: false
        order_inserts: true # for batch insert
        order_updates: true # for batch update
        jdbc:
          batch_size: 50 # for batch insert
          batch_versioned_data: true # for batch update
        id:
          new_generator_mappings: true
        ddl-auto: none
  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:postgresql://localhost:5432/db?reWriteBatchedInserts=true # batch inserts on db side

entity
@Entity
@Table(name = "test_batch_insert")
public class TestBatchInsert implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    //https://stackoverflow.com/questions/12745751/hibernate-sequencegenerator-and-allocationsize
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "TestBatchInsert_SEQ")
    @SequenceGenerator(name = "TestBatchInsert_SEQ", sequenceName = "SEQUENCE_TestBatchInsert", allocationSize = 50)
    @Column(name = "id")
    private Long id;

    @Column(name = "name", unique = true)
    private String name;

}

Useful post about reWriteBatchedInserts by Vlad Mihalcea
One more post from him about INSERT UPDATE in Hibernate
Boost jpa insert performance
Batch Insert/Update with Hibernate/JPA
Hibernate not batching inserts


RnD simple table schema

One sheet - one config
Data could start from A1 cell only
Supported data types: int, float, string
Support any number of fields and custom field names
Create documentation with rules description and examples

Dropped example to google sheet table. Sheet name: sheets possible formats


Document supported hardware architectures

Hi!
I have checked the documentation but did not find any word about supported architectures - only about supported operating systems.
Could you please put the information about supported architectures to the documentation please? E.e. about supported architectures for different operating systems, some specific requirements to the supported instructions, if you have any (e.g. maybe AVX is required - I do not know).
This kind of information is important for the end-users.
Thanks in advance!

Ok. For which OS-Arch combinations do you have a CI? I guess some architectures are more tested than others.

Continuous Integration

So could I interpret it as "Only x86-64 architecture is tested"? Since Github Actions works only on x86-64 builders (without self-hosted workers and/or QEMU-based magic).

Yes - for the official CI builders. Other projects, like Google Chrome, have an expanded set of builders that run on ARM (for Android and Chrome OS), but it's the responsibility of those downstream consumers to deal with any architecture issues.


Export LoggerOptions Type

Which problem is this PR solving?

DiagLoggerApi.setLogger has two overrides. One of them has options: LoggerOptions parameter. However, LoggerOptions is not exported through index.ts.
(More Context: I am working to create a wrapper function for setLogger for Application Insights, which makes it difficult without accessing the right types.)

Fixes #3638
Short description of the changes
Exporting LoggerOptions interface in index.ts
Type of change

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

How Has This Been Tested?
N/A
Checklist:

[x] Followed the style guidelines of this project
[ ] Unit tests have been added
[ ] Documentation has been updated

/easycla

There seems to be a type name conflict with logger API. see #3640
But I think it's implicit exported in API already so rename would be breaking.

There seems to be a type name conflict with logger API. see #3640 But I think it's implicit exported in API already so rename would be breaking.

Commented in the issue #3640

blocking for now until #3640 comes to a conclusion.

Blocker has been resolved. We can continue with this PR.


Stripe Customer retrieve stub and expand default_source option

The customer retrieve stub currently doesn't support Stripe's expand: ['default_source'] option:
customer = Stripe::Customer.retrieve(id: 'customer-id-here', expand: ['default_source'])

With fake_stripe and Stripe customer = Stripe::Customer.retrieve(id: 'customer-id-here') (no expand option) the customer.default_source returns a String (the id of the default payment source).
However with Stripe, but not fake_stripe customer = Stripe::Customer.retrieve(id: 'customer-id-here', expand: ['default_source]) (note the expand option) the customer.default_source returns the populated payment source object (not just the string id of the payment source). fake_stripe only returns the String id of the payment source.
(stripe-ruby-mock has a similar issue that may be useful https://github.com/rebelidealist/stripe-ruby-mock/issues/109 )

Closing this because fake_stripe has been deprecated: https://github.com/thoughtbot/fake_stripe/pull/154


leader-line mount point

What happens when the start and end tags can be dragged and dropped？ Whether the mount point can be set

Hi @Bingjiajia, thank you for the comment.
Could you explain that?

There are two div elements in a container. If do not drag the container, can wire, and if drag, cannot follow the wire. how to solve

Is it possible to mount the line to the container and follow it around,when container drag

Sorry, my English is poor. I couldn't understand your words well.
Do you mean that you want to draw a line between draggable elements?
Try this example:
https://anseki.github.io/leader-line/#ex-191-stage
Drag the yellow box.

Or, if you have a problem in your code, show me an example by using e.g. https://jsfiddle.net/ .

哈哈，我的谷歌翻译的中文。场景是这样的，我在一个容器内，添加了多个div元素，然后元素之间用线连接上。但是我把这个容器设置为可拖拽，然后拖拽释放后如何让容器内的连线也跟着容器走呢

Sorry?

Thank you. I have solved it

Ok :smile:
Could you close this issue?

哈哈，我的谷歌翻译的中文。场景是这样的，我在一个容器内，添加了多个div元素，然后元素之间用线连接上。但是我把这个容器设置为可拖拽，然后拖拽释放后如何让容器内的连线也跟着容器走呢

咋解决啊

No reply came from @yuleiQ but the issue seems to have been already solved by solving of @yuleiQ's another issue. :smile:


rework rsyslog startup wait for /var/log mounting

some iaases are slower to mount the log disk for example aws
solves #241

it causes our bats tests to fail https://bosh.ci.cloudfoundry.org/teams/main/pipelines/stemcells-ubuntu-jammy/jobs/test-stemcells-master-ipv4/builds/132

@aramprice and @cunnie, forgot to update both of you. This PR was discussed at the last working group meeting. Apparently the changes were tested against the wrong stemcell and do not work with jammy yet. Which is why the PR was converted to draft again.

i investigated it further and it seems that journald gets borked on aws stemcells.
ong gcp journaldwork just fine
running a systemctl status systemd-journald* shows all service green
but when running systemctl --verify it fails.
after restarting it it works fine systemctl restart systemd-journald.service
i have no idea why this fails on the first startup.

rsyslogd is now enabled by default as we do have a preexec check now before its even able to start.
i think in the past this was disabled as the syslog socket would enable it in a later state.
but it seems this behavior has changed.
i also tried to use the following systemd options for rsyslog.service but i could not get it to behave so that rsyslog would start later than the the mounting of var/log
[Unit]
After=network.target var-log.mount
Require=network.target var-log.mount
RequiresMountsFor=/var/log

some references about journald in bosh eco system:
https://github.com/cloudfoundry/bosh-agent/issues/241


Round Up Decimals

Is there any method or configuration to round up decimals from OPC? We are receiving values like 2.99999999991, and we want to round up the decimal up to 4. Is it possible? or do we need to tweak the code to achieve this?

We do not support rounding up values. You would need to round it up in the cloud or in a module post OPC Publisher.


Cannot response HTTP code 204 when using context.json()

What version of Hono are you using?
3.7.2
What runtime/platform is your app running on?
Node
What steps can reproduce the bug?

Setup a Node/Hono server
Implement below code

const app = new Hono();
app.delete('...', async (context: Context) => {
  const categoryId = context.req.param("category-id");

 const

  // If not found the category
  if (response === 0) {
    context.status(204);
    return context.json(
        { data: [], message: t("routes.video_categories.category_not_found") }
    );
  }
  return context.json({ id: categoryId });
});

// Hosting the app

Request DELETE / and an exception was occurred

TypeError: Response constructor: Invalid response status code 204

What is the expected behavior?
I expected this implemented code should response 204 (No content) data
What do you see instead?
TypeError: Response constructor: Invalid response status code 204

Additional information
No response

When status code is 204, Response can't contain any content. Body is empty always.

HTTP Status 204 signifies that there is no content in the response body.
https://http.dev/204
Given your code, what you want to use is status 404 instead, which is usually used when you cannot find a record.
https://http.dev/404

Hi @PlayerNguyen
Is this problem resolved? If you wan to return 204 with no body, you can return c.body(null, 204).

Closing. If you have any problems, please reopen

@yusukebe just encountered this. While it's an easy fix, this was missed in one of my PRs and caused a few errors in prod. Do you think it could be a good idea to omit the 204 from acceptable response codes in c.json() and whatnot?

Yes @askorupskyy.
You can delete body

What I had in mind is doing something like
json: JSONRespond = <
    T extends JSONValue | SimplifyDeepArray<unknown> | InvalidJSONValue,
    U extends Exclude<StatusCode, '204'> = Exclude<StatusCode, '204'>
  >

Interesting idea

Hi @askorupskyy @EdamAme-x
Throwing a TypeScript error if the Response has a status code that can't have a null body is a good idea. If so, it should support other status codes, not only 204:

@yusukebe i will make a pr for this soon

That is correct.
There is one problem, and it complicates the mold somewhat.


[FilterBox] use column verbose names

fixes https://github.com/airbnb/superset/issues/1363

@mistercrunch, could you cut a new release that includes this feature sometime soon? Thanks!

@kelchm 0.18.5 is out