forgejo/models/gitea_migrations/fixtures/Test_ChangeMavenArtifactConcatenation/package.yml
pat-s c39a4368af refactor: migrate from lib/pq to jackc/pgx (#10219)
This PR migrates the unmaintaiend `lib/pq` library to `jackc/pgx`, which is the de-facto standard lib in go for postgres connections these days.

Some implementation notes:

We register both `pgx` and `postgresschema` driver names (for backward comp). We can't register `postgres` as this one is still used by `lib/pq` imported by `go-chi/session`, which is in use when users go for the "postgres" session type in the "Session config.
It is questionable if anyone is really using the "postgres" driver option in the session config - but for consistency, it would be good to also migrate to `pgx` there, especially as the code lives within Forgejo under [go-chi/session](https://code.forgejo.org/go-chi/session).

`pgx` supports multi-host notation in the connection string. New tests have been added therefore.

`pgx` also allows for connection string parameters such as `?default_query_exec_mode=simple_protocol`. This should possibly allow running with `pgbouncer` "transaction" mode instead of "session", which could substantially enhance Postgres query handling.

## Checklist

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10219
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2025-11-30 17:47:45 +01:00

66 lines
1.3 KiB
YAML

- id: 1
owner_id: 2
repo_id: 0
type: maven
name: com.example-parent-project
lower_name: com.example-parent-project
semver_compatible: false
is_internal: false
- id: 2
owner_id: 2
repo_id: 0
type: maven
name: com.example-sub-module
lower_name: com.example-sub-module
semver_compatible: false
is_internal: false
- id: 3
owner_id: 1
repo_id: 0
type: maven
name: com.example-parent-project
lower_name: com.example-parent-project
semver_compatible: false
is_internal: false
- id: 4
owner_id: 1
repo_id: 0
type: maven
name: com.example-sub-module
lower_name: com.example-sub-module
semver_compatible: false
is_internal: false
- id: 5
owner_id: 1
repo_id: 0
type: maven
name: foo--bar
lower_name: foo--bar
semver_compatible: false
is_internal: false
# broken uploads
- id: 6
owner_id: 8
repo_id: 54
type: maven
name: com.broken-br-rest-webmvc
lower_name: com.broken-br-rest-webmvc
semver_compatible: false
is_internal: false
- id: 7
owner_id: 8
repo_id: 54
type: maven
name: com.broken-br-openapi-base
lower_name: com.broken-br-openapi-base
semver_compatible: false
is_internal: false
# collision
- id: 8
owner_id: 1
repo_id: 0
type: maven
name: group-bar-art
lower_name: group-bar-art
semver_compatible: false
is_internal: false