-
Notifications
You must be signed in to change notification settings - Fork 7
refactor: convert gha_runner to library #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Current summary, generated by CopilotThis pull request includes significant changes to the cloud deployment architecture, introducing new classes and refactoring existing ones for better separation of concerns and clarity. Additionally, helper functions and classes have been added to manage environment variables and workflow commands. Refactoring and New Classes:
Helper Functions and Classes:
|
356a977 to
c3672be
Compare
Creates two new abstract base classes to split apart the existing cloud deployment class. This allows for use in our new architecture.
BREAKING CHANGE: Removed CloudDeployment class completely from the underlying library. This renders __main__ unusable.
c3672be to
77d5cd0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #43 +/- ##
==========================================
+ Coverage 95.20% 97.65% +2.44%
==========================================
Files 3 4 +1
Lines 334 256 -78
==========================================
- Hits 318 250 -68
+ Misses 16 6 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
BREAKING CHANGE: Removes the ability to run this repo in favor of making it completely a library.
|
Notably, this PR is missing significant docs changes as I think those will be handled done separately as part of the larger migration. Additionally, this does not include changes for uploading to PyPI at this time and will happen following the merging of this PR. Let me know if you have an comments or concerns! |
dwhswenson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. Inline comments have some questions and docstring fixes. Beyond the inline comments, two other points:
-
I'd prefer that the test structure better match the src structure. So, for example, since we have
src/helpers/input.py, movetests/test_input.pytotests/helpers/test_input.py(makes a big difference in large projects). Same withworkflow_cmds. -
Question about design: why pass both
cloud_paramsandprovider_typeto theDeployInstance? Does theDeployInstanceneed direct access tocloud_params? It seems like it would be better separation to just pass theproviderinstance to theDeployInstanceand generate theprovideras part of a separate step?
The answer is yes. Initially, I had done it that way and that was reflected in the initial implementation of this project. My largest goal here when consolidating these pieces was to make it such that building a new provider requires two steps:
Furthermore, I wanted to make it so that the end-developer has a simple API surface to use so that the |
BREAKING CHANGE: Renames with_var to with_state
BREAKING CHANGE: Removes EnvVarBuilder's build function in favor of a property instead
Adds numerous changes for making this workflow generic. Some docs are missing and I am missing tests for the new cloud deployment classes since I will utilize testing from the PyGithub changes in #42 to better construct mocking for these cases. For usage of this library see, https://github.com/omsf-eco-infra/start-aws-gha-runner and https://github.com/omsf-eco-infra/stop-aws-gha-runner.