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>
This commit is contained in:
pat-s 2025-11-30 17:47:45 +01:00 committed by Mathieu Fenniak
parent 36ea60023a
commit c39a4368af
37 changed files with 472 additions and 334 deletions

View file

@ -814,6 +814,26 @@
"path": "github.com/inbucket/html2text/LICENSE", "path": "github.com/inbucket/html2text/LICENSE",
"licenseText": "The MIT License (MIT)\n\nCopyright (c) 2015 Jay Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n" "licenseText": "The MIT License (MIT)\n\nCopyright (c) 2015 Jay Taylor\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
}, },
{
"name": "github.com/jackc/pgpassfile",
"path": "github.com/jackc/pgpassfile/LICENSE",
"licenseText": "Copyright (c) 2019 Jack Christensen\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
},
{
"name": "github.com/jackc/pgservicefile",
"path": "github.com/jackc/pgservicefile/LICENSE",
"licenseText": "Copyright (c) 2020 Jack Christensen\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
},
{
"name": "github.com/jackc/pgx/v5",
"path": "github.com/jackc/pgx/v5/LICENSE",
"licenseText": "Copyright (c) 2013-2021 Jack Christensen\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
},
{
"name": "github.com/jackc/puddle/v2",
"path": "github.com/jackc/puddle/v2/LICENSE",
"licenseText": "Copyright (c) 2018 Jack Christensen\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
},
{ {
"name": "github.com/jbenet/go-context/io", "name": "github.com/jbenet/go-context/io",
"path": "github.com/jbenet/go-context/io/LICENSE", "path": "github.com/jbenet/go-context/io/LICENSE",

6
go.mod
View file

@ -67,12 +67,12 @@ require (
github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/huandu/xstrings v1.5.0 github.com/huandu/xstrings v1.5.0
github.com/inbucket/html2text v0.9.0 github.com/inbucket/html2text v0.9.0
github.com/jackc/pgx/v5 v5.7.6
github.com/jhillyerd/enmime/v2 v2.2.0 github.com/jhillyerd/enmime/v2 v2.2.0
github.com/json-iterator/go v1.1.12 github.com/json-iterator/go v1.1.12
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/klauspost/compress v1.18.1 github.com/klauspost/compress v1.18.1
github.com/klauspost/cpuid/v2 v2.2.11 github.com/klauspost/cpuid/v2 v2.2.11
github.com/lib/pq v1.10.9
github.com/markbates/goth v1.80.0 github.com/markbates/goth v1.80.0
github.com/mattn/go-isatty v0.0.20 github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-sqlite3 v1.14.32 github.com/mattn/go-sqlite3 v1.14.32
@ -206,10 +206,14 @@ require (
github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/securecookie v1.1.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect github.com/klauspost/pgzip v1.2.6 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/libdns/libdns v1.0.0 // indirect github.com/libdns/libdns v1.0.0 // indirect
github.com/mailru/easyjson v0.9.0 // indirect github.com/mailru/easyjson v0.9.0 // indirect
github.com/markbates/going v1.0.3 // indirect github.com/markbates/going v1.0.3 // indirect

8
go.sum
View file

@ -458,6 +458,14 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw=
github.com/inbucket/html2text v0.9.0 h1:ULJmVcBEMAcmLE+/rN815KG1Fx6+a4HhbUxiDiN+qks= github.com/inbucket/html2text v0.9.0 h1:ULJmVcBEMAcmLE+/rN815KG1Fx6+a4HhbUxiDiN+qks=
github.com/inbucket/html2text v0.9.0/go.mod h1:QDaumzl+/OzlSVbNohhmg+yAy5pKjUjzCKW2BMvztKE= github.com/inbucket/html2text v0.9.0/go.mod h1:QDaumzl+/OzlSVbNohhmg+yAy5pKjUjzCKW2BMvztKE=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk=
github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M=
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=

View file

@ -25,7 +25,6 @@ import (
"xorm.io/xorm/schemas" "xorm.io/xorm/schemas"
_ "github.com/go-sql-driver/mysql" // Needed for the MySQL driver _ "github.com/go-sql-driver/mysql" // Needed for the MySQL driver
_ "github.com/lib/pq" // Needed for the Postgresql driver
) )
var ( var (
@ -112,10 +111,14 @@ func newXORMEngineGroup() (xormEngineInterface, error) {
} }
var masterEngine *xorm.Engine var masterEngine *xorm.Engine
// For PostgreSQL: if a schema is provided, we use the special "postgresschema" driver. // For PostgreSQL: use pgx driver for better performance and multi-host support
if setting.Database.Type.IsPostgreSQL() && len(setting.Database.Schema) > 0 { // If a schema is provided, use "postgresschema" which wraps pgx with schema injection
registerPostgresSchemaDriver() if setting.Database.Type.IsPostgreSQL() {
masterEngine, err = xorm.NewEngine("postgresschema", masterConnStr) if len(setting.Database.Schema) > 0 {
masterEngine, err = xorm.NewEngine("postgresschema", masterConnStr)
} else {
masterEngine, err = xorm.NewEngine("pgx", masterConnStr)
}
} else { } else {
masterEngine, err = xorm.NewEngine(setting.Database.Type.String(), masterConnStr) masterEngine, err = xorm.NewEngine(setting.Database.Type.String(), masterConnStr)
} }
@ -138,7 +141,17 @@ func newXORMEngineGroup() (xormEngineInterface, error) {
var slaveEngines []*xorm.Engine var slaveEngines []*xorm.Engine
// Iterate over all slave DSNs and create engines // Iterate over all slave DSNs and create engines
for _, dsn := range slaveConnStrs { for _, dsn := range slaveConnStrs {
slaveEngine, err := xorm.NewEngine(setting.Database.Type.String(), dsn) var slaveEngine *xorm.Engine
// Use same driver selection logic as master
if setting.Database.Type.IsPostgreSQL() {
if len(setting.Database.Schema) > 0 {
slaveEngine, err = xorm.NewEngine("postgresschema", dsn)
} else {
slaveEngine, err = xorm.NewEngine("pgx", dsn)
}
} else {
slaveEngine, err = xorm.NewEngine(setting.Database.Type.String(), dsn)
}
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to create slave engine for dsn %q: %w", dsn, err) return nil, fmt.Errorf("failed to create slave engine for dsn %q: %w", dsn, err)
} }

View file

@ -1,70 +1,55 @@
// Copyright 2020 The Gitea Authors. All rights reserved. // Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// Copyright 2025 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: GPL-3.0-or-later
package db package db
import ( import (
"context"
"database/sql" "database/sql"
"database/sql/driver" "database/sql/driver"
"sync" "errors"
"forgejo.org/modules/setting" "forgejo.org/modules/setting"
"github.com/lib/pq" "github.com/jackc/pgx/v5/stdlib"
"xorm.io/xorm/dialects" "xorm.io/xorm/dialects"
) )
var registerOnce sync.Once func init() {
// Register pgx-based driver as "postgresschema" for PostgreSQL with schema support
func registerPostgresSchemaDriver() { // This wraps pgx/v5/stdlib and injects search_path configuration on connection
registerOnce.Do(func() { // For PostgreSQL without schema, engine.go uses "pgx" directly (registered by pgx/v5/stdlib)
sql.Register("postgresschema", &postgresSchemaDriver{}) drv := &postgresSchemaDriver{innerDriver: &stdlib.Driver{}}
dialects.RegisterDriver("postgresschema", dialects.QueryDriver("postgres")) sql.Register("postgresschema", drv)
}) dialects.RegisterDriver("postgresschema", dialects.QueryDriver("postgres"))
} }
type postgresSchemaDriver struct { type postgresSchemaDriver struct {
pq.Driver innerDriver *stdlib.Driver
} }
// Open opens a new connection to the database. name is a connection string. // Open opens a new connection to the database. name is a connection string.
// This function opens the postgres connection in the default manner but immediately // This function opens the postgres connection in the default manner but immediately
// runs set_config to set the search_path appropriately // runs set_config to set the search_path appropriately
func (d *postgresSchemaDriver) Open(name string) (driver.Conn, error) { func (d *postgresSchemaDriver) Open(name string) (driver.Conn, error) {
conn, err := d.Driver.Open(name) conn, err := d.innerDriver.Open(name)
if err != nil { if err != nil {
return conn, err return conn, err
} }
schemaValue, _ := driver.String.ConvertValue(setting.Database.Schema)
// golangci lint is incorrect here - there is no benefit to using driver.ExecerContext here // pgx implements ExecerContext, not the deprecated Execer interface
// and in any case pq does not implement it execer, ok := conn.(driver.ExecerContext)
if execer, ok := conn.(driver.Execer); ok { //nolint if !ok {
_, err := execer.Exec(`SELECT set_config( _ = conn.Close()
'search_path', return nil, errors.New("pgx driver connection does not implement ExecerContext")
$1 || ',' || current_setting('search_path'),
false)`, []driver.Value{schemaValue})
if err != nil {
_ = conn.Close()
return nil, err
}
return conn, nil
} }
stmt, err := conn.Prepare(`SELECT set_config( _, err = execer.ExecContext(context.Background(), `SELECT set_config(
'search_path', 'search_path',
$1 || ',' || current_setting('search_path'), $1 || ',' || current_setting('search_path'),
false)`) false)`, []driver.NamedValue{{Ordinal: 1, Value: setting.Database.Schema}})
if err != nil {
_ = conn.Close()
return nil, err
}
defer stmt.Close()
// driver.String.ConvertValue will never return err for string
// golangci lint is incorrect here - there is no benefit to using stmt.ExecWithContext here
_, err = stmt.Exec([]driver.Value{schemaValue}) //nolint
if err != nil { if err != nil {
_ = conn.Close() _ = conn.Close()
return nil, err return nil, err

View file

@ -0,0 +1,29 @@
// Copyright 2025 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: GPL-3.0-or-later
package db
import (
"database/sql"
"slices"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestPostgresSchemaDriverRegistered(t *testing.T) {
// Verify the driver is registered (happens in init())
drivers := sql.Drivers()
found := slices.Contains(drivers, "postgresschema")
assert.True(t, found, "postgresschema driver should be registered")
}
func TestPostgresSchemaDriverOpenFailsWithInvalidConnString(t *testing.T) {
// Verify Open() is actually called by checking that an invalid connection string returns an error
drv := &postgresSchemaDriver{innerDriver: nil}
require.Panics(t, func() {
_, _ = drv.Open("invalid")
}, "Open with nil innerDriver should panic (confirming the Open method is called)")
}

View file

@ -9,13 +9,13 @@
ref: "refs/heads/master" ref: "refs/heads/master"
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0" commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
event: "push" event: "push"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 status: 1
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
event_payload: | event_payload: |
{ {
@ -217,13 +217,13 @@
ref: "refs/heads/master" ref: "refs/heads/master"
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0" commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
event: "push" event: "push"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 status: 1
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
event_payload: | event_payload: |
{ {
@ -424,13 +424,13 @@
ref: "refs/heads/master" ref: "refs/heads/master"
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0" commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
event: "push" event: "push"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 status: 1
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
- -
id: 794 id: 794
@ -443,13 +443,13 @@
ref: "refs/heads/test" ref: "refs/heads/test"
commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0" commit_sha: "c2d72f548424103f01ee1dc02889c1e2bff816b0"
event: "push" event: "push"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 status: 1
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
- -
id: 891 id: 891
@ -462,13 +462,13 @@
ref: "refs/heads/branch2" ref: "refs/heads/branch2"
commit_sha: "985f0301dba5e7b34be866819cd15ad3d8f508ee" commit_sha: "985f0301dba5e7b34be866819cd15ad3d8f508ee"
event: "push" event: "push"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
event_payload: '{"head_commit":{"id":"5f22f7d0d95d614d25a5b68592adb345a4b5c7fd"}}' event_payload: '{"head_commit":{"id":"5f22f7d0d95d614d25a5b68592adb345a4b5c7fd"}}'
@ -485,13 +485,13 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
event: "push" event: "push"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
- -
@ -505,13 +505,13 @@
ref: "refs/heads/bugfix-1" ref: "refs/heads/bugfix-1"
commit_sha: "35c5cddfc19397501ec8f4f7bb808a7c8f04445f" commit_sha: "35c5cddfc19397501ec8f4f7bb808a7c8f04445f"
event: "pull_request" event: "pull_request"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 2 # failure status: 2 # failure
started: 1683636528 started: 1683636528
stopped: 1683636626 stopped: 1683636626
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
- -
@ -526,10 +526,10 @@
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
event: "workflow_dispatch" event: "workflow_dispatch"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 6 # running status: 6 # running
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0

View file

@ -4,7 +4,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 1 attempt: 1
job_id: job_2 job_id: job_2
@ -18,7 +18,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 1 attempt: 1
job_id: job_2 job_id: job_2
@ -32,7 +32,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
name: job1 (1) name: job1 (1)
attempt: 1 attempt: 1
job_id: job1 job_id: job1
@ -46,7 +46,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
name: job1 (2) name: job1 (2)
attempt: 1 attempt: 1
job_id: job1 job_id: job1
@ -60,7 +60,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
name: job2 name: job2
attempt: 1 attempt: 1
job_id: job2 job_id: job2
@ -75,7 +75,7 @@
repo_id: 1 repo_id: 1
owner_id: 1 owner_id: 1
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 1 attempt: 1
job_id: job_2 job_id: job_2
@ -89,7 +89,7 @@
repo_id: 1 repo_id: 1
owner_id: 1 owner_id: 1
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 1 attempt: 1
job_id: job_2 job_id: job_2
@ -104,7 +104,7 @@
repo_id: 1 repo_id: 1
owner_id: 2 owner_id: 2
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 2 attempt: 2
job_id: job_2 job_id: job_2
@ -119,7 +119,7 @@
repo_id: 1 repo_id: 1
owner_id: 3 owner_id: 3
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 1 attempt: 1
job_id: job_2 job_id: job_2
@ -134,7 +134,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 0 attempt: 0
job_id: job_2 job_id: job_2
@ -149,7 +149,7 @@
repo_id: 1 repo_id: 1
owner_id: 3 owner_id: 3
commit_sha: ea09cba7099f7e3bea80dee1a42f0b5d5e127f2e commit_sha: ea09cba7099f7e3bea80dee1a42f0b5d5e127f2e
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_3 name: job_3
attempt: 1 attempt: 1
job_id: job_3 job_id: job_3

View file

@ -3,7 +3,7 @@
token: xeiWBL5kuTYxGPynHCqQdoeYmJAeG3IzGXCYTrDX token: xeiWBL5kuTYxGPynHCqQdoeYmJAeG3IzGXCYTrDX
owner_id: 0 owner_id: 0
repo_id: 0 repo_id: 0
is_active: 1 is_active: true
created: 1695617748 created: 1695617748
updated: 1695617748 updated: 1695617748
@ -12,7 +12,7 @@
token: vohJB9QcZuSv1gAXESTk2uqpSjHhsKT9j4zYF84x token: vohJB9QcZuSv1gAXESTk2uqpSjHhsKT9j4zYF84x
owner_id: 1 owner_id: 1
repo_id: 0 repo_id: 0
is_active: 0 is_active: false
created: 1695617749 created: 1695617749
updated: 1695617749 updated: 1695617749
@ -21,7 +21,7 @@
token: gjItAeJ3CA74hNPmPPo0Zco8I1eMaNcP1jVifjOE token: gjItAeJ3CA74hNPmPPo0Zco8I1eMaNcP1jVifjOE
owner_id: 1 owner_id: 1
repo_id: 0 repo_id: 0
is_active: 1 is_active: true
created: 1695617750 created: 1695617750
updated: 1695617750 updated: 1695617750
@ -30,6 +30,6 @@
token: NOjLubxzFxPGhPXflZknys0gjVvQNhomFbAYuhbH token: NOjLubxzFxPGhPXflZknys0gjVvQNhomFbAYuhbH
owner_id: 0 owner_id: 0
repo_id: 1 repo_id: 1
is_active: 1 is_active: true
created: 1695617751 created: 1695617751
updated: 1695617751 updated: 1695617751

View file

@ -8,15 +8,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: 6d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2aaaaa token_hash: 6d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2aaaaa
token_salt: eeeeeeee token_salt: eeeeeeee
token_last_eight: eeeeeeee token_last_eight: eeeeeeee
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 47 id: 47
job_id: 192 job_id: 192
@ -28,15 +28,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: 6d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e token_hash: 6d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e
token_salt: jVuKnSPGgy token_salt: jVuKnSPGgy
token_last_eight: eeb1a71a token_last_eight: eeb1a71a
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 48 id: 48
job_id: 193 job_id: 193
@ -48,15 +48,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: ffffcfffffffbffffffffffffffffefffffffafffffffffffffffffffffffffffffdffffffffffffffffffffffffffffffff token_hash: ffffcfffffffbffffffffffffffffefffffffafffffffffffffffffffffffffffffdffffffffffffffffffffffffffffffff
token_salt: ffffffffff token_salt: ffffffffff
token_last_eight: ffffffff token_last_eight: ffffffff
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 49 id: 49
job_id: 194 job_id: 194
@ -68,15 +68,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784220 token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784220
token_salt: ffffffffff token_salt: ffffffffff
token_last_eight: ffffffff token_last_eight: ffffffff
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 50 id: 50
job_id: 195 job_id: 195
@ -88,15 +88,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784221 token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784221
token_salt: ffffffffff token_salt: ffffffffff
token_last_eight: ffffffff token_last_eight: ffffffff
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 51 id: 51
job_id: 196 job_id: 196
@ -108,15 +108,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784222 token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784222
token_salt: ffffffffff token_salt: ffffffffff
token_last_eight: ffffffff token_last_eight: ffffffff
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 52 id: 52
job_id: 192 job_id: 192
@ -128,15 +128,15 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784223 token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784223
token_salt: ffffffffff token_salt: ffffffffff
token_last_eight: ffffffff token_last_eight: ffffffff
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 53 id: 53
job_id: 192 job_id: 192
@ -148,12 +148,12 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784224 token_hash: b8d3962425466b6709b9ac51446f93260c54afe8e7b6d3686e34f991fb8a8953822b0deed86fe41a103f34bc48dbc4784224
token_salt: ffffffffff token_salt: ffffffffff
token_last_eight: ffffffff token_last_eight: ffffffff
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false

View file

@ -268,7 +268,7 @@
poster_id: 1 poster_id: 1
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 1 label_id: 1
content: 1 # add label content: "1" # add label
created_unix: 946685520 created_unix: 946685520
- -
@ -277,7 +277,7 @@
poster_id: 1 poster_id: 1
issue_id: 1 issue_id: 1
label_id: 2 label_id: 2
content: 1 # add label content: "1" # add label
created_unix: 946685620 created_unix: 946685620
- -
@ -286,7 +286,7 @@
poster_id: 2 poster_id: 2
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 1 label_id: 1
content: 0 # remove label content: "0" # remove label
created_unix: 946685720 created_unix: 946685720
- -
@ -295,7 +295,7 @@
poster_id: 1 poster_id: 1
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 1 label_id: 1
content: 1 # add label content: "1" # add label
created_unix: 946685720 created_unix: 946685720
- -
@ -304,7 +304,7 @@
poster_id: 1 poster_id: 1
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 2 label_id: 2
content: 0 # remove label content: "0" # remove label
created_unix: 946685720 created_unix: 946685720
- -
@ -313,7 +313,7 @@
poster_id: 2 poster_id: 2
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 2 label_id: 2
content: 1 # add label content: "1" # add label
created_unix: 946685820 created_unix: 946685820
- -
@ -322,7 +322,7 @@
poster_id: 1 poster_id: 1
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 1 label_id: 1
content: 0 # remove label content: "0" # remove label
created_unix: 946685920 created_unix: 946685920
- -
@ -331,7 +331,7 @@
poster_id: 1 poster_id: 1
issue_id: 1 # in repo_id 1 issue_id: 1 # in repo_id 1
label_id: 2 label_id: 2
content: 0 # remove label content: "0" # remove label
created_unix: 946685920 created_unix: 946685920
- id: 2040 - id: 2040

View file

@ -249,5 +249,5 @@
authorize: 3 authorize: 3
num_repos: 0 num_repos: 0
num_members: 0 num_members: 0
includes_all_repositories: 0 includes_all_repositories: false
can_create_org_repo: 0 can_create_org_repo: false

View file

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

View file

@ -4,7 +4,7 @@
name: parent-project-1.0-20250503.071237-1.pom name: parent-project-1.0-20250503.071237-1.pom
lower_name: parent-project-1.0-20250503.071237-1.pom lower_name: parent-project-1.0-20250503.071237-1.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256357 created_unix: 1746256357
- id: 3 - id: 3
version_id: 2 version_id: 2
@ -12,7 +12,7 @@
name: sub-module-1.0-20250503.071237-1.pom name: sub-module-1.0-20250503.071237-1.pom
lower_name: sub-module-1.0-20250503.071237-1.pom lower_name: sub-module-1.0-20250503.071237-1.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256358 created_unix: 1746256358
- id: 4 - id: 4
version_id: 2 version_id: 2
@ -20,7 +20,7 @@
name: sub-module-1.0-20250503.071237-1.jar name: sub-module-1.0-20250503.071237-1.jar
lower_name: sub-module-1.0-20250503.071237-1.jar lower_name: sub-module-1.0-20250503.071237-1.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256358 created_unix: 1746256358
- id: 6 - id: 6
version_id: 3 version_id: 3
@ -28,7 +28,7 @@
name: parent-project-7.0.0.pom name: parent-project-7.0.0.pom
lower_name: parent-project-7.0.0.pom lower_name: parent-project-7.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256360 created_unix: 1746256360
- id: 7 - id: 7
version_id: 4 version_id: 4
@ -36,7 +36,7 @@
name: sub-module-7.0.0.pom name: sub-module-7.0.0.pom
lower_name: sub-module-7.0.0.pom lower_name: sub-module-7.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256361 created_unix: 1746256361
- id: 8 - id: 8
version_id: 4 version_id: 4
@ -44,7 +44,7 @@
name: sub-module-7.0.0.jar name: sub-module-7.0.0.jar
lower_name: sub-module-7.0.0.jar lower_name: sub-module-7.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256361 created_unix: 1746256361
- id: 9 - id: 9
version_id: 5 version_id: 5
@ -52,7 +52,7 @@
name: parent-project-7.0.0.pom name: parent-project-7.0.0.pom
lower_name: parent-project-7.0.0.pom lower_name: parent-project-7.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256364 created_unix: 1746256364
- id: 10 - id: 10
version_id: 6 version_id: 6
@ -60,7 +60,7 @@
name: sub-module-7.0.0.pom name: sub-module-7.0.0.pom
lower_name: sub-module-7.0.0.pom lower_name: sub-module-7.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256365 created_unix: 1746256365
- id: 11 - id: 11
version_id: 6 version_id: 6
@ -68,7 +68,7 @@
name: sub-module-7.0.0.jar name: sub-module-7.0.0.jar
lower_name: sub-module-7.0.0.jar lower_name: sub-module-7.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256365 created_unix: 1746256365
- id: 12 - id: 12
version_id: 7 version_id: 7
@ -76,7 +76,7 @@
name: bar-1.0-20250503.071248-1.pom name: bar-1.0-20250503.071248-1.pom
lower_name: bar-1.0-20250503.071248-1.pom lower_name: bar-1.0-20250503.071248-1.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256367 created_unix: 1746256367
- id: 14 - id: 14
version_id: 8 version_id: 8
@ -84,7 +84,7 @@
name: bar-7.0.0.pom name: bar-7.0.0.pom
lower_name: bar-7.0.0.pom lower_name: bar-7.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256370 created_unix: 1746256370
- id: 15 - id: 15
version_id: 7 version_id: 7
@ -92,7 +92,7 @@
name: -bar-1.0-20250503.071253-2.pom name: -bar-1.0-20250503.071253-2.pom
lower_name: -bar-1.0-20250503.071253-2.pom lower_name: -bar-1.0-20250503.071253-2.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256373 created_unix: 1746256373
- id: 17 - id: 17
version_id: 8 version_id: 8
@ -100,7 +100,7 @@
name: -bar-7.0.0.pom name: -bar-7.0.0.pom
lower_name: -bar-7.0.0.pom lower_name: -bar-7.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256375 created_unix: 1746256375
- id: 18 - id: 18
version_id: 1 version_id: 1
@ -108,7 +108,7 @@
name: parent-project-1.0-20250503.071306-2.pom name: parent-project-1.0-20250503.071306-2.pom
lower_name: parent-project-1.0-20250503.071306-2.pom lower_name: parent-project-1.0-20250503.071306-2.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256385 created_unix: 1746256385
- id: 20 - id: 20
version_id: 2 version_id: 2
@ -116,7 +116,7 @@
name: sub-module-1.0-20250503.071306-2.pom name: sub-module-1.0-20250503.071306-2.pom
lower_name: sub-module-1.0-20250503.071306-2.pom lower_name: sub-module-1.0-20250503.071306-2.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256386 created_unix: 1746256386
- id: 21 - id: 21
version_id: 2 version_id: 2
@ -124,7 +124,7 @@
name: sub-module-1.0-20250503.071306-2.jar name: sub-module-1.0-20250503.071306-2.jar
lower_name: sub-module-1.0-20250503.071306-2.jar lower_name: sub-module-1.0-20250503.071306-2.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256386 created_unix: 1746256386
- id: 23 - id: 23
version_id: 9 version_id: 9
@ -132,7 +132,7 @@
name: parent-project-8.0.0.pom name: parent-project-8.0.0.pom
lower_name: parent-project-8.0.0.pom lower_name: parent-project-8.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256389 created_unix: 1746256389
- id: 24 - id: 24
version_id: 10 version_id: 10
@ -140,7 +140,7 @@
name: sub-module-8.0.0.pom name: sub-module-8.0.0.pom
lower_name: sub-module-8.0.0.pom lower_name: sub-module-8.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256390 created_unix: 1746256390
- id: 25 - id: 25
version_id: 10 version_id: 10
@ -148,7 +148,7 @@
name: sub-module-8.0.0.jar name: sub-module-8.0.0.jar
lower_name: sub-module-8.0.0.jar lower_name: sub-module-8.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256390 created_unix: 1746256390
- id: 26 - id: 26
version_id: 11 version_id: 11
@ -156,7 +156,7 @@
name: parent-project-8.0.0.pom name: parent-project-8.0.0.pom
lower_name: parent-project-8.0.0.pom lower_name: parent-project-8.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256393 created_unix: 1746256393
- id: 27 - id: 27
version_id: 12 version_id: 12
@ -164,7 +164,7 @@
name: sub-module-8.0.0.pom name: sub-module-8.0.0.pom
lower_name: sub-module-8.0.0.pom lower_name: sub-module-8.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256394 created_unix: 1746256394
- id: 28 - id: 28
version_id: 12 version_id: 12
@ -172,7 +172,7 @@
name: sub-module-8.0.0.jar name: sub-module-8.0.0.jar
lower_name: sub-module-8.0.0.jar lower_name: sub-module-8.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256394 created_unix: 1746256394
- id: 29 - id: 29
version_id: 7 version_id: 7
@ -180,7 +180,7 @@
name: bar-1.0-20250503.071317-3.pom name: bar-1.0-20250503.071317-3.pom
lower_name: bar-1.0-20250503.071317-3.pom lower_name: bar-1.0-20250503.071317-3.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256397 created_unix: 1746256397
- id: 31 - id: 31
version_id: 13 version_id: 13
@ -188,7 +188,7 @@
name: bar-8.0.0.pom name: bar-8.0.0.pom
lower_name: bar-8.0.0.pom lower_name: bar-8.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256399 created_unix: 1746256399
- id: 32 - id: 32
version_id: 7 version_id: 7
@ -196,7 +196,7 @@
name: -bar-1.0-20250503.071323-4.pom name: -bar-1.0-20250503.071323-4.pom
lower_name: -bar-1.0-20250503.071323-4.pom lower_name: -bar-1.0-20250503.071323-4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256402 created_unix: 1746256402
- id: 34 - id: 34
version_id: 13 version_id: 13
@ -204,7 +204,7 @@
name: -bar-8.0.0.pom name: -bar-8.0.0.pom
lower_name: -bar-8.0.0.pom lower_name: -bar-8.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256405 created_unix: 1746256405
- id: 35 - id: 35
version_id: 1 version_id: 1
@ -212,7 +212,7 @@
name: parent-project-1.0-20250503.071335-3.pom name: parent-project-1.0-20250503.071335-3.pom
lower_name: parent-project-1.0-20250503.071335-3.pom lower_name: parent-project-1.0-20250503.071335-3.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256415 created_unix: 1746256415
- id: 37 - id: 37
version_id: 2 version_id: 2
@ -220,7 +220,7 @@
name: sub-module-1.0-20250503.071335-3.pom name: sub-module-1.0-20250503.071335-3.pom
lower_name: sub-module-1.0-20250503.071335-3.pom lower_name: sub-module-1.0-20250503.071335-3.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256416 created_unix: 1746256416
- id: 38 - id: 38
version_id: 2 version_id: 2
@ -228,7 +228,7 @@
name: sub-module-1.0-20250503.071335-3.jar name: sub-module-1.0-20250503.071335-3.jar
lower_name: sub-module-1.0-20250503.071335-3.jar lower_name: sub-module-1.0-20250503.071335-3.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256416 created_unix: 1746256416
- id: 40 - id: 40
version_id: 14 version_id: 14
@ -236,7 +236,7 @@
name: parent-project-9.0.0.pom name: parent-project-9.0.0.pom
lower_name: parent-project-9.0.0.pom lower_name: parent-project-9.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256419 created_unix: 1746256419
- id: 41 - id: 41
version_id: 15 version_id: 15
@ -244,7 +244,7 @@
name: sub-module-9.0.0.pom name: sub-module-9.0.0.pom
lower_name: sub-module-9.0.0.pom lower_name: sub-module-9.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256420 created_unix: 1746256420
- id: 42 - id: 42
version_id: 15 version_id: 15
@ -252,7 +252,7 @@
name: sub-module-9.0.0.jar name: sub-module-9.0.0.jar
lower_name: sub-module-9.0.0.jar lower_name: sub-module-9.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256420 created_unix: 1746256420
- id: 43 - id: 43
version_id: 16 version_id: 16
@ -260,7 +260,7 @@
name: parent-project-9.0.0.pom name: parent-project-9.0.0.pom
lower_name: parent-project-9.0.0.pom lower_name: parent-project-9.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256423 created_unix: 1746256423
- id: 44 - id: 44
version_id: 17 version_id: 17
@ -268,7 +268,7 @@
name: sub-module-9.0.0.pom name: sub-module-9.0.0.pom
lower_name: sub-module-9.0.0.pom lower_name: sub-module-9.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256424 created_unix: 1746256424
- id: 45 - id: 45
version_id: 17 version_id: 17
@ -276,7 +276,7 @@
name: sub-module-9.0.0.jar name: sub-module-9.0.0.jar
lower_name: sub-module-9.0.0.jar lower_name: sub-module-9.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256424 created_unix: 1746256424
- id: 46 - id: 46
version_id: 7 version_id: 7
@ -284,7 +284,7 @@
name: bar-1.0-20250503.071347-5.pom name: bar-1.0-20250503.071347-5.pom
lower_name: bar-1.0-20250503.071347-5.pom lower_name: bar-1.0-20250503.071347-5.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256427 created_unix: 1746256427
- id: 48 - id: 48
version_id: 18 version_id: 18
@ -292,7 +292,7 @@
name: bar-9.0.0.pom name: bar-9.0.0.pom
lower_name: bar-9.0.0.pom lower_name: bar-9.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256429 created_unix: 1746256429
- id: 49 - id: 49
version_id: 7 version_id: 7
@ -300,7 +300,7 @@
name: -bar-1.0-20250503.071353-6.pom name: -bar-1.0-20250503.071353-6.pom
lower_name: -bar-1.0-20250503.071353-6.pom lower_name: -bar-1.0-20250503.071353-6.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256432 created_unix: 1746256432
- id: 51 - id: 51
version_id: 18 version_id: 18
@ -308,7 +308,7 @@
name: -bar-9.0.0.pom name: -bar-9.0.0.pom
lower_name: -bar-9.0.0.pom lower_name: -bar-9.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256435 created_unix: 1746256435
- id: 52 - id: 52
version_id: 1 version_id: 1
@ -316,7 +316,7 @@
name: parent-project-1.0-20250503.071405-4.pom name: parent-project-1.0-20250503.071405-4.pom
lower_name: parent-project-1.0-20250503.071405-4.pom lower_name: parent-project-1.0-20250503.071405-4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256445 created_unix: 1746256445
- id: 54 - id: 54
version_id: 2 version_id: 2
@ -324,7 +324,7 @@
name: sub-module-1.0-20250503.071405-4.pom name: sub-module-1.0-20250503.071405-4.pom
lower_name: sub-module-1.0-20250503.071405-4.pom lower_name: sub-module-1.0-20250503.071405-4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256446 created_unix: 1746256446
- id: 55 - id: 55
version_id: 2 version_id: 2
@ -332,7 +332,7 @@
name: sub-module-1.0-20250503.071405-4.jar name: sub-module-1.0-20250503.071405-4.jar
lower_name: sub-module-1.0-20250503.071405-4.jar lower_name: sub-module-1.0-20250503.071405-4.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256446 created_unix: 1746256446
- id: 57 - id: 57
version_id: 19 version_id: 19
@ -340,7 +340,7 @@
name: parent-project-10.0.0.pom name: parent-project-10.0.0.pom
lower_name: parent-project-10.0.0.pom lower_name: parent-project-10.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256449 created_unix: 1746256449
- id: 58 - id: 58
version_id: 20 version_id: 20
@ -348,7 +348,7 @@
name: sub-module-10.0.0.pom name: sub-module-10.0.0.pom
lower_name: sub-module-10.0.0.pom lower_name: sub-module-10.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256450 created_unix: 1746256450
- id: 59 - id: 59
version_id: 20 version_id: 20
@ -356,7 +356,7 @@
name: sub-module-10.0.0.jar name: sub-module-10.0.0.jar
lower_name: sub-module-10.0.0.jar lower_name: sub-module-10.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256450 created_unix: 1746256450
- id: 60 - id: 60
version_id: 21 version_id: 21
@ -364,7 +364,7 @@
name: parent-project-10.0.0.pom name: parent-project-10.0.0.pom
lower_name: parent-project-10.0.0.pom lower_name: parent-project-10.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256452 created_unix: 1746256452
- id: 61 - id: 61
version_id: 22 version_id: 22
@ -372,7 +372,7 @@
name: sub-module-10.0.0.pom name: sub-module-10.0.0.pom
lower_name: sub-module-10.0.0.pom lower_name: sub-module-10.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256453 created_unix: 1746256453
- id: 62 - id: 62
version_id: 22 version_id: 22
@ -380,7 +380,7 @@
name: sub-module-10.0.0.jar name: sub-module-10.0.0.jar
lower_name: sub-module-10.0.0.jar lower_name: sub-module-10.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256453 created_unix: 1746256453
- id: 63 - id: 63
version_id: 7 version_id: 7
@ -388,7 +388,7 @@
name: bar-1.0-20250503.071416-7.pom name: bar-1.0-20250503.071416-7.pom
lower_name: bar-1.0-20250503.071416-7.pom lower_name: bar-1.0-20250503.071416-7.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256456 created_unix: 1746256456
- id: 65 - id: 65
version_id: 23 version_id: 23
@ -396,7 +396,7 @@
name: bar-10.0.0.pom name: bar-10.0.0.pom
lower_name: bar-10.0.0.pom lower_name: bar-10.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256459 created_unix: 1746256459
- id: 66 - id: 66
version_id: 7 version_id: 7
@ -404,7 +404,7 @@
name: -bar-1.0-20250503.071422-8.pom name: -bar-1.0-20250503.071422-8.pom
lower_name: -bar-1.0-20250503.071422-8.pom lower_name: -bar-1.0-20250503.071422-8.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256461 created_unix: 1746256461
- id: 68 - id: 68
version_id: 23 version_id: 23
@ -412,7 +412,7 @@
name: -bar-10.0.0.pom name: -bar-10.0.0.pom
lower_name: -bar-10.0.0.pom lower_name: -bar-10.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256464 created_unix: 1746256464
- id: 69 - id: 69
version_id: 1 version_id: 1
@ -420,7 +420,7 @@
name: parent-project-1.0-20250503.071435-5.pom name: parent-project-1.0-20250503.071435-5.pom
lower_name: parent-project-1.0-20250503.071435-5.pom lower_name: parent-project-1.0-20250503.071435-5.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256474 created_unix: 1746256474
- id: 70 - id: 70
version_id: 1 version_id: 1
@ -428,7 +428,7 @@
name: maven-metadata.xml name: maven-metadata.xml
lower_name: maven-metadata.xml lower_name: maven-metadata.xml
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256474 created_unix: 1746256474
- id: 71 - id: 71
version_id: 2 version_id: 2
@ -436,7 +436,7 @@
name: sub-module-1.0-20250503.071435-5.pom name: sub-module-1.0-20250503.071435-5.pom
lower_name: sub-module-1.0-20250503.071435-5.pom lower_name: sub-module-1.0-20250503.071435-5.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256475 created_unix: 1746256475
- id: 72 - id: 72
version_id: 2 version_id: 2
@ -444,7 +444,7 @@
name: sub-module-1.0-20250503.071435-5.jar name: sub-module-1.0-20250503.071435-5.jar
lower_name: sub-module-1.0-20250503.071435-5.jar lower_name: sub-module-1.0-20250503.071435-5.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256475 created_unix: 1746256475
- id: 73 - id: 73
version_id: 2 version_id: 2
@ -452,7 +452,7 @@
name: maven-metadata.xml name: maven-metadata.xml
lower_name: maven-metadata.xml lower_name: maven-metadata.xml
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256476 created_unix: 1746256476
- id: 74 - id: 74
version_id: 24 version_id: 24
@ -460,7 +460,7 @@
name: parent-project-11.0.0.pom name: parent-project-11.0.0.pom
lower_name: parent-project-11.0.0.pom lower_name: parent-project-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256478 created_unix: 1746256478
- id: 75 - id: 75
version_id: 25 version_id: 25
@ -468,7 +468,7 @@
name: sub-module-11.0.0.pom name: sub-module-11.0.0.pom
lower_name: sub-module-11.0.0.pom lower_name: sub-module-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256479 created_unix: 1746256479
- id: 76 - id: 76
version_id: 25 version_id: 25
@ -476,7 +476,7 @@
name: sub-module-11.0.0.jar name: sub-module-11.0.0.jar
lower_name: sub-module-11.0.0.jar lower_name: sub-module-11.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256479 created_unix: 1746256479
- id: 77 - id: 77
version_id: 26 version_id: 26
@ -484,7 +484,7 @@
name: parent-project-11.0.0.pom name: parent-project-11.0.0.pom
lower_name: parent-project-11.0.0.pom lower_name: parent-project-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256482 created_unix: 1746256482
- id: 78 - id: 78
version_id: 27 version_id: 27
@ -492,7 +492,7 @@
name: sub-module-11.0.0.pom name: sub-module-11.0.0.pom
lower_name: sub-module-11.0.0.pom lower_name: sub-module-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256483 created_unix: 1746256483
- id: 79 - id: 79
version_id: 27 version_id: 27
@ -500,7 +500,7 @@
name: sub-module-11.0.0.jar name: sub-module-11.0.0.jar
lower_name: sub-module-11.0.0.jar lower_name: sub-module-11.0.0.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256483 created_unix: 1746256483
- id: 80 - id: 80
version_id: 7 version_id: 7
@ -508,7 +508,7 @@
name: bar-1.0-20250503.071446-9.pom name: bar-1.0-20250503.071446-9.pom
lower_name: bar-1.0-20250503.071446-9.pom lower_name: bar-1.0-20250503.071446-9.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256486 created_unix: 1746256486
- id: 82 - id: 82
version_id: 28 version_id: 28
@ -516,7 +516,7 @@
name: bar-11.0.0.pom name: bar-11.0.0.pom
lower_name: bar-11.0.0.pom lower_name: bar-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256488 created_unix: 1746256488
- id: 83 - id: 83
version_id: 7 version_id: 7
@ -524,7 +524,7 @@
name: -bar-1.0-20250503.071451-10.pom name: -bar-1.0-20250503.071451-10.pom
lower_name: -bar-1.0-20250503.071451-10.pom lower_name: -bar-1.0-20250503.071451-10.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256491 created_unix: 1746256491
- id: 84 - id: 84
version_id: 7 version_id: 7
@ -532,7 +532,7 @@
name: maven-metadata.xml name: maven-metadata.xml
lower_name: maven-metadata.xml lower_name: maven-metadata.xml
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 1746256491 created_unix: 1746256491
- id: 85 - id: 85
version_id: 28 version_id: 28
@ -540,7 +540,7 @@
name: -bar-11.0.0.pom name: -bar-11.0.0.pom
lower_name: -bar-11.0.0.pom lower_name: -bar-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746256494 created_unix: 1746256494
# broken uploads # broken uploads
- id: 86 - id: 86
@ -549,7 +549,7 @@
name: br-repo-jooq-1.2.4-sources.jar name: br-repo-jooq-1.2.4-sources.jar
lower_name: br-repo-jooq-1.2.4-sources.jar lower_name: br-repo-jooq-1.2.4-sources.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649444986 created_unix: 174625649444986
- id: 87 - id: 87
version_id: 29 version_id: 29
@ -557,7 +557,7 @@
name: br-rest-webmvc-1.2.4.jar name: br-rest-webmvc-1.2.4.jar
lower_name: br-rest-webmvc-1.2.4.jar lower_name: br-rest-webmvc-1.2.4.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649446161 created_unix: 174625649446161
- id: 88 - id: 88
version_id: 29 version_id: 29
@ -565,7 +565,7 @@
name: br-openapi-base-1.2.4.pom name: br-openapi-base-1.2.4.pom
lower_name: br-openapi-base-1.2.4.pom lower_name: br-openapi-base-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649444734 created_unix: 174625649444734
- id: 89 - id: 89
version_id: 29 version_id: 29
@ -573,7 +573,7 @@
name: br-openapi-base-1.2.4.jar name: br-openapi-base-1.2.4.jar
lower_name: br-openapi-base-1.2.4.jar lower_name: br-openapi-base-1.2.4.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649444746 created_unix: 174625649444746
- id: 90 - id: 90
version_id: 29 version_id: 29
@ -581,7 +581,7 @@
name: br-openapi-base-1.2.4-sources.jar name: br-openapi-base-1.2.4-sources.jar
lower_name: br-openapi-base-1.2.4-sources.jar lower_name: br-openapi-base-1.2.4-sources.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649444775 created_unix: 174625649444775
- id: 91 - id: 91
version_id: 29 version_id: 29
@ -589,7 +589,7 @@
name: br-parent-1.2.4.pom name: br-parent-1.2.4.pom
lower_name: br-parent-1.2.4.pom lower_name: br-parent-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649444852 created_unix: 174625649444852
- id: 92 - id: 92
version_id: 29 version_id: 29
@ -597,7 +597,7 @@
name: br-repo-in-memory-1.2.4.pom name: br-repo-in-memory-1.2.4.pom
lower_name: br-repo-in-memory-1.2.4.pom lower_name: br-repo-in-memory-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649444900 created_unix: 174625649444900
- id: 93 - id: 93
version_id: 29 version_id: 29
@ -605,7 +605,7 @@
name: br-repo-in-memory-1.2.4.jar name: br-repo-in-memory-1.2.4.jar
lower_name: br-repo-in-memory-1.2.4.jar lower_name: br-repo-in-memory-1.2.4.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649444911 created_unix: 174625649444911
- id: 94 - id: 94
version_id: 29 version_id: 29
@ -613,7 +613,7 @@
name: br-repo-in-memory-1.2.4-sources.jar name: br-repo-in-memory-1.2.4-sources.jar
lower_name: br-repo-in-memory-1.2.4-sources.jar lower_name: br-repo-in-memory-1.2.4-sources.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649444922 created_unix: 174625649444922
- id: 95 - id: 95
version_id: 29 version_id: 29
@ -621,7 +621,7 @@
name: br-repo-jooq-1.2.4.pom name: br-repo-jooq-1.2.4.pom
lower_name: br-repo-jooq-1.2.4.pom lower_name: br-repo-jooq-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649444953 created_unix: 174625649444953
- id: 96 - id: 96
version_id: 29 version_id: 29
@ -629,7 +629,7 @@
name: br-repo-jooq-1.2.4.jar name: br-repo-jooq-1.2.4.jar
lower_name: br-repo-jooq-1.2.4.jar lower_name: br-repo-jooq-1.2.4.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649444969 created_unix: 174625649444969
- id: 97 - id: 97
version_id: 29 version_id: 29
@ -637,7 +637,7 @@
name: br-rest-webmvc-1.2.4-sources.jar name: br-rest-webmvc-1.2.4-sources.jar
lower_name: br-rest-webmvc-1.2.4-sources.jar lower_name: br-rest-webmvc-1.2.4-sources.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649446161 created_unix: 174625649446161
- id: 98 - id: 98
version_id: 29 version_id: 29
@ -645,7 +645,7 @@
name: br-rest-webmvc-1.2.4.pom name: br-rest-webmvc-1.2.4.pom
lower_name: br-rest-webmvc-1.2.4.pom lower_name: br-rest-webmvc-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649446195 created_unix: 174625649446195
- id: 99 - id: 99
version_id: 29 version_id: 29
@ -653,7 +653,7 @@
name: br-root-1.2.4.pom name: br-root-1.2.4.pom
lower_name: br-root-1.2.4.pom lower_name: br-root-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649446217 created_unix: 174625649446217
- id: 100 - id: 100
version_id: 30 version_id: 30
@ -661,7 +661,7 @@
name: br-rest-webmvc-1.2.4.pom name: br-rest-webmvc-1.2.4.pom
lower_name: br-rest-webmvc-1.2.4.pom lower_name: br-rest-webmvc-1.2.4.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 174625649446311 created_unix: 174625649446311
- id: 101 - id: 101
version_id: 30 version_id: 30
@ -669,7 +669,7 @@
name: br-rest-webmvc-1.2.4.jar name: br-rest-webmvc-1.2.4.jar
lower_name: br-rest-webmvc-1.2.4.jar lower_name: br-rest-webmvc-1.2.4.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649446312 created_unix: 174625649446312
- id: 102 - id: 102
version_id: 30 version_id: 30
@ -677,7 +677,7 @@
name: br-rest-webmvc-1.2.4-sources.jar name: br-rest-webmvc-1.2.4-sources.jar
lower_name: br-rest-webmvc-1.2.4-sources.jar lower_name: br-rest-webmvc-1.2.4-sources.jar
composite_key: "" composite_key: ""
is_lead: 0 is_lead: false
created_unix: 174625649446312 created_unix: 174625649446312
# collision # collision
- id: 103 - id: 103
@ -686,7 +686,7 @@
name: bar-art-11.0.0.pom name: bar-art-11.0.0.pom
lower_name: bar-art-11.0.0.pom lower_name: bar-art-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746280832 created_unix: 1746280832
- id: 104 - id: 104
version_id: 31 version_id: 31
@ -694,5 +694,5 @@
name: art-11.0.0.pom name: art-11.0.0.pom
lower_name: art-11.0.0.pom lower_name: art-11.0.0.pom
composite_key: "" composite_key: ""
is_lead: 1 is_lead: true
created_unix: 1746280843 created_unix: 1746280843

View file

@ -4,7 +4,7 @@
version: 1.0-SNAPSHOT version: 1.0-SNAPSHOT
lower_version: 1.0-snapshot lower_version: 1.0-snapshot
created_unix: 1746256357 created_unix: 1746256357
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 2 - id: 2
@ -13,7 +13,7 @@
version: 1.0-SNAPSHOT version: 1.0-SNAPSHOT
lower_version: 1.0-snapshot lower_version: 1.0-snapshot
created_unix: 1746256358 created_unix: 1746256358
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 3 - id: 3
@ -22,7 +22,7 @@
version: 7.0.0 version: 7.0.0
lower_version: 7.0.0 lower_version: 7.0.0
created_unix: 1746256360 created_unix: 1746256360
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 4 - id: 4
@ -31,7 +31,7 @@
version: 7.0.0 version: 7.0.0
lower_version: 7.0.0 lower_version: 7.0.0
created_unix: 1746256361 created_unix: 1746256361
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 5 - id: 5
@ -40,7 +40,7 @@
version: 7.0.0 version: 7.0.0
lower_version: 7.0.0 lower_version: 7.0.0
created_unix: 1746256364 created_unix: 1746256364
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 6 - id: 6
@ -49,7 +49,7 @@
version: 7.0.0 version: 7.0.0
lower_version: 7.0.0 lower_version: 7.0.0
created_unix: 1746256365 created_unix: 1746256365
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 7 - id: 7
@ -58,7 +58,7 @@
version: 1.0-SNAPSHOT version: 1.0-SNAPSHOT
lower_version: 1.0-snapshot lower_version: 1.0-snapshot
created_unix: 1746256367 created_unix: 1746256367
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}' metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 8 - id: 8
@ -67,7 +67,7 @@
version: 7.0.0 version: 7.0.0
lower_version: 7.0.0 lower_version: 7.0.0
created_unix: 1746256370 created_unix: 1746256370
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}' metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 9 - id: 9
@ -76,7 +76,7 @@
version: 8.0.0 version: 8.0.0
lower_version: 8.0.0 lower_version: 8.0.0
created_unix: 1746256389 created_unix: 1746256389
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 10 - id: 10
@ -85,7 +85,7 @@
version: 8.0.0 version: 8.0.0
lower_version: 8.0.0 lower_version: 8.0.0
created_unix: 1746256390 created_unix: 1746256390
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 11 - id: 11
@ -94,7 +94,7 @@
version: 8.0.0 version: 8.0.0
lower_version: 8.0.0 lower_version: 8.0.0
created_unix: 1746256393 created_unix: 1746256393
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 12 - id: 12
@ -103,7 +103,7 @@
version: 8.0.0 version: 8.0.0
lower_version: 8.0.0 lower_version: 8.0.0
created_unix: 1746256394 created_unix: 1746256394
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 13 - id: 13
@ -112,7 +112,7 @@
version: 8.0.0 version: 8.0.0
lower_version: 8.0.0 lower_version: 8.0.0
created_unix: 1746256399 created_unix: 1746256399
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}' metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 14 - id: 14
@ -121,7 +121,7 @@
version: 9.0.0 version: 9.0.0
lower_version: 9.0.0 lower_version: 9.0.0
created_unix: 1746256419 created_unix: 1746256419
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 15 - id: 15
@ -130,7 +130,7 @@
version: 9.0.0 version: 9.0.0
lower_version: 9.0.0 lower_version: 9.0.0
created_unix: 1746256420 created_unix: 1746256420
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 16 - id: 16
@ -139,7 +139,7 @@
version: 9.0.0 version: 9.0.0
lower_version: 9.0.0 lower_version: 9.0.0
created_unix: 1746256423 created_unix: 1746256423
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 17 - id: 17
@ -148,7 +148,7 @@
version: 9.0.0 version: 9.0.0
lower_version: 9.0.0 lower_version: 9.0.0
created_unix: 1746256424 created_unix: 1746256424
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 18 - id: 18
@ -157,7 +157,7 @@
version: 9.0.0 version: 9.0.0
lower_version: 9.0.0 lower_version: 9.0.0
created_unix: 1746256429 created_unix: 1746256429
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}' metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 19 - id: 19
@ -166,7 +166,7 @@
version: 10.0.0 version: 10.0.0
lower_version: 10.0.0 lower_version: 10.0.0
created_unix: 1746256449 created_unix: 1746256449
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 20 - id: 20
@ -175,7 +175,7 @@
version: 10.0.0 version: 10.0.0
lower_version: 10.0.0 lower_version: 10.0.0
created_unix: 1746256450 created_unix: 1746256450
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 21 - id: 21
@ -184,7 +184,7 @@
version: 10.0.0 version: 10.0.0
lower_version: 10.0.0 lower_version: 10.0.0
created_unix: 1746256452 created_unix: 1746256452
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 22 - id: 22
@ -193,7 +193,7 @@
version: 10.0.0 version: 10.0.0
lower_version: 10.0.0 lower_version: 10.0.0
created_unix: 1746256453 created_unix: 1746256453
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 23 - id: 23
@ -202,7 +202,7 @@
version: 10.0.0 version: 10.0.0
lower_version: 10.0.0 lower_version: 10.0.0
created_unix: 1746256459 created_unix: 1746256459
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}' metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 24 - id: 24
@ -211,7 +211,7 @@
version: 11.0.0 version: 11.0.0
lower_version: 11.0.0 lower_version: 11.0.0
created_unix: 1746256478 created_unix: 1746256478
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 25 - id: 25
@ -220,7 +220,7 @@
version: 11.0.0 version: 11.0.0
lower_version: 11.0.0 lower_version: 11.0.0
created_unix: 1746256479 created_unix: 1746256479
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 26 - id: 26
@ -229,7 +229,7 @@
version: 11.0.0 version: 11.0.0
lower_version: 11.0.0 lower_version: 11.0.0
created_unix: 1746256482 created_unix: 1746256482
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}' metadata_json: '{"group_id":"com.example","artifact_id":"parent-project","name":"Example :: Parent "}'
download_count: 0 download_count: 0
- id: 27 - id: 27
@ -238,7 +238,7 @@
version: 11.0.0 version: 11.0.0
lower_version: 11.0.0 lower_version: 11.0.0
created_unix: 1746256483 created_unix: 1746256483
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}' metadata_json: '{"group_id":"com.example","artifact_id":"sub-module","name":"Example :: SubModule ","dependencies":[{"group_id":"junit","artifact_id":"junit","version":"3.8.1"}]}'
download_count: 0 download_count: 0
- id: 28 - id: 28
@ -247,7 +247,7 @@
version: 11.0.0 version: 11.0.0
lower_version: 11.0.0 lower_version: 11.0.0
created_unix: 1746256488 created_unix: 1746256488
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}' metadata_json: '{"group_id":"foo","artifact_id":"-bar","name":"Example :: Parent "}'
download_count: 0 download_count: 0
# broken uploads # broken uploads
@ -257,7 +257,7 @@
version: 1.2.4 version: 1.2.4
lower_version: 1.2.4 lower_version: 1.2.4
created_unix: 1746256488 created_unix: 1746256488
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"com.broken","artifact_id":"br-root","name":"Foo"}' metadata_json: '{"group_id":"com.broken","artifact_id":"br-root","name":"Foo"}'
download_count: 0 download_count: 0
- id: 30 - id: 30
@ -266,7 +266,7 @@
version: 1.2.4 version: 1.2.4
lower_version: 1.2.4 lower_version: 1.2.4
created_unix: 1746256488 created_unix: 1746256488
is_internal: 0 is_internal: false
metadata_json: '{"artifact_id":"br-rest-webmvc","name":"Foo :: REST :: Web MVC","dependencies":[{"group_id":"com.broken","artifact_id":"br-base"},{"group_id":"jakarta.servlet","artifact_id":"jakarta.servlet-api"},{"group_id":"jakarta.validation","artifact_id":"jakarta.validation-api"},{"group_id":"org.springframework","artifact_id":"spring-webmvc"},{"group_id":"org.springframework.hateoas","artifact_id":"spring-hateoas"},{"group_id":"org.springframework.boot","artifact_id":"spring-boot-starter-test"},{"group_id":"com.broken","artifact_id":"br-test"},{"group_id":"com.broken","artifact_id":"br-repo-in-memory"},{"group_id":"org.hibernate.validator","artifact_id":"hibernate-validator"},{"group_id":"org.glassfish.expressly","artifact_id":"expressly"}]}' metadata_json: '{"artifact_id":"br-rest-webmvc","name":"Foo :: REST :: Web MVC","dependencies":[{"group_id":"com.broken","artifact_id":"br-base"},{"group_id":"jakarta.servlet","artifact_id":"jakarta.servlet-api"},{"group_id":"jakarta.validation","artifact_id":"jakarta.validation-api"},{"group_id":"org.springframework","artifact_id":"spring-webmvc"},{"group_id":"org.springframework.hateoas","artifact_id":"spring-hateoas"},{"group_id":"org.springframework.boot","artifact_id":"spring-boot-starter-test"},{"group_id":"com.broken","artifact_id":"br-test"},{"group_id":"com.broken","artifact_id":"br-repo-in-memory"},{"group_id":"org.hibernate.validator","artifact_id":"hibernate-validator"},{"group_id":"org.glassfish.expressly","artifact_id":"expressly"}]}'
download_count: 0 download_count: 0
# collision # collision
@ -276,6 +276,6 @@
version: 11.0.0 version: 11.0.0
lower_version: 11.0.0 lower_version: 11.0.0
created_unix: 1746256488 created_unix: 1746256488
is_internal: 0 is_internal: false
metadata_json: '{"group_id":"group-bar","artifact_id":"art","name":"Example :: Parent "}' metadata_json: '{"group_id":"group-bar","artifact_id":"art","name":"Example :: Parent "}'
download_count: 0 download_count: 0

View file

@ -10,12 +10,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1001 id: 1001
@ -29,12 +29,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1002 id: 1002
@ -48,12 +48,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1003 id: 1003
@ -67,12 +67,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1004 id: 1004
@ -86,12 +86,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1005 id: 1005
@ -105,12 +105,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1006 id: 1006
@ -124,12 +124,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
- -
id: 1007 id: 1007
@ -143,9 +143,9 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 1 # success status: 1 # success
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false

View file

@ -26,6 +26,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"xorm.io/xorm" "xorm.io/xorm"
_ "github.com/jackc/pgx/v5/stdlib" // Import pgx driver
) )
// PrepareTestEnv prepares the test environment and reset the database. The skip parameter should usually be 0. // PrepareTestEnv prepares the test environment and reset the database. The skip parameter should usually be 0.
@ -210,7 +212,7 @@ func deleteDB() error {
} }
return nil return nil
case setting.Database.Type.IsPostgreSQL(): case setting.Database.Type.IsPostgreSQL():
db, err := sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/?sslmode=%s", db, err := sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.SSLMode))
if err != nil { if err != nil {
return err return err
@ -228,7 +230,7 @@ func deleteDB() error {
// Check if we need to setup a specific schema // Check if we need to setup a specific schema
if len(setting.Database.Schema) != 0 { if len(setting.Database.Schema) != 0 {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode))
if err != nil { if err != nil {
return err return err

View file

@ -14,7 +14,7 @@ import (
func UpdateOpenMilestoneCounts(x *xorm.Engine) error { func UpdateOpenMilestoneCounts(x *xorm.Engine) error {
var openMilestoneIDs []int64 var openMilestoneIDs []int64
err := x.Table("milestone").Select("id").Where(builder.Neq{"is_closed": 1}).Find(&openMilestoneIDs) err := x.Table("milestone").Select("id").Where(builder.Neq{"is_closed": true}).Find(&openMilestoneIDs)
if err != nil { if err != nil {
return fmt.Errorf("error selecting open milestone IDs: %w", err) return fmt.Errorf("error selecting open milestone IDs: %w", err)
} }

View file

@ -215,7 +215,7 @@ func IssueNoDependenciesLeft(ctx context.Context, issue *Issue) (bool, error) {
Select("issue.*"). Select("issue.*").
Join("INNER", "issue", "issue.id = issue_dependency.dependency_id"). Join("INNER", "issue", "issue.id = issue_dependency.dependency_id").
Where("issue_dependency.issue_id = ?", issue.ID). Where("issue_dependency.issue_id = ?", issue.ID).
And("issue.is_closed = ?", "0"). And("issue.is_closed = ?", false).
Exist(&Issue{}) Exist(&Issue{})
return !exists, err return !exists, err

View file

@ -41,10 +41,10 @@ func TestUpdateIssueUserByRead(t *testing.T) {
issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1}) issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 1})
require.NoError(t, issues_model.UpdateIssueUserByRead(db.DefaultContext, 4, issue.ID)) require.NoError(t, issues_model.UpdateIssueUserByRead(db.DefaultContext, 4, issue.ID))
unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: issue.ID, UID: 4}, "is_read=1") unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: issue.ID, UID: 4}, unittest.Cond("is_read = ?", true))
require.NoError(t, issues_model.UpdateIssueUserByRead(db.DefaultContext, 4, issue.ID)) require.NoError(t, issues_model.UpdateIssueUserByRead(db.DefaultContext, 4, issue.ID))
unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: issue.ID, UID: 4}, "is_read=1") unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: issue.ID, UID: 4}, unittest.Cond("is_read = ?", true))
require.NoError(t, issues_model.UpdateIssueUserByRead(db.DefaultContext, unittest.NonexistentID, unittest.NonexistentID)) require.NoError(t, issues_model.UpdateIssueUserByRead(db.DefaultContext, unittest.NonexistentID, unittest.NonexistentID))
} }
@ -56,6 +56,6 @@ func TestUpdateIssueUsersByMentions(t *testing.T) {
uids := []int64{2, 5} uids := []int64{2, 5}
require.NoError(t, issues_model.UpdateIssueUsersByMentions(db.DefaultContext, issue.ID, uids)) require.NoError(t, issues_model.UpdateIssueUsersByMentions(db.DefaultContext, issue.ID, uids))
for _, uid := range uids { for _, uid := range uids {
unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: issue.ID, UID: uid}, "is_mentioned=1") unittest.AssertExistsAndLoadBean(t, &issues_model.IssueUser{IssueID: issue.ID, UID: uid}, unittest.Cond("is_mentioned = ?", true))
} }
} }

View file

@ -307,7 +307,7 @@ func TestChangeMilestoneStatusByRepoIDAndID(t *testing.T) {
unittest.CheckConsistencyFor(t, &repo_model.Repository{ID: 1}, &issues_model.Milestone{}) unittest.CheckConsistencyFor(t, &repo_model.Repository{ID: 1}, &issues_model.Milestone{})
require.NoError(t, issues_model.ChangeMilestoneStatusByRepoIDAndID(db.DefaultContext, 1, 1, false)) require.NoError(t, issues_model.ChangeMilestoneStatusByRepoIDAndID(db.DefaultContext, 1, 1, false))
unittest.AssertExistsAndLoadBean(t, &issues_model.Milestone{ID: 1}, "is_closed=0") unittest.AssertExistsAndLoadBean(t, &issues_model.Milestone{ID: 1}, unittest.Cond("is_closed = ?", false))
unittest.CheckConsistencyFor(t, &repo_model.Repository{ID: 1}, &issues_model.Milestone{}) unittest.CheckConsistencyFor(t, &repo_model.Repository{ID: 1}, &issues_model.Milestone{})
} }
@ -335,7 +335,7 @@ func TestUpdateMilestone(t *testing.T) {
func TestUpdateMilestoneCounters(t *testing.T) { func TestUpdateMilestoneCounters(t *testing.T) {
require.NoError(t, unittest.PrepareTestDatabase()) require.NoError(t, unittest.PrepareTestDatabase())
issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{MilestoneID: 1}, issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{MilestoneID: 1},
"is_closed=0") unittest.Cond("is_closed = ?", false))
issue.IsClosed = true issue.IsClosed = true
issue.ClosedUnix = timeutil.TimeStampNow() issue.ClosedUnix = timeutil.TimeStampNow()

View file

@ -2,7 +2,7 @@
id: 1001 id: 1001
type: 6 # OAuth2 type: 6 # OAuth2
name: OAuth2 authentication source name: OAuth2 authentication source
is_active: 1 is_active: true
cfg: '{"Provider":"invalid","ClientID":"invalid","ClientSecret":"invalid","AllowUsernameChange":true}' cfg: '{"Provider":"invalid","ClientID":"invalid","ClientSecret":"invalid","AllowUsernameChange":true}'
created_unix: 1753740851 created_unix: 1753740851
updated_unix: 1753740851 updated_unix: 1753740851

View file

@ -277,6 +277,36 @@ func parsePostgreSQLHostPort(info string) (host, port string) {
func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbsslMode string) (connStr string) { func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbsslMode string) (connStr string) {
dbName, dbParam, _ := strings.Cut(dbName, "?") dbName, dbParam, _ := strings.Cut(dbName, "?")
// pgx multi-host specification: "host1:port1,host2:port2"
if strings.Contains(dbHost, ",") {
var hostParts []string
for host := range strings.SplitSeq(dbHost, ",") {
trimmed := strings.TrimSpace(host)
if trimmed == "" {
continue
}
h, p := parsePostgreSQLHostPort(trimmed)
hostParts = append(hostParts, net.JoinHostPort(h, p))
}
// Validate that we have at least one valid host after parsing
if len(hostParts) > 0 {
connURL := url.URL{
Scheme: "postgres",
User: url.UserPassword(dbUser, dbPasswd),
Host: strings.Join(hostParts, ","),
Path: dbName,
OmitHost: false,
RawQuery: dbParam,
}
query := connURL.Query()
query.Set("sslmode", dbsslMode)
connURL.RawQuery = query.Encode()
return connURL.String()
}
}
host, port := parsePostgreSQLHostPort(dbHost) host, port := parsePostgreSQLHostPort(dbHost)
connURL := url.URL{ connURL := url.URL{
Scheme: "postgres", Scheme: "postgres",

View file

@ -101,6 +101,51 @@ func Test_getPostgreSQLConnectionString(t *testing.T) {
Name: "gitea?param=1", Name: "gitea?param=1",
Output: "postgres://user:pass@localhost:1234/gitea?param=1&sslmode=", Output: "postgres://user:pass@localhost:1234/gitea?param=1&sslmode=",
}, },
{
// Multi-host with same ports
Host: "host1,host2,host3",
User: "user",
Passwd: "pass",
Name: "forgejo",
SSLMode: "disable",
Output: "postgres://user:pass@host1:5432,host2:5432,host3:5432/forgejo?sslmode=disable",
},
{
// Multi-host with different ports
Host: "host1:5432,host2:5433",
User: "user",
Passwd: "pass",
Name: "forgejo",
SSLMode: "require",
Output: "postgres://user:pass@host1:5432,host2:5433/forgejo?sslmode=require",
},
{
// Multi-host IPv6
Host: "[::1]:1234,[::2]:2345",
User: "user",
Passwd: "pass",
Name: "forgejo",
SSLMode: "disable",
Output: "postgres://user:pass@[::1]:1234,[::2]:2345/forgejo?sslmode=disable",
},
{
// Multi-host with spaces (should be trimmed)
Host: "host1:5432 , host2:5433 , host3",
User: "user",
Passwd: "pass",
Name: "forgejo",
SSLMode: "verify-full",
Output: "postgres://user:pass@host1:5432,host2:5433,host3:5432/forgejo?sslmode=verify-full",
},
{
// Multi-host with database parameters
Host: "host1,host2",
User: "user",
Passwd: "pass",
Name: "forgejo?connect_timeout=10",
SSLMode: "disable",
Output: "postgres://user:pass@host1:5432,host2:5432/forgejo?connect_timeout=10&sslmode=disable",
},
} }
for _, test := range tests { for _, test := range tests {
@ -120,9 +165,8 @@ func getPostgreSQLEngineGroupConnectionStrings(primaryHost, replicaHosts, user,
// Build the replica connection strings. // Build the replica connection strings.
replicaConns := []string{} replicaConns := []string{}
if strings.TrimSpace(replicaHosts) != "" { if strings.TrimSpace(replicaHosts) != "" {
// Split comma-separated replica host values. // Split comma-separated replica host values
hosts := strings.Split(replicaHosts, ",") for h := range strings.SplitSeq(replicaHosts, ",") {
for _, h := range hosts {
trimmed := strings.TrimSpace(h) trimmed := strings.TrimSpace(h)
if trimmed != "" { if trimmed != "" {
replicaConns = append(replicaConns, replicaConns = append(replicaConns,

View file

@ -61,7 +61,7 @@ func TestRepoEdit(t *testing.T) {
assert.Equal(t, http.StatusOK, ctx.Resp.Status()) assert.Equal(t, http.StatusOK, ctx.Resp.Status())
unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{
ID: 1, ID: 1,
}, unittest.Cond("name = ? AND is_archived = 1", *opts.Name)) }, unittest.Cond("name = ? AND is_archived = ?", *opts.Name, true))
} }
func TestRepoEditNameChange(t *testing.T) { func TestRepoEditNameChange(t *testing.T) {

View file

@ -9,12 +9,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "synchronized" trigger_event: "synchronized"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 6 # running status: 6 # running
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
concurrency_group: abc123 concurrency_group: abc123
- -
@ -28,11 +28,11 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "synchronized" trigger_event: "synchronized"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 5 # waiting status: 5 # waiting
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 1 need_approval: true
approved_by: 0 approved_by: 0
concurrency_group: def435 concurrency_group: def435

View file

@ -4,7 +4,7 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1
@ -18,7 +18,7 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_2 name: job_2
attempt: 0 attempt: 0
job_id: job_2 job_id: job_2
@ -32,7 +32,7 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1

View file

@ -9,15 +9,15 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: 8d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e token_hash: 8d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e
token_salt: jVuKnSPGgy token_salt: jVuKnSPGgy
token_last_eight: eeb1a71a token_last_eight: eeb1a71a
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false
- -
id: 711900 id: 711900
job_id: 11900 job_id: 11900
@ -29,12 +29,12 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0 commit_sha: c2d72f548424103f01ee1dc02889c1e2bff816b0
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: 7d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e token_hash: 7d8ef48297195edcc8e22c70b3020eaa06c52976db67d39b4260c64a69a2cc1508825121b7b8394e48e00b1bf8718b2a867e
token_salt: jVuKnSPGgy token_salt: jVuKnSPGgy
token_last_eight: eeb1a71a token_last_eight: eeb1a71a
log_filename: artifact-test2/2f/47.log log_filename: artifact-test2/2f/47.log
log_in_storage: 1 log_in_storage: true
log_length: 707 log_length: 707
log_size: 90179 log_size: 90179
log_expired: 0 log_expired: false

View file

@ -4,7 +4,7 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1

View file

@ -9,12 +9,12 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 6 # running status: 6 # running
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
concurrency_group: abc123 concurrency_group: abc123
- -
@ -28,11 +28,11 @@
ref: "refs/heads/main" ref: "refs/heads/main"
commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee" commit_sha: "97f29ee599c373c729132a5c46a046978311e0ee"
trigger_event: "workflow_dispatch" trigger_event: "workflow_dispatch"
is_fork_pull_request: 0 is_fork_pull_request: false
status: 6 # running status: 6 # running
started: 1683636528 started: 1683636528
created: 1683636108 created: 1683636108
updated: 1683636626 updated: 1683636626
need_approval: 0 need_approval: false
approved_by: 0 approved_by: 0
concurrency_group: abc123 concurrency_group: abc123

View file

@ -4,7 +4,7 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1
@ -18,7 +18,7 @@
repo_id: 63 repo_id: 63
owner_id: 2 owner_id: 2
commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee commit_sha: 97f29ee599c373c729132a5c46a046978311e0ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1

View file

@ -7,11 +7,11 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: "1000" commit_sha: "1000"
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: "1000" token_hash: "1000"
log_filename: path1 log_filename: path1
log_in_storage: false log_in_storage: false
log_expired: 0 log_expired: false
created: 1732575600 # date +%s --date 2024-11-26 created: 1732575600 # date +%s --date 2024-11-26
updated: 1732575605 # a few seconds later updated: 1732575605 # a few seconds later
@ -23,11 +23,11 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: "2000" commit_sha: "2000"
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: "2000" token_hash: "2000"
log_filename: path2 log_filename: path2
log_in_storage: false log_in_storage: false
log_expired: 0 log_expired: false
created: 1732921200 # date +%s --date 2024-11-30 created: 1732921200 # date +%s --date 2024-11-30
updated: 1732921205 # a few seconds later updated: 1732921205 # a few seconds later
@ -39,11 +39,11 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: "3000" commit_sha: "3000"
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: "3000" token_hash: "3000"
log_filename: path3 log_filename: path3
log_in_storage: true log_in_storage: true
log_expired: 0 log_expired: false
created: 1732575600 # date +%s --date 2024-11-26 created: 1732575600 # date +%s --date 2024-11-26
updated: 1732575605 # a few seconds later updated: 1732575605 # a few seconds later
@ -55,11 +55,11 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: "4000" commit_sha: "4000"
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: "4000" token_hash: "4000"
log_filename: path4 log_filename: path4
log_in_storage: false log_in_storage: false
log_expired: 0 log_expired: false
created: 1732575600 # date +%s --date 2024-11-26 created: 1732575600 # date +%s --date 2024-11-26
updated: 1732575605 # a few seconds later updated: 1732575605 # a few seconds later
@ -71,10 +71,10 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: "5000" commit_sha: "5000"
is_fork_pull_request: 0 is_fork_pull_request: false
token_hash: "5000" token_hash: "5000"
log_filename: path5 log_filename: path5
log_in_storage: false log_in_storage: false
log_expired: 0 log_expired: false
created: 1732575600 # date +%s --date 2024-11-26 created: 1732575600 # date +%s --date 2024-11-26
updated: 1732575605 # a few seconds later updated: 1732575605 # a few seconds later

View file

@ -60,10 +60,10 @@ func TestUpdateIssuesCommit(t *testing.T) {
issueBean := &issues_model.Issue{RepoID: repo.ID, Index: 4} issueBean := &issues_model.Issue{RepoID: repo.ID, Index: 4}
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 2}, "is_closed=1") unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 2}, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch)) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch))
unittest.AssertExistsAndLoadBean(t, commentBean) unittest.AssertExistsAndLoadBean(t, commentBean)
unittest.AssertExistsAndLoadBean(t, issueBean, "is_closed=1") unittest.AssertExistsAndLoadBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
// Test that push to a non-default branch closes no issue. // Test that push to a non-default branch closes no issue.
@ -87,10 +87,10 @@ func TestUpdateIssuesCommit(t *testing.T) {
issueBean = &issues_model.Issue{RepoID: repo.ID, Index: 1} issueBean = &issues_model.Issue{RepoID: repo.ID, Index: 1}
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 1}, "is_closed=1") unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 1}, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, "non-existing-branch")) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, "non-existing-branch"))
unittest.AssertExistsAndLoadBean(t, commentBean) unittest.AssertExistsAndLoadBean(t, commentBean)
unittest.AssertNotExistsBean(t, issueBean, "is_closed=1") unittest.AssertNotExistsBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
pushCommits = []*repository.PushCommit{ pushCommits = []*repository.PushCommit{
@ -113,10 +113,10 @@ func TestUpdateIssuesCommit(t *testing.T) {
issueBean = &issues_model.Issue{RepoID: repo.ID, Index: 1} issueBean = &issues_model.Issue{RepoID: repo.ID, Index: 1}
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 1}, "is_closed=1") unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 1}, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch)) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch))
unittest.AssertExistsAndLoadBean(t, commentBean) unittest.AssertExistsAndLoadBean(t, commentBean)
unittest.AssertExistsAndLoadBean(t, issueBean, "is_closed=1") unittest.AssertExistsAndLoadBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
} }
@ -139,9 +139,9 @@ func TestUpdateIssuesCommit_Colon(t *testing.T) {
issueBean := &issues_model.Issue{RepoID: repo.ID, Index: 4} issueBean := &issues_model.Issue{RepoID: repo.ID, Index: 4}
unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 2}, "is_closed=1") unittest.AssertNotExistsBean(t, &issues_model.Issue{RepoID: repo.ID, Index: 2}, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch)) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch))
unittest.AssertExistsAndLoadBean(t, issueBean, "is_closed=1") unittest.AssertExistsAndLoadBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
} }
@ -172,10 +172,10 @@ func TestUpdateIssuesCommit_Issue5957(t *testing.T) {
issueBean := &issues_model.Issue{RepoID: repo.ID, Index: 2, ID: 7} issueBean := &issues_model.Issue{RepoID: repo.ID, Index: 2, ID: 7}
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, issueBean, "is_closed=1") unittest.AssertNotExistsBean(t, issueBean, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, "non-existing-branch")) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, "non-existing-branch"))
unittest.AssertExistsAndLoadBean(t, commentBean) unittest.AssertExistsAndLoadBean(t, commentBean)
unittest.AssertExistsAndLoadBean(t, issueBean, "is_closed=1") unittest.AssertExistsAndLoadBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
} }
@ -207,10 +207,10 @@ func TestUpdateIssuesCommit_AnotherRepo(t *testing.T) {
issueBean := &issues_model.Issue{RepoID: 1, Index: 1, ID: 1} issueBean := &issues_model.Issue{RepoID: 1, Index: 1, ID: 1}
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, issueBean, "is_closed=1") unittest.AssertNotExistsBean(t, issueBean, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch)) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch))
unittest.AssertExistsAndLoadBean(t, commentBean) unittest.AssertExistsAndLoadBean(t, commentBean)
unittest.AssertExistsAndLoadBean(t, issueBean, "is_closed=1") unittest.AssertExistsAndLoadBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
} }
@ -242,10 +242,10 @@ func TestUpdateIssuesCommit_AnotherRepo_FullAddress(t *testing.T) {
issueBean := &issues_model.Issue{RepoID: 1, Index: 1, ID: 1} issueBean := &issues_model.Issue{RepoID: 1, Index: 1, ID: 1}
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, issueBean, "is_closed=1") unittest.AssertNotExistsBean(t, issueBean, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch)) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch))
unittest.AssertExistsAndLoadBean(t, commentBean) unittest.AssertExistsAndLoadBean(t, commentBean)
unittest.AssertExistsAndLoadBean(t, issueBean, "is_closed=1") unittest.AssertExistsAndLoadBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
} }
@ -292,10 +292,10 @@ func TestUpdateIssuesCommit_AnotherRepoNoPermission(t *testing.T) {
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, commentBean2) unittest.AssertNotExistsBean(t, commentBean2)
unittest.AssertNotExistsBean(t, issueBean, "is_closed=1") unittest.AssertNotExistsBean(t, issueBean, unittest.Cond("is_closed = ?", true))
require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch)) require.NoError(t, UpdateIssuesCommit(db.DefaultContext, user, repo, pushCommits, repo.DefaultBranch))
unittest.AssertNotExistsBean(t, commentBean) unittest.AssertNotExistsBean(t, commentBean)
unittest.AssertNotExistsBean(t, commentBean2) unittest.AssertNotExistsBean(t, commentBean2)
unittest.AssertNotExistsBean(t, issueBean, "is_closed=1") unittest.AssertNotExistsBean(t, issueBean, unittest.Cond("is_closed = ?", true))
unittest.CheckConsistencyFor(t, &activities_model.Action{}) unittest.CheckConsistencyFor(t, &activities_model.Action{})
} }

View file

@ -4,7 +4,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1
@ -18,7 +18,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1
@ -32,7 +32,7 @@
repo_id: 4 repo_id: 4
owner_id: 1 owner_id: 1
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1

View file

@ -4,7 +4,7 @@
repo_id: 62 repo_id: 62
owner_id: 2 owner_id: 2
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1
@ -18,7 +18,7 @@
repo_id: 4 repo_id: 4
owner_id: 3 owner_id: 3
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1
@ -32,7 +32,7 @@
repo_id: 1 repo_id: 1
owner_id: 2 owner_id: 2
commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee commit_sha: 985f0301dba5e7b34be866819cd15ad3d8f508ee
is_fork_pull_request: 0 is_fork_pull_request: false
name: job_1 name: job_1
attempt: 0 attempt: 0
job_id: job_1 job_id: job_1

View file

@ -29,6 +29,7 @@ import (
"forgejo.org/modules/util" "forgejo.org/modules/util"
"forgejo.org/tests" "forgejo.org/tests"
_ "github.com/jackc/pgx/v5/stdlib" // Import pgx driver
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"xorm.io/xorm" "xorm.io/xorm"
@ -193,11 +194,11 @@ func restoreOldDB(t *testing.T, version string) bool {
var db *sql.DB var db *sql.DB
var err error var err error
if setting.Database.Host[0] == '/' { if setting.Database.Host[0] == '/' {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/?sslmode=%s&host=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@/?sslmode=%s&host=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.SSLMode, setting.Database.Host)) setting.Database.User, setting.Database.Passwd, setting.Database.SSLMode, setting.Database.Host))
require.NoError(t, err) require.NoError(t, err)
} else { } else {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/?sslmode=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.SSLMode))
require.NoError(t, err) require.NoError(t, err)
} }
@ -213,10 +214,10 @@ func restoreOldDB(t *testing.T, version string) bool {
// Check if we need to setup a specific schema // Check if we need to setup a specific schema
if len(setting.Database.Schema) != 0 { if len(setting.Database.Schema) != 0 {
if setting.Database.Host[0] == '/' { if setting.Database.Host[0] == '/' {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host))
} else { } else {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode))
} }
require.NoError(t, err) require.NoError(t, err)
@ -244,10 +245,10 @@ func restoreOldDB(t *testing.T, version string) bool {
} }
if setting.Database.Host[0] == '/' { if setting.Database.Host[0] == '/' {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host))
} else { } else {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode))
} }
require.NoError(t, err) require.NoError(t, err)

View file

@ -47,6 +47,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"xorm.io/xorm/convert" "xorm.io/xorm/convert"
_ "github.com/jackc/pgx/v5/stdlib" // Import pgx driver
) )
func exitf(format string, args ...any) { func exitf(format string, args ...any) {
@ -128,10 +130,10 @@ func InitTest(requireGitea bool) {
var db *sql.DB var db *sql.DB
var err error var err error
if setting.Database.Host[0] == '/' { if setting.Database.Host[0] == '/' {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host))
} else { } else {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode))
} }
@ -157,10 +159,10 @@ func InitTest(requireGitea bool) {
db.Close() db.Close()
if setting.Database.Host[0] == '/' { if setting.Database.Host[0] == '/' {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@/%s?sslmode=%s&host=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host)) setting.Database.User, setting.Database.Passwd, setting.Database.Name, setting.Database.SSLMode, setting.Database.Host))
} else { } else {
db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", db, err = sql.Open("pgx", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s",
setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode))
} }
// This is a different db object; requires a different Close() // This is a different db object; requires a different Close()