feat: Adopt the flagsmith entrypoint#7901
Draft
khvn26 wants to merge 1 commit into
Draft
Conversation
Replace the bespoke startup sequencing in run-docker.sh with the composite verbs provided by the flagsmith-common `flagsmith` entrypoint: - run-docker.sh becomes a thin `exec flagsmith "$@"` shim, kept for callers that reference the script path or its verbs directly. - The image ENTRYPOINT is now `flagsmith`; the APPLICATION_LOGGERS default the shell script used to set moves to a Dockerfile ENV. - Startup verbs are driven by new settings built from the configured databases (FLAGSMITH_MIGRATE_DATABASES, FLAGSMITH_WAIT_FOR_MIGRATIONS_DATABASES, FLAGSMITH_STARTUP_COMMANDS). - The task processor task definition starts via `start task-processor` and no longer migrates on every task; migrations run once per deploy via the migration task. startPeriod drops from 120s to 30s for the faster boot. flagsmith-common is temporarily sourced from its branch until the verbs are released; revert to the PyPI release before merge (see pyproject TODO). beep boop
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7901 +/- ##
=======================================
Coverage 98.62% 98.62%
=======================================
Files 1487 1487
Lines 58493 58493
=======================================
Hits 57687 57687
Misses 806 806 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #7891.
Adopts the
flagsmithCLI entrypoint (from flagsmith-common) for container startup, replacing the bespoke sequencing inapi/scripts/run-docker.sh.run-docker.shis reduced to a backwards-compatible shim (exec flagsmith "$@"), so anything invoking the script path or its verbs keeps working.ENTRYPOINTis nowflagsmith;APPLICATION_LOGGERS(previously defaulted in the shell script) moves to a DockerfileENVso logging is unchanged.app/settings/common.pyfrom the databases actually configured.start task-processor.startPeriodraised to 120s in fix(infra): Task processor tasks killed during startup by health check #7887 is lowered to 30s in both the prod and staging task-processor definitions, which comfortably covers the new single-boot startup.How did you test this code?
End-to-end against a local environment, exercising each verb via the
flagsmithentrypoint:flagsmith migrate— waits for the DB, migrates the configured databases, creates the cache table.flagsmith serve— waits for the DB, starts the API;/health/livenessserved on:8000.flagsmith start task-processor— the new task-definition command; binds:8000and starts the worker threads.flagsmith migrate-and-serve— runs migrate, thenbootstrap(viaFLAGSMITH_STARTUP_COMMANDS), then serves.