-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix GetDeployment function when Devfile SchemaVersion is less than 2.1.0 #161
Fix GetDeployment function when Devfile SchemaVersion is less than 2.1.0 #161
Conversation
Signed-off-by: Parthvi Vala <[email protected]>
2a1e0dd
to
2d58ec4
Compare
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.
The changes look good but can we update the test case coverage?
pkg/devfile/generator/generators.go
Outdated
if err != nil { | ||
return nil, err | ||
var globalAttributes attributes.Attributes | ||
// attributes is not supported in versions less than 2.0.0, so we skip it |
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.
update comment to say less than 2.0.1
Codecov ReportBase: 59.52% // Head: 59.55% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #161 +/- ##
==========================================
+ Coverage 59.52% 59.55% +0.03%
==========================================
Files 36 36
Lines 4225 4226 +1
==========================================
+ Hits 2515 2517 +2
- Misses 1561 1562 +1
+ Partials 149 147 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Parthvi Vala <[email protected]>
720cb4a
to
0756f8e
Compare
Signed-off-by: Parthvi Vala <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kim-tsao, valaparthvi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kim-tsao What would it take to merge this PR? I see all checks pass and it has both lgtm and approved labels. |
@valaparthvi I realized you do not have permissions to merge this. It's merged now |
Signed-off-by: Parthvi Vala [email protected]
What does this PR do?:
When
GetDeployment
is called for a Devfile schemaVersion less than 2.1.0. Currently it fails with error "top-level attributes is not supported in devfile schema version 2.0.0".Which issue(s) this PR fixes:
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.
Unit/Functional tests
QE Integration test
Documentation
Client Impact
Gosec scans
How to test changes / Special notes to the reviewer:
Use the following devfile for example:
devfile.yaml
```yaml commands: - exec: commandLine: npm install component: runtime group: isDefault: true kind: build workingDir:I reproduced this issue with odo. You can use
odo dev
with the Devfile and see the error.I'll add the unit test once the changes have been approved.