feat: function version migrations#664
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## main #664 +/- ##
==========================================
+ Coverage 37.93% 38.03% +0.10%
==========================================
Files 41 42 +1
Lines 3872 3917 +45
==========================================
+ Hits 1469 1490 +21
- Misses 2212 2225 +13
- Partials 191 202 +11
Continue to review full report at Codecov.
|
b7b7600 to
72348b1
Compare
lance
left a comment
There was a problem hiding this comment.
This is a nice addition. Thanks!
/lgtm
72348b1 to
bf648bb
Compare
ccead95 to
46d008e
Compare
|
Tests have (thankfully, though a bit begrudgingly) uncovered a logical inconsistency in Function instantiation. Marking this as draft until I can get it sorted out. |
0b22d7c to
29bd550
Compare
29bd550 to
24c9222
Compare
* adds new test confirming name is properly defaulted in new Functions.
Introduces the concept of Function versions and associated migrations. Includes a single migration which initializes version and creation fields for Functions <=v0.19.0.
PR #641 takes advantage of function creation timestamp to determine if a Function has been initialized. Functions created prior to this stamp being introduced (forthcoming v0.20.0) should have their Creation stamp initialized to maintain backwards compatibility.
Migrations are applied when a Function is instantiated (read from func.yaml) in the order in which they are registered.
Currently the only migration is that which takes a Function from unversioned to versioned, and initialized a creation timestamp. The version written to func.yaml is the latest migration applied, indicating migrations can be skipped on subsequent loads until a new migration is added to the codebase.
Fixes #674
/kind enhancement