1190 Commits

Author SHA1 Message Date
Philippe Martin
4c7ab35b76 Disable loading a single branch when getting git starter project (#6290)
* Disable loading a single branch when getting git starter project and reference is not defined

* Add integration test
2022-11-07 09:23:52 -05:00
Anand Kumar Singh
99f4a0dbc6 resolve inconsistent order of registries in preference view (#6266)
* resolve inconsistent order of registries in preference view

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* reverse regList on business layer

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update unit test, add functional test and small refactor

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update functional tests to use proxy

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-11-03 17:58:10 -04:00
Anand Kumar Singh
26c1d9be4a display equivalent odo init command for odo init interactive (#6265)
* display equivalent odo init command for odo init interactive

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update the documentation to add the new returned values

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update mock and functional tests

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-11-03 15:38:09 -04:00
Philippe Martin
2dab7fbda9 Define label for integration tests not needing cluster (#6242) 2022-10-31 18:16:24 -04:00
Armel Soro
719fe99c21 Allow controlling telemetry via the ODO_TRACKING_CONSENT environment variable (#6258)
* Add support for ODO_TRACKING_CONSENT env variable

Co-authored-by: Armel Soro <asoro@redhat.com>

* Replace deprecated 'ODO_DISABLE_TELEMETRY' env var with 'ODO_TRACKING_CONSENT' in integration tests

* Log environment of process launched with 'helper_run' in integration tests

`odo` behavior might be altered based on certain environment variables.
So this is to help debug future issues that might happen.

Because the process environment also contains the
current OS environment, we purposely limit the content
to variables prefixed with 'ODO_' or particular ones
(like 'TELEMETRY_CALLER').

* Test conflicting situations when using both 'ODO_DISABLE_TELEMETRY' and 'ODO_TRACKING_CONSENT'

* Disable golangci-lint 'staticcheck' check about using the deprecated 'segment.DisableTelemetryEnv'

However, due to [1], line-based directives do not seem to be working.

* Make ODO_TRACKING_CONSENT env var take precedence over the ConsentTelemetry preference

See [1] for more context.

[1] https://github.com/redhat-developer/odo/pull/6258\#issuecomment-1293736398

* Add new 'segment#isTrackingConsentEnabled' function, as suggested in review

This would make it easier to rename the values if needed or add aliases later.

* Add more unit test cases, especially when any of the telemetry var is not there in the env

* Document ODO_TRACKING_CONSENT

* fixup! Add new 'segment#isTrackingConsentEnabled' function, as suggested in review

* fixup! fixup! Add new 'segment#isTrackingConsentEnabled' function, as suggested in review

Co-authored-by: Tomas Kral <tkral@redhat.com>
2022-10-31 09:57:35 -04:00
Philippe Martin
87fc43b58f Set empty component name in context if no devfile exists in the current directory (#6268)
* Set empty component name in context if no devfile exists in the current directory

* Add integration tests
2022-10-31 05:16:48 -04:00
Philippe Martin
9b9ba0b7ca fix test failure due to devfile-registry (#6243) 2022-10-21 13:18:24 -04:00
Anand Kumar Singh
11e853ba5e fix test failure due to devfile-registry (#6235)
* fix devfile-registry

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* replace dotnet to .Net

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-10-20 11:04:26 -04:00
Anand Kumar Singh
bdf8bdece9 enable quarkus e2e test (#6224)
Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-10-18 12:50:04 -04:00
Armel Soro
1c9d6b36a8 Allow passing caller to telemetry (#6223)
* Add integration test cases highlighting the acceptance criteria

* Set the caller property for telemetry based on the 'TELEMETRY_CALLER' env var

Note that this property is set in telemetry even if it is not in the set
of allowed values, but does not prevent the odo command from running.

* Update documentation
2022-10-17 06:33:12 -04:00
Armel Soro
f26010864b Merge tag v3.0.0 2022-10-13 10:53:55 +02:00
Anand Kumar Singh
9c734ce0ac suspend quarkus test (#6184)
* suspend quarkus test

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Update tests/e2escenarios/e2e_devfile_test.go

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>
2022-10-12 16:09:51 +02:00
Anand Kumar Singh
95a8a58533 suspend quarkus test (#6184)
* suspend quarkus test

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Update tests/e2escenarios/e2e_devfile_test.go

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>
2022-10-03 20:53:36 +02:00
Tomas Kral
86334d1cc7 telemetry: start tracking flags usage (#6168)
* telementry: start tracking flags usage

* remove forgotten debut print, add test case

* ignore errcheck in tests

* update tests to test telemetry flags
2022-10-03 18:55:47 +02:00
Anand Kumar Singh
ae06ffc02b Fix Windows tests for PR targeting branches other than main (#6177)
* copy repo from ibmcloud instead of copying

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* suspend quarkus test

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Speed up test execution on Windows with a shallow checkout instead of an 'scp'

'scp' happens to be a slow operation, because it is dependent on the network
and copies everything, including the full Git history checked out by the
IBM Cloud container.
The shallow clone/fetch allows to retrieve only the last commit in the
PR branch, rather than fetching the full Git history (which might take time
too).

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2022-10-03 10:36:19 +02:00
Parthvi Vala
b333b08484 Revert devfile python ID (#6164) 2022-09-27 17:53:33 +02:00
Charlie Drage
dbf594054c Add extra output when init project using odo dev or deploy (#6127)
* Add extra output when init project using odo dev

<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind feature
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind cleanup

**What does this PR do / why we need it:**

Updates the messaging when you run `odo dev` and there is no
`devfile.yaml` available. Outputs more information that makes it similar
to running `odo dev` or `odo init`

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes https://github.com/redhat-developer/odo/issues/5679

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Update based on review

* fix tests

* update based on review

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2022-09-23 15:23:32 +02:00
Parthvi Vala
643eef7d85 Revert devfile python ID (#6164) 2022-09-23 12:21:09 +02:00
Parthvi Vala
3a244866ac Update devfile data in integration tests (#6140) 2022-09-20 13:14:14 +02:00
Anand Kumar Singh
c3eced4483 check if namespace is created instead of project (#6108)
* check if ns/project present

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* adding comment

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-09-16 22:56:31 +02:00
Dharmit Shah
c2c0bddb7b Adds support for odo list services (#6118)
* Adds support for odo list services

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Aliases for simpler use

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Use slice instead of slice of map

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Address Philippe's PR feedback

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Add more usable fields to BindableService

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Add service field to the struct and JSON output

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Address Armel's PR feedback

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Ignore error assuming namespace is deleted/terminating

This is mainly a problem in integration tests where odo tries to list
bindable Operator backed services from namespaces that are deleted or
in Terminating state.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* klog when listing bindable services fails

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Move klog/v2 to indirect dependency

klog/v2, at the time of this commit, was used only in binding.go and
dev.go files. Rest of the code used the v1 of klog. To keep things
consistent, I removed klog/v2 from the go.mod file, and changed the
imports for the two files mentioned above to use v1 instead of klog/v2.
Next, I did `go mod vendor` which resulted in all the changes that are
carried by this commit.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
2022-09-16 18:38:31 +02:00
Parthvi Vala
ad7350d8b7 Show Kubernetes cluster version in odo version (#6109)
* Show Kubernetes cluster version in odo version

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix for logged out clusters

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Not return error if oc fails

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* rm3l's review

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-09-15 13:47:35 +02:00
Philippe Martin
32303b164d Add runtime label based on metadata:language/projectType (#6112)
* Add runtime label based on metadata:language/projectType

* Add integration tests for odo dev

* odo deploy integration test

* Reverse priority between pojectType and language
2022-09-14 09:22:45 +02:00
Armel Soro
16c6d1589f Make sure to port-forward all endpoints, regardless of exposure (#6119)
Defining endpoints for Debug ports is required for Devfiles
to work properly with `odo dev --debug`.
This addresses the question of exposure for such endpoints.

Tools like DevSpaces currently set 'exposure: none' for debug endpoints.
This makes sense from the developer perspective,
as 'odo dev' aims at emulating a local developer machine.

As a consequence, `odo dev` should no longer ignore endpoints with
'exposure: none'. They should be port-forwarded just like other endpoints.
2022-09-14 08:54:17 +02:00
Philippe Martin
8b5986fa50 Do not display message when using no-watch flag (#6116) 2022-09-13 11:31:56 +02:00
Philippe Martin
59f4f8348a Manual sync of files pressing p (#6089)
* Set character mode for input stream

* Move watchers in receiver + sync when p pressed

* Integration tests manual sync

* Add a console to DevSession

* Vendor

* Skip pressKey tests on Windows

* Add interactive test for p press

* Add info about pressing p key

* Doc

* Review

* Rephrase Manul sync

* Fix HotReloadCapable

* Document timers

* Document enableCharInput

* Document geyKey and getKeyWatcher functions

* Avoid to Kill in AfterEach after running Kill before
2022-09-09 18:54:54 +02:00
Philippe Martin
6c6f8ef5ad No error/help display for JSON output (#6106)
* No error/help display for JSON output

* Fix for subcommands

* Add integration tests

* Replace NoArgs with NoArgsAndSilenceJSON

* Add more tests, in a single It
2022-09-09 15:03:19 +02:00
Philippe Martin
c5f8c5aed8 JSON output for preference view (#6105)
* JSON output for preference view

* Document

* Integration tests
2022-09-09 10:23:02 +02:00
Armel Soro
1d719f010c Display "Interactive mode enabled" only when running odo init interactively (#6100)
* Display "Interactive mode enabled" only when running `odo init` interactively

* fixup! Display "Interactive mode enabled" only when running `odo init` interactively
2022-09-07 15:48:55 +02:00
Parthvi Vala
897f5f3e06 Remove skip for k8s (#6096)
Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-09-06 20:02:10 +02:00
Philippe Martin
9e39df37d3 Use map for runningIn instead of array in JSON output (#6094)
* Use map for runningIn instead of array

* Set false entries in runningIn map

* Rename RunningModeList to RunningModes + fix doc

* Fix integration test
2022-09-06 18:55:19 +02:00
Parthvi Vala
fe0832bea7 (odo init): Add input validation for component name (#6088)
* (odo init): Add input validation for component name

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Update docs/website/docs/command-reference/init.md

Co-authored-by: Armel Soro <armel@rm3l.org>

* Apply suggestions from code review

Co-authored-by: Armel Soro <armel@rm3l.org>

* Use  instead of \n for interactive tests

* Ask to re-enter component name until a valid value is passed

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* feloy's review

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
2022-09-06 12:44:21 +02:00
Philippe Martin
588472ede5 Fix interactive tests on Windows (#6091)
* Use ActiveState/termtest for interactive tests, which works with Windows

* Fix interactive tests to pass on Windows

* Fix windows tests script

* Set SKIP_WELCOMING_MESSAGES on Windowd tests

* No not resize terminal

* Kill previous odo processes

* Increase timeout for Expect()
2022-09-06 11:33:28 +02:00
Armel Soro
843717cab3 Make odo work if optional metadata.name field is missing in Devfile (#6015)
* Move 'starter_project.go' from 'pkg/component' to 'pkg/registry'

Functions in this file are only called from the 'registry' package,
so it makes sense for this file to belong to this package.

Furthermore, this paves the way to calling 'alizer.DetectName' from 'component.go',
thus avoiding a cyclic dependency between packages.

* Introduce central logic for determining component names in 'pkg/component/component.go'

This rewrites the 'component#GatherName' function that was already there,
but not used, to meet the expectations, i.e.:

- use 'metadata.name' field (after sanitizing it) if it is defined in the Devfile
- otherwise, use Alizer to detect the name. Under the hood, this leverages the 'alizer#DetectName' introduced in 83ad3ee, which means that:
-- use Alizer to detect the name automatically
-- otherwise, use the name of the Devfile base directory after sanitizing it

* Compute and store the component name in the CLI context, and pass it as needed

As commented out in [1], the context should ideally be built
and passed down to the business clients structs.

[1] https://github.com/redhat-developer/odo/pull/6015#discussion_r957005479

* Enrich relevant integration test cases

For the sake of both performance and readability,
only the tests that break in the absence of a 'metadata.name'
field in their Devfiles have been updated (to test this specific case).

* Add test case for 'odo dev' when a project with no source code is used with no 'metadata.name' in the Devfile

The rationale behind this is to purposely make
the Alizer library unable to detect the project.
Per the requirements, this would force us to use the project
directory name as component name.

This highlights an interesting behavior if the project
directory name is all-numeric (as is the case in our tests);
our sanitization logic automatically prepends an "x" prefix
to the directory name, so it can be used as a valid name
for the component.
2022-08-30 02:54:31 -04:00
Philippe Martin
64ee3db5b3 Implement "odo list" (#6043)
* Move "odo list" to "odo list component"

* Refactor odo list component

* Add --namespace flag to "odo list binding"

* odo list implementation

* Doc

* Apply suggestions from code review

Co-authored-by: Armel Soro <armel@rm3l.org>

Co-authored-by: Armel Soro <armel@rm3l.org>
2022-08-29 12:44:13 -04:00
Anand Kumar Singh
39b8c7e4c2 fix flake and use operatorhub to install EDB (#6004)
* fix flake

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fix flake

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* check if namespace is created

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* check if namespace without sercice is created

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-08-29 11:26:57 -04:00
Philippe Martin
0a83f1d899 Do not use env.yaml file anymore (#6057)
* Remove GetApplication from LocalConfigProvider interface and all related stuff

* Remove GetName from LocalConfigProvider interface and all related stuff

* Remove GetContainers from LocalConfigProvider interface

* Remove Exists method from LocalConfigProvider interface and stop odo dev writing env.yaml file

* Remove GetDebugort method from LocalConfigProvider interface + fix #6056

* Remove unnecessary fields from EnvInfo structure

* Remove all references to env.yaml file

* Review

* Test for #6056
2022-08-29 09:25:09 -04:00
Parthvi Vala
6d82a577a2 Fix: ServiceBinding resources are not deployed with odo deploy (#6029)
* Fix: ServiceBinding resources are not deployed with odo deploy

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix test failures

* Add owner reference before object creation

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-24 14:37:04 -04:00
Philippe Martin
27f9dff19c deploymentExists different from component running (#6048)
* deploymentExists different from component running

* Add integration test

* Update tests/integration/cmd_dev_test.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* Update pkg/devfile/adapters/kubernetes/component/adapter.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* Fix fmt

Co-authored-by: Parthvi Vala <pvala@redhat.com>
2022-08-24 09:17:58 -04:00
Charlie Drage
83ad3eec6b Autodetect project name via Alizer (#5989)
* Autodetect project name via Alizer

<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind tests
/kind documentation

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind feature

**What does this PR do / why we need it:**

This PR:
* Detects the project name via pom.xml (java), package.json (node.js),
  etc. with alizer.
* If the detection fails, default to using the directory name.

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes https://github.com/redhat-developer/odo/issues/5847

**PR acceptance criteria:**

- [ ] Unit test

- [ ] Integration test

- [ ] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* update based on review

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2022-08-22 13:16:58 -04:00
Philippe Martin
1ef9f5c09f Do not get project from env.yaml file (#6025)
* Do not read env.yaml file to get project

* Integration tests

* Remove GetNamespace() from interface to be sure to never call it

* Do not set project in env.yaml file for odo deploy

* Do not set project in dev.yaml file for odo deploy and dont expect it for delete component and build-images commands

* Remove project from env.yaml on dev cleanup

* - Message previously returned when no env.yaml file is now returned by NoDevfileError
- Return NoDevfileError when odo dev/deploy is started from empty directory

* Remove unnecessary params

* Add tests to test env.yaml with a non current project

* Fix noDevfileError when command does not specify componentContext

* Update messages and doc for `odo set namespace`

* Reverts part of c384f547cf
2022-08-22 09:05:27 +00:00
Philippe Martin
79a57cd162 setSysProcAttr on Cmd (#6038) 2022-08-19 10:20:29 +00:00
Parthvi Vala
0e716239fb odo list: add odo version used to create a component to the output (#6028)
Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-17 19:21:41 +00:00
Philippe Martin
04dec8529e Watch for devfile dependencies (#6020)
* GetReferencedLocalFiles

* Watch for all devfile dependencies

* Integration test
2022-08-17 12:03:54 +00:00
Philippe Martin
60c9a78b22 odo dev: Cleanup after displaying the error (#6024)
* odo dev: Cleanup after displaying the error

* Fix integration test
2022-08-17 10:23:21 +00:00
Parthvi Vala
b4ee87281f Fix: Non odo components not reported (#6021)
* Fix: Non odo components not reported

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Add unit test

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-17 07:46:42 +00:00
Philippe Martin
53a7c3cd1b Restart port forwarding on failure (#6013)
* Restart port forwarding on failure

* Save ports again when port forward is restarted

* Integration test

* Update pkg/portForward/portForward.go

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>

* Fix rebase

* Fix integration test with run composite command

* Copy errorhandlers

* Add timeout for first-time port forwarding

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>
2022-08-11 08:20:41 +00:00
Parthvi Vala
0f14bd9c4a Remove command: odo project (#6008)
* Remove command: odo project

* Fix integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-10 16:12:42 +00:00
Parthvi Vala
224069cd68 odo dev: Add support for non-exec commands part of a composite run or debug command (#5923)
* Initial commit

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Move ValidateResourceExist(s) from pkg/service to pkg/devfile/adapters/kubernetes/component

* Fix odo dev cleanup

* Fix multiple deployment issue

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* DRY the code

* Fix unit test failure

* Add integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* remove comment

* Add isPartOfComponent to GetLabels, and GetSelector

* Add unit tests for changes in ListResourcesToDeleteFromDevfile

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix unit test failures due to removal of component label

* Enhance integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Use a single devfile.yaml

* Fix test failures

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix rebase conflicts, add new tests for remote Dockerfile URI, and rm3l's review

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Attempt at fixing integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Mockgen

* Changes post rebase

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Attempt at fixing integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix rebase mishap

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Co-authored-by: Armel Soro <armel@rm3l.org>
2022-08-10 10:41:43 +00:00
Parthvi Vala
076f2e236e Enhance error message when user runs from a non-component directory (#6006)
* Enhance error message when user runs from a non-component directory

* Dharmit's review

* Use different messages

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-09 17:19:05 +00:00