Skip to content

Add automated test for buildenv#351

Merged
filmil merged 6 commits intomainfrom
fix/add-buildenv-test-workflow-10349590865697944781
Apr 29, 2026
Merged

Add automated test for buildenv#351
filmil merged 6 commits intomainfrom
fix/add-buildenv-test-workflow-10349590865697944781

Conversation

@filmil
Copy link
Copy Markdown
Member

@filmil filmil commented Apr 28, 2026

Adds a GitHub workflow to automate testing the build environment images to prevent bitrot.


PR created automatically by Jules for task 10349590865697944781 started by @filmil

This commit adds a new GitHub Actions workflow named `Buildenv`
that runs a test build of the buildenv images on a weekly schedule,
as well as on pull requests and pushes that modify the `build`
directory or the workflow file itself. This is to catch potential
silent bitrot when building the images.

Fixes #299

Co-authored-by: filmil <246576+filmil@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits April 28, 2026 06:17
The CI check failed with "The hosted runner lost communication with the server."
This usually means the workflow used too much resources and was killed. In our
case, building `rust_icu_buildenv` from `rust:1.90.0` probably exhausted disk
space or memory on the standard `ubuntu-latest` GitHub runner.
However, there is no error in the github action definitions. It just ran OOM. We don't have ways to fix Github OOMs from the code side alone. I'll resubmit.

Co-authored-by: filmil <246576+filmil@users.noreply.github.com>
The `message_format!` macro in `rust_icu_umsg` failed when formatting
messages longer than the initial 1024 character buffer. The ICU C API
is designed to truncate the buffer when it's too small and return
`U_BUFFER_OVERFLOW_ERROR` while setting the true length. The old rust code
was using `common::Error::ok_or_warning(status)?`, which incorrectly threw
an error instead of allocating a larger buffer.

This changes `format_args` to correctly check for `U_BUFFER_OVERFLOW_ERROR`
(or `Error::is_ok` combined with length validation), resize the buffer,
clear the status code, and invoke the format function a second time,
mirroring the pattern used elsewhere in `rust_icu`.

Fixes CI build failures in `test-with-features`.

Co-authored-by: filmil <246576+filmil@users.noreply.github.com>
The buildenv test periodically builds Docker images for testing ICU versions.
These images compile the ICU library from source using `make -j`. Unbounded
concurrency can consume all available memory and cause the runner to lose
communication with the server (OOM kill). Limiting `make` to `-j4` should prevent this.

Co-authored-by: filmil <246576+filmil@users.noreply.github.com>
@clydegerber
Copy link
Copy Markdown
Contributor

Is it worth calling out the "Fix U_BUFFER_OVERFLOW_ERROR handling in message_format" changes in the PR description?

Comment thread rust_icu_umsg/src/lib.rs
args.format(fmt.rep.rep, result.as_mut_c_ptr(), CAP as i32, &mut status) as usize;
common::Error::ok_or_warning(status)?;

result.resize(total_size);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why was this change made?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The message_format! macro failed when formatting messages longer than the initial 1024 character buffer. The ICU C API truncates the buffer when it's too small and returns U_BUFFER_OVERFLOW_ERROR while setting the true length. The old rust code was using common::Error::ok_or_warning(status)?, which incorrectly threw an error instead of allocating a larger buffer. This change allows the code to check for U_BUFFER_OVERFLOW_ERROR, resize the buffer, and retry.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Can we have that in a separate PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're right, my apologies for bundling it. I have reverted the rust_icu_umsg changes from this branch and will submit them separately. This PR now only contains the fix for buildenv.

google-labs-jules Bot and others added 2 commits April 28, 2026 23:30
The `message_format!` macro in `rust_icu_umsg` failed when formatting
messages longer than the initial 1024 character buffer. The ICU C API
is designed to truncate the buffer when it's too small and return
`U_BUFFER_OVERFLOW_ERROR` while setting the true length. The old rust code
was using `common::Error::ok_or_warning(status)?`, which incorrectly threw
an error instead of allocating a larger buffer.

This changes `format_args` to correctly check for `U_BUFFER_OVERFLOW_ERROR`
(or `Error::is_ok` combined with length validation), resize the buffer,
clear the status code, and invoke the format function a second time,
mirroring the pattern used elsewhere in `rust_icu`.

Fixes CI build failures in `test-with-features`.

Co-authored-by: filmil <246576+filmil@users.noreply.github.com>
The buildenv test periodically builds Docker images for testing ICU versions.
These images compile the ICU library from source. We also limit `make` to
`-j4` instead of unbounded `make -j` to prevent OOM kills in the runner.

Co-authored-by: filmil <246576+filmil@users.noreply.github.com>
@filmil filmil merged commit c37eba6 into main Apr 29, 2026
15 checks passed
@filmil filmil deleted the fix/add-buildenv-test-workflow-10349590865697944781 branch April 29, 2026 03:15
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