Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 29 commits into from
Dec 20, 2022

Conversation

iblancasa
Copy link
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 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
Copy link
Contributor Author

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

@kevinearls
Copy link
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

Copy link
Member

@kevinearls kevinearls left a comment

Choose a reason for hiding this comment

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

LGTM

tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml Outdated Show resolved Hide resolved
tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml Outdated Show resolved Hide resolved
kuttl-test-upgrade.yaml Outdated Show resolved Hide resolved
kuttl-test-upgrade.yaml Show resolved Hide resolved
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
Signed-off-by: Israel Blancas <iblancasa@gmail.com>
kuttl-test-upgrade.yaml Outdated Show resolved Hide resolved
tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml Outdated Show resolved Hide resolved
@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 pavolloffay and jkandasa and removed request for frzifus and pavolloffay December 16, 2022 16:33
hack/ensure-collector-deployment.go Outdated Show resolved Hide resolved
hack/ensure-collector-deployment.go Outdated Show resolved Hide resolved
hack/ensure-collector-deployment.go Outdated Show resolved Hide resolved
hack/ensure-collector-deployment.go Outdated Show resolved Hide resolved
// See the License for the specific language governing permissions and
// limitations under the License.

package main
Copy link
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?

Copy link
Contributor Author

@iblancasa iblancasa Dec 19, 2022

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.

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
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
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 pavolloffay and frzifus and removed request for jkandasa, pavolloffay and frzifus 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