Conversation
This modifies a prior migration which is typically forbidden, but because we're pre-production deployment I felt grouping would be helpful to future contributors. This adds database functions that are required for the provisioner daemon and job queue logic.
Adds a projectparameter package to compute build-time project values for a provided scope. This package will be used to return which variables are being used for a build, and can visually indicate the hierarchy to a user.
Codecov Report
@@ Coverage Diff @@
## main #82 +/- ##
==========================================
- Coverage 71.90% 71.76% -0.14%
==========================================
Files 88 89 +1
Lines 3417 3563 +146
Branches 55 55
==========================================
+ Hits 2457 2557 +100
- Misses 751 786 +35
- Partials 209 220 +11
Continue to review full report at Codecov.
|
| } | ||
|
|
||
| // Project parameters come third! | ||
| projectParameters, err := db.GetParameterValuesByScope(ctx, database.GetParameterValuesByScopeParams{ |
There was a problem hiding this comment.
Following from the comment above - this projectParameters is a confusing name, because we use: for _, projectParameter := range projectHistoryParameters { above!
Some possible ideas:
- We could rename
projectParametershere tooverriddenProjectParameters - We could rename
projectParameterin those loops toprojectHistoryParameter
There was a problem hiding this comment.
Yup, I renamed em' all to projectHistoryParameter instead. Long name, but very clear!
| // Validates and computes the value for parameters; setting the value on "parameterByName". | ||
| func (c *compute) inject(scopedParameters []database.ParameterValue) error { |
There was a problem hiding this comment.
Good idea to factor this out to a helper method
bryphe-coder
left a comment
There was a problem hiding this comment.
Just some minor nits about comments and naming for the projectHistoryParameters / projectParameters when we compute the override - otherwise looks good to me!
Adds a projectparameter package to compute build-time project
values for a provided scope.
This package will be used to return which variables are being
used for a build, and can visually indicate the hierarchy to
a user.