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

Skipped test building of docker image on push #1833

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bmispelon
Copy link
Member

The image will actually get built (and published) anyway.

The image will actually get built (and published) anyway.
@bmispelon
Copy link
Member Author

@tobiasmcnulty does that make sense? Or am I missing a usecase for testing the build before actually publishing it?

@tobiasmcnulty
Copy link
Member

@bmispelon Good catch. I agree it would be nice to remove the duplicate build of the Docker image with the production/deployed requirements file.

This change would no longer test the Docker build with test requirements after a PR is merged (relevant only if the offending PR was not updated to latest main before merging). That may be an edge case not worth worrying about.

In the future, maybe the two files could be consolidated to eliminate the duplicate build, but still always test both builds on pushes to main?

@bmispelon
Copy link
Member Author

This change would no longer test the Docker build with test requirements after a PR is merged (relevant only if the offending PR was not updated to latest main before merging). That may be an edge case not worth worrying about.

Ah right, good point. That does seem to be quite the edge case, plus as it turns out our instructions for testing in docker haven't been working for a while (#1817 )

In the future, maybe the two files could be consolidated to eliminate the duplicate build, but still always test both builds on pushes to main?

That's an interesting idea: test the build with the tests.txt requirements then build+publish the one with prods.txt? I could file a new ticket for that.

@tobiasmcnulty
Copy link
Member

This change would no longer test the Docker build with test requirements after a PR is merged (relevant only if the offending PR was not updated to latest main before merging). That may be an edge case not worth worrying about.

Ah right, good point. That does seem to be quite the edge case, plus as it turns out our instructions for testing in docker haven't been working for a while (#1817 )

Interesting, maybe we could test this flow in CI, too. I vaguely recall thinking about that at DjangoCon and then running out of time and/or steam. 😅

In the future, maybe the two files could be consolidated to eliminate the duplicate build, but still always test both builds on pushes to main?

That's an interesting idea: test the build with the tests.txt requirements then build+publish the one with prods.txt? I could file a new ticket for that.

That should work. I think it could still be a matrix build so they both happen at the same time.

Another option would be to keep the workflow files separate (maybe better if we want CI to run tests in Docker too?), but add a variable to push only if the branch is main.

Anyways, I think this is good, thanks! 👍🏻

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