At the time of making this commit, the package `github.com/ghodss/yaml`
is no longer actively maintained.
`sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively
maintained by Kubernetes SIG.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Ignore devstate when existing process name is not odo
* Delete orphan devstate files with odo delete component
* Update unit tests
* Create fake system
* Add unit tests for odo delete component
* Integration tests for odo dev
* Troubleshooting
* First process on Windows is 4
* Use go-ps lib for pidExists
* Update 'go.mod' with new location of the Alizer library
* Downgrade and pin conflicting versions of 'github.com/docker/{cli,distributions}'
Pinning it to the version we had before.
Otherwise, there were issues when running 'go mod tidy':
```
$ go mod tidy
go: downloading github.com/operator-framework/api v0.17.6
go: finding module for package github.com/docker/docker/pkg/term
github.com/redhat-developer/odo/pkg/auth imports
github.com/openshift/oc/pkg/cli/login imports
github.com/openshift/oc/pkg/helpers/term imports
github.com/docker/docker/pkg/term: module
github.com/docker/docker@latest found
(v24.0.4+incompatible), but does not contain
package github.com/docker/docker/pkg/term
```
* Fix expected output in quickstart guides doc automation tests
* POST /devstate/container
* Implement POST /devstate/container
* Generate DELETE /devstate/container/{containerName}
* Implement DELETE /devstate/container/{containerName}
* Serve /devstate/image
* Implement /devstate/image
* Serve /devstate/resource
* Implement /devstate/resource
* Move Components specific code to components.go
* Serve /devstate/*command
* Implement /devstate/*command
* Serve /devstate/metadata
* Implement /devstate/metadata
* Serve devstate/chart
* Implement /devstate/chart
* Create a DevfileContent schema reference
* Use `DELETE /command/{name}` instead of `DELETE /*Command/{name}`
* Serve /devstate/command/move
* Implement /devstate/command/move
* Serve /devstate/command/{name}/[un]setDefault
* Implement /devstate/command/{name}/[un]setDefault
* serve /devstate/events
* Implement /devstate/events
* Serve /devstate/quantityValid
* Implement /devstate/quantityValid
* Add json tag to API result value
* Sets a proxy for the API
* Move calls from wasm to api (first part)
* Implement PUT /devsatte/devfile
* Move calls from wasm to api (end)
* Implement GET /devstate/devfile
* Implement DELETE /devstate/devfile
* At startup, get devfile from api, not from localStorage
* Rename service wasmGo -> devstate
* Remove wasm module
* Update to latest devfile-lifecycle version, license compatible
* Apply suggestions from code review
Co-authored-by: Armel Soro <armel@rm3l.org>
* Remove wasm from ui/{Makefile/devfile.yaml}
* Define DevfileContent into apispec
* Define required fields
* Generate API models from front
* Regenerate API server after spec changes
* Fix examples case
* Fix github action e2e tests not running
* Make target for all generated api code
---------
Co-authored-by: Armel Soro <armel@rm3l.org>
* Bump Alizer to the latest commit at this time [1]
Amongst other things, this fixes an issue when analyzing large projects,
by preventing potential panics when trying to detect application ports.
[1] 14114f066c
* Downgrade and pin the versions of 'sigs.k8s.io/controller-runtime' and 'k8s.io/*' to the previous versions we had
Bumping Alizer bumped these packages to upper versions,
which seems to cause build errors due to Service Binding Operator
libraries not compatible with those new versions.
See the error below.
Since we don't want to update SBO libraries at this time
(as SBO is currently in maintenance mode only),
this makes sure we are using the versions it builds against.
Build error for reference:
```
go install -mod=vendor -ldflags="-X github.com/redhat-developer/odo/pkg/version.GITCOMMIT=cb9c13900" ./cmd/odo/
# github.com/redhat-developer/service-binding-operator/apis/spec/v1alpha3
vendor/github.com/redhat-developer/service-binding-operator/apis/spec/v1alpha3/servicebinding_webhook.go:44:27: cannot use &ServiceBinding{} (value of type *ServiceBinding) as type admission.Validator in variable declaration:
*ServiceBinding does not implement admission.Validator (wrong type for ValidateCreate method)
have ValidateCreate() error
want ValidateCreate() (warnings admission.Warnings, err error)
# github.com/redhat-developer/service-binding-operator/apis/binding/v1alpha1
vendor/github.com/redhat-developer/service-binding-operator/apis/binding/v1alpha1/servicebinding_webhook.go:37:27: cannot use &ServiceBinding{} (value of type *ServiceBinding) as type admission.Validator in variable declaration:
*ServiceBinding does not implement admission.Validator (wrong type for ValidateCreate method)
have ValidateCreate() error
want ValidateCreate() (warnings admission.Warnings, err error)
make: *** [Makefile:90: install] Error 2
```
* Fix expected output in doc automation tests
* Add integration tests highlighting our expectations
* Bump Devfile library to latest commit
f041d79870
* Expose preference that allows users to globally configure an image registry
* Return the effective Devfile view by default from the initial context
This is supposed to be read-only, so that tools can rely on it
and to the operations they need to perform right away.
Raw Devfile objects can still be obtained upon request
if there is need to update them (for example via 'odo add/remove
binding' commands.
* Pass the image registry preference to the Devfile parser to build the effective view
* Fix 'odo init' integration tests
- The test spec was actually not doing what it was supposed to do
- Now 'odo init' returns a complete Devfile, where the parent is flattened,
because the goal of 'odo init' is to bootstrap a Devfile.
Previously, 'odo init' would not download the parent referenced,
making it hard to understand the resulting Devfile.
* Document how odo now handles relative image names as selectors
* fixup! Document how odo now handles relative image names as selectors
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Revert "Fix 'odo init' integration tests"
This reverts commit 78868b03fd.
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Do not make `odo init` return an effective Devfile as a result
This would change the behavior of `odo init`.
Furthermore, due to an issue [1] in the Devfile library,
it is not possible to parse some Devfiles with parents linked as GitHub URLs (like GitHub release artifacts).
[1] https://github.com/devfile/api/issues/1119
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* fixup! Document how odo now handles relative image names as selectors
---------
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Add sample Devfile with multiple autoBuild/deployByDefault combinations
It will be used for integration tests.
* Add helper function to update a given Devfile Command Group
This will allow supporting cases where we need to run a custom command,
but this is not implemented yet on odo (cases with 'odo dev --debug'
and 'odo deploy').
In this case, this helper will allow updating the Devfile for example to
unmark the current default command as non-default, and mark the custom
one as default.
* Add test cases for 'odo dev'
* Add test cases for 'odo deploy'
* Add test cases for 'odo build-images'
'odo build-images' should build all images regardless of the 'autoBuild' property.
* Display the spinner when creating or updating Kubernetes resources
This helps understand what resources are being patched.
* Handle deployByDefault on K8s and OpenShift components
* Add 'devfile.GetImageComponentsToPush' functions that returns the list of image components to auto-create
See https://github.com/devfile/api/issues/852#issuecomment-1211928487 for more context.
* Handle automatic image component creation for 'odo dev' on Kubernetes
* Handle automatic image component creation for 'odo dev' on Podman
* Handle automatic image and K8s/OpenShift component creation for 'odo deploy'
* Bump Devfile library to the latest commit at this time (c1b23d2)
This includes the fix for [1], which provides a way not to set default values automatically
[1] https://github.com/devfile/api/issues/1067
* Do not set default values when parsing a Devfile
See [1] for the rationale
[1] https://github.com/redhat-developer/odo/issues/5694\#issuecomment-1465778398
* Add documentation in the Devfile reference page
* Revert "Display the spinner when creating or updating Kubernetes resources"
This reverts commit 6ad073e63cb0e685f165eed767619a90997393a3.
* Avoid re-applying Image components multiple times
'adapter#Push' might get called several times when there are
state transitions (either on the Deployment in the cluster,
or from 'odo').
It might be confusing to apply Image components over and over again
(and also it can be slower if we need to push images to remote registries).
* Move GetK8sAndOcComponentsToPush and GetImageComponentsToPush to libdevfile package
As suggested in review, this should be the responsibility of the devfile library
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* fixup! Handle automatic image and K8s/OpenShift component creation for 'odo deploy'
* fixup! Handle automatic image component creation for 'odo dev' on Podman
* fixup! Avoid re-applying Image components multiple times
* Apply suggestions from code review
Co-authored-by: Parthvi Vala <pvala@redhat.com>
* fixup! Do not set default values when parsing a Devfile
* Fix devfile-deploy-functional-pods.yaml (used in 'odo logs' tests)
Set deployByDefault to false on innerloop-pod component.
Otherwise, since it is not referenced by any apply command,
it will be automatically created by *both* 'odo dev' and 'odo deploy'.
---------
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
* Do not use deprecated DefaultStarterProjects
* Fix integration tests
* Use CommandGroups from registry index
* Fix JSON field name / Detailed err message
* Clarify --details is to be used with --devfile
* Document versions.commandGroups in json output
* Use GetPodTemplateSpec instead of deprecated GetContainers
* Specify pod admission policy when building Exec Job
* Integration test
* Update tests/helper/component_podman.go
Co-authored-by: Armel Soro <armel@rm3l.org>
* add test
---------
Co-authored-by: Armel Soro <armel@rm3l.org>
* update alizer to ad2d305
* go mod vendor
* add wwhrd exceptions for github.com/pjbgf/sha1cd/
* update go-git to v5.6.1
* go mod vendor
* fixup! go mod vendor
---------
Co-authored-by: Armel Soro <asoro@redhat.com>