-
Notifications
You must be signed in to change notification settings - Fork 36
Implement Interface definition for DownloadInMemory #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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]>
@@ -38,6 +39,8 @@ type YamlSrc struct { | |||
Path string | |||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good, just some minor comments.
README.md
Outdated
```go | ||
src: YamlSrc{ | ||
URL: "http://github.com/my-private-repo", | ||
Token: "my-PAT", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't recall. but why the giturl path has to contain odo-devfile.yaml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be devfile.yaml
or devfile.yml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened a bug to handle this devfile/api#1362
Signed-off-by: Maysun J Faisal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Needs 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