3719 Commits

Author SHA1 Message Date
Armel Soro
85b4ff92e8 Make sure event is recorded whenever telemetry preference is changed (#6842)
* Add integration test highlighting the expectations

* Use the cancellable context derived from 'cmd.Context' where needed

* Introduce new 'wasTelemetryEnabled' telemetry property

This is recorded before any command is run.
And it will help determine if telemetry was
changed (e.g., from enabled to disabled),
so that we can record the event in this case.

* Send telemetry if it was enabled previously or if it is currently enabled

This is done by reading the actual telemetry setting
(either from env vars or the preferences file)
at the moment we want to record the telemetry event.
This covers cases where a command ('odo preference set ConsentTelemetry')
or an environment variable ('ODO_TRACKING_CONSENT')
updated the telemetry consent for example.
2023-05-26 11:25:24 -04:00
Philippe Martin
9a239c4e77 Use a single handler for executing all commands (#6826)
* Document current implementations of command handlers

* Add unit tests for execHAndler

* Refactor pkg/devfile/image to inject Backend as dependency

* Use same handler for kubedev/podmandev

* Fail after SelectBackend==nil only if backend is needed

* Move runHandler to dev/common

* Unit tests for runHandler

* Create a component.ExecuteTerminatingCommand

* ExecuteTerminatingCommand/ExecuteNonTerminatingCommand for Handler

* Fix calling other command types

* Consider parent group to determine if a command is terminating

* Replace component.execHandler by common.runHandler

* Remove execHandler

* Make runHandler and most of fields private and pass containersRunning to handler

* Pass containersRunning value

* deploy using common Handler

* Fix tests

* Use specific Dev/Deploy mode for Apply

* Fix cmdline for job

* Fix unit tests

* Pass appName and componentName with ctx to handler

* Move handler to pkg/component package

* Update doc

* Unit tests Deploy

* Unit tests Build

* Unit tests Run

* Unit tests PostStart

* Unit tests PreStop

* Update doc

* Fix Podman tests

* Fix hotReload on podman

* Change podman version timeout to 30s for tests

* Cleanup + fix doc
2023-05-26 11:01:21 -04:00
Armel Soro
511aaa22ad Fix should print warning about default namespace when running odo dev test when Dev Session does not start correctly (#6848)
The goal of this test is to ensure that the warning message is displayed,
so it does not matter if the Dev Session does not start correctly.
2023-05-26 10:09:08 -04:00
Parthvi Vala
e9077be4d6 Fix issues with describe/list binding tests (#6839)
* Fix issues with describe/list binding tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>

* Attempt at fixing human readable failure

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

* Fix bug with odo list --namespace while fetching binding information

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

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-05-26 07:51:47 -04:00
Armel Soro
b60fc5bc47 Fix flaky odo dev test on Podman by randomizing component names (#6833)
* Fix 'odo dev' tests by randomizing some missing component names

* Force setting a component name when copying example Devfiles

This way, we won't forget about this in the future.
2023-05-26 04:46:51 -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
Parthvi Vala
dcbc60a90c Use odo logo instead of author image in blog posts (#6837)
* Use odo logo instead of author image in blog posts

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

* Update .github/workflow-data/release-management/blog-post-header.tpl.md

* Add image to all the blog posts

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

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2023-05-24 02:29:21 -04:00
Armel Soro
dcf9009df4 Do not error out in port detection if any of the /proc/net/{tc,ud}p{,6} files are missing in the dev container (#6831)
* Do  not error out in port detection if any of `/proc/net/{tc,ud}p{,6}` files are missing

/proc/net/{tc,ud}p6 files might be missing if IPv6 is disabled in the host networking stack,
as reported by a user on RHEL.

Actually /proc/net/{tc,ud}p* files might be totally missing if network stats are disabled.

* Do not error out if we are not able to detect container ports bound on the loopback interface

We are already displaying a warning in such case
(saying that port forwarding might not work correctly);
so this should not prevent port-forwarding messages to be displayed.

We are already behaving this way when detecting if endpoints in the Devfile
are actually opened in the container.
A warning is displayed if any error occurs while checking this.

* fixup! Do  not error out in port detection if any of `/proc/net/{tc,ud}p{,6}` files are missing
2023-05-23 09:36:39 -04:00
ritudes
63bf76a30a Updating the oudated release script (#6801)
* Updating the oudated release script

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

* Update release-bit-verification.sh

* Update scripts/release-bit-verification.sh

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

* Update scripts/release-bit-verification.sh

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

* Update release-bit-verification.sh

* Update release-bit-verification.sh

* Update release-bit-verification.sh

* Update release-bit-verification.sh

* Update release-bit-verification.sh

---------

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
2023-05-23 09:23:50 -04:00
Armel Soro
58969d9eb0 Replace deprecated --slow-spec-threshold Ginkgo flag with --poll-progress-after (#6834)
* Replace deprecated '--slow-spec-threshold' Ginkgo flag with '--poll-progress-after'

Per [1], this instructs Ginkgo to automatically emit a progress report
whenever a node takes too long to complete.
The Progress Report includes information about which node is currently running
and the exact line of code that it is currently executing,
along with any relevant goroutines that were launched by the spec.

[1] https://onsi.github.io/ginkgo/#getting-visibility-into-long-running-specs

* Also set '--poll-progress-interval' flag so as to get progress reports periodically
2023-05-23 06:05:03 -04:00
Philippe Martin
db35b572ee Only run cluster tests on nightly tests, not nocluster tests (#6825) 2023-05-22 12:04:41 -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]
59e790564d Website: Bump @docusaurus/module-type-aliases in /docs/website (#6828)
Bumps [@docusaurus/module-type-aliases](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-module-type-aliases) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v2.4.1/packages/docusaurus-module-type-aliases)

---
updated-dependencies:
- dependency-name: "@docusaurus/module-type-aliases"
  dependency-type: direct:development
  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-22 04:20:30 -04:00
Armel Soro
d5587809a2 Do not run 'odo-infra-stage-test' GitHub Workflow on PRs that did not modify any files under 'scripts/ansible' (#6823) 2023-05-19 06:21:13 -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
Philippe Martin
67709ff895 Move parent devfiles in specific directories (#6818) 2023-05-16 03:29:07 -04:00
Parthvi Vala
a6da3e015a Add spinner when determining a devfile using alizer (#6793)
* Add spinner when determining a devfile using alizer and handle panic on odo dev

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

* Change HandleSignal signature, handle context cancellation in AlizerBackend Select Devfile

Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix spinner and terminate on terminal interrupt

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

* Fix validation errors

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

* Fix doc test error

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

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Philippe Martin <phmartin@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-05-16 03:10:33 -04:00
Philippe Martin
d23789afd3 Wait after killing odo during integration test (#6816)
* Wait after killing odo during integration test

* Make podman replacement terminate sooner
2023-05-15 08:46:17 -04:00
Philippe Martin
2e0a882dea fix 6812 (#6814)
* todo

* Log Devfile Registry

* remove end space

* Clean comment
2023-05-15 04:54:25 -04:00
dependabot[bot]
723c660d23 Website: Bump @svgr/webpack from 7.0.0 to 8.0.1 in /docs/website (#6811)
Bumps [@svgr/webpack](https://github.com/gregberge/svgr) from 7.0.0 to 8.0.1.
- [Release notes](https://github.com/gregberge/svgr/releases)
- [Changelog](https://github.com/gregberge/svgr/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gregberge/svgr/compare/v7.0.0...v8.0.1)

---
updated-dependencies:
- dependency-name: "@svgr/webpack"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 04:02:19 -04:00
Parthvi Vala
0cdc2e5542 Fix: odo init overwrites personalized configuration when downloading starter project (#6800)
* Fix personalized configuration overwritten by starter project

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

* Update pkg/registry/registry_test.go

Co-authored-by: Armel Soro <armel@rm3l.org>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Adding intergration tests for personalizing configurations with odo init

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

Modified changes

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

Update tests/integration/interactive_init_test.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

Update tests/integration/interactive_init_test.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

Update interactive_init_test.go

Update interactive_init_test.go

Update interactive_init_test.go

Update tests/integration/interactive_init_test.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

Update interactive_init_test.go

* Updated changes

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

* Attempt at fixing interactive tests

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

* Add multiple devfile version check

Co-authored-by: Armel Soro <asoro@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
Co-authored-by: Ritu Deshmukh <rideshmu@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-05-11 16:06:49 -04:00
Armel Soro
c217741cc7 Add a timeout when initializing the Podman client (broken Podman should not affect odo dev on cluster) (#6808)
* Add test highlighting the issue and setting the expectations

* Add a timeout of 1s to the 'podman version' command

This command is called at dependency injection time to initialize a (nil-able) Podman client,
even if users won't use Podman at all.
As discussed, this command is supposed to be
quite fast to return, hence this timeout of 1 second.

Initially, we were using cmd.Output to get the command output,
but as reported in [1], cmd.Output does not respect the context timeout.
This explains the workaround of reading from both stdout and stderr pipes,
*and* relying on cmd.Wait() to close those pipes properly when the program exits
(either as expected or when the timeout is reached).

[1] https://github.com/golang/go/issues/57129

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

* Log the errors returned at dependency injection time when the optional Kubernetes/Podman clients could not be initialized

This helps debug such potential issues instead of swallowing the errors.

* Make the timeout configurable via the 'PODMAN_CMD_INIT_TIMEOUT' env var

This will allow setting a different value for environments like
in GitHub where the Podman client would take slightly more time to return
(I guess because of we are running a lot of Podman commands in parallel?).

* Increase the timeout for Podman tests to an arbitrary value of 10s

Some tests did not pass because the Podman client did not
initialize in 1s; I guess because we are running a lot of Podman commands in parallel?
This should hopefully improve this situation.

* fixup! Add a timeout of 1s to the 'podman version' command

---------

Co-authored-by: Philippe Martin <phmartin@redhat.com>
2023-05-11 15:34:34 -04:00
Anand Kumar Singh
7ff460bc62 seperate ansible scripts (#6484)
* ansible scripts for infra automation, and workflow for applying and testing changes

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

* fix

Signed-off-by: anandrkskd <ansingh@redhat.com>

* fix

Signed-off-by: anandrkskd <ansingh@redhat.com>

* rename requirements.yaml

Signed-off-by: anandrkskd <ansingh@redhat.com>

* change permissions

Signed-off-by: anandrkskd <ansingh@redhat.com>

* update cluster version

Signed-off-by: anandrkskd <ansingh@redhat.com>

---------

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
Signed-off-by: anandrkskd <ansingh@redhat.com>
2023-05-11 10:55:25 -04:00
Philippe Martin
f491bcc7db Reuse same volumes when devfile is modified, on podman (#6810)
* Reuse same volumes when devfile is modified

* Fix doc /comment
2023-05-11 03:57:12 -04:00
Philippe Martin
da28e7d286 Delete previous pod and creates new ond when modifying devfile on podman (#6802)
* Delete previous pod and creates new ond when modifying devfile on podman

* Add integration tests
2023-05-10 06:45:19 -04:00
Parthvi Vala
5459326795 Update the release doc with Sprint 235 updates (#6798)
* Update the release doc with Sprint 235 updates

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

* 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>
2023-05-09 11:09:24 -04:00
dependabot[bot]
aa7efe8264 Website: Bump @segment/snippet from 4.15.3 to 4.16.0 in /docs/website (#6797)
Bumps [@segment/snippet](https://github.com/segmentio/snippet) from 4.15.3 to 4.16.0.
- [Release notes](https://github.com/segmentio/snippet/releases)
- [Changelog](https://github.com/segmentio/snippet/blob/master/History.md)
- [Commits](https://github.com/segmentio/snippet/compare/4.15.3...4.16.0)

---
updated-dependencies:
- dependency-name: "@segment/snippet"
  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-05-09 03:56:57 -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
Vinu K
f1ccc5eb60 Check if namespace exists before the delete confirmation (#6233) 2023-05-06 12:53:40 -04:00
github-actions[bot]
c1a203e090 Release PR for v3.10.0 (#6787)
* Set version in build/VERSION file

* Bump version in installation docs

* Add release blog post

* Update the doc

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

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: valaparthvi <valaparthvi@users.noreply.github.com>
Co-authored-by: Parthvi Vala <pvala@redhat.com>
2023-05-06 00:49:07 -04:00
dependabot[bot]
1a8eec7ed0 Website: Bump loader-utils from 2.0.2 to 2.0.4 in /docs/website (#6796)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  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-05 16:23:34 -04:00
Philippe Martin
32e2df0f43 Check latest version from index instead of using hardcoded value (#6789)
* Check latest version from index instead of using harcoded value

* Use checkVersion

* Fix when DEVFILE_REGISTRY ends with /
2023-05-05 01:19:42 -04:00
Parthvi Vala
6dd357dd0c Blog: Helm integration with odo (#6775)
* Blog: Helm integration with odo using deploy exec command

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

* Update docs/website/blog/deploy-and-connect-to-microservice-using-helm-and-exec.md

* Fix typos and mistake with the doc

Co-authored-by: Armel Soro <asoro@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-05-04 10:43:35 -04:00
Philippe Martin
56d0b6f95e Fix HotReloadCapable Build command (#6696)
* On cluster, run Build command again only if Build command itself is not hotReloadCapable

* On Podman, execute Build command only if itself is not hotReloadcapable

* Handle hotReloadCapable in handler

* Add integration tests

* Update doc

* review
2023-05-04 10:20:21 -04:00
Armel Soro
6241a66129 Allow passing extra flags to Podman/Docker (#6785)
* Allow passing extra build flags to Podman/Docker

This is supported via 2 new env vars:
- ODO_IMAGE_BUILD_ARGS: passed when building images via Podman/Docker
- ODO_CONTAINER_RUN_ARGS: passed when running odo dev on Podman

Those are comma-separated list of options
that can be passed to either Podman or Docker
(depending on the PODMAN_CMD env var).

* Refactor 'build-images' tests to make it easier to add additional tests

* Add integration tests for passing build extra args

* Add integration tests for passing global extra args to Podman

* Distinguish between global options passed to Podman and specific options for 'podman play kube'

Previously, we were handling 'ODO_CONTAINER_RUN_ARGS' as global options for Podman,
but this turns our not being that useful if we want to pass dedicated options to 'podman play kube'.
This commit introduces a new 'ODO_CONTAINER_BACKEND_GLOBAL_ARGS' env var,
which will be used as global options passed to every Podman command we execute.

This paves the way to isolating our Podman-related tests further
using the '--root' and '--runroot' global options.

* Use `ODO_IMAGE_BUILD_ARGS` in the Advanced Guides

* Use a semicolon as delimiter for extra flags

Doing so because some of the options of Podman/Docker can actually be either repeated or comma-separated.
2023-05-04 04:59:18 -04:00
Philippe Martin
d0ba624d6c dev states proposal (#6782) 2023-05-03 03:49:51 -04:00
Parthvi Vala
039ef07320 Bump version to 3.10.0 (#6783)
Signed-off-by: Parthvi Vala <pvala@redhat.com>
v3.10.0
2023-05-02 10:04:54 -04:00
Parthvi Vala
010e9634d3 Use custom address for port forwarding (#6766)
* Custom address for port forwarding

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

* Add integration tests

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

* Use private variables for custom address and ports

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

* Update pkg/util/util.go

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

* Assign custom address to HostIP for podman

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

* Add validation for free port when --port-forward is provided in the Validate() method, add integration test for running parallel dev sessions on same platform, same port and different addresses

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

* Fix unit test failure

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

* Attempt at fixing windows failure

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

* Add documentation

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

* Use default value for --address flag

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

* Changes from review

Co-authored-by: Armel Soro <asoro@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
Co-authored-by: Armel Soro <asoro@redhat.com>
2023-05-02 07:34:19 -04:00
Philippe Martin
191ee6f45f Wait when Build command fails (#6771)
* Same signature for reconcile in kubedev/podmandev

* Do not call initial reconcile

* Do not retry + filter deployment events

* Integration tests

* Move logs back to level 4

* Remove unnecessary files

* Log state + Set state to ready when build fails
2023-05-02 04:39:58 -04:00
dependabot[bot]
0a8500d083 Website: Bump webpack from 5.80.0 to 5.81.0 in /docs/website (#6781)
Bumps [webpack](https://github.com/webpack/webpack) from 5.80.0 to 5.81.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.80.0...v5.81.0)

---
updated-dependencies:
- dependency-name: webpack
  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-05-01 16:54:19 -04:00
Armel Soro
00918c3d16 Support variable substitution with --var and --var-file in odo build-images (#6776)
* Add integration tests

* Add support for --var and --var-file to the 'build-images' command

* Update 'build-images' command reference
2023-04-27 11:13:16 -04:00
Philippe Martin
ef9206a86f PODMAN_USE_NAMESPACES to disable using namespaces on podman integration tests for podman v4.5 (#6774)
* PODMAN_USE_NAMESPACES to disable using namespaces on podman integration tests for podman v4.5

* Parse bool value

* Update tests/helper/helper_podman.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

---------

Co-authored-by: Parthvi Vala <pvala@redhat.com>
2023-04-27 06:19:22 -04:00
ritudes
591309747f Doc automation:Command reference: odo delete,list and set namespace (#6756)
* Adding files for odo delete,list and set namespace

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

* Changes to be added

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

* Modified changes

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

* Adding changes based on review

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>

---------

Signed-off-by: Ritu Deshmukh <rideshmu@redhat.com>
2023-04-27 03:04:28 -04:00
Parthvi Vala
b57d3e2f17 Attempt at fixing (#6769)
Move test skip before waitgroup is initiated

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2023-04-26 03:39:24 -04:00
Philippe Martin
e9c5f86563 Simplify devfile Kubernetes adapter (#6762)
* Get values from context

* Move Devfile param to WatchParams and biuld adapter only once

* Move pkg/devfile/adapters/kubernetes/* into pkg/dev/kubedev

* Rename Push to reconcile and split in 2 parts: components and innreloop

* Pass out ans errout as startOptions

* Embed StartOptions into PushParameters

* Embed StartOptions into WatchParameters

* Fix passing startoptions

* Deduplicate options (out, ...)

* Revert adding unwanted files

* Fix wait app ready
2023-04-25 05:13:19 -04:00
Armel Soro
6aacbe242b Fix flaky tests using custom port mapping when running specs in parallel (#6763)
* Fix flaky test using custom port mapping when running specs in parallel

Using a global counter currently does not work
because Ginkgo runs parallel specs by isolating them in
completely different processes [1].
This relies on the parallel process index returned by Ginkgo
to get a value that can be used as starting port.
Callers can then safely increment this value if needed in the
specs to get a different custom value.

[1] https://onsi.github.io/ginkgo/#mental-model-how-ginkgo-runs-parallel-specs

* Apply suggestions from code review

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* fixup! Apply suggestions from code review

---------

Co-authored-by: Parthvi Vala <pvala@redhat.com>
2023-04-25 07:00:02 +00:00
Philippe Martin
4d1e402542 Check files to sync with gitignore library (#6760) 2023-04-24 16:29:41 +00:00
Armel Soro
f62a4337d3 Set 'mountSources' to 'true' in some example SpringBoot multi-container Devfiles (#6761)
In those examples, the build and run commands are running in
different container components.
Without mounting sources in the container used for the 'run' command,
this command will not start because Maven would not be able
to resolve the 'spring-boot' plugin:

```
 ✓  Building your application in container (command: defaultbuild) [39s]
 •  Executing the application (command: defaultrun)  ...
 ✗  Finished executing the application (command: defaultrun) [151ms]
 ⚠  Devfile command "defaultrun" exited with an error status in 20 second(s)
 ⚠  Last 100 lines of log:
 ✗  Waiting for the application to be ready [1m]
 ⚠  Port forwarding might not work correctly: timeout while checking for ports; ports not listening: (8080 in container "runtime"): context deadline exceeded
 ⚠  Running `odo logs --follow` might help in identifying the problem.

 -  Forwarding from 127.0.0.1:20001 -> 8080
```

This was not caught in the tests because failing to run the
'run' command current does not prevent the Dev session from starting.

This change might actually make the test faster as we would not have to wait 1 minute
to find out that the application port is not reachable.
2023-04-24 14:11:55 +00:00
dependabot[bot]
1cfc8b6a22 Website: Bump webpack from 5.79.0 to 5.80.0 in /docs/website (#6765)
Bumps [webpack](https://github.com/webpack/webpack) from 5.79.0 to 5.80.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.79.0...v5.80.0)

---
updated-dependencies:
- dependency-name: webpack
  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-04-24 10:48:22 +00:00