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

Open
#332 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, github-actions, java, kubernetes
Domain
ci-cd, devops, testing

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
14
Forks
13
Avg merge
23m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microcks/microcks-operator

All issues in microcks/microcks-operator

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.