Skip to content

feat: publish startup warnings for deployment checks - #4739

Merged
nijel merged 1 commit into
WeblateOrg:mainfrom
nijel:docker-checks
Sep 4, 2026
Merged

feat: publish startup warnings for deployment checks#4739
nijel merged 1 commit into
WeblateOrg:mainfrom
nijel:docker-checks

Conversation

@nijel

@nijel nijel commented Sep 4, 2026

Copy link
Copy Markdown
Member

Track actionable warnings per container in the shared data volume, refresh their heartbeat, and remove reports during orderly shutdown.

Track actionable warnings per container in the shared data volume, refresh their heartbeat, and remove reports during orderly shutdown.
@nijel nijel self-assigned this Sep 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T11:58:57.860712Z 91fb2de PR opened
🔒 Security Review Completed 2026-09-04T11:58:06.657810Z 91fb2de PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91fb2def20

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread start
echo "Starting Weblate $WEBLATE_VERSION..."

prepare_runtime_files
initialize_startup_warning_report "$@"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Start the heartbeat before long-running startup work

When startup takes more than five minutes—for example, while run_startup_maintenance performs a large migration—this initializes the only heartbeat before the warning-producing checks, but the heartbeat process is not started until start_supervisord at the end of runserver_main. The report therefore becomes stale and stops appearing in deployment checks during the slow startup, and another container's expiry cleanup can remove it. Start the helper earlier or refresh the heartbeat throughout pre-supervisor startup.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is not a big deal, in most cases the long startup is in the single container, so there will be nothing consuming the checks.

Comment thread start
WEBLATE_DOCKER_WARNING_HOSTNAME=${HOSTNAME:-unknown}
WEBLATE_DOCKER_WARNING_SERVICE=${WEBLATE_SERVICE:-all}
WEBLATE_DOCKER_WARNING_MESSAGES=
if ! mkdir -p "$WEBLATE_DOCKER_WARNING_REPORT"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the shared warning root group-writable

When the shared data volume is reused by containers running different arbitrary UIDs, as supported for OpenShift-style deployments, the first mkdir -p creates .docker-startup-warnings with the normal 0755 mode and ownership of that container's UID. A later container with another UID but the shared root group cannot create its report beneath that directory, so this path prints the initialization error and silently disables warning publication and stale-report cleanup. Create the shared root with group-write permissions consistent with /app/data before creating the per-container directory.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think we actually support such setups.

@nijel

nijel commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

To be merged after WeblateOrg/weblate#21455 so that we can actually test the container.

@nijel
nijel enabled auto-merge (rebase) September 4, 2026 13:57
@nijel
nijel merged commit 2b7d52e into WeblateOrg:main Sep 4, 2026
71 checks passed
@nijel
nijel deleted the docker-checks branch September 4, 2026 14:32
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.

1 participant