-
Notifications
You must be signed in to change notification settings - Fork 243
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
Fix: Starterproject not replace existing devfile stack files of the context dir #6633
Fix: Starterproject not replace existing devfile stack files of the context dir #6633
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
3199f13
to
ac36ffc
Compare
/override Kubernetes-Integration-Tests/Kubernetes-Integration-Tests Expected
<string>: âš Pod is Terminating
✗ Finished executing the application (command: devrun) [43s]
âš No pod exists
âš Pod is Pending
✓ Pod is Running
• Syncing files into the container ...
✓ Syncing files into the container [501ms]
• Building your application in container (command: devbuild) ...
✓ Building your application in container (command: devbuild) [3s]
• Executing the application (command: devrun) ...
- Forwarding from 127.0.0.1:39429 -> 3000
↪ Dev mode
Keyboard Commands:
[Ctrl+c] - Exit and delete resources from the cluster
[p] - Manually apply local changes to the application on the cluster
To satisfy at least one of these matchers: [%!s(*matchers.ContainSubstringMatcher=&{Pushing files... []}) %!s(*matchers.ContainSubstringMatcher=&{Updating Component... []})]
In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:64
------------------------------
•••••••
Summarizing 1 Failure:
[FAIL] odo dev command tests port-forwarding for the component when devfile has single endpoint when running odo dev when modifying memoryLimit for container in Devfile [BeforeEach] should react on the Devfile modification
/go/odo_1/tests/helper/helper_run.go:64 |
@valaparthvi: Overrode contexts on behalf of valaparthvi: Kubernetes-Integration-Tests/Kubernetes-Integration-Tests In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/override windows-integration-test/Windows-test Expected
<*url.Error | 0xc0002ec8a0>: {
Op: "Post",
URL: "http://127.0.0.1:64534/api/newuser",
Err: <*errors.errorString | 0xc000088130>{s: "EOF"},
}
to be nil
In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/3416/tests/e2escenarios/e2e_test.go:306
There were additional failures detected after the initial failure. Here's a summary - for full details run Ginkgo in verbose mode:
[FAILED] in [AfterEach] at C:/Users/Administrator.ANSIBLE-TEST-VS/3416/tests/helper/helper_filesystem.go:48
------------------------------
Summarizing 1 Failure:
[FAIL] E2E Test starting with non-empty Directory add Binding [It] should verify developer workflow of using binding as env in innerloop
C:/Users/Administrator.ANSIBLE-TEST-VS/3416/tests/e2escenarios/e2e_test.go:306
|
@valaparthvi: Overrode contexts on behalf of valaparthvi: windows-integration-test/Windows-test In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -228,7 +224,7 @@ func IsValidProjectDir(path string, devfilePath string) error { | |||
// takes an absolute path prefixed with file:// and extracts it to a destination. | |||
// pathToUnzip specifies the path within the zip folder to extract | |||
// TODO(feloy) sync with devfile library? | |||
func GetAndExtractZip(zipURL string, destination string, pathToUnzip string, starterToken string) error { | |||
func GetAndExtractZip(zipURL string, destination string, pathToUnzip string, starterToken string, fsys filesystem.Filesystem) error { |
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.
Can fsys
be the first parameter of this function, just to be consistent with the other functions like IsValidProjectDir
?
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.
I've changed the position of fsys
in IsValidProjectDir
just to be more consistent with other functions.
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
efc25e4
to
30bb75c
Compare
/override Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests
|
@valaparthvi: Overrode contexts on behalf of valaparthvi: Kubernetes-Integration-Tests/Kubernetes-Docs-Integration-Tests In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/override windows-integration-test/Windows-test
|
@valaparthvi: Overrode contexts on behalf of valaparthvi: windows-integration-test/Windows-test In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
…icting and non-conflicting cases Signed-off-by: Parthvi Vala <pvala@redhat.com>
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.
Thanks for the changes. LGTM overall. I had one last comment on error handling when walking the directory tree.
Signed-off-by: Parthvi Vala <pvala@redhat.com>
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.
Thanks for the changes.
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.
Whoops, sorry. I just approved this PR feature-wise, but noticed I had a lot of odostarterproject*
and odo*
non-empty folders filling up my temporary filesystem.
c826e28
to
101b895
Compare
Signed-off-by: Parthvi Vala <pvala@redhat.com>
101b895
to
d9f25dc
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Thanks for your work on this!
What type of PR is this:
/kind bug
What does this PR do / why we need it:
This PR ensures that downloading a starter project does not replace an existing stack files downloading as a part of the Devfile.
Which issue(s) this PR fixes:
Fixes #6489
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
0. Setup a custom devfile registry by using quay.io/pvala18/devfile-index:latest and go Devfile.
odo init --devfile go --devfile-version latest --starter go-starter --name my-go-app
should show the following result:Here
docker
andkubernetes
are a part of the Devfile stack.2. Run
odo init --devfile go --devfile-version latest --starter conflicting-starter-project-demo --name my-go-app
. A CONFLICT_STARTER_PROJECT should have been created containing the starter project and a warning must be printed listing the conflicting files.3. Run
odo init --devfile go --devfile-version latest --starter starterproject-with-devfile-demo --name my-go-app
. Downloading the starter project should replace devfile.yaml and the stack files.