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

add support for 2.2.1 and 2.2.2 schema versions #208

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

Jdubrick
Copy link
Contributor

What does this PR do?:

A summary of changes made in this PR can be found below:

  1. Added schema version 2.2.1 and 2.2.2 to the library, they are now recognized and parsable.
  2. Updated 2.2.0 version to reference 2.2.0 release instead of 2.1.1-alpha as 2.1.1 is now added itself
  3. Added new case to existing unit test to verify unsupported schemas are being picked up and tested

Which issue(s) this PR fixes:

fixes devfile/api#1454

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:

Unit tests ran with make test should pass. Additionally when you try and parse a devfile on schema 2.2.1 or 2.2.2 now it should function and not spit an error message.

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.11%. Comparing base (d3c2770) to head (51d08a5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #208      +/-   ##
==========================================
+ Coverage   61.01%   61.11%   +0.09%     
==========================================
  Files          43       43              
  Lines        5112     5117       +5     
==========================================
+ Hits         3119     3127       +8     
+ Misses       1804     1802       -2     
+ Partials      189      188       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/devfile/parse_test.go Show resolved Hide resolved
pkg/devfile/parse_test.go Outdated Show resolved Hide resolved
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@Jdubrick
Copy link
Contributor Author

@michael-valdron i pushed a new commit for the changes. I took your advice about having the string pointer so if it needs an error it sets the string and if not it will be nil. I also had to make sure the schema versions were sorted so the output was in the correct order for error messages, im pretty sure this is due to the schemas being stored in a map so they're all out of order.

@Jdubrick
Copy link
Contributor Author

/retest

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

openshift-ci bot commented Mar 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick, michael-valdron

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:
  • OWNERS [Jdubrick,michael-valdron]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Jdubrick Jdubrick merged commit 44ca18d into devfile:main Mar 15, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add library support for devfile schema - version 2.2.1 & version 2.2.2
2 participants