Remove "sha" argument from GraphQL ciConfigVariables
What does this MR do and why?
In !116032 (merged), we deprecated the sha
argument from ProjectType.ci_config_variables
and updated the FE to use the new ref
argument. This was done as a first step to gracefully deprecate sha
so that there aren't issues with the FE if it's a version behind the latest BE release.
Now that the MR thereof has been pushed to production, and the ProjectType.ci_config_variables
is in alpha
, we can proceed immediately with removing the sha
argument altogether.
How to set up and validate locally
- Set up a project whose
.gitlab-ci.yml
file has the following contents:
variables:
CONFIG_VAR_1: 'Value for CONFIG_VAR_1'
CONFIG_VAR_2: 'Value for CONFIG_VAR_2'
job:
script: echo
- Go to
http://gdk.test:3000/-/graphql-explorer
and run the following query (updatefullPath
as necessary).
query getProjectConfigVariables($fullPath: ID!, $ref: String!) {
project(fullPath: $fullPath) {
id
ciConfigVariables(ref: $ref) {
key
value
}
__typename
}
}
Variables:
{"fullPath": "group-a/project-1", "ref": "master"}
- Observe that the result shows both config variables:
- Also observe that if you update the query to use
sha
(ciConfigVariables(sha: $ref)
), you get an error output.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #404493 (closed)
Edited by Leaminn Ma