Skip to content

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented Jun 10, 2025

This change blocks the start of uwsgi, celerybeat, and celeryworker until initializer is not completed_successfully. This is useful for:

  • avoiding errors in uwsgi, celerybeat, and celeryworker during start-up when the db is not ready
  • make it easier to identify errors with initializer (they might get easily lost within other logs).

@kiblik kiblik marked this pull request as ready for review June 10, 2025 17:26
@kiblik kiblik requested review from Maffooch and mtesauro as code owners June 10, 2025 17:26
Copy link

DryRun Security

No security concerns detected in this pull request.


All finding details can be found in the DryRun Security Dashboard.

Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

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

Cool! What happens when there is an error in the initializer? I guess it just fails with an error and the other containers are never started?

@valentijnscholten valentijnscholten added this to the 2.48.0 milestone Jun 11, 2025
@kiblik
Copy link
Contributor Author

kiblik commented Jun 11, 2025

Cool! What happens when there is an error in the initializer? I guess it just fails with an error and the other containers are never started?

Exactly (well, except psql and redis - they do not use dependency, so they would still be running)

For testing, I changed models.py, did not prepare migrations, initializer failed, and the whole process of startup stopped (docker did not touch uwsgi, nginx or celery*). This was the last message before coming back to bash.

service "initializer" didn't complete successfully: exit 1

@Maffooch Maffooch requested a review from dogboat June 12, 2025 00:05
@mtesauro
Copy link
Contributor

Excellent work here 🚀

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@mtesauro mtesauro merged commit 6b0f0c5 into DefectDojo:dev Jun 12, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants