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

Build docker on PRs, and inline docker GHA config #584

Merged
merged 6 commits into from
Nov 20, 2023
Merged

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Nov 20, 2023

The latest release's CI hung. It's spent over 3 hours doing a docker build, and I've no idea why: https://github.com/matrix-org/sydent/actions/runs/6932931412

To try to debug this I tried:

  • poetry install -vv. I don't think this made much difference to the logs that were generated. Might need -vvv, or a newer Poetry version? (This repo uses 1.2.x in CI, I think.)
  • copying the CI config that matrix-org/sliding-sync uses for building docker images. Somehow this seemed to work!?! I don't understand why. It's not doing that much different to what was running before, though we do use newer versions of some docker-related actions.

I'd like to try this on main to see if the docker build magically becomes fast again.

David Robertson added 5 commits November 20, 2023 19:33
This config seemed to build arm wheels much more quickly and I've no
idea why!?!!
@DMRobertson DMRobertson changed the title Docker: poetry install verbosely Build docker on PRs, and inline docker GHA config Nov 20, 2023
@DMRobertson DMRobertson marked this pull request as ready for review November 20, 2023 20:04
@DMRobertson DMRobertson requested a review from a team as a code owner November 20, 2023 20:04
@@ -26,7 +26,7 @@ COPY --chown=sydent:sydent ["sydent", "sydent"]
COPY --chown=sydent:sydent ["README.rst", "pyproject.toml", "poetry.lock", "./"]

# Install dependencies
RUN python -m poetry install --no-dev --no-interaction --extras "prometheus sentry"
RUN python -m poetry install -vv --no-dev --no-interaction --extras "prometheus sentry"
Copy link
Member

Choose a reason for hiding this comment

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

Do you still want the -vv here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thinking was to leave it in as it can't do any harm.

@@ -59,6 +59,22 @@ jobs:
packaging:
uses: "matrix-org/backend-meta/.github/workflows/packaging.yml@v1"

docker:
# Sanity check that we can build the x64 image
Copy link
Member

Choose a reason for hiding this comment

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

Just x64 because arm is slow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my thinking, yeah.

@DMRobertson DMRobertson merged commit 7efe9b5 into main Nov 20, 2023
9 checks passed
@DMRobertson DMRobertson deleted the dmr/docker-debug branch November 20, 2023 20:17
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.

2 participants