Change actions billing structs to maps#2597
Merged
gmlewis merged 2 commits intogoogle:masterfrom Dec 26, 2022
Merged
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. |
gmlewis
reviewed
Dec 13, 2022
gmlewis
requested changes
Dec 14, 2022
Collaborator
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @tragiclifestories !
added 2 commits
December 14, 2022 16:23
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
gmlewis
approved these changes
Dec 14, 2022
Collaborator
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @tragiclifestories !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
Collaborator
|
Thank you, @valbeat ! |
5 tasks
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.
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.