allow .devfile.yaml #5138
Conversation
|
✔️ Deploy Preview for odo-docusaurus-preview ready! 🔨 Explore the source changes: 801451f 🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/617637b00131ac00073d0f62 😎 Browse the preview: https://deploy-preview-5138--odo-docusaurus-preview.netlify.app |
7ed4eb5 to
6794531
Compare
|
@anandrkskd , I can see this error: In this case, it should be able to find the |
| for _, devFile := range possibleDevfileNames { | ||
| if util.CheckPathExists(filepath.Join(contexDir, devFile)) { | ||
| return devFile | ||
| } | ||
| } |
There was a problem hiding this comment.
What happens if both the possible devfiles are present? Shouldn't we raise an error in that case? Which devfile gets precedence in case both are present?
And, would it help to sort the possibleDevfileNames before iterating over it? Can we ensure that every iteration on possibleDevfileNames follows the same order?
There was a problem hiding this comment.
-
We discussed this point with Anand. He first wanted to raise an error if both files were present, I campaigned for not doing this, so we can have a more generic function, trying to find the file in a >2 number of different names (imagine we want to also check for the yml extension...). But the discussion is open...
-
An array is ordered and will always be iterated in the same order. The maps are not.
There was a problem hiding this comment.
Can we set a preference key for the user to determine their default devfile? I remember Gerald asked(on the channel) if he could use devfile-v2.yaml as his default devfile without using --devfile flag.
There was a problem hiding this comment.
Can we set a preference key for the user to determine their default devfile
We can do that, but I think it's a different feature than what this PR adds to odo.
I think we can have a different issue for adding that feature to odo.
There was a problem hiding this comment.
+1, it should be a separate issue which requires its own discussion.
There was a problem hiding this comment.
Can we set a preference key for the user to determine their default devfile? I remember Gerald asked(on the channel) if he could use devfile-v2.yaml as his default devfile without using --devfile flag.
I don't think that uses should be allowed to change default devfile. If they want to use something else then devfile.yaml or .devfile.yaml they can do and should use --devfile flag. Gerald's use case was specific and the only reason he needed this was to work around the fact that odo supports v2 but che doesn't
There was a problem hiding this comment.
Based on the discussion above, I am okay with not raising an error, but I would prefer that we log the devfile that we are going to use.
407f649 to
0f38eda
Compare
|
@anandrkskd Can you resolve merge conflicts here? |
0f38eda to
dfc7be3
Compare
|
I have updated the tests to rename the We probably don't want to keep these tests as is, as using /approve @valaparthvi I let you lgtm when it is ok for you |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: feloy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@anandrkskd It would be nice to have a more complete test with a |
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
dfc7be3 to
c01ec5c
Compare
Signed-off-by: anandrkskd <anandrkskd@gmail.com>
|
SonarCloud Quality Gate failed.
|
@feloy do you mean testcases covering service/link scenarios using |
|
/lgtm @anandrkskd can you open a new issue for the tests as we discussed? |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
Issue created for tests at #5167 |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
11 similar comments
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |








Signed-off-by: anandrkskd anandrkskd@gmail.com
What type of PR is this?
/kind feature
What does this PR do / why we need it:
This PR adds a feature with which we can use
.devfile.yamlwithout adding--devfileflag.With this PR in, odo will prefer
devfile.yamland if not present will use.devfile.yamlif.devfile.yamlexists.Which issue(s) this PR fixes:
Fixes #3126
PR acceptance criteria:
Unit test
Integration test
Documentation
I have read the test guidelines
How to test changes / Special notes to the reviewer:
Simplest way to check if
.devfile.yamlis used without using--devfileflag