Update Terraform.latest.gitlab-ci.yml template
What does this MR do?
Update the Terraform.latest.gitlab-ci.yml template to reflect the new syntax in the terraform-images.
As suggested by @Alexand, the init
stage is redundant.
Related issues
Check-list
Pre-merge
Consider the effect of the changes in this merge request on the following:
-
Different pipeline types - Non-canonical projects:
-
gitlab-foss
-
security
-
dev
-
personal forks
-
-
Pipeline performance
If new jobs are added:
-
Change-related rules (e.g. frontend/backend/database file changes): _____ -
Frequency they are running (MRs, main branch, nightly, bi-hourly): _____ -
Add a duration chart to https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations if there are new jobs added to merge request pipelines
This will help keep track of expected cost increases to the GitLab project average pipeline cost per merge request RPI
Post-merge
-
Consider communicating these changes to the broader team following the communication guideline for pipeline changes
Merge request reports
Activity
Thank you for your contribution to GitLab. We believe that everyone can contribute and contributions like yours are what make GitLab great!
- Our Merge Request Coaches will ensure your contribution is reviewed in a timely manner*.
- If you haven't, please set up a
DANGER_GITLAB_API_TOKEN
. - You can comment
@gitlab-bot label ~"group::"
to add a group label. - After a few days, feel free to ask
@gitlab-bot help
or ping a Merge Request Coach. - Read more how to get help.
This message was generated automatically. You're welcome to improve it.
added Community contribution label
1 Warning This merge request does not refer to an existing milestone. 1 Message This merge request adds or changes files that require a review from the CI/CD Templates maintainers. This merge request requires a CI/CD Template review. To make sure these changes are reviewed, take the following steps:
- Ensure the merge request has the citemplates label. If the merge request modifies CI/CD Template files, Danger will do this for you.
- Prepare your MR for a CI/CD Template review according to the template development guide.
- Assign and
@
mention the CI/CD Template reviewer suggested by Reviewer Roulette.
The following files require a review from the CI/CD Templates maintainers:
lib/gitlab/ci/templates/Terraform.latest.gitlab-ci.yml
lib/gitlab/ci/templates/Terraform/Base.latest.gitlab-ci.yml
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Furkan Ayhan ( @furkanayhan
) (UTC+3)Dylan Griffith ( @DylanGriffith
) (UTC+11)citemplates Tiger Watson ( @tigerwnz
) (UTC+11)Laura Montemayor ( @lauraX
) (UTC-5)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangeradded 102 commits
-
def21230...a7822ccd - 101 commits from branch
gitlab-org:master
- 2c96c2c4 - Update Terraform.latest.gitlab-ci.yml template
-
def21230...a7822ccd - 101 commits from branch
mentioned in issue gitlab-org/quality/triage-reports#4766 (closed)
added backend label
Hi again, @willianpaixao!
I see you've been working on this here. Feel free and please ping me on a message when you have it ready for review or if you'd like to discuss anything.
added 418 commits
-
2c96c2c4...3ce20ca4 - 417 commits from branch
gitlab-org:master
- 9e8a02de - Update Terraform.latest.gitlab-ci.yml template
-
2c96c2c4...3ce20ca4 - 417 commits from branch
added 12 commits
-
9e8a02de...9477cff7 - 11 commits from branch
gitlab-org:master
- 88b789f8 - Update Terraform.latest.gitlab-ci.yml template
-
9e8a02de...9477cff7 - 11 commits from branch
added 1 commit
- 3db14573 - Update Terraform.latest.gitlab-ci.yml template
added 393 commits
-
3db14573...8abf12af - 392 commits from branch
gitlab-org:master
- a920d2b2 - Update Terraform.latest.gitlab-ci.yml template
-
3db14573...8abf12af - 392 commits from branch
Hi @Alexand, the MR is now ready to review.
- Resolved by João Alexandre Cunha
I did some basic QA with this change and it works: https://gitlab.com/Alexand/terraform-test/-/pipelines/382096407
I've tested with existing state and also deleting the state and restarting the pipeline.
- Resolved by João Alexandre Cunha
@tigerwnz , could you also review this idea? Can you think of any edge cases where having the
init
stage is important?I think removing the
init
stage makes sense based on the fact that we already callterraform init
before every relevant command. I believe this question was raised by @willianpaixao and @nagyv-gitlab .I also think that having a stage just to run
init
could make sense, if we cache and pass forward theterraform.lock.hcl
file to the next stages/jobs. Then maybe we could avoid fetching the dependencies over and over for every job that needs it. But this could also be done in the future. The simplest improvement might be just to remove theinit
stage already. WDYT?Edited by João Alexandre Cunha
added 89 commits
-
a920d2b2...13c904f0 - 88 commits from branch
gitlab-org:master
- d935e449 - Update Terraform.latest.gitlab-ci.yml template
-
a920d2b2...13c904f0 - 88 commits from branch
- Resolved by willian.eth
removed review request for @tigerwnz
- Resolved by Shinya Maeda
@tigerwnz
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, please start a new pipeline before merging.
For more info, please refer to the following links:
added 487 commits
-
d935e449...5aa98afe - 486 commits from branch
gitlab-org:master
- 9adda5d7 - Update Terraform.latest.gitlab-ci.yml template
-
d935e449...5aa98afe - 486 commits from branch
added 12 commits
-
9adda5d7...9663b69b - 11 commits from branch
gitlab-org:master
- ea485810 - Update Terraform.latest.gitlab-ci.yml template
-
9adda5d7...9663b69b - 11 commits from branch
- Resolved by willian.eth
@willianpaixao , the pipeline failure for this change unveiled that there is a bug in our Terraform stable template spec.
The problem
We have a feature that redirects stable template to their
latest
version if a feature flag is enabled. This happens here.Although, we have configured our specs to always run with all the feature flags enabled by default. This means that the specs for the stable CI templates will be loading the
latest
version instead, therefore testing the wrong one.The solution
The solution is simple, we can stub the feature flag to return false in a
before
hook on the template stable spec. For Terraform, this would be adding the below to this block:stub_feature_flags(redirect_to_latest_template_terraform: false)
For this MR this should be enough. Could you add this here, @willianpaixao ?
FYI, @hfyngvason @shinya.maeda , we might want to have a quick look on other specs related to stable templates that might be being redirected to
latest
. I'll open a follow up issue for us to have a look at it.
assigned to @willianpaixao
added 1 commit
- 6ff3f96c - Update Terraform.latest.gitlab-ci.yml template
- Resolved by willian.eth
Sorry, @willianpaixao . CI is failing due to NPM problems this time: https://status.npmjs.org/
We'll have to wait to retry your pipeline for now.
added 92 commits
-
6ff3f96c...f3a8f0da - 91 commits from branch
gitlab-org:master
- 2f261efd - Update Terraform.latest.gitlab-ci.yml template
-
6ff3f96c...f3a8f0da - 91 commits from branch
- Resolved by Shinya Maeda
Thanks, @willianpaixao. LGTM!
@mwoolf could you do the backend maintainer review?
@hfyngvason could you do the citemplates review?
requested review from @hfyngvason and @mwoolf
removed review request for @mwoolf
- Resolved by willian.eth
- Resolved by Laura Montemayor
Thanks @willianpaixao
I just had one small suggestion, let me know what you think.
requested review from @lauraX and removed review request for @Alexand and @hfyngvason
- Resolved by willian.eth
added 1170 commits
-
2f261efd...a9dbb0ab - 1169 commits from branch
gitlab-org:master
- a36e00c1 - Update Terraform.latest.gitlab-ci.yml template
-
2f261efd...a9dbb0ab - 1169 commits from branch
Hi @shinya.maeda - could you please merge this MR if you're ok with it? Thank you!
requested review from @shinya.maeda
- A deleted user
added citemplates label
enabled an automatic merge when the pipeline for b91106d9 succeeds
mentioned in commit 60ae9dea
added workflowstaging label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
changed milestone to %14.5
@cj_obermaier it all started here. The change only takes effect in the 14.5 version.
mentioned in commit a36e00c1
@shinya.maeda would you mind adding the Hacktoberfest please?
added Hacktoberfest label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!388 (merged)
mentioned in commit atarc/iac-terraform@05830cf5
added typemaintenance label and removed tooling (archive) label
mentioned in merge request !101756 (closed)
added groupenvironments label and removed groupconfigure [DEPRECATED] label