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

Refactor Jenkins pipeline #2005

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Refactor Jenkins pipeline #2005

merged 4 commits into from
Jul 29, 2024

Conversation

korlaxxalrok
Copy link
Contributor

@korlaxxalrok korlaxxalrok commented Jul 29, 2024

Description

Bug fix and feature

(This Slack thread is the starting point for this work.)

Main change:

Make the pipeline less likely to produce hard to debug errors by removing usage of parallel. Though not 100% diagnosed, it seems like parallel can lead to some strange behavior that manifests as files and programs not being found, or Python package installation steps failing, etc. These are transient and often go away after a retry, but they are confusing and sometimes send people on unnecessary troubleshooting exercises.

Ex issue:

A potentially significant downside will be the extra time the pipeline will take to complete. This won't be too bad for now, but time will scale with the number of indicators. There will be additional work done to migrate the pipeline to GH Actions in the short to medium term, where we should be able to run in parallel again.

Additional change(s):

Run the build script on dev/feature branches. This is useful to catch issues before the necessity of merging to main.

Changelog

  • Remove usage of parallel in build and package stages
  • Create separate build and package scripts
  • Add build stage for dev/feature branches, eg anything other than main and prod

- Remove usage of parallel in the build and package stages
- Retain usage of parallel in the deploy stages
- Separate build and package into separate scripts to support build-only stages
- Add a build-only stage for dev/feature branches
Copy link
Contributor

@melange396 melange396 left a comment

Choose a reason for hiding this comment

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

The deploy scripts are safe to keep parallel?

Do you wanna also remove the old https://github.com/cmu-delphi/covidcast-indicators/blob/main/jenkins/build-and-package.sh script?

Otherwise, LGTM!

@korlaxxalrok
Copy link
Contributor Author

Yeah, re deploy stages: I'd considered changing them as well, but thought we could see how they fare. They do have some infrequent issues, but they are typically minor and iirc always resolve on a retry, so maybe we keep 'em? I'll keep an eye out for failure. The build stage is the one that, at least in the context of this latest issue we ran into, would not resolve on any subsequent retry and is most necessary to address to unblock work.

I'll yank out that original script as well 👍

Copy link
Contributor

@minhkhul minhkhul left a comment

Choose a reason for hiding this comment

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

To sum up, we're checking env and installations on all branches now, not just main and prod. Got it.

@korlaxxalrok korlaxxalrok merged commit 936a4d5 into main Jul 29, 2024
16 checks passed
@korlaxxalrok korlaxxalrok deleted the refactor-jenkins-pipeline branch July 29, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants