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

Update library version and fix revision usage in cache samples #188

Merged
merged 9 commits into from
Nov 2, 2023

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Oct 23, 2023

Please specify the area for this PR

/generator
/server

What does does this PR do / why we need it:

Update devfile library version

This PR updates the version of github.com/devfile/library/v2 to v2.2.1. One of the new features of library, will let us accept two different components using the same port. This way we can introduce new sample versions that will have consistent ports (using 8080 port).

With the current version of library the registry build fails as the validation of the devfile fails because of using twice the same port for different components. Trace:

* devfile contains multiple containers with same endpoint targetPort: 8080, imported from
id: go, registryURL: https://registry.devfile.io

Use git.revision instead of git.checkoutFrom.revision

The PR also uses replaces the usage of git.checkoutFrom.revision inside the cache_samples.sh by using the git.revision which is the correct field according the Git schema: https://github.com/devfile/registry-support/blob/main/index/generator/schema/schema.go#L224

Which issue(s) this PR fixes:

Partially fixes devfile/api#1112

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:

* Update gh actions for nodejs16

Signed-off-by: thepetk <[email protected]>

* Further updates on gh actions versions

Signe-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>

---------

Signed-off-by: thepetk <[email protected]>
Signed-off-by: thepetk <[email protected]>
@openshift-ci openshift-ci bot requested review from elsony and rm3l October 23, 2023 18:19
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 23, 2023
@thepetk thepetk self-assigned this Oct 23, 2023
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1168591) 35.93% compared to head (5d6e585) 35.93%.

❗ Current head 5d6e585 differs from pull request most recent head c579642. Consider uploading reports for the commit c579642 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #188   +/-   ##
=======================================
  Coverage   35.93%   35.93%           
=======================================
  Files           7        7           
  Lines        1347     1347           
=======================================
  Hits          484      484           
  Misses        816      816           
  Partials       47       47           

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

@thepetk thepetk changed the title Update Devfile Library version to 2.2.1 Update library version and fix revision usage in cache samples Oct 27, 2023
@@ -11,4 +11,4 @@ metadata:
- Go
version: 2.1.0
parent:
uri: https://registry.devfile.io/devfiles/go/2.1.0
uri: https://raw.githubusercontent.com/devfile/registry/main/stacks/go/2.1.0/devfile.yaml
Copy link
Member

Choose a reason for hiding this comment

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

is this change mean to be pushed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the test was failing due to the previous link. It seems that due to recent changes the URI of this format is not supported anymore. The reason is we are now using DownloadGitRepoResources which expects a git provider link instead of the registry one.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 31, 2023
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 Oct 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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 [michael-valdron,thepetk]

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

@thepetk thepetk merged commit b5f8893 into devfile:main Nov 2, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Devfile Samples to reference v2.2.0 Parent stacks
3 participants