Commit Graph

168 Commits

Author SHA1 Message Date
dependabot[bot]
1cdaffd568 Go: Bump github.com/go-git/go-git/v5 from 5.7.0 to 5.10.1 (#7155)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-01 12:27:59 +01:00
Armel Soro
0f2103e7d7 Recognize devfile.yml and .devfile.yml as Devfiles (#7130) 2023-12-01 12:10:19 +01:00
Armel Soro
15f663f12a Start HTTP server to replace Devfile Registry server in the tests (#7154) 2023-12-01 10:35:15 +01:00
dependabot[bot]
d77ca3e95a Go: Bump github.com/devfile/alizer from 1.0.1 to 1.2.1 (#7126)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-10-23 18:09:52 +02:00
dependabot[bot]
ea0484afe8 Go: Bump github.com/fatih/color from 1.14.1 to 1.15.0 (#7122)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.14.1 to 1.15.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.14.1...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 18:46:29 +00:00
dependabot[bot]
290e5d850f Go: Bump golang.org/x/sys from 0.12.0 to 0.13.0 (#7113)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/sys/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-13 16:11:10 +00:00
dependabot[bot]
765c1e12e9 Go: Bump github.com/operator-framework/api from 0.17.6 to 0.17.7 (#7108)
Bumps [github.com/operator-framework/api](https://github.com/operator-framework/api) from 0.17.6 to 0.17.7.
- [Release notes](https://github.com/operator-framework/api/releases)
- [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md)
- [Commits](https://github.com/operator-framework/api/compare/v0.17.6...v0.17.7)

---
updated-dependencies:
- dependency-name: github.com/operator-framework/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 07:11:27 +00:00
dependabot[bot]
ac38e08257 Go: Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.12.1 (#7101)
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.11.0 to 2.12.1.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.11.0...v2.12.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 04:16:53 -04:00
dependabot[bot]
134a0867b2 Go: Bump github.com/tidwall/gjson from 1.16.0 to 1.17.0 (#7095)
Bumps [github.com/tidwall/gjson](https://github.com/tidwall/gjson) from 1.16.0 to 1.17.0.
- [Commits](https://github.com/tidwall/gjson/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/tidwall/gjson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 07:45:13 -04:00
Eng Zer Jun
0959b56285 Replace github.com/ghodss/yaml with sigs.k8s.io/yaml (#7005)
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>
2023-09-22 06:23:09 -04:00
Philippe Martin
0f828ec99f Ignore devstate when existing process name is not odo + delete devstate files with odo delete component (#7090)
* 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
2023-09-20 14:20:53 +02:00
dependabot[bot]
28def95001 Go: Bump github.com/tidwall/gjson from 1.14.4 to 1.16.0 (#7089)
Bumps [github.com/tidwall/gjson](https://github.com/tidwall/gjson) from 1.14.4 to 1.16.0.
- [Commits](https://github.com/tidwall/gjson/compare/v1.14.4...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/tidwall/gjson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 13:52:51 +02:00
dependabot[bot]
b20ceb619c Go: Bump golang.org/x/term from 0.11.0 to 0.12.0 (#7082)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/term/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 12:09:35 +02:00
dependabot[bot]
4f9ff1012a Go: Bump github.com/jedib0t/go-pretty/v6 from 6.4.3 to 6.4.7 (#7067)
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.4.3 to 6.4.7.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.4.3...v6.4.7)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 11:00:46 +02:00
dependabot[bot]
319adfa724 Go: Bump github.com/securego/gosec/v2 from 2.15.0 to 2.17.0 (#7033)
* Go: Bump github.com/securego/gosec/v2 from 2.15.0 to 2.17.0

Bumps [github.com/securego/gosec/v2](https://github.com/securego/gosec) from 2.15.0 to 2.17.0.
- [Release notes](https://github.com/securego/gosec/releases)
- [Changelog](https://github.com/securego/gosec/blob/master/.goreleaser.yml)
- [Commits](https://github.com/securego/gosec/compare/v2.15.0...v2.17.0)

---
updated-dependencies:
- dependency-name: github.com/securego/gosec/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Go: Bump github.com/securego/gosec/v2 from 2.15.0 to 2.17.0

Bumps [github.com/securego/gosec/v2](https://github.com/securego/gosec) from 2.15.0 to 2.17.0.
- [Release notes](https://github.com/securego/gosec/releases)
- [Changelog](https://github.com/securego/gosec/blob/master/.goreleaser.yml)
- [Commits](https://github.com/securego/gosec/compare/v2.15.0...v2.17.0)

---
updated-dependencies:
- dependency-name: github.com/securego/gosec/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Ignore gosec error

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
2023-08-28 15:18:08 +02:00
dependabot[bot]
e58ff71e4c Go: Bump github.com/go-openapi/jsonpointer from 0.19.6 to 0.20.0 (#7024)
Bumps [github.com/go-openapi/jsonpointer](https://github.com/go-openapi/jsonpointer) from 0.19.6 to 0.20.0.
- [Commits](https://github.com/go-openapi/jsonpointer/compare/v0.19.6...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/jsonpointer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 14:48:47 +02:00
dependabot[bot]
3d4f339e84 Go: Bump github.com/zalando/go-keyring from 0.2.1 to 0.2.3 (#7006)
Bumps [github.com/zalando/go-keyring](https://github.com/zalando/go-keyring) from 0.2.1 to 0.2.3.
- [Release notes](https://github.com/zalando/go-keyring/releases)
- [Commits](https://github.com/zalando/go-keyring/compare/v0.2.1...v0.2.3)

---
updated-dependencies:
- dependency-name: github.com/zalando/go-keyring
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 10:30:06 +02:00
dependabot[bot]
79f3685dfe Go: Bump github.com/onsi/ginkgo/v2 from 2.9.5 to 2.11.0 (#6998)
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.9.5 to 2.11.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.9.5...v2.11.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-24 09:50:24 +02:00
Armel Soro
abdb1c568d Update go.mod with new location of the Alizer library (#6962)
* 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
2023-07-17 12:57:31 +02:00
dependabot[bot]
819be1df35 Go: Bump github.com/operator-framework/api from 0.17.3 to 0.17.6 (#6960)
Bumps [github.com/operator-framework/api](https://github.com/operator-framework/api) from 0.17.3 to 0.17.6.
- [Release notes](https://github.com/operator-framework/api/releases)
- [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md)
- [Commits](https://github.com/operator-framework/api/compare/v0.17.3...v0.17.6)

---
updated-dependencies:
- dependency-name: github.com/operator-framework/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 05:02:15 -04:00
dependabot[bot]
3b73c806db Go: Bump golang.org/x/sys from 0.8.0 to 0.10.0 (#6948)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.8.0 to 0.10.0.
- [Commits](https://github.com/golang/sys/compare/v0.8.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-05 11:06:05 -04:00
Philippe Martin
649181c1dc Implement devfile state in odo api (#6941)
* 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>
2023-07-05 05:19:29 -04:00
Armel Soro
324d73fb37 Bump Alizer to fix potential panic when analyzing large projects (#6926)
* 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
2023-06-27 09:34:38 +02:00
dependabot[bot]
08e8b5d9f5 Go: Bump github.com/segmentio/backo-go (#6851)
Bumps [github.com/segmentio/backo-go](https://github.com/segmentio/backo-go) from 1.0.1-0.20200129164019-23eae7c10bd3 to 1.0.1.
- [Release notes](https://github.com/segmentio/backo-go/releases)
- [Commits](https://github.com/segmentio/backo-go/commits/v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/segmentio/backo-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 10:00:15 -04:00
Armel Soro
23360426bf Bump Devfile library to latest commit [1] (#6845)
This fixes the issue with parsing child Devfiles
referencing parents via URIs (GitHub blob, raw or any hosted URL).
See [2] for more context.

[1] 04a8b3fc66
[2] https://github.com/devfile/api/issues/1119
2023-05-26 02:23:12 -04:00
Armel Soro
ec747b4ab3 Allow using imageName as a selector (#6768)
* 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>
2023-05-22 10:45:27 -04:00
dependabot[bot]
cd11d3c78c Go: Bump github.com/docker/distribution (#6822)
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 11:24:15 -04:00
dependabot[bot]
50cb5c9b3b Go: Bump github.com/securego/gosec/v2 from 2.14.0 to 2.15.0 (#6686)
* Go: Bump github.com/securego/gosec/v2 from 2.14.0 to 2.15.0

Bumps [github.com/securego/gosec/v2](https://github.com/securego/gosec) from 2.14.0 to 2.15.0.
- [Release notes](https://github.com/securego/gosec/releases)
- [Changelog](https://github.com/securego/gosec/blob/master/.goreleaser.yml)
- [Commits](https://github.com/securego/gosec/compare/v2.14.0...v2.15.0)

---
updated-dependencies:
- dependency-name: github.com/securego/gosec/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Make sure to handle error returned by io.Closer.Close() in 'defer' statements

This is considered unsafe by gosec otherwise.

[1] https://github.com/securego/gosec/issues/512
[2] https://github.com/securego/gosec/issues/714
[3] https://www.joeshaw.org/dont-defer-close-on-writable-files/

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-05-16 09:51:30 -04:00
dependabot[bot]
b9babc2cfd Go: Bump github.com/docker/docker (#6795)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.11+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.11...v20.10.24)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 13:03:58 -04:00
Armel Soro
cc2e8def81 Support autoBuild and deployByDefault on Image and Kubernetes/OpenShift components (#6654)
* 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>
2023-04-05 01:30:30 -04:00
Tomas Kral
eaa9c1c0a3 Update alizer (#6707)
* update alizer to d36e409ff94f

* go mod vendor
2023-04-03 12:15:45 -04:00
Philippe Martin
252a77dde7 Speedup odo registry --details (#6678)
* 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
2023-04-03 10:05:04 -04:00
Philippe Martin
163c164d18 Pod Security Admission support for odo deploy (#6679)
* 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>
2023-03-28 16:23:11 +02:00
Tomas Kral
6af2f9d030 Update alizer dependency (#6650)
* 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>
2023-03-25 15:36:24 -04:00
dependabot[bot]
0b4ef58591 Go: Bump golang.org/x/sync (#6665)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.0.0-20220722155255-886fb9371eb4 to 0.1.0.
- [Release notes](https://github.com/golang/sync/releases)
- [Commits](https://github.com/golang/sync/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 12:54:57 -04:00
Philippe Martin
93d1330182 Patch Pods to pass pod security admission (#6602)
* Bump devfile/library

* Use generator.GetPodTemplateSpec instead of Get[Init]Containers

* Fix deprecated pointer.*

* Fix more deprecated

* Workaround for ServerPreferredResources panicking

* Pass policy to GetPodTemplateSpec

* Integration test

* document behaviour

* Review
2023-03-20 10:16:14 -04:00
dependabot[bot]
8f9ced9759 Go: Bump github.com/operator-framework/api (#6656)
Bumps [github.com/operator-framework/api](https://github.com/operator-framework/api) from 0.14.1-0.20220413143725-33310d6154f3 to 0.17.3.
- [Release notes](https://github.com/operator-framework/api/releases)
- [Commits](https://github.com/operator-framework/api/commits/v0.17.3)

---
updated-dependencies:
- dependency-name: github.com/operator-framework/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 11:18:13 -04:00
dependabot[bot]
851b1710ff Go: Bump github.com/sethvargo/go-envconfig from 0.8.2 to 0.9.0 (#6630)
Bumps [github.com/sethvargo/go-envconfig](https://github.com/sethvargo/go-envconfig) from 0.8.2 to 0.9.0.
- [Release notes](https://github.com/sethvargo/go-envconfig/releases)
- [Commits](https://github.com/sethvargo/go-envconfig/compare/v0.8.2...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/sethvargo/go-envconfig
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 10:43:15 +01:00
Armel Soro
4fb7308cfa Automatically use in-cluster Devfile registries if any (#6622)
* Add kubeclient as dependency of the registry client

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Add GetRegistryList method to the kube client interface

This is yet to be implemented.

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Implement GetRegistryList

* adding test if devfileRegistryListCR is present in cluster

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

* Unit tests (to be continued)

* Add unit test cases against kclient#GetRegistryList()

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Ignore in-cluster registries with an empty URL

This should ideally not happen if the registry operator
 is installed in the cluster (because it validates the
 URL to make sure it is reachable), but you never know ;-)

* Update error message when trying to remove registry

Registries might be found in the cluster.

* Pass isSecure value to the registry handler

* Make it possible to use in-cluster registries when calling 'odo registry --details'

* Remove unused 'preferenceClient' from registry.getRegistryStacks

* Handle in-cluster registries in 'odo init' non-interactive mode

* Handle in-cluster registries in 'odo init' interactive mode

* Add integration test for odo init --devfile-registry

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

* Use proxy when available

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

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

* Make sure tests work even if the registry operator is installed in the cluster or if there are cluster-wide registry lists

* Add tests for 'odo init' interactive mode

* Remove useless CR file

CRs are now dynamically created and applied from the tests

* fixup! Add tests for 'odo init' interactive mode

---------

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: anandrkskd <anandrkskd@gmail.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
2023-03-06 09:19:02 +01:00
dependabot[bot]
99bdaebfff Go: Bump github.com/ActiveState/termtest from 0.7.1 to 0.7.2 (#6621)
Bumps [github.com/ActiveState/termtest](https://github.com/ActiveState/termtest) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/ActiveState/termtest/releases)
- [Commits](https://github.com/ActiveState/termtest/compare/v0.7.1...v0.7.2)

---
updated-dependencies:
- dependency-name: github.com/ActiveState/termtest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 15:02:33 +01:00
Philippe Martin
2460ea83da Update devfile library (#6599) 2023-02-16 05:47:04 -05:00
dependabot[bot]
96e9adf652 Go: Bump github.com/go-openapi/jsonreference from 0.20.1 to 0.20.2 (#6590)
Bumps [github.com/go-openapi/jsonreference](https://github.com/go-openapi/jsonreference) from 0.20.1 to 0.20.2.
- [Release notes](https://github.com/go-openapi/jsonreference/releases)
- [Commits](https://github.com/go-openapi/jsonreference/compare/v0.20.1...v0.20.2)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/jsonreference
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 05:39:58 -05:00
dependabot[bot]
5c3857367a Go: Bump github.com/fatih/color from 1.13.0 to 1.14.1 (#6571)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-06 12:21:51 +01:00
dependabot[bot]
106473af73 Go: Bump github.com/go-openapi/spec from 0.19.5 to 0.20.8 (#6546)
Bumps [github.com/go-openapi/spec](https://github.com/go-openapi/spec) from 0.19.5 to 0.20.8.
- [Release notes](https://github.com/go-openapi/spec/releases)
- [Commits](https://github.com/go-openapi/spec/compare/v0.19.5...v0.20.8)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/spec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-30 11:14:32 -05:00
Philippe Martin
0bce606cfc Set platform and platformVersion in telemetry (#6540)
* Set platform and platformVersion in telemetry

* Vendor oc config client

* Get OC version

* Integration tests for odo dev

* Integration tests for odo deploy

* Update doc

* Apply suggestions from code review

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

* Add integration test on odo init

* Fix OC version when no complete version status

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
2023-01-28 11:20:56 -05:00
dependabot[bot]
95a6b6d81f Go: Bump golang.org/x/text from 0.3.8 to 0.6.0 (#6523)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.8 to 0.6.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.8...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 08:34:13 -05:00
Parthvi Vala
19f8e0ebdb Update devfile/library to support pod-overrides and container-overrides attributes and add integration test for it (#6512)
* Update the Devfile library

* Add test for container-overrides and pod-overrides attributes

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

Attempt at fixing CI failures

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

* Fix CI failure

* Attempt at fixing OC integration test failures

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

* Use random name in integration test

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

* Rebase and fix integration test failure

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

* Make integration test work for podman

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

* Temp attempt at fixing podman test for GH

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

* Another attempt at fixing CI test for podman

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

* One more attempt at fixing integration test for podman

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

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2023-01-23 15:21:18 -05:00
dependabot[bot]
87b7b213c1 Go: Bump github.com/tidwall/gjson from 1.14.1 to 1.14.4 (#6490)
Bumps [github.com/tidwall/gjson](https://github.com/tidwall/gjson) from 1.14.1 to 1.14.4.
- [Release notes](https://github.com/tidwall/gjson/releases)
- [Commits](https://github.com/tidwall/gjson/compare/v1.14.1...v1.14.4)

---
updated-dependencies:
- dependency-name: github.com/tidwall/gjson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-16 08:09:26 -05:00
dependabot[bot]
f39c5b6b0a Go: Bump github.com/go-openapi/jsonreference from 0.20.0 to 0.20.1 (#6476)
Bumps [github.com/go-openapi/jsonreference](https://github.com/go-openapi/jsonreference) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/go-openapi/jsonreference/releases)
- [Commits](https://github.com/go-openapi/jsonreference/compare/v0.20.0...v0.20.1)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/jsonreference
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 10:42:07 -05:00
dependabot[bot]
554acbbb4f Go: Bump github.com/jedib0t/go-pretty/v6 from 6.3.5 to 6.4.3 (#6441)
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.3.5 to 6.4.3.
- [Release notes](https://github.com/jedib0t/go-pretty/releases)
- [Commits](https://github.com/jedib0t/go-pretty/compare/v6.3.5...v6.4.3)

---
updated-dependencies:
- dependency-name: github.com/jedib0t/go-pretty/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 07:46:09 -05:00