Skip to content

Conversation

SeanTAllen
Copy link
Member

This introduces a number of changes for our container image building.

It introduces the eventual deprecation of latest as a tag. At the moment, our use of latest is misleading. That is supposed to be "most recent" but we don't use it as such. For us it is "most recently nightly".

This commit will be the start of us having "nightly" images that are explicitly a nightly build. Additionally, our tags will have a qualifier for the libc version. In the case of this musl image the tag would be "musl-nightly". When we do the same for GNU libc, the tag would be "gnu-nightly".

This same name scheme will end up being carried over to releases: "musl-release" and "gnu-release" as well as "by version" tags "musl-0.60.0" and "gnu-0.60.0". The older tags will be dropped as this rolls out.

We can if we want then start using a variation on latest with "musl-latest" and "gnu-latest" should we want, or for ponyc images we can ditch the entire concept of "latest" as "nightly" and "release" versions will always be for a given library the latest nightly and latest release.

In addition the tag name changes, this also is our first multiplatform image. The build process for this is as simple as I could make it. We have a new workflow for building the nightly image. It is set to have a concurrency of 1 so, as events arrive from Cloudsmith, we will build a new version of the image with whatever is the latest nightly arm64 and latest nightly am64 version of ponyc that is available in Cloudsmith.

This means that as we upload to Cloudsmith each night we will create the image twice. If the arm64 synchronized message arrives first and then the amd64 one we will have the following happen:

  • arm64 message arrives
  • Build a new "nightly image" with today's arm64 and yesterday's amd64
  • amd64 message arrives
  • Build a new "nightly image" with today's arm64 and today's arm64

The same pattern would be applied to releases.

At the time the message arrives, the image will be built using the most recent version of ponyc for each platform that is available. This has a couple nice qualities to it:

  • If one failed to build, we still make the one that succeeded available.
  • It makes our configuration relatively simple

Without this "cross over", we would need to wait for each message to have arrived and then build the final image. That is some tricky yaml that we should want to avoid doing if possible.

@SeanTAllen SeanTAllen marked this pull request as draft June 4, 2025 13:34
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jun 4, 2025
@SeanTAllen
Copy link
Member Author

This will fail until:

  • a changelog-tool nightly for arm64 is available
  • we do a new ponyup release with support for alpine-3.21 on amd64 and arm64

both will be happening soon.

@SeanTAllen SeanTAllen force-pushed the multiplatform-musl-nightly branch from fd919e8 to f2b9855 Compare June 4, 2025 13:41
@SeanTAllen SeanTAllen requested a review from jemc June 4, 2025 13:41

concurrency:
group: build-nightly-musl-image
cancel-in-progress: false
Copy link
Member Author

Choose a reason for hiding this comment

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

cancelling in progress could result in unrelated sync events killing off both of our expected events and resulting in no image.

This introduces a number of changes for our container image building.

It introduces the eventual deprecation of `latest` as a tag. At the moment,
our use of `latest` is misleading. That is supposed to be "most recent" but
we don't use it as such. For us it is "most recently nightly".

This commit will be the start of us having "nightly" images that are explicitly
a nightly build. Additionally, our tags will have a qualifier for the libc version.
In the case of this musl image the tag would be "musl-nightly". When we do the same
for GNU libc, the tag would be "gnu-nightly".

This same name scheme will end up being carried over to releases: "musl-release" and
"gnu-release" as well as "by version" tags "musl-0.60.0" and "gnu-0.60.0". The older
tags will be dropped as this rolls out.

We can if we want then start using a variation on latest with "musl-latest" and
"gnu-latest" should we want, or for ponyc images we can ditch the entire concept of
"latest" as "nightly" and "release" versions will always be for a given library the
latest nightly and latest release.

In addition the tag name changes, this also is our first multiplatform image. The
build process for this is as simple as I could make it. We have a new workflow for
building the nightly image. It is set to have a concurrency of 1 so, as events arrive
from Cloudsmith, we will build a new version of the image with whatever is the latest
nightly arm64 and latest nightly am64 version of ponyc that is available in Cloudsmith.

This means that as we upload to Cloudsmith each night we will create the image twice.
If the arm64 synchronized message arrives first and then the amd64 one we will have the
following happen:

- arm64 message arrives
- Build a new "nightly image" with today's arm64 and yesterday's amd64
- amd64 message arrives
- Build a new "nightly image" with today's arm64 and today's arm64

The same pattern would be applied to releases.

At the time the message arrives, the image will be built using the most recent version
of ponyc for each platform that is available. This has a couple nice qualities to it:

- If one failed to build, we still make the one that succeeded available.
- It makes our configuration relatively simple

Without this "cross over", we would need to wait for each message to have arrived and then
build the final image. That is some tricky yaml that we should want to avoid doing if
possible.
@SeanTAllen SeanTAllen force-pushed the multiplatform-musl-nightly branch from f2b9855 to 25396bb Compare June 4, 2025 13:43
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.

send-repository-dispatch-event:
Copy link
Member Author

Choose a reason for hiding this comment

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

The downside to this approach is that we will send this event twice and double the downstream work of "verify we work with latest" and also "rebuild shared docker images" or whatever else the event triggers.

We could add the complicated "only if both logic" as a gate in front of this event but that feels like work for another day if we decide it is a problem. This starts at the simplest solution.

Copy link
Member Author

Choose a reason for hiding this comment

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

The downside to not coalescing to a single dispatch event here is that downstream could end up with a race condition unless it also has the workflow concurrency set to only handle a single event at a time.

@jemc
Copy link
Member

jemc commented Jun 10, 2025

Looks good to me.

@SeanTAllen SeanTAllen removed the discuss during sync Should be discussed during an upcoming sync label Jun 17, 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.

3 participants