Repository navigation
ci: prepare shared jobs for the Ubuntu 26.04 pool - #4679
vvbandeira merged 2 commits into
Conversation
Move hosted and private labels together and replace host-wide installer cleanup with run-owned Docker objects. Publish images only from master and keep the existing container OS cases. Poll the streaming test output instead of relying on interpreter startup timing. Run utility tests without changing host packages. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request replaces a fixed sleep in test_streaming_flush with a polling loop that waits up to 1.0 second for the log file to contain 'line1', reducing flakiness due to varying interpreter start-up times. The reviewer suggested making the polling loop more robust by adding an early exit if the subprocess exits prematurely and specifying an explicit UTF-8 encoding when opening the log file.
| content = "" | ||
| deadline = time.monotonic() + 1.0 | ||
| while time.monotonic() < deadline: | ||
| if os.path.exists(self.log_path): | ||
| with open(self.log_path) as f: | ||
| content = f.read() | ||
| if "line1" in content: | ||
| break | ||
| time.sleep(0.05) |
There was a problem hiding this comment.
To make the polling loop more robust and efficient, we can make two improvements:
- Early exit on subprocess failure: If the subprocess exits prematurely (e.g., due to a crash or error), we should break out of the loop immediately instead of waiting for the full 1.0-second timeout. This prevents unnecessary delays in test failures.
- Explicit file encoding: Specify
encoding="utf-8"when opening the log file to ensure consistent cross-platform behavior, adhering to PEP 597 best practices.
content = ""
deadline = time.monotonic() + 1.0
while time.monotonic() < deadline:
if os.path.exists(self.log_path):
with open(self.log_path, encoding="utf-8") as f:
content = f.read()
if "line1" in content:
break
if proc.poll() is not None:
break
time.sleep(0.05)
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 0 without a comparable baseline. |
BREAKING CHANGE: Ubuntu 20.04 is no longer a supported installer or Docker build target. Use Ubuntu 22.04. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Move hosted and private workflow jobs to Ubuntu 26.04 together.
Shared jobs select
self-hosted-ubuntu-26.04for the private pool andubuntu-26.04for hosted runs.Keep the existing public-only guards.
Drop Ubuntu 20.04 from the installer and image-publishing matrices, Docker helper, and support documentation.
Ubuntu 22.04 remains the Docker default and the retained installer case.
The helper rejects Ubuntu 20.04 before it calls Docker.
Make installer tests safe on a shared Docker host by removing daemon termination, NAT flushing, bridge removal, and Docker restart.
Give each run its own image tags and test container, and clean up only those objects.
Run the utility tests with python3 without installing unused host packages.
Retain the existing streaming-flush assertion while polling for output instead of relying on a fixed startup delay.
Restrict the image publishing pipeline to matching master pushes.
Its dependency images and registry caches keep the existing publication chain.
Run the disk-cleanup action only on GitHub-hosted runners.
Installer and utility workflows retain their PR validation.
All nine utility test files passed with Python 3.12.8 and 3.14.8: 86 tests with one optional Yosys skip per version.
The Ubuntu 22.04 installer, build, and sample flow passed on the shared Ubuntu 26.04 host using predecessor
68ab2f17f08f.A concurrent job kept the same healthy container, network, and Docker daemon identity.
Direct inspection proved that installer-owned objects were removed.
The Ubuntu 20.04 case failed because its GCC 9 cannot build the pinned Yosys dependency.
This PR retires that OS target.
For the retirement change, CLI probes confirm that Ubuntu 20.04 is rejected and Ubuntu 22.04 still selects the same base image.
Shell syntax and workflow syntax checks pass, with no new ShellCheck findings against the predecessor.
The Ubuntu 22.04 installer path and dependency pins are unchanged by the retirement commit.
The full live installer was not rerun at this head.
Black 26.5.1 is unavailable locally, and fresh PR checks must pass at the new head.