Skip to content

CI fail against PostgreSQL 18 #37952

@harryzcy

Description

@harryzcy

Gitea Version

main

What happened?

If running against postgres:18 in pull-db-tests.yml, the database migration test fails. Other postgres versions from 14 to 17 are all fine.

I've created an example PR #37951 to show the error at https://github.com/go-gitea/gitea/actions/runs/26706353880/job/78708274992?pr=37951. Looks like id database column gets duplicated and that is not expected.

Error log:

=== Test_AddActionRunAttemptModel (/opt/hostedtoolcache/go/1.26.3/x64/src/testing/testing.go:2036)
--- FAIL: Test_AddActionRunAttemptModel (0.16s)
    v331_test.go:52: no fixtures found in: /home/runner/work/gitea/gitea/models/migrations/fixtures/Test_AddActionRunAttemptModel
    v331_test.go:77: 
        	Error Trace:	/home/runner/work/gitea/gitea/models/migrations/v1_27/v331_test.go:77
        	Error:      	elements differ
        	            	
        	            	extra elements in list A:
        	            	([]interface {}) (len=1) {
        	            	 (string) (len=2) "id"
        	            	}
        	            	
        	            	
        	            	listA:
        	            	([]string) (len=13) {
        	            	 (string) (len=2) "id",
        	            	 (string) (len=2) "id",
        	            	 (string) (len=7) "repo_id",
        	            	 (string) (len=6) "run_id",
        	            	 (string) (len=7) "attempt",
        	            	 (string) (len=15) "trigger_user_id",
        	            	 (string) (len=17) "concurrency_group",
        	            	 (string) (len=18) "concurrency_cancel",
        	            	 (string) (len=6) "status",
        	            	 (string) (len=7) "started",
        	            	 (string) (len=7) "stopped",
        	            	 (string) (len=7) "created",
        	            	 (string) (len=7) "updated"
        	            	}
        	            	
        	            	
        	            	listB:
        	            	([]string) (len=12) {
        	            	 (string) (len=2) "id",
        	            	 (string) (len=7) "repo_id",
        	            	 (string) (len=6) "run_id",
        	            	 (string) (len=7) "attempt",
        	            	 (string) (len=15) "trigger_user_id",
        	            	 (string) (len=6) "status",
        	            	 (string) (len=7) "started",
        	            	 (string) (len=7) "stopped",
        	            	 (string) (len=17) "concurrency_group",
        	            	 (string) (len=18) "concurrency_cancel",
        	            	 (string) (len=7) "created",
        	            	 (string) (len=7) "updated"
        	            	}
        	Test:       	Test_AddActionRunAttemptModel

How are you running Gitea?

In CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions