* Document current implementations of command handlers
* Add unit tests for execHAndler
* Refactor pkg/devfile/image to inject Backend as dependency
* Use same handler for kubedev/podmandev
* Fail after SelectBackend==nil only if backend is needed
* Move runHandler to dev/common
* Unit tests for runHandler
* Create a component.ExecuteTerminatingCommand
* ExecuteTerminatingCommand/ExecuteNonTerminatingCommand for Handler
* Fix calling other command types
* Consider parent group to determine if a command is terminating
* Replace component.execHandler by common.runHandler
* Remove execHandler
* Make runHandler and most of fields private and pass containersRunning to handler
* Pass containersRunning value
* deploy using common Handler
* Fix tests
* Use specific Dev/Deploy mode for Apply
* Fix cmdline for job
* Fix unit tests
* Pass appName and componentName with ctx to handler
* Move handler to pkg/component package
* Update doc
* Unit tests Deploy
* Unit tests Build
* Unit tests Run
* Unit tests PostStart
* Unit tests PreStop
* Update doc
* Fix Podman tests
* Fix hotReload on podman
* Change podman version timeout to 30s for tests
* Cleanup + fix doc
* Simplify AddOdoProjectVolume and AddOdoMandatoryVolume
* Rename / Clarify HandleEphemeralStorage function
* Regroup volume-specific code
* Move volume specific code to a separated function
* Add a new module configAutomount
* Automount PVC (without options)
* Add unit tests
* Separate functions
* Mount secrets
* Mount configmaps
* Specific mount path
* MountAs annotation
* Mounting cm/secret as env
* Refacto: use inAllContainers + replace result with volume
* Mounting cm/secret as subpath
* Read-only
* Integration tests
* Rename label
* Automount during odo deploy Exec command
* Add documentation
* Fix TODO
* Review
* Fix indentation
* Rename labels/annotations
* Add runOn flag
* Instantiate Kube/Podman DevClient instance according to runOn flag
* Start and stop Podman Pod
* Unit tests for createPodFromComponent
* podman mode runs without Kube config
* Fix tests + rebase
* Add sync and exec clients to podman dev
* tbc: call sync
* Remove unnecessary kclient dependency from exec client
* Inject podman client
* Implement ExecCMDInContainer for podman client
* Move [gG]etFirstContainerWithSourceVolume to dev/common package and use it for Podman
* TBC: execute build/run commands
* Fix rebase
* Fix unit test
* Comments for refacto
* Prepare implementation of Platform
* Use ExecuteRunCommand for run handler
* Do not pass parameters present in context
* Move back instanciation of devclient to clientset package
* Move CleanupDevResources method from Watch to Dev package
* CleanupResources: Do not pass parameters present in context
* Fix deleting volumes at exit time
* Check volumes do not exist
* Add support for postStart event
* Make odo dev work when no cluster is configured
* Review
* Add more TODOs
* User interface
* More info on ExitError errors
* Display forwarded ports in output and devstate file
* Add tests for forwarded ports
* Create .odo when necessary
* Add keyboard commands message
* Add doc on podman platform
* Remove kclient from interface / signatures
* Create Exec package
* Call ExecuteCommand with client
* Call ExecuteCommand with client from sync package
* Fix order of dependencies
* Remove dependency on common.AdapterContext for sync.Adapter
* Simplify adapters.NewComponentAdapter
* NewComponentAdapter accepts kubernetes.KubernetesContext instead of interface{}
* Replace KubernetesContext with its only field Namespace
* Move the Push Interface and builders to the kubernetes.component package
* Move AdapterContext to kubernetes.component package
* Embeds component.New into NewKubernetesAdapter
* Move GetCommandsMap where it is used
* Move GetSyncFilesFromAttributes where it is used
* Move constants where they are used
* Move types to adapters package
* Update pkg/devfile/adapters/kubernetes/component/adapter.go
Co-authored-by: Armel Soro <armel@rm3l.org>
Co-authored-by: Armel Soro <armel@rm3l.org>
* Skeleton for odo create binding
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add logic
* Add functions to add data to devfile and create files
* Dharmit's review + make it work with <name>/<kind>.<apigroup>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add support for more formats
* Add integration tests and supporting helper functions
* create > add
* Add default ServiceBinding name
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix timeout, and move cli/add/binding.go to cli/add/binding/binding.go
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Update pkg/binding/binding.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update pkg/binding/binding.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update pkg/binding/interface.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Philippe's review
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Self review
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix unit test failure
* Philippe's review: round 2
* Tomas review; self review
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix windows test failure
* Randomize binding name for test
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: Philippe Martin <contact@elol.fr>
* Remove `odo url` from CLI layer
* Adapt tests
* Adapt test from deleted `cmd_devfile_delete_test.go`
This test still makes sense, as it tests the removal
of URL-related resources, like Services and Ingresses.
* Remove call to `odo project set ...` in test, as suggested in review
This command will get removed in the near future.
* Remove places where URL manipulation could modify Devfiles
Also remove dead code
* Remove unused `updateURL` field from EnvInfo struct
* Adapt test by mimicking some behavior that `odo url create` used to perform
`odo url` used to modify the `env.yaml` file,
and `odo dev` currently creates Kubernetes/OCP resources related to URLs.
We may remove this test later on if `odo dev`
no longer needs to create such Ingresses and Routes.
* Remove all places where URLs, Ingresses and Routes are manipulated
* Port test in cmd_dev_test instead and make sure no Ingress/Route is created
* Remove no-longer `test-cmd-devfile-url` target from Makefile
The corresponding test file has been deleted.
* Remove `create url` command reference from V3 docs, as suggested in review
* Use existing `devfile-with-multiple-endpoints.yaml` Devfile in test, as suggested in review
* First pass of port-forward for odo dev
* Supports forwarding multiple ports/endpoints
* Change message wording
* Port forwarding happens port 40001 onward
* Organize the code
* Integration tests
* Update the CLI help message
* Catch and check err
* Changes for failing unit tests
* Fix test and add newline to a message
* Remote label and use for loop
* Adds TODO to cleanup when port-forwarding fails
* Change messaging printed on the CLI
* Break Start method into multiple methods
* Set debug port while creating push parameters in dev
* Test after making a change to a file in pwd
* Refactoring to put things where they should be
* Notify user to run odo dev again if endpoints change
* Unit tests and rebase mistakes
* Add newline character for clear formatting
* Create business logic for reuse to find endpoints
* Fix unit and integration test failures
* Self review
* Changes based on Philippe's review
* Two more changes based on Philippe's review
* More changes based on PR review
* Changes based on PR feedback and more
- Renames all receivers in kclient package to `c`
- Adds mocks
* Removes unnecessary function
* Make function more generic for reuse
* Rename Options to DevOptions
* Address review comments by Tomas
* Fix failing unit test
* Modify message to restart odo dev
* Use helper.RunDevMode in odo dev tests
* Remove doubly imported log package
* Modifies clientset at CLI and business layer
- No need of KUBERNETES client for `odo dev` business layer.
- Added KUBERNETES client for `odo dev` CLI layer.
* Remove hardcoding of URL in tests
- It uses @feloy's work in PR #5570.
* Uses regexp to find strings.
* Makes FindAllMatchingStrings more generally usable
* Adds constant for localhost regex
* Replace matches with urls and remove unnecessary Sprintf
* Documents what urls is in RunDevMode function.
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
* Update tests/helper/helper_dev.go
Co-authored-by: Philippe Martin <contact@elol.fr>
Co-authored-by: Philippe Martin <contact@elol.fr>
* remove odo catalog command
- move devfile registry relevant code to pkg/registry
* remove odo catalog page form docs
* remove a few forgotten uses of catalog from clientset.go
* fix typos in docs
* Namespace
* Get all resources with selector
* Delete resources
* Display errors
* Add start message
* Set correct labels for odo deploy
* Add unit tests
* Add integration tests
* Delete managed by odo only
* Fix rebase
* Review + small fixes
* AdD/fix logs
* Skeleton for odo dev and a unit test
* Update go mod for fsnotify
* Start method Pushes and then Watches
* More understandable code comments
* Client and interface for watch package
* Mocks for watch package
* Add CLI layer
* Fix infinite watch & push trigger
* Remove context flag from odo dev
* Add integration tests for odo dev
* Add klog to dev.go
* Replace errors.Wrap with fmt.Errorf
* Self review
* Removes `odo watch` command, but the business logic exists as it's
used by odo dev
* Removes integration tests for `odo watch`
* Removes errors.go and types.go from pkg/dev/ since they are empty
* Check if error is not nil
* Use real client in watch unit tests
* Uncomment AfterEach from tests
* Modify the logs printed to stdout
* Changes based on Philippe's review
* Remove unused clients
* Parthvi's PR review and unit test fixes
* Fix gofmt message, remove message to not expect
* Fix lint complains, add mistakenly deleted URL creation logic
* Remove or modify tests that rely on odo push output
* Remove unused variables based on golangci-lint
* Fixes based on Philippe's review
* Initialize first index after first run of odo dev
* Modify odo dev test, and uncomment a mistake
* Init command
* More tests + check empty dir
* Move function from catalog to service package
* Interactive asks lang + type
* Interactive
* Refactor catalog package with interface
* Add mocks for catalog and init/asker
* Add tests
* Create sub-packages for init + starter project
* Rename files in pkg/catalog
* More validations
* fix
* Logs
* Rollback
* Go back and No starter
* Review
* Use filesystem.Filesystem in pkg/catalog
* Change pull from registry strategy
* More unit tests
* More tests
* Integration tests
* Review
* Use full path to fix problem with Unzip
* Add integration test for devfile with parent URI
* Add prefClient dependence to catalog package
* Move function to pkg/init package
* Review
* Fix rebase
* Review
* Create a cmdline interface
The interface abstracts the cobra.Command
* Remove cobra relation from Context
* Remove cmd parameter to Run method
* Remove direct use of cobra.Command
* Add mock for cmdline interface
* First test
* Fix typo in rebase
* Restore SetClusterType
* Move constants to specific package to avoid import cycle
* Fix rebase