* 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>
* Add integration tests highlighting the expectations
* Add and fill a 'Commands' field from the DevfileData struct returned by `describe`
* Display commands in the human-readable output of 'odo describe'
* Add documentation and sample outputs
* 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
* Fix issues in the tests if user does not have permission to see the OpenShift platform version
This happened on the nightly jobs running on Prow,
which makes us use a developer account with some restrictions.
* Rename 'helper.JsonSatisfies' into 'helper.JsonStatisfiesAll' to make the intent clearer
* Pass odo context to api server
* Get /instance
* DELETE /instance implementation
* Move describe logic to pkg/component/describe
* Get /component implementation
* POST /component/command implementation
* Fix example by replacing action with name
* Fix integration test
* Integration tests
* Add comment for PushWatcher
* Test DELETE /instance without --no-watch
* Apply suggestions from code review
Co-authored-by: Armel Soro <armel@rm3l.org>
* Return an error if not ready for push
* Fix windows tests
* Fix tests for Windows
---------
Co-authored-by: Armel Soro <armel@rm3l.org>
* Show podman version in odo version; TODO: fix test and implement json
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add integration test
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add support for JSON
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add documentation
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Fix missing OpenShift version
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add warnings when unable to fetch version information
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Do not print warning when --client is used and review
Signed-off-by: Parthvi Vala <pvala@redhat.com>
---------
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* check SKIP_SERVICE_BINDING_TESTS to skip service binding tests
* Pass SKIP_SERVICE_BINDING_TESTS to Windows for Windows tests
* Use fsGroup on Kubernetes
* add instructions to install devfile registry in cluster
* Add test highlighting the expectations
* Propagate errors and call os.Exit only in 'main' functions
See ExitInMain[1] and ExitInMain_ExitOnce[2] coding convention guidelines.
[1] https://github.com/redhat-developer/odo/wiki/Dev:-Coding-Conventions#exit-in-main
[2] https://github.com/redhat-developer/odo/wiki/Dev:-Coding-Conventions#exit-once
* Handle errors returned by Cleanuper#Cleanup
This makes sure the exit code of the command
is mapped onto any error returned by Cleanup
* Do not return an error when the watch loop in 'odo dev' is interrupted
* Test that the exit code of 'odo dev' matches the error returned by the cleanup logic
* Add unit test highliging the issue
* Fix 'delete' unit tests
* Pass the filesystem object where it is relevant
* Add a way for CLI commands to indicate whether of not they require a valid Devfile
For the 'analyze' command, this is not required,
so Devfile parsing will be ignored completely.
* Make the fake filesystem return an absolute current dir
Otherwise, some code will assume it is relative,
and try to prepend the current physical directory
* Implement HTTP Server based on OpenAPI spec
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Starter server when odo dev starts
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add --api-server and --api-server-port flags to start API Server; write the port to stat file; TODO: make this feature experimental
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Make the flag experimental
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Make apiserver and apiserverport flag local
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Use container image to run openapi-generator-tool instead of a local CLI
Co-authored-by: Armel Soro <asoro@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Add integration test
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Use label podman
Signed-off-by: Parthvi Vala <pvala@redhat.com>
* Regenerate the api files with openapitool v6.6.0 and changes from review
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
---------
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Trigger website PR preview workflow only for changes in the 'docs/website' folder or in the Workflow itself
While this allowed to test 'odo deploy', it
makes more sense to avoid deploying the website uselessly if there are no changes in the website itself.
There are already integration or E2E tests testing 'odo deploy' on different projects.
* Do not require manual deployment approval if the PR comes from members of the odo team or certain robot accounts we rely on
* Send tests results to Sheet
* Save tests from Windows tests + do not fail if junit file not found
* Change package name
* Remove cleanup old entries (keeping implementation)
* Add job number
* Add 'deploy' command in Devfile to support outer-loop case for the website
The goal is to leverage this for creating PR deploy previews
in an automated way.
* Add GitHub Workflow to create Deploy previews for PRs using 'odo deploy'
* Leverage the image-names-as-selector feature
* Add odo binary location to system path to make it easier to use it
* Do not change the Devfile name dynamically
We are using a robot account on quay.io,
which requires specific permissions per repository name,
which cannot be dynamic in this case.
Since we are scoping everything per namespace, it should be fine.
* Document the '--no-commands' flag
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Add integration tests highlighting the expectations
* Add '--no-commands' flag to the 'dev' sub-command
* Implement '--no-command' on Podman
* Implement '--no-command' on cluster
* Validate the '--no-commands' flag in the CLI
For example, it should not be possible to call it alongside '--build-command' or '--run-command',
because we won't be able to know what to do.
* Fix 'odo dev' tests when the run/debug does not exist
For consistency with how e.g., the build command works,
instead of erroring out, `odo dev` will
now simply log the error message and wait for new input.
* Check for command existence when we want to run them
As suggested in review, this makes it more adaptable.
As a consequence, if the default (or single) build/run command does not exist,
"odo dev" will not error out immediately; instead, it will behave a bit like
"odo dev --no-commands" (by starting, but printing a warning about the
missing command).
The difference here is that if a run command is added later on
during the dev session, "odo dev" will pick it up and run it,
but "odo dev --no-commands" will continue to purposely ignore it.
The existence of the optional default Build is already checked
by the 'libdevfile.Build' command. It does not error out if there is
no default (or single) Build command. It errors out only if the specified
'--build-command' does not exist in the Devfile.
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Check for application ports only if the Devfile has run or debug command and if there are ports to forward
This prevents:
i) displaying the "Waiting for the application to be ready" spinner for nothing,
if there are no ports to forward
ii) waiting until the timeout of 1m has expired if there was no run/debug command executed,
in which case, it is less unlikely that the application ports defined in the Devfile
will ever be reachable.
* Test "odo run" command against a Dev Session started with and without "--no-commands"
---------
Co-authored-by: Philippe Martin <phmartin@redhat.com>
* Build nightly versions of odo and upload them to IBM Cloud Object Storage
* Document where the nightly builds can be downloaded and installed
* Allow to trigger the nightly build workflow manually if needed
* Add a '-nightly' suffix to the commit id included at build time
This will help users running 'odo' know
that they are running a nightly build, e.g.:
```
$ ./odo version
odo v3.11.0 (077397dbd-nightly)
```
* Use an arbitrary cron schedule in the night to avoid peak executions at midnight
Co-authored-by: Philippe Martin <contact@elol.fr>
---------
Co-authored-by: Philippe Martin <contact@elol.fr>
* Change NewRunHandler params with Options
* Pass an options to RunHandler to show logs
* Hide spinner and std output since outputs are displayed
* Integration tests with failing command
* Fix outputs
* use raw terminal and local standard i/o streams
* Fix podman i/o
* Fix stdout/err
* Test if in/out are terminal
* command reference doc
* Add a run command
* Check command name passed as arg
* Check platform is available
* Add a Run method to the DevClient
* Run command on cluster
* Add test with run command on cluster
* Implement and test run on podman
* Enhance test to check that command has been executed in container
* Fix `odo help` test
* Refactor common code for podman/cluster
* Test Apply commands on Kubernetes/Images
* Test a msg is displayed when executing odo run without odo dev
* Review
* makes GetRunningPodFromSelector return only Running pods on Podman
* Check that the "Syncing files into the container" spinner is correctly displayed on both Podman and cluster
* Add missing "Syncing files into the container" spinner when running 'odo dev' on Podman
This indicates to the user that we are sync'ing the files,
which might be a potentially long operation.
This is to be consistent with the output when using 'odo dev' on cluster.
* Set version in build/VERSION file
* Bump version in installation docs
* Add release blog post
* Update
* Apply suggestions from code review
Co-authored-by: Armel Soro <asoro@redhat.com>
---------
Co-authored-by: feloy <feloy@users.noreply.github.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
* Add integration test highlighting the expectations
* Record parameter (and value) set or unset using the 'odo preference set/unset' commands
By default, values are anonymized.
Only parameters explicitly declared list will be recorded verbatim.
This list is currently empty, but that might change later on.
* Mark all current preference parameters except ImageRegistry as clear-text
Co-authored-by: Philippe Martin <phmartin@redhat.com>
---------
Co-authored-by: Philippe Martin <phmartin@redhat.com>