Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Refactor the automatic-crate-publishing logic, make triggered pipelines uninterruptible as well #13908

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

altaua
Copy link
Contributor

@altaua altaua commented Apr 13, 2023

It's not neccessary to dynamically change the interruptible setting for all jobs as the old approach does; gitlab already considers a pipeline uninterruptible as soon as a single uninterruptible job has started (cf https://docs.gitlab.com/ee/ci/yaml/#interruptible).

IMO this approach is more readable, as it avoids dynamically loading the .defaults section from different files based on import conditions; the logic is now shorter and entirely contained in the main .gitlab-ci.yml.

In addition to the refactoring, this PR also adds a condition to make multi-project pipelines uninterruptible too. Currently, a substrate pipeline triggered e.g. by a ci-linux build in the scripts repo could be interrupted, thus unneccessarily preventing a ci-linux:production deployment.

It's not neccessary to dynamically change the `interruptible` setting
for *all* jobs as the old approach does; gitlab already considers a
pipeline uninterruptible as soon as a single uninterruptible job has
started (cf https://docs.gitlab.com/ee/ci/yaml/#interruptible).

IMO this approach is more readable, as it avoids dynamically loading the
.defaults section from different files based on import conditions; the
logic is now shorter and entirely contained in the main .gitlab-ci.yml.
@altaua altaua added A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Apr 13, 2023
@altaua altaua requested a review from a team as a code owner April 13, 2023 14:13
@altaua altaua self-assigned this Apr 13, 2023
@paritytech-ci paritytech-ci requested a review from a team April 13, 2023 14:30
.gitlab-ci.yml Outdated
# * multi-project pipelines such as the ones triggered by the scripts repo
# * the scheduled automatic-crate-publishing pipeline
#
# In those cases, we add an interruptible .pre job; once that one has started,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we add an interruptible .pre job

AFAIU it should be we add an uninterruptible .pre job?

@paritytech-ci paritytech-ci requested a review from a team April 13, 2023 16:43
@altaua altaua merged commit a49292a into master Apr 13, 2023
@altaua altaua deleted the mira/uninterruptible-mpps branch April 13, 2023 18:17
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
…es uninterruptible as well (paritytech#13908)

* Use a new approach to make automatic-crate-publishing uninterruptible

It's not neccessary to dynamically change the `interruptible` setting
for *all* jobs as the old approach does; gitlab already considers a
pipeline uninterruptible as soon as a single uninterruptible job has
started (cf https://docs.gitlab.com/ee/ci/yaml/#interruptible).

IMO this approach is more readable, as it avoids dynamically loading the
.defaults section from different files based on import conditions; the
logic is now shorter and entirely contained in the main .gitlab-ci.yml.

* Make triggered multi-project pipelines uninterruptible
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants