-
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
Re-enable support for the sparseCheckoutDir field in devfiles #3933
Comments
it has been discussed here #3867 (comment) |
Thanks @adisky. I'll go update the issue title since its disabling was deliberate In that case I think we need to do two things:
Have we looked at how Che handles the CC @kadel |
Disabling that will be a problem with the java-openliberty stack. @scottkurz @ajm01 This means that the liberty starter scenario will not work out of the box as before. You may consider to adjust the java-openliberty stack to workaround this problem for the time being. |
+1 on updating the stack to workaround it for now. From Tomas' comment on the PR, it sounds like we weren't handling If it may take a while to re-introduce the |
@johnmcollier @elsony - How would you suggest enabling the ability to have multiple starters? It would be easy enough to switch to a new repository with a single starter and nothing else, but we intended to offer:
Can each individual starter get its own relevant config in the devfile? (I tried it quick on something close to the odo2 beta and it always checks out the repo root no matter what the --starter arg). |
@scottkurz So, devfiles can have multiple starter projects and your syntax (
|
@scottkurz Just to be clear, to work around the current problem of
|
@johnmcollier, As far as I know, they don't handle that, as they don't have v2 support and this was not in v1 :-/ Sparse checkout in git can populate only certain directories, but the directory structure remains. For example, If I have a repo with two dirs I would actually consider completely removing this field from Devfile, It will create a lot of confusion and problems. Created devfile/api#128 |
The only way how we can fix it right now is to go with option 1 (separate repo) |
@scottkurz ^^ We only have option 1 for the time being. |
From what I could infer from the above discussion,
@kadel @girishramnani @johnmcollier @elsony can you reassure on this? please correct me if I'm wrong. |
yes to first part no to second part :-) |
Some more clarity now after a discussion with @kadel .. Waiting on devfile/api#129 before moving ahead with this. |
A function handling sparseCheckoutDir is already present in the master branch https://github.com/openshift/odo/blob/4bb02182db17c445ab5762d97486a7ca5aee886c/pkg/odo/cli/component/create.go#L1178 but currently is only used for zip based starterProjects |
For git component, if a subDir is set, we will clone the entire directory to a temporary directory and copy the files inside the |
/kind bug
/area devfile
/area regression
What versions of software are you using?
Operating System:
macOS
Output of
odo version
:master
How did you run odo exactly?
odo create java-openliberty --starter
Actual behavior
When cloning a starter project with the
sparseCheckoutDir
field set,odo create --starter
now clones the entire source code repo specified in the starter project, rather than checking out the directory specified insparseCheckoutDir
.As the java-openliberty devfile currently uses
sparseCheckoutDir
for its starterProject, we're currently unable to useodo create java-openliberty --starter
and successfully deploy a component from it.Expected behavior
odo create --starter
respects thesparseCheckoutDir
field in devfilesAny logs, error output, etc?
Sample devfile:
The text was updated successfully, but these errors were encountered: