-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Change actions billing structs to maps #2597
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2597 +/- ##
=======================================
Coverage 97.99% 97.99%
=======================================
Files 126 126
Lines 10913 10913
=======================================
Hits 10694 10694
Misses 150 150
Partials 69 69
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thank you, @tragiclifestories !
Fixes google#2595. The structs hardcode the three machine types that Github Actions supported until recently. However, we now have a lot more different types of machines, with the potential for more to be added at any time. Using maps instead of structs will allow us to transparently support more machine classes in the future.
c897aa1
to
f231951
Compare
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.
Thank you, @tragiclifestories !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
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.
LGTM!
Thank you, @valbeat ! |
Fixes #2595.
The structs hardcode the three machine types that Github Actions supported until recently. However, we now have a lot more different types of machines, with the potential for more to be added at any time. Using maps instead of structs will allow us to transparently support more machine classes in the future.
I've done this pretty naively instead of creating safe access methods or anything like that, and kept the map values as pointers for consistency with other maps in the codebase. Can't think of any tests that would be necessary (beyond the generated ones) but open to suggestions.