Open lafriks opened 5 days ago
I can help testing it if you want. Please let me know if I have to do something specifically for the test.
Attention: Patch coverage is 0%
with 34 lines
in your changes missing coverage. Please review.
Project coverage is 27.35%. Comparing base (
fb37147
) to head (d78ea31
). Report is 1 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
server/store/datastore/migration/common.go | 0.00% | 34 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I can help testing it if you want. Please let me know if I have to do something specifically for the test.
the pipeline should now publish an image you can test against
I just tested it and it fails with the following error.
8:58AM INF woodpecker/src/github.com/woodpecker-ci/woodpecker/shared/logger/logger.go:101 > log level: debug
8:58AM FTL woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/main.go:46 > error running server error="can't setup store: could not migrate datastore: migration alter-table-registries-fix-required-fields failed: Error 1054 (42S22): Unknown column 'column_name' in 'where clause'"
as soon as CI builds new image you can try again, should be fixed now
It failed again.
10:14AM INF woodpecker/src/github.com/woodpecker-ci/woodpecker/shared/logger/logger.go:101 > log level: debug
10:14AM FTL woodpecker/src/github.com/woodpecker-ci/woodpecker/cmd/server/main.go:46 > error running server error="can't setup store: could not migrate datastore: migration alter-table-registries-fix-required-fields failed: column repo_id data type in table registries can not be detected"
I dont know if this helps but I executed the query prior to the error I see in the common.go
file and get the following results:
MariaDB [woodpecker]> show columns from registries;
+----------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| repo_id | bigint(20) | YES | MUL | 0 | |
| address | varchar(255) | YES | MUL | NULL | |
| username | varchar(2000) | YES | | NULL | |
| password | text | YES | | NULL | |
+----------+---------------+------+-----+---------+----------------+
5 rows in set (0.002 sec)
MariaDB [woodpecker]> show columns from registries where lower(field) = 'repo_id';
+---------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------+------+-----+---------+-------+
| repo_id | bigint(20) | YES | MUL | 0 | |
+---------+------------+------+-----+---------+-------+
could be resultset is actually not lowercase as I thought, will try to use Type
instead of type
please test again when new version is built
This works and fixes the issue. No errors reported in the logs.
can you show output of show columns from registries;
after migrations?
can you show output of
show columns from registries;
after migrations?
+----------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------+------+-----+---------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| repo_id | bigint(20) | NO | MUL | 0 | |
| address | varchar(255) | NO | MUL | NULL | |
| username | varchar(2000) | YES | | NULL | |
| password | text | YES | | NULL | |
| org_id | bigint(20) | NO | MUL | 0 | |
+----------+---------------+------+-----+---------+----------------+
Great! Everything looks as it should be. Thanks for your help on testing it! ❤️
Fixes #3870
Would be nice if someone could test it as I have no mysql/mariadb instances to reproduce this on