Fix regression of ARM instance startup#60
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a regression by enabling dynamic runner architecture selection and updates tests to validate the change.
- Dynamically reads an
archkey fromcloud_params(defaulting to"x64") in__post_init__ - Passes the chosen architecture to
get_latest_runner_release - Updates tests to assert the new parameter and refactors formatting in teardown tests
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/gha_runner/clouddeployment.py | Added dynamic architecture lookup in __post_init__ |
| tests/test_clouddeployment.py | Enhanced tests to assert architecture arg and improved formatting |
Comments suppressed due to low confidence (3)
src/gha_runner/clouddeployment.py:150
- [nitpick] Consider renaming the cloud_params key from 'arch' to 'architecture' for consistency with the parameter name and improve clarity.
architecture = self.cloud_params.get("arch", "x64")
src/gha_runner/clouddeployment.py:140
- Update the docstring of post_init to document the new cloud_params key 'arch' and explain how it controls runner architecture selection.
def __post_init__(self):
tests/test_clouddeployment.py:77
- Add a test case for a non-default architecture value to ensure custom 'arch' values in cloud_params are passed correctly to get_latest_runner_release.
gh_mock.get_latest_runner_release.assert_called_once_with(
dwhswenson
approved these changes
Jul 9, 2025
Member
dwhswenson
left a comment
There was a problem hiding this comment.
LGTM. Only question is whether it might be worth adding a test with non-default OS/arch, to make sure we can explicitly set it. But I don't see that as a necessary blocker, just a potential improvement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #59
This pull request introduces a minor enhancement to support configurable runner architecture and updates the corresponding test cases to reflect this change. The most important changes include adding support for dynamic architecture selection in the
clouddeployment.pyfile and ensuring the test cases validate this new functionality.Enhancements to runner architecture configuration:
src/gha_runner/clouddeployment.py: Modified the__post_init__method to dynamically determine the runner architecture fromcloud_params(defaulting to "x64") and pass it to theget_latest_runner_releasemethod.Updates to test cases:
tests/test_clouddeployment.py:test_deploy_instance_creationto verify thatget_latest_runner_releaseis called with the correct architecture parameter.test_teardown_instance_failureto align the expected output list for readability.get_instance_mappingmethod.