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

chore(ci): build images from tags, build next nightly #2218

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

kadel
Copy link
Member

@kadel kadel commented Jan 21, 2025

Modifies .github/workflows/next-build-image.yaml

  • to make it more generic, so it can be triggered even on the tags and build images from tag
  • builds next nightly instead of after every push to main branch. arm build takes almost 5 hours, so we won't be able to build more than 4 of them a day anyway

related to https://issues.redhat.com/browse/RHIDP-5027

Copy link
Contributor

@kadel kadel changed the title chore(ci): build images from tags chore(ci): build images from tags, build next nightly Jan 21, 2025
Copy link
Contributor


on:
schedule:
# run at 3:18 UTC every day
- cron: "18 3 * * *"
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused why you want to switch from "on every push to main" to "once a day"... are we trying to reduce noise ? server usage? data centre heat causing global warming?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you do "on every push to main" than every time, there is a new commit on main, the running job gets canceled, and a new one is trigerred. Which makes sense because otherwise you are building something that is already out of date.

To complete a full multiplatform image build, which typically takes over 5 hours, you’d need at least five consecutive hours without merging any pull requests (PRs) into main.
During regular workdays, with multiple PRs being merged daily, this job will likely get triggered and canceled repeatedly until nighttime when there’s less activity.

Copy link
Member

Choose a reason for hiding this comment

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

FIVE HOURS? What's it doing, compiling every single dependent package from sources??

Copy link
Member

Choose a reason for hiding this comment

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

also you can turn off the concurrency settings to cancel in-progress builds if you don't want things to be cancelled and started over:

https://github.com/redhat-developer/rhdh/blob/main/.github/workflows/next-build-image.yaml#L24

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, but if we don't cancel it than we are building something that is is never going to be used

Copy link
Member Author

Choose a reason for hiding this comment

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

FIVE HOURS? What's it doing, compiling every single dependent package from sources??

arm build takes this long becuase it is running in emualated environment

Copy link
Contributor

Copy link
Member

@nickboldt nickboldt left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link

openshift-ci bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nickboldt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@kadel
Copy link
Member Author

kadel commented Jan 22, 2025

/hold

lets get agreement that everyone is ok with switching to daily builds

@schultzp2020
Copy link
Collaborator

+1 on the changes

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

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

+1. Just a small comment below:

.github/workflows/next-build-image.yaml Show resolved Hide resolved
Co-authored-by: Armel Soro <armel@rm3l.org>
Copy link
Contributor

@kadel
Copy link
Member Author

kadel commented Jan 24, 2025

/hold cancel

@kadel kadel added the lgtm label Jan 24, 2025
Copy link
Contributor

@openshift-merge-bot openshift-merge-bot bot merged commit fa2e216 into redhat-developer:main Jan 24, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants