Skip to content
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

allow bypass setting of default values #169

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

kim-tsao
Copy link
Contributor

What does this PR do?:

Introduces a new parser option SetBooleanDefaults to allow clients the ability to bypass setting the defaults on the boolean properties.

Which issue(s) this PR fixes:

devfile/api#1067

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.

  • Open new test/doc issues under the devfile/api repo
  • Check each criteria if:
  • There is a separate tracking issue. Add the issue link under the criteria
    or
  • test/doc updates are made as part of this PR
  • If unchecked, explain why it's not needed

How to test changes / Special notes to the reviewer:

Signed-off-by: Kim Tsao <ktsao@redhat.com>
Signed-off-by: Kim Tsao <ktsao@redhat.com>
Signed-off-by: Kim Tsao <ktsao@redhat.com>
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.81 🎉

Comparison is base (d36e409) 60.47% compared to head (415f350) 61.28%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   60.47%   61.28%   +0.81%     
==========================================
  Files          37       37              
  Lines        4369     4373       +4     
==========================================
+ Hits         2642     2680      +38     
+ Misses       1567     1531      -36     
- Partials      160      162       +2     
Impacted Files Coverage Δ
pkg/devfile/parser/parse.go 64.00% <100.00%> (+4.99%) ⬆️

... and 1 file with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@yangcao77 yangcao77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. However, since setting setBooleanDefaults=false will result in all unset boolean values in Nil state, better confirm this change will not cause any issue before merging

@openshift-ci
Copy link

openshift-ci bot commented Mar 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kim-tsao, yangcao77

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

rm3l added a commit to rm3l/odo that referenced this pull request Mar 29, 2023
We'll need to remove this commit and update the Devfile library once [1] is merged.

[1] devfile/library#169
rm3l added a commit to rm3l/bug-devfile-parser-fields-not-set that referenced this pull request Mar 29, 2023
@kim-tsao kim-tsao merged commit c1b23d2 into devfile:main Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants