This page may contain information related to upcoming products, features and functionality.
It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes.
Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
Right now it's not possible to view or override the variables being used when retrying the job. Developers want to be able to tweak variables used by a manual job when working on a deployment, for example. Sometimes you need to go back and tweak the input.
Surface the project level variables that are being inherited by the job, and indicate when they're being overridden by the custom variables. Those can be view-only since they're set on project level, but it can be useful to see them for the context.
There can be further improvements to the variables form, for example when a variables has "true" or "false" values we can automatically offer those options in the dropdown.
Offer possible variable values to choose from a given variable
+1 on this feature request. This is the behaviour I expected when re-triggering manual jobs.
I tried to hack around it by erasing the job log so I'm presented with the input prompt again (success!) but clicking "Retry this job" doesn't respect my input.
This is a problem for us in Quality too. As others have noted, it's worse than the initial description - we can't even rerun the job with the same variables.
We sometimes need to be able to run a specific set of tests in CI that's different from the various statically configured sets, and we can do so using the custom variables feature (e.g., gitlab-qa!362 (merged))
However, one key use case for us is to be able to repeatedly run the same quarantined test to verify that it's not flaky. Unfortunately, we can't do so yet because retrying ignores the custom variables.
Came across this today. I made a mistake declaring a variable for a manual action in the pipeline. It was not possible to retry the same job and fix the mistake without creating a new pipeline
Possible duplicate with #37268 (closed)?
Also, as mentioned there, there is a (sort of) workaround with re-running the pipeline (not triggering another pipeline, as this reruns all previous steps as mentioned above).
Also, workaround mentioned here (erasing the log and providing variables) does not always work for me. I suspect that it only allows overwriting variables passed to the previous run, doesn't allow overriding / adding new variables.
My customer would like to create automation that says get last deploy to 'blue' environment for each project. now deploy the exact same thing to the 'green' environment In order to do this, they want to leverage the same job but pass {"variables": {"ENVIRONMENT_NAME": "green"}} to https://docs.gitlab.com/ee/api/jobs.html#retry-a-job.
We would also like this to be fixed, since after the first trigger of the manual job with custom input variables, in order to be able to re run it, you have to manually trigger the whole pipeline (if you do not want to push something else)
We think this would be a very useful feature within enterprises where job overrides/re-trigger (with manual variables) are needed for a certain process evaluation or elevated privilege based on deploy environment and who can deploy to those environments.
When clicking on Retry for a manual job the user is directed to a page where they can specify the variables again (which are pre-filled with existing variables)? I think this might need to be a new page, but we could re-use the existing variable UI.
The alternative is to copy the initially defined variables and re-run the job with those, but that does not fascilitate the use case described in the comments here.
@dimitrieh - Since I'm sub-ing in and lack context. Could you propose a design here? Is this something that requires solution validation? I think it is clear that we have a validated problem here.
We have a manual job which relies on multiple variables which have to be manually entered before pressing play. If the job fails due to any reason (Runner failure, script failure, timeout) or you simply made an error when entering the variables, you have zero chance to retry the job.
Editing retry would be great! Can maybe mimic how Jenkins does it - they allow you to replay a job, and modify the Jenkinsfile (without modifying the original source)
Customer https://gitlab.my.salesforce.com/00161000019dARj would like to see this feature. Firing off a manual job with one or more variables specified manually prevents you from firing off the same job in the same pipeline again with different variables/values. One currently has to create a new pipeline from the same commit and then run the manual job there. This is annoying when the manual job you want to run is preceded by several other dependent tasks.
+1 - this is an absolute must. We're trying to use failsafes on manual jobs we don't want to accidentally run, such as rolling back deployments etc. Our CI pipeline checks to make sure that ROLLBACK is set to the project name, but if someone forgets to do this, or there is a typo in the name, we can no longer trigger this manual job...
We (as another commercial customer) would like to join to the requestors.
When running a manually triggered job (when: manual) users can provide additional variable just for that job when triggering it in the web interface. We want to be able to re-try such jobs, though with change/different variables (names and values). This should ideally work when retrying failed as well as succeeded jobs that have "when: manual"
This would be a very helpful feature for the Delivery team, we have many situations where we need to retry failures with CI variables set to override conditions, and right now it usually means we need to set a CI variable and manually remove it once the job starts.
+1 - Came across similar issue! We have trigger whole pipeline again and wait to trigger manual job id in case we have passed wrong variables!
Is there already a fix for this ?
If you're subscribed to this thread, it might be worth adding a "I'm still here and I still want this" message so it gets traction.
I follow every message on here and sympathize with everyone. I wish I could do more.
How much do I want this? This is my #1 (closed) request. To see update after update go out with other features no one on my team will ever use while this one sits here without any timeline... hello?
While I can appreciate the potential UI difficulties, can we at least get two very basic aspects of this: (1) Visibly display, somewhere, the manual inputs to a job; and (2) Make "Retry" use any such inputs when retrying.
I'd love to get (3) Make any attempt to rerun any job or pipeline have an option to set or alter input variables. I add that last because, as noted above, there is no way to get back to the input variable page. I can only look at what it's already done and have the useless "Retry" button, which technically doesn't retry because it forgets those variables.
As a workaround until this feature comes in, you can trigger a pipeline via the rest API and provide variables there. It's not quite the same but it works.