Commit Graph

154 Commits

Author SHA1 Message Date
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
dependabot[bot]
e88214cc76 Go: Bump github.com/go-openapi/jsonreference from 0.19.5 to 0.20.0 (#6398)
Bumps [github.com/go-openapi/jsonreference](https://github.com/go-openapi/jsonreference) from 0.19.5 to 0.20.0.
- [Release notes](https://github.com/go-openapi/jsonreference/releases)
- [Commits](https://github.com/go-openapi/jsonreference/compare/v0.19.5...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/go-openapi/jsonreference
  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>
2022-12-12 10:05:06 -05:00
Tomas Kral
eeaff57dda Update registry-library to 19293ac0b8ab (#6396)
* update github.com/devfile/registry-support/registry-library

* go mod vendor
2022-12-09 02:49:26 -05:00
Tomas Kral
6883fb9de1 Update to latest Alizer (#6378)
* update to latest Alizer version

* run scripts/mockgen.sh

* go mod tidy; go mod vendor

* add wwhrd exceptions for MIT
2022-12-05 12:21:42 -05:00
Armel Soro
5660093167 Use go-cmp instead of reflect.DeepEqual to compare unit test results (#6343) 2022-11-24 07:24:32 -05:00
dependabot[bot]
b581f9d91a Go: Bump github.com/mattn/go-colorable from 0.1.9 to 0.1.13 (#6321)
* Go: Bump github.com/mattn/go-colorable from 0.1.9 to 0.1.13

Bumps [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable) from 0.1.9 to 0.1.13.
- [Release notes](https://github.com/mattn/go-colorable/releases)
- [Commits](https://github.com/mattn/go-colorable/compare/v0.1.9...v0.1.13)

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

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

* Compare slices regardless of order in 'TestGetKubernetesComponentsToPush'

'GetKubernetesComponentsToPush' internally iterates over a map to return
the resulting slice, but the iteration order of a Map in Go is not guaranteed.

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>
2022-11-21 13:40:46 -05:00
Philippe Martin
712254ae66 Centralize environment configuration (#6293)
* Define central config

* Use envConfig in GenericRun for segment parameters

* Pass the env config into the context passed to CLI methods

* Use PodmanCmd and DockerCmd from context

* Remove tests now that ODO_DISABLE_TELEMETRY is checked for a bool value

* deploy.Deploy: Use values from ctx instead of parameters + use FS from DI

* dev.Start: Use values from ctx instead of parameters

* image.Build*: Use values from ctx instead of parameters

* Use telemetry file from context

* Pass ctx to segment.getTelemetryForDevfileRegistry

* Use ctx in getTelemetryForDevfileRegistry

* Call IsTelemetryEnabled once and use scontext.GetTelemetryStatus after

* Fix unit tests

* Use envConfig in segment.IsTelemetryEnabled

* Define TelemetryCaller constant in test helper

* IsTrackingConsentEnabled: get value from envconfig instead of env

* Use ctx instead of GLOBALODOCONFIG

* Place ODO_EXPERIMENTAL_MODE in configuration

* Use maintained envconfig package

* Define default values when exist

* Document accepted boolean values
2022-11-17 17:57:34 +00:00
Dharmit Shah
f062c11a11 Update odo to use go 1.18 (#6166)
* Update odo to use go 1.18

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Update golangci-lint version in Makefile

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Use go 1.18, not go 1.19

Erroneously I had used go 1.19 at various places.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Rearrange imports; fix golangci-lint errors

Fixed a bunch of golangci-lint errors like below:

`File is not `gofmt`-ed with `-s``

using the command: `golangci-lint run --fix`

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Use go install instead of go get

This is because with go 1.18, `go get` behaves as `go get -d` by
default. Which means that it will only download, but not install.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
2022-11-09 05:31:38 -05:00
dependabot[bot]
25dc107885 Go: Bump github.com/olekukonko/tablewriter from 0.0.4 to 0.0.5 (#6286)
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.4...v0.0.5)

---
updated-dependencies:
- dependency-name: github.com/olekukonko/tablewriter
  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>
2022-11-07 10:00:21 -05:00
dependabot[bot]
5a41b2606f Go: Bump github.com/securego/gosec/v2 from 2.12.0 to 2.14.0 (#6249)
Bumps [github.com/securego/gosec/v2](https://github.com/securego/gosec) from 2.12.0 to 2.14.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.12.0...v2.14.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-24 06:27:49 -04:00
Dharmit Shah
c2c0bddb7b Adds support for odo list services (#6118)
* Adds support for odo list services

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Aliases for simpler use

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Use slice instead of slice of map

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Address Philippe's PR feedback

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Add more usable fields to BindableService

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Add service field to the struct and JSON output

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Address Armel's PR feedback

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Ignore error assuming namespace is deleted/terminating

This is mainly a problem in integration tests where odo tries to list
bindable Operator backed services from namespaces that are deleted or
in Terminating state.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* klog when listing bindable services fails

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

* Move klog/v2 to indirect dependency

klog/v2, at the time of this commit, was used only in binding.go and
dev.go files. Rest of the code used the v1 of klog. To keep things
consistent, I removed klog/v2 from the go.mod file, and changed the
imports for the two files mentioned above to use v1 instead of klog/v2.
Next, I did `go mod vendor` which resulted in all the changes that are
carried by this commit.

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
2022-09-16 18:38:31 +02:00
Philippe Martin
59f4f8348a Manual sync of files pressing p (#6089)
* Set character mode for input stream

* Move watchers in receiver + sync when p pressed

* Integration tests manual sync

* Add a console to DevSession

* Vendor

* Skip pressKey tests on Windows

* Add interactive test for p press

* Add info about pressing p key

* Doc

* Review

* Rephrase Manul sync

* Fix HotReloadCapable

* Document timers

* Document enableCharInput

* Document geyKey and getKeyWatcher functions

* Avoid to Kill in AfterEach after running Kill before
2022-09-09 18:54:54 +02:00
Philippe Martin
588472ede5 Fix interactive tests on Windows (#6091)
* Use ActiveState/termtest for interactive tests, which works with Windows

* Fix interactive tests to pass on Windows

* Fix windows tests script

* Set SKIP_WELCOMING_MESSAGES on Windowd tests

* No not resize terminal

* Kill previous odo processes

* Increase timeout for Expect()
2022-09-06 11:33:28 +02:00
Anand Kumar Singh
2337f4d0f5 update ginkgo to v2.1.6 (#6072)
Signed-off-by: anandrkskd <anandrkskd@gmail.com>

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-09-01 14:49:16 +02:00
Tomas Kral
bda53f15f3 update to OpenShift 4.11 (#6060)
* update openshift to 4.11

* go mod vendor
2022-08-29 04:43:48 -04:00