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.3.0 schema version #219

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

michael-valdron
Copy link
Member

@michael-valdron michael-valdron commented Jun 17, 2024

What does this PR do?:

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

  1. Updated updateApi.sh include recent API versions
  2. Added schema version 2.3.0 to the library, now recognized and parsable.

Which issue(s) this PR fixes:

fixes devfile/api#1593

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:

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@openshift-ci openshift-ci bot requested review from elsony and Jdubrick June 17, 2024 16:31
@michael-valdron michael-valdron requested a review from a team June 17, 2024 16:33
@michael-valdron
Copy link
Member Author

Documentation (READMEs, Product Docs, Blogs, Education Modules, etc.)

N/A

@michael-valdron michael-valdron requested review from thepetk and yangcao77 and removed request for elsony June 17, 2024 16:35
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.12%. Comparing base (1507864) to head (f707324).
Report is 12 commits behind head on main.

Current head f707324 differs from pull request most recent head 267aa8b

Please upload reports for the commit 267aa8b to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   61.01%   61.12%   +0.11%     
==========================================
  Files          43       43              
  Lines        5112     5119       +7     
==========================================
+ Hits         3119     3129      +10     
+ Misses       1804     1802       -2     
+ Partials      189      188       -1     

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

@@ -46,7 +46,7 @@ func TestParseDevfileAndValidate(t *testing.T) {

devfileStruct := schema.DevWorkspaceTemplate{
TypeMeta: metav1.TypeMeta{
APIVersion: "2.1.0",
APIVersion: "2.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of moving this to 2.3.0 what do you think about having a struct for each version to test against, it looks to me like we are moving to only testing 2.3.0?

Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't need to update all the tests to be 2.3.0, library is, and should be, backward compatible, so for any existing features we test with, leave it as it's previous version.

Copy link
Collaborator

Choose a reason for hiding this comment

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

only bump-up devfile version in test if the unit test covers new features introduced in the latest version
@michael-valdron

Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI, just created this issue: devfile/api#1603

Copy link
Member Author

Choose a reason for hiding this comment

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

only bump-up devfile version in test if the unit test covers new features introduced in the latest version @michael-valdron

@yangcao77 @Jdubrick Reverted with 267aa8b, though I left in the changes to the unsupportedSchemaError test case since the result will change with the addition of 2.3.0.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@michael-valdron michael-valdron requested a review from Jdubrick June 17, 2024 19:47
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.

looks good to me

Copy link

openshift-ci bot commented Jun 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: michael-valdron, 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

@michael-valdron michael-valdron merged commit 69a656f into devfile:main Jun 18, 2024
5 checks passed
Jdubrick added a commit that referenced this pull request Aug 15, 2024
* update schema version to 2.2.2 for nodejs test child devfiles (#213)

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* add ubuntu server bypass error case for invalid registry urls (#217)

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* Fix parent version on test devfile (#216)

* Fix parent version on test devfile

Signed-off-by: thepetk <thepetk@gmail.com>

* Update parent version

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>

* bump k8s api (#212)

Signed-off-by: Kartikey-star <kmamgain@redhat.com>

* update references to Go 1.21 in docs (#218)

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* Add support for 2.3.0 schema version (#219)

* updateApi.sh script includes newer schema versions

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* devfile 2.3.0 support

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* revert schema versions for testing older features

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

---------

Signed-off-by: Michael Valdron <mvaldron@redhat.com>

* Bump github.com/docker/docker (#221)

Bumps [github.com/docker/docker](/~https://github.com/docker/docker) from 25.0.1+incompatible to 25.0.6+incompatible.
- [Release notes](/~https://github.com/docker/docker/releases)
- [Commits](moby/moby@v25.0.1...v25.0.6)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update readme for 2.3.0 schema (#222)

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

---------

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: Kartikey-star <kmamgain@redhat.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Co-authored-by: Michael Valdron <mvaldron@redhat.com>
Co-authored-by: Theofanis Petkos <thepetk@gmail.com>
Co-authored-by: Kartikey Mamgain <mamgainkartikey@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

support devfile 2.3.0 in devfile library
3 participants