-
Notifications
You must be signed in to change notification settings - Fork 61
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
A workaround for 'ODO' stopped working after Devfile schema update to v.2.2.2 #4183 #4185
A workaround for 'ODO' stopped working after Devfile schema update to v.2.2.2 #4183 #4185
Conversation
… v.2.2.2 redhat-developer#4183 This is the only workaround limiting the devfile version for node.js component to v.2.2.0 Issue: redhat-developer#4183 Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4185 +/- ##
===========================================
+ Coverage 32.37% 43.87% +11.50%
===========================================
Files 85 95 +10
Lines 6505 7710 +1205
Branches 1349 1630 +281
===========================================
+ Hits 2106 3383 +1277
+ Misses 4399 4327 -72 ☔ View full report in Codecov by Sentry. |
@@ -109,6 +109,7 @@ export class Odo { | |||
starter: string = undefined, | |||
useExistingDevfile = false, | |||
customDevfilePath = '', | |||
devfileVersion?: string |
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.
how does it know which version of devfile it should not update to? we need to define it somewhere.
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.
This is only a workaround to make the test working with current officially released 'odo' version and the Default Devfile Registry.
The officially released 'odo' supports devfile schema versions <= 2.2.0
. So this version is provided as the value of this argument hereafter in the test when creating a component from 'node.js' devfile (because this devfile has multiple versions and [if not specifying this argument] odo returns the default one, which currently is set to be > 2.2.0.
We do not provide this argument value when creating a component with 'Go' devfile - its devfile returned by default has schema version < 2.2.0
so it perfectly works with odo.
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.
devfile version info ?
So, for these nodejs versions we're downloading devfiles with the following schema versions:
The PR makes odo to install Node.js version v.2.2.0 which makes it to download devfile with schema version 2.1.0 that odo is fully compatible with. Default Devfile registry contains multiple versions for In order to fix tests we force 'odo' to retrieve a nodejs v.2.2.0 devfile with schema version There is a proposal to use nightly builds for 'odo' binary instead of official release (see: #4183 (comment)) - the devfile schema version issue is fixed on the main 'odo' branch and the fixed version is available at https://odo.dev/docs/overview/installation#nightly-builds |
I still don't see the Nodejs devfile listed in the devfile registry viewer, so I don't think this will do much. (eg. you can't choose to create a project based on the nodejs devfile, so it doesn't make sense to reduce the version of that devfile that's used.) |
This is a quite strange thing... as for the Default Devfile Registry:
... while the Devfile Registry editor shows only 11 entries. Also, the result of |
We probably won't need this PR if we move to using ODO nightly builds. See: PR #4191 - [build] Use ODO binary from nightly builds #4191 |
@vrubezhny if there is a new release of odo binary, that should fix the issue? |
That's not a release (no more releases are produced unless they have a blocker issue), but nightly builds made from the ODO repository
So, yeah. Using ODO nightly builds should fix the issue. |
I probably got the question wrongly... If ODO team makes a new release - then the problem will definitely be solved with no any changes from our side. Using nightly builds looks now as a bed option, as the download URL is static and the track of nightly build binaries isn't kept - this really prevents us from using them. |
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.
This fixes the integration test suite for the time being, which I think is very helpful.
@vrubezhny is this ready for merge?
Closing this as not needed anymore after ODO v.3.16.1 is released and move to using ODO nightly builds for the following ODO updates |
This is the only workaround limiting the devfile version for node.js component to v.2.2.0 when running the integration tests
Issue: #4183