Skip to content

[chore] Change the E2E automation to run the tests in OpenShift#1254

Merged
pavolloffay merged 29 commits into
open-telemetry:mainfrom
iblancasa:run-tests-openshift
Dec 20, 2022
Merged

[chore] Change the E2E automation to run the tests in OpenShift#1254
pavolloffay merged 29 commits into
open-telemetry:mainfrom
iblancasa:run-tests-openshift

Conversation

@iblancasa

Copy link
Copy Markdown
Contributor

This PRs adds some changes to the E2E automation in order to allow the usage of Kubernetes clusters not created with kind. It also allows the usage of OpenShift.

⚠️ The tests are not passing in OpenShift. Further work is needed. I'm working on that too

@iblancasa iblancasa requested a review from a team November 16, 2022 15:44
@iblancasa iblancasa marked this pull request as draft November 16, 2022 15:44
@iblancasa iblancasa marked this pull request as ready for review November 17, 2022 16:18
@iblancasa iblancasa marked this pull request as draft November 17, 2022 16:52
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa marked this pull request as ready for review November 30, 2022 14:57
@iblancasa iblancasa requested a review from kevinearls November 30, 2022 14:57
@iblancasa

Copy link
Copy Markdown
Contributor Author

I'm not able to reproduce the error in the Unit tests workflow

@kevinearls

Copy link
Copy Markdown
Member

@iblancasa as part of this PR #1233 I just added a change 1213f7b to skip that test as it was failing frequently for me

@kevinearls kevinearls left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml Outdated
Comment thread tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml Outdated
Comment thread kuttl-test-upgrade.yaml Outdated
Comment thread kuttl-test-upgrade.yaml
@iblancasa iblancasa requested a review from pavolloffay December 1, 2022 12:08
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Comment thread kuttl-test-upgrade.yaml Outdated
Comment thread tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml Outdated
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa changed the title Change the E2E automation to run the tests in OpenShift [chore] Change the E2E automation to run the tests in OpenShift Dec 16, 2022
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa requested review from jkandasa and pavolloffay and removed request for frzifus and pavolloffay December 16, 2022 16:33
Comment thread hack/ensure-collector-deployment.go Outdated
Comment thread hack/ensure-collector-deployment.go Outdated
Comment thread hack/ensure-collector-deployment.go Outdated
Comment thread hack/ensure-collector-deployment.go Outdated
Comment thread hack/ensure-collector-deployment.go Outdated
// See the License for the specific language governing permissions and
// limitations under the License.

package main

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan to see this written in golang.

Did you use golang because of te poll?

@iblancasa iblancasa Dec 19, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had two options: Golang or shell. Shell will be more difficult to understand/maintain. Also, stuff like the poll mechanism is implemented in the libraries we use: with bash I would have to implement it.

Comment thread hack/ensure-collector-deployment.go Outdated
fmt.Println("Wait until the creation of OTEL Collectors is available")
pollInterval := 3 * time.Second
timeoutPoll := time.Duration(timeout) * time.Second
err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the poll is used to apply the install manifest? Why does the installation fail? Is it because the webhook or the CRD is not recognized in the cluster?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the error I pointed in #1254 (comment). As I pointed in previous comments: I don't know how to solve it without adding sleep statements or trying to create a resource until the creation doesn't fail. If you know a better way to do it, please, give me a hint.

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@iblancasa iblancasa requested review from frzifus and pavolloffay and removed request for frzifus, jkandasa and pavolloffay December 19, 2022 13:34
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
@pavolloffay pavolloffay merged commit 06503f9 into open-telemetry:main Dec 20, 2022
@iblancasa iblancasa deleted the run-tests-openshift branch December 22, 2022 14:12
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…-telemetry#1254)

* Run the E2E tests in OpenShift

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Set version for GitHub Actions workflow

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix CI

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Apply some changes to simplify the upgrade E2E test

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix CI

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix CI

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Install OpenShift routes only if needed

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Trigger Build

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Remove cert-manager installation from deployment step

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Trigger Build

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Ensure the webhook don't fail when kubectl apply

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix coding standard issues

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Fix coding standard issues

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Increase timeout for golangci

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Apply changes requested in CR

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Change timeout to 500ms

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Change program file name

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Do the check without depending on a manifest file

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

* Change program file name

Signed-off-by: Israel Blancas <iblancasa@gmail.com>

Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants