-
Notifications
You must be signed in to change notification settings - Fork 244
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
Ignore Che devfile v1 #4276
Comments
How we will determine if the devfilev1 present in the project repo is from Che/CRW project or from some other project? Secondly the s2i component name is to be specified during odo create or s2i component needs to be detected from devfile v1? |
Where the Devfile comes from is not important. This behavior should be for all Devfile v1 no matter where they come from.
In this situation, odo should behave as there is no devfile. s2i component name can be autodetected or specified by the user. |
Got it its about ignoring |
I'm not sure that this is a good idea.
If understand correctly what you are proposing is automatically falling back to using s2i.
The problem is that the flow is the same, but the result is completely different, for example, they won't be able to use Kubernetes in the first case (with s2i component). There is another even more important aspect: |
if we implement #4281 and consider this then odo will ignore devfileV1 and generate a devfileV2 considering it as S2I component. |
The way I see it, we're discussing how to move backwards instead of moving forwards when we plan to fallback on s2i. I'm also surprised that we didn't have #4281 around already because I remember us discussing this a bunch of times!
How can these projects move to Devfile v2? How can we help? Probably not by code, I'm afraid. I'm assuming it's on their roadmap to move to Devfile v2. My concern is that while adding Devfile support in odo's experimental mode, we made a conscious decision to support v2 instead of Devfile v1. It took us time and effort and delayed things by more than a bit (correct me if I am wrong here.) While I understand that we're not discussing going back to Devfile v1 here, it makes me think that why our tools (in this case Che & odo) use different versions of Devfile instead of being in sync at least at the major version level, that is, by using Devfile v 2.y.z. @kadel @deboer-tim @adisky I am not suggesting that we should not do this. And I am not questioning anyone/anything on Che side of the world. I apologize if my comment sounded that way. My comment is probably tangential to what you folks are discussing and, maybe, not discussing technical aspect of this issue. Just wanted to share my thoughts. And please correct me if/wherever I am wrong. |
IMO from a customer's POV, it would be neat if all the Openshift products aligned, so in that world odo would somehow say devfile v1 is not supported but we can convert it for you to devfile v2, much like the option odo has for convering s2i to devfile v2. But the other argument is, odo started with devfile v2 so its also fair to say, odo will not support devfile v1 at all and err out with a msg and a link explaining how the user can convert to devfile v2 themselves. Also, +1 to odo just defaulting to devfiles for s2i rather than its own code path. |
Yeah, I want to be clear I agree we should not try to support devfile v1 in odo. I also agree that supporting s2i via devfile v2 in #4281 and getting to one codepath sounds very appealing. Which makes this case pretty difficult. For the next few months until Che moves to devfile v2 + many more months for users to upgrade, there will be projects with devfile v1. Trying to interpret these as v2 in odo will fail, and auto-migrating them to v2 may break Che/CRW users. If As much as it is ugly from a user perspective (Tomas' comment above), I still think the better behaviour short term is if odo ignores devfile v1 (treats it like no devfile), ideally with a warning. It is (very unfortunately) trading poor usability outside of Che where we don't expect many users to get into this situation, against extremely poor usability in Che where people are going to see this. |
One quick solution to all those problems could be to create a new naming convention for Devfile v2 ( Otherwise, it is either what @deboer-tim is proposing here or #4281. But we can't do both. |
Now when I think about it there might be a solution, but it will involve a little more coding. If you call |
Over time other tools will support devfiles too (even Che itself) and they won't want to find the location via .odo folder. We could create a generic place to store the path, but that's not really better than just picking a different filename. I agree this could cause other problems... Argh, maybe there's no good interim solution here? What about a hidden flag or temporary experimental setting that the connector sets when within Che that says 'yes, I know there's a devfile, but just use the s2i route'? Basically just give them a path to force s2i-only until Che moves up to devfile 2 itself. |
In this case, it would be up to the users to replace
This is already there. |
After a few other discussions I've suggested we avoid this situation, by essentially sticking on an older pre-devfile odo build for a few months until Che can update to devfile 2. This isn't ideal (and if we get confirmation I'm sorry for the hassle), but it would mean that we can ignore this situation and focus on #4281 and what odo needs w/o distraction. |
@sympatheticmoose You are not doing anything wrong. This is something that we will have to change. Logic shoudl be:
|
Surprisingly, sympathetic moose is not the Canadian in this thread! :) @kadel, David and I had a chat and agreed to drop this request. We'll leave the version of odo (via the Connector extension) back-levelled until Che can adopt devfile 2. That will avoid this issue and the need to do any temporary settings or workarounds, as well as the potential usability issues you noted above (#4276 (comment)). If someone really wants to try devfile 2 in Che/CRW in the meantime, we'll be writing a blog that will explain how to update the extension, and note this as a limitation the user will need to avoid. |
/kind bug
What versions of software are you using?
Operating System:
Mac OS Catalina
Output of
odo version
:odo v2.0.1 (a9fff7d)
Actual behavior
If there is a devfile in a project, odo uses it; if there's no devfile then we revert to s2i. However, Che/CRW support devfile v1 and there are lots of sample projects out there that have a v1 devfile in them. If you try to use these with odo they fail.
Expected behavior
If the devfile is a v1 Che devfile, ignore it and revert to the s2i route.
The text was updated successfully, but these errors were encountered: