Skip to content

Conversation

@ivoanjo
Copy link
Contributor

@ivoanjo ivoanjo commented Feb 19, 2025

What does this PR do?:

This PR takes the build reuse support added in #14 and makes it trigger automatically for 3.4-asan builds.

Specifically, since 3.4-asan builds are done from release tags (e.g. v3_4_2), and releases are far and far between, we can reuse a build instead of redoing it.

Motivation:

Reduce CI work.

Additional Notes:

There's a bit of a complexity trade-off here: we need to add a bit more branching logic.

How to test the change?

I've tested the three code paths:

Rather than repeating the whole logic for skip_slow, let's rely on
the matrix being set.
**What does this PR do?:**

This PR takes the build reuse support added in
ruby#14 and makes it
trigger automatically for 3.4-asan builds.

Specifically, since 3.4-asan builds are done from release tags (e.g.
v3_4_2), and releases are far and far between, we can reuse a build
instead of redoing it.

**Motivation:**

Reduce CI work.

**Additional Notes:**

There's a bit of a complexity trade-off here: we need to add a bit
more branching logic.

**How to test the change?**

I've tested the three code paths:
* Previous build can be reused => https://github.com/DataDog/ruby-dev-builder/actions/runs/13411682947/job/37463131435
* Previous built **can't** be reused => https://github.com/DataDog/ruby-dev-builder/actions/runs/13411767953/job/37463387098
* skip_slow was set => https://github.com/DataDog/ruby-dev-builder/actions/runs/13411781030/job/37463429665
// Entry in body may not exist, but if it doesn't the should_build_3_4_asan is still correct
const latestRelease34ASanCommit = ((release.body.split('\n')[1] ?? "").split('@')[1] ?? "").trim()
console.log(`Latest release commit: ${latestReleaseCommit}`)
console.log(`Latest 3.4-asan release commit: ${latestRelease34ASanCommit}`)
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this next to Latest 3.4-asan: so it's easier to compare, example from your build: https://github.com/DataDog/ruby-dev-builder/actions/runs/13411682947/job/37463108782#step:5:25

Could even align all 4 commits vertically to make it even easier.

Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@eregon eregon merged commit bdaf2f7 into ruby:master Mar 4, 2025
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.

2 participants