e2e tests never run on PRs from forks: the Quay login step fails without secrets

Aperta
#332 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
64/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, github-actions, java, kubernetes
Ambito
ci-cd, devops, testing

Direzione di ricerca

Start with the build-verify.yml package step around lines 52–53, then inspect tests/kuttl-test.yaml and tests/manifests/install-operator.yml to see how the test image is built, loaded and pulled. Check whether the pushed e2e image is used elsewhere, then adjust the CI and image pull behavior so fork PRs test their own image. Done when the kuttl e2e tests run successfully on fork and Dependabot PRs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

On pull requests from forks, the build-verify-package workflow fails at the step "Package container image for operator e2e tests". This step builds the operator image, then logs in to Quay and pushes it as quay.io/microcks/microcks-operator:e2e-tests (build-verify.yml L52-53). GitHub does not pass repository secrets to PRs from forks, so the Quay username is empty and docker login fails. Because of this, the kuttl e2e tests never run on PRs from forks. Dependabot PRs fail at the same step.

Expected behavior

The e2e tests run on every PR, including PRs from forks.

Actual behavior

The step fails with Error: Cannot perform an interactive login from a non TTY device, and the e2e steps are skipped. The build and unit tests before it pass. For example #306 and #331.

How to Reproduce?

Open any PR from a fork and look at the build-verify-package run.

Microcks version or git rev

main @ 4d74e9f

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

operator (CI)

Additional information

The push may not be needed. kuttl already loads the image into the kind cluster (kindContainers in tests/kuttl-test.yaml), but tests/manifests/install-operator.yml sets imagePullPolicy: Always, so the pod pulls the image from Quay instead of using the loaded one. A possible fix is to remove the login and push and set imagePullPolicy: IfNotPresent. Only removing the push would not be enough: with Always, fork PRs would test the last image pushed to Quay instead of their own code.

Is the pushed e2e-tests image used for anything else? If not, I'm happy to send a PR.

I used AI tools while working on this and verified everything myself.

Lingua principale
Java
Stelle
14
Fork
13
Merge medio
23m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microcks/microcks-operator

Tutte le issue di microcks/microcks-operator

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.