Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdk-cicd: during a scheduled run publish_artifacts and release shouldn't run #1551

Merged
merged 16 commits into from
Jan 26, 2023

Conversation

murphp15
Copy link
Collaborator

@murphp15 murphp15 commented Jan 26, 2023

Why

We want to be able to run scheduled jobs.
But as part of the scheduled jobs we want to skip publish_artifact jobs and also release jobs.

This change should not have any impact on the pipeline and I will start running the scheduled jobs once we see the pipeline is still green for merge triggered builds.

In the future I might extract the rule into a shared abstract job. But that will be a later PR

What

Add a guard on all publish_artifact jobs and also release jobs so that they won't run if it is triggered by a scheduled operation.
I also upgraded helm if we are testing everything we should try upgrade that too. The hope here is that it fixes #1252.

How has this been tested

Not much, mostly visual inspection.

closes #1254

Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
@antoniivanov
Copy link
Collaborator

Please assign the #1254 to yourself. And linked it in teh ticket.

Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
Signed-off-by: murphp15 <murphp15@tcd.ie>
@murphp15 murphp15 changed the title DRAFT Person/murphp15/disable publishing for nightly vdk-cicd: during a scheduled run publish_artifacts and release shouldn't run Jan 26, 2023
Copy link
Contributor

@ivakoleva ivakoleva left a comment

Choose a reason for hiding this comment

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

could explain in the PR description what are the changes expected?
for example, I am wondering why the vdk-heartbeat publish/release stages are handled, and the vdk-control-cli are not?

projects/control-service/cicd/.gitlab-ci.yml Outdated Show resolved Hide resolved
@murphp15 murphp15 marked this pull request as draft January 26, 2023 11:35
@murphp15 murphp15 changed the title vdk-cicd: during a scheduled run publish_artifacts and release shouldn't run DRAFT vdk-cicd: during a scheduled run publish_artifacts and release shouldn't run Jan 26, 2023
@murphp15 murphp15 marked this pull request as ready for review January 26, 2023 11:41
Signed-off-by: murphp15 <murphp15@tcd.ie>
@murphp15
Copy link
Collaborator Author

could explain in the PR description what are the changes expected? for example, I am wondering why the vdk-heartbeat publish/release stages are handled, and the vdk-control-cli are not?

Fixed

Copy link
Contributor

@ivakoleva ivakoleva left a comment

Choose a reason for hiding this comment

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

Still don't understand why some gitlab ci yaml files are changed, and some are not.....for example https://github.com/vmware/versatile-data-kit/blob/main/projects/vdk-control-cli/.gitlab-ci.yml#L86 ?

@ivakoleva
Copy link
Contributor

for convenience, you can also link the gitlab schedule created, to save time (I went to find it on my own)

@murphp15
Copy link
Collaborator Author

for convenience, you can also link the gitlab schedule created, to save time (I went to find it on my own)

the schedule is not actually created yet.
that schedule you are looking at it for a branch and it does a pretty bad job of testing it.
I will create the schedule when I know I have not introduced regressions in the current builds.

@murphp15
Copy link
Collaborator Author

Still don't understand why some gitlab ci yaml files are changed, and some are not.....for example https://github.com/vmware/versatile-data-kit/blob/main/projects/vdk-control-cli/.gitlab-ci.yml#L86 ?

It is changed, but I only changed it after you pointed it out.
Do you see other examples where I am not doing it?

@murphp15 murphp15 changed the title DRAFT vdk-cicd: during a scheduled run publish_artifacts and release shouldn't run vdk-cicd: during a scheduled run publish_artifacts and release shouldn't run Jan 26, 2023
@murphp15 murphp15 enabled auto-merge (squash) January 26, 2023 11:53
@antoniivanov
Copy link
Collaborator

Is it possible to configure the rule to be "opt-in" - run on schedule only the jobs marked as such.
Instead of opt-out as it's now (excluding jobs) ?

With opt-in , it's easier to start with smaller set of jobs and add more incrementally until we are happy

@murphp15
Copy link
Collaborator Author

Is it possible to configure the rule to be "opt-in" - run on schedule only the jobs marked as such. Instead of opt-out as it's now (excluding jobs) ?

With opt-in , it's easier to start with smaller set of jobs and add more incrementally until we are happy

IMO opt out is better so we are testing more by default.

I think the problem with current setup with both my solution and your suggested solution is that it touches soo many lines of code.
I think we should try make an abstract job for each stage. all jobs in that stage should extend it.
That way it is super easy to skip an entire stage.

However I only want to try that after I have identified all the edge cases etc..

Let me know what you think?

Signed-off-by: murphp15 <murphp15@tcd.ie>
@antoniivanov
Copy link
Collaborator

Is it possible to configure the rule to be "opt-in" - run on schedule only the jobs marked as such. Instead of opt-out as it's now (excluding jobs) ?
With opt-in , it's easier to start with smaller set of jobs and add more incrementally until we are happy

IMO opt out is better so we are testing more by default.

I think the problem with current setup with both my solution and your suggested solution is that it touches soo many lines of code. I think we should try make an abstract job for each stage. all jobs in that stage should extend it. That way it is super easy to skip an entire stage.

However I only want to try that after I have identified all the edge cases etc..

Let me know what you think?

With opt-out if we add a new component/plugin build job, it would be automatically included in the scheduled nightly build. Which is a good thing.

But if we add a new release job then it would be automatically included which is not what we want.

But if we can extend a stage, as you suggest, then we can opt out "release" stage. Unless somebody releases in the wrong stages, there's no problem with wrong jobs being included.

So I like this..

OK. Let's go with the proposed plan. First let's identify the what jobs need to be included and what not.
Then we can refactor to support inheriting abstract job for each stage. Which would likely be useful for other purposes as well.

Copy link
Collaborator

@antoniivanov antoniivanov left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Since there's some risk. But I'd suggest that You do not merge it soon before clocking out and monitor the pipeline afterward. It's very unlikely that the new rules would break something but you never know

@murphp15 murphp15 merged commit 2ec53ff into main Jan 26, 2023
@murphp15 murphp15 deleted the person/murphp15/disable_publishing_for_nightly branch January 26, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants