Check for revisions upon Samples caching#178
Conversation
|
@thepetk: The label(s) DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
mike-hoang
left a comment
There was a problem hiding this comment.
We do allow commit ids to be used, so wondering if we should support that here?
ref: https://devfile.io/docs/2.2.0/devfile-schema#starter-projects-git-checkout-from-revision
revision string
The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #178 +/- ##
=======================================
Coverage 35.93% 35.93%
=======================================
Files 7 7
Lines 1347 1347
=======================================
Hits 484 484
Misses 816 816
Partials 47 47 ☔ View full report in Codecov by Sentry. |
Signed-off-by: thepetk@gmail.com Signed-off-by: thepetk <thepetk@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mike-hoang, thepetk The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
devfile#178) Signed-off-by: thepetk@gmail.com Signed-off-by: thepetk@gmail.com Signed-off-by: thepetk <thepetk@gmail.com>
Please specify the area for this PR
/area registry
What does does this PR do / why we need it:
This PR is introducing a check for samples using a different branch than the default. More detailed we have two cases:
A sample in
extraDevfileEntries.yaml, having different versions while using the same repo. So the version X of a sample is using the X branch of sample repo, while the version Y of sample Y uses the branch Y of the same repo.A sample with a single version that is not using the default branch.
More detailed, a simple addition is made to the
cache_sample.shfile in order to check the givenextraDevfileEntries.yamlfor anygit.checkoutFrom.revisionfields inside a sample. For this, we are introducing theclone_sample_repofunction:As a result we can support samples defined like:
Which issue(s) this PR fixes:
Fixes devfile/api#1209
PR acceptance criteria:
Documentation (WIP)
How to test changes / Special notes to the reviewer: