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

Containers created from gdcc/dataverse:unstable image do not work as expected #9769

Closed
GPortas opened this issue Aug 10, 2023 · 3 comments · Fixed by #9777
Closed

Containers created from gdcc/dataverse:unstable image do not work as expected #9769

GPortas opened this issue Aug 10, 2023 · 3 comments · Fixed by #9777
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers. D: DataverseInDocker Deliverable of running Dataverse within Docker
Milestone

Comments

@GPortas
Copy link
Contributor

GPortas commented Aug 10, 2023

What steps does it take to reproduce the issue?

Running the Dataverse containerized setup using a freshly pulled unstable Dataverse image through Docker compose. You will notice that the configbaker bootstrapping container will timeout before finishing configuring the Dataverse application.

Note after 08/10/23 containerization meeting:

It seems that an image was wrongly pushed to the Docker registry instead of the GitHub Container Registry. The problematic push seems to be: https://github.com/IQSS/dataverse/actions/runs/5813835717/job/15762398940

When does this issue occur?

On localhost envs and GitHub actions using the containers through the usual Docker Compose setup.

What happens?

Timeout during Dataverse container bootstrapping.

To whom does it occur (all users, curators, superusers)?

Developers and automation processes (GitHub actions).

Screenshots:

Timeout using a localhost Docker Compose setup:

unstable_docker_fail

Timeout on GitHub actions:

unstable_docker_fail_actions

Run: https://github.com/pdurbin/dataverse-api-test-runner/actions/runs/5820120434/job/15779838142

@GPortas GPortas added Component: Containers Anything related to cloudy Dataverse, shipped in containers. D: DataverseInDocker Deliverable of running Dataverse within Docker labels Aug 10, 2023
@pdurbin pdurbin moved this from ▶ SPRINT READY to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Aug 10, 2023
@pdurbin pdurbin self-assigned this Aug 10, 2023
@pdurbin
Copy link
Member

pdurbin commented Aug 10, 2023

For now I'm poking at this and leaving some notes here: https://dataverse.zulipchat.com/#narrow/stream/375812-containers/topic/.239769.20unstable.20images

@GPortas I believe that during the container meeting I said it's working for me. I confused myself. Without thinking, I had built the image locally with mvn -Pct clean package docker:run. When I pull the image down from Docker Hub with docker compose -f docker-compose-dev.yml up it doesn't work.

Here's the digest:

$ docker images gdcc/dataverse --digests
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
gdcc/dataverse unstable sha256:8dcef6d4166cc5b83aa94fb7c886e190fc70a1894cf489e52feb6b006371a673 1e19f9de87db 22 hours ago 739MB

It's failing with this...

dev_dataverse | org.glassfish.deployment.common.DeploymentException: CDI deployment failure:jakarta/servlet/Filter -- jakarta/servlet/Filter

...so I think a Payara 6 branch got into the unstable image (as we talked about in the meeting). The problematic pushed you linked to came from fedb103 which is a Payara 6 branch. As I said in Zulip, I'm having trouble linking up the sha256 digests though. The path from a push to a broken image on my desktop is not clear to me.

@pdurbin
Copy link
Member

pdurbin commented Aug 10, 2023

Anyway, regardless of my inability to trace this thing, is the following a problem?

# Depending on context, we push to different targets. Login accordingly.
- if: ${{ github.event_name != 'pull_request' }}
  name: Log in to Docker Hub registry

fedb103 is not a pull request. It's just a push to a branch. But it was problematic? And kicked off a run that pushed to Docker Hub? Do we need to tighten up this logic, perhaps? The line is here:

- if: ${{ github.event_name != 'pull_request' }}

@poikilotherm
Copy link
Contributor

Nice to see we are coming to the same conclusion here. Indeed, this line is the problem.

It's kind of easy to fix (simply detect if we are on develop / master in addition).

I would not alter the GHCR login thing to avoid double pushes. One from a PR, one from a push. Does that make sense?

poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 11, 2023
By ensuring pushes to Docker Hub are only executed for any
non-PR events when based on develop or master branch, we avoid
breaking the images on the Hub.
@poikilotherm poikilotherm mentioned this issue Aug 11, 2023
4 tasks
@pdurbin pdurbin linked a pull request Aug 11, 2023 that will close this issue
4 tasks
@pdurbin pdurbin removed their assignment Aug 11, 2023
@pdurbin pdurbin self-assigned this Aug 14, 2023
@pdurbin pdurbin moved this from ▶ SPRINT READY to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Aug 14, 2023
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 14, 2023
By ensuring pushes to Docker Hub are only executed when based on
develop or master branch, we avoid breaking the images on the Hub:
simply skip the deploy job on wrong pushed to branch.
@pdurbin pdurbin added this to the 6.0 milestone Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Containers Anything related to cloudy Dataverse, shipped in containers. D: DataverseInDocker Deliverable of running Dataverse within Docker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants