Fix an issue where updating `expires_at` more than 2 times could cause an error
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
Closes #6271 (closed)
This MR makes a couple of changes to the project & group access token plan modification that are required for token expiration to function properly when natively using the expires_at
to modify the token. Without this change, people who were previously rotation the token without using the rotation_configuration
would experience a breaking change with 16.11 if they rotate multiple times.
The reason for this is that the primary key of the token changes every time you call the rotate API (which we weren't expecting), and the token ID is using the the provider's resource ID. As a result, when rotating, we need to re-set the ID.
Unfortunately, this also requires that the Plan
operation accurately reflects that the ID will be unknown at time of apply, so there is a change to the ModifyPlan
function here to reflect that.
Finally, a small maintenance tweak to the Dockerfile to align it to our Go version now.