Implement Interface definition for DownloadInMemory#189
Implement Interface definition for DownloadInMemory#189maysunfaisal merged 5 commits intodevfile:mainfrom
Conversation
Signed-off-by: Maysun J Faisal <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #189 +/- ##
==========================================
- Coverage 61.05% 60.53% -0.53%
==========================================
Files 42 43 +1
Lines 5017 5047 +30
==========================================
- Hits 3063 3055 -8
- Misses 1761 1802 +41
+ Partials 193 190 -3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Maysun J Faisal <[email protected]>
Signed-off-by: Maysun J Faisal <[email protected]>
| // URL of the yaml file | ||
| URL string | ||
| // Token to access a private URL like a private repository | ||
| Token string |
There was a problem hiding this comment.
before I start reviewing, I'm wondering if by-design we can ONLY accept a single token instead of a token list?
saw you have the readkubernetesyaml with the token passed in. led me to think of the case that the private repo A contains devfile.yaml, which has a kubernetes component reference to a private repo B. In this case, only one token can be passed in, it's gonna cause problem.
There was a problem hiding this comment.
I think that is a valid question but which is currently out of scope for this issue. We have the same issue in HAS with SPI where we only support one token and if someone's devfile has multiple private repo then its something we dont support now.
Signed-off-by: Maysun J Faisal <[email protected]>
yangcao77
left a comment
There was a problem hiding this comment.
generally looks good, just some minor comments.
README.md
Outdated
| ```go | ||
| src: YamlSrc{ | ||
| URL: "http://github.com/my-private-repo", | ||
| Token: "my-PAT", |
README.md
Outdated
| values, err := ReadKubernetesYaml(src, fs, nil) | ||
| ``` | ||
|
|
||
| If you would like to use the mock implementation for the `DevfileUtils` interface method defined in `pkg/devfile/parser/util/interface.go`, then use |
There was a problem hiding this comment.
link to the file would be better
| return err | ||
| } | ||
|
|
||
| if !gitUrl.IsFile || gitUrl.Revision == "" || !strings.Contains(gitUrl.Path, OutputDevfileYamlPath) { |
There was a problem hiding this comment.
I couldn't recall. but why the giturl path has to contain odo-devfile.yaml?
There was a problem hiding this comment.
should it be devfile.yaml or devfile.yml?
There was a problem hiding this comment.
I am not sure, this is a just a cut-paste from another file when I was re-arranging it https://github.com/devfile/library/blob/main/pkg/devfile/parser/utils.go#L52
There was a problem hiding this comment.
I opened a bug to handle this devfile/api#1362
Signed-off-by: Maysun J Faisal <[email protected]>
yangcao77
left a comment
There was a problem hiding this comment.
thanks for the change. looks good to me
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: maysunfaisal, yangcao77 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 |
What does this PR do?:
Which issue(s) this PR fixes:
Fixes devfile/api#1221
PR acceptance criteria:
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened and linked to this PR, if they are not in the PR scope due to various constraints.
Unit/Functional tests
QE Integration test
Documentation (READMEs, Product Docs, Blogs, Education Modules, etc.)
Client Impact
Gosec scans
How to test changes / Special notes to the reviewer:
Tests should pass