flytectl
flytectl copied to clipboard
Generate random version when registering workflows
Signed-off-by: Kevin Su [email protected]
TL;DR
Generate a random version if users don't specify a version
Type
- [x] Bug Fix
- [ ] Feature
- [ ] Plugin
Are all requirements met?
- [ ] Code completed
- [ ] Smoke tested
- [x] Unit tests added
- [ ] Code documentation added
- [ ] Any pending items have an associated Issue
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
https://github.com/flyteorg/flyte/issues/1968
Follow-up issue
NA
Codecov Report
Merging #244 (0020530) into master (ce1c5f4) will increase coverage by
6.43%. The diff coverage is76.31%.
@@ Coverage Diff @@
## master #244 +/- ##
==========================================
+ Coverage 76.17% 82.61% +6.43%
==========================================
Files 106 93 -13
Lines 2695 3319 +624
==========================================
+ Hits 2053 2742 +689
+ Misses 528 366 -162
- Partials 114 211 +97
| Impacted Files | Coverage Δ | |
|---|---|---|
| cmd/completion.go | 90.90% <ø> (ø) |
|
| cmd/config/config.go | 66.66% <ø> (ø) |
|
| cmd/create/create.go | 100.00% <ø> (ø) |
|
| cmd/get/matchable_cluster_resource_attribute.go | 100.00% <ø> (ø) |
|
| cmd/get/matchable_execution_cluster_label.go | 100.00% <ø> (ø) |
|
| cmd/get/matchable_execution_queue_attribute.go | 100.00% <ø> (ø) |
|
| cmd/get/matchable_plugin_override.go | 100.00% <ø> (ø) |
|
| cmd/get/matchable_task_resource_attribute.go | 100.00% <ø> (ø) |
|
| cmd/get/project.go | 86.36% <ø> (+3.03%) |
:arrow_up: |
| cmd/register/register.go | 100.00% <ø> (ø) |
|
| ... and 160 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 50a91fb...0020530. Read the comment docs.
Hey @pingsutw i don't think random versioning is useful. I understand it works around the annoyance of local iterations but I think it breaks the premise of immutability and idempotency. I think an important characteristic in any versioning scheme is determinism. One thing you can use is either hashing of the individual resource you're about to register or hashing of the entire archive file.. either way would be ok...
Make sense, will use the hashing of resource spec