* Create auxialiary functions to find current deployment and pod name
* Create auxialiary function for pushing Kubernetes components to cluster
* Auxiliary function getPushDevfileCommands and remocve RunModeChanged flag as it is not possible anymore with long running dev command
+ move prelimiray tests at the beginning
* Create auxiliary function updatePVCsOwnerReferences + move isMainStorageEphemeral inside aux. function
* Watch for deployments in addition to watching for files during odo dev
* - Check the Deployment Generation to return earlier when generation changed
- Return earlier when pod is not ready
* Push receives a Status that it can update, to indicate the status of the component when the function returns. This status is passed from Start to Watch
* Use status to decide to sync files
* Simplify getting pod
* Status for PostStartEvents
* - Touch .gitignore earlier so it is not synced
- Add devstate.jso file to .gitignore
* Fix the integration tests.
* Make --no-watch work again
* Get smaller volumes for tests
* Quit when fail to exec port forwarding
* Exponential delay after an error
* Fix: get running pod
* Remove testing odo dev stops when the build command fails. odo dev now gives a change to the user to fix the problem
* Fix order or volumes and volume mounts in pod spec
* Use server side apply for updating PVC when supported
* Watch Devfile separately
* Adapt tests for devfile handled separately
* Update forwarded ports when necessary
* Display kubernetes resources created only when created/updated
* Do not set ResourceVersion when patching
* TEMP: Add more logs on failing integrattests
* Tests: select the *running* pod
* Use forward slashes for .gitignore content, even on Windows
* Rename GetOnePodFromSelector to GetRunningPodFromSelector
* Cleanup logs
* Fix 'odo log' integration test
* Add log "Waiting for Kubernetes resources"
* Fail if service bindings are not injected
* Rename sources related watcher, timer
* Fix delay after error
* Display info about Pod
* Disambiguate error messages
* Display events related to components pod
* Remove now unused functions used to wait for Deployment / Pod
* Typos + function renaming
* Do not watch devfile with --no-watch
* Use type switch for Kubernertes watch event
* Do not fail when watching Events is Forbidden
* Do not fail when servicebinding resources are forbidden
* Exit when build command fails on no-watch mode
* Sync devfile.yaml by default, workaround when commands change on devfile
* Rename to warningsWatcher
* Fix comment
* Change errors.Wrapf
* Replace errors.Wrap
* Dont use pkg/errors (except error.Cause)
* Fix errors on Windows (do not test system underlying message)
* Replace errors.Cause
* Review
* Adds storage Push() for devfile components.
It also adds CLI messages for creation and deletion of storage.
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Adds test for Push(). It also adds tests for Create() and Delete() of the kubernetes storage client
* Removes GetOwnerReference() from the kclient
* Renames UpdateStorageOwnerReference() to GetAndUpdateStorageOwnerReference()
* Fixes ListFromCluster(), removes the StorageAdapter from the common interface and adds some comments.
* Fixes ListFromCluster() by avoiding the volume mounts from the init containers and the source volume
* Add Devfile Parser V2, Update Common Structs (#3188)
* Add Devfile Parser for Version 2.0.0
Added Devfile V2 Go Structures
Added converter for v2 ro common types
Signed-off-by: adisky <adsharma@redhat.com>
* Add example V2 devfile
added example nodejs V2 devfile
* Add Common Types as V2
Add common types as v2
Add Converter from common to v1
* Updated example devfile with group
* Fixes command.go and kubernetes adapter (#3194)
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Fixes utils of k8s adapter (#3195)
* Update Command Logic to use groups (#3196)
* Updates create logic to v2 (#3200)
* Fixes utils of docker docker adapter (#3198)
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Update Docker and Kubernetes adapter to use groups (#3206)
* Update Docker and Kubernetes adapter to use groups
* Update Some Validation
Incorporate some review comments for commands Map
Update Some Validation logic
* Updated Logs for V2 (#3208)
Fixed interface implementation for v2
Updated logs
refactored commands.go
* Avoid String Pointers (#3209)
While converting v1 to v2 types, string pointers are prone to cause
null pointer error. This PR updates struct fields from string
pointers to string
* Update commands check
* Fixes lower and upper case for commands (#3219)
* Fixes type of project and components for devfile v1 (#3228)
* Update testing utils (#3220)
* Update command tests
Updated Command tests to v2
Removed some cases like command type validation, that will be
validated by schema only.
* Fix common adapters tests
All devfile.adapters.common unit tests are fixed
* Add tests for Mismatched type
Fix devfile.adapters.Kubernetes.Component unit tests
* Add TestCase for default command
* Design proposal: Event notification support for build and application status for IDE integration for devfile scenarios (#2550) (#3177)
* Add event notification proposal
[skip ci]
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Update event-notification.md
* Fix Integration tests for devfile v2 (#3236)
* Fix Integration tests
Correct volume structure
Fix supervisord binary insertion for docker
Insert command and args in build container fr docker
* Fix Integration tests
Revert commands, args removal
Add commands, args in v2 common structs
Fix duplicate volume error
* Fixes unit tests (#3240)
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Add devfiles V2 examples (#3253)
Add devfiles v2 examples for springboot and nodejs
* Fix regression by sparse checkout dir PR (#3258)
fix regression caused by rebase to master.
Also add github, zip as supported project types.
* Address review comments (#3267)
* Address review comments part 2
fix log levels to v4
fix error formatting
add case no's in test cases
update some comments
* Address review comments part 2
Remove validation for group
Co-authored-by: Mrinal Das <mrinald7@gmail.com>
Co-authored-by: Jonathan West <jgwest@users.noreply.github.com>
* Implement devfile syncing on odo push
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Add test for GetRemoteFilesMarkedForDeletion
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Properly retrieve sourcePath
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Don't push if not needed to
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Remove duplicate WaitAndGetPod
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Use odo volume constants
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Fix race condition (oops)
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Fix gosec errors
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Add namespace flag to odo push
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Implement integration tests for odo push
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Address review comments on tests
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Remove duplicated preferences lines
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Address review comments
* Implement KubernetesAdapter to store namespace passed in from CLI
* Move adapter push function into start function
* Move FilterIgnores into util package and write unit tests for it
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Fix unit test
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Address review comments
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Fix rebase
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Properly return error if sync fails
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Sync to `/projects/<projectName>` when needed
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Fix unit tests
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Remove debugging line
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Add more unit tests for functions in pushlocal
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Add comments
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Fix test on Windows
Signed-off-by: John Collier <John.J.Collier@ibm.com>
* Create deployment based on Devfile
* GetAliasedComponents helper function and fix some log messages
* Refactor to make platform adapters more modular
* Generate a component name that satisfies DNS-1123 requirement due to deployment name
* Handle devfile updates
* Include devfile object in context
* New tests
* Fixes after rebase on master
Signed-off-by: Rajiv Senthilnathan <rajivsen@ca.ibm.com>
* Update to work with experimental devfile push
Signed-off-by: Rajiv Senthilnathan <rajivsen@ca.ibm.com>
* Fix console output and deployment strategy
Signed-off-by: Rajiv Senthilnathan <rajivsen@ca.ibm.com>
* Rename AdapterMetadata to AdapterContext + cleanup
Signed-off-by: Rajiv Senthilnathan <rajivsen@ca.ibm.com>
* Fix component start test
Signed-off-by: Rajiv Senthilnathan <rajivsen@ca.ibm.com>
* Address naming review comments
Signed-off-by: Rajiv Senthilnathan <rajivsen@ca.ibm.com>
* Fix test race condition
* Move utils to a more common location and fix Travis CI failures