Check for GitLab version when creating token
What does this MR do and why?
The MR updates Admin PAT seeding file to check for the version to maintain backward compatibility when testing GitLab older than 17.4.
Related to Set PAT default organization (!1363 - merged) and resolving Failure in e2e update jobs | method_missing: un... (gitlab#487757 - closed) when update-major
fails to create token https://gitlab.com/gitlab-org/gitlab/-/jobs/7867330885#L451
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Start GitLab container older than 17.4
- Create
admin_access_token_seed.rb
file and run it from container - for examplegitlab-rails runner /tmp/admin_access_token_seed.rb
- Verify that seeding passed:
# Tested with 17.3 release
# gitlab-rails runner /tmp/admin_access_token_seed.rb
WARNING: Active Record does not support composite primary key.
security_findings has composite primary key. Composite primary key is ignored.
Personal access token seeded for root user.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
Commits include Changelog:
trailer -
I have evaluated the MR acceptance checklist for this MR.