Skip to content

Added log event when automations beta flag is enabled#28810

Merged
cmraible merged 1 commit into
mainfrom
codex/log-automations-beta-flag
Jun 22, 2026
Merged

Added log event when automations beta flag is enabled#28810
cmraible merged 1 commit into
mainfrom
codex/log-automations-beta-flag

Conversation

@cmraible

@cmraible cmraible commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

refs https://linear.app/ghost/issue/NY-1272/set-up-automations-dashboards-in-elastic

Summary

  • Added a structured server log when the automations beta flag is enabled
  • Kept the log limited to the off-to-on transition
  • Added unit coverage for enabled, already-enabled, and disabled cases

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The SettingsBREADService gains an AUTOMATIONS_LABS_FLAG constant and a parseLabsValue helper that normalizes the labs setting into an object regardless of whether it is falsy, a JSON string, or unparseable. A new _shouldLogAutomationsEnabled(settings) method compares the incoming labs value against the current state from this.labs.getAll() and returns true only when the automations flag transitions to enabled. The edit() method calls this check and conditionally emits an automations.beta_flag_enabled info log. Three unit tests cover the transition, already-enabled, and disabled cases.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description is directly related to the changeset, explaining the logging implementation, its scope, test coverage, and linear issue reference.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The pull request title accurately captures the main change: adding a log event when the automations beta flag is enabled, which aligns with the implementation of logging behavior in the SettingsBREADService and corresponding unit tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/log-automations-beta-flag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cmraible cmraible marked this pull request as ready for review June 22, 2026 22:51
@nx-cloud

nx-cloud Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 68595fd

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 19s View ↗
nx run ghost:test:ci:integration:no-coverage ✅ Succeeded 2m 21s View ↗
nx run ghost:test:ci:legacy ✅ Succeeded 2m 48s View ↗
nx run ghost:test:ci:e2e ✅ Succeeded 2m 29s View ↗
nx run ghost:test:ci:e2e:no-coverage ✅ Succeeded 2m 11s View ↗
nx build @tryghost/signup-form ✅ Succeeded <1s View ↗
nx build @tryghost/portal ✅ Succeeded <1s View ↗
nx build @tryghost/admin-toolbar ✅ Succeeded <1s View ↗
Additional runs (10) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-06-22 23:44:34 UTC

@cmraible cmraible force-pushed the codex/log-automations-beta-flag branch 2 times, most recently from aeb3109 to 68595fd Compare June 22, 2026 23:32
no ref

- automations beta enablement is one-way, so logging the transition makes rollout activity visible in server logs
@cmraible cmraible force-pushed the codex/log-automations-beta-flag branch from 68595fd to 32f242a Compare June 22, 2026 23:36
@cmraible cmraible enabled auto-merge (squash) June 22, 2026 23:44
@cmraible cmraible disabled auto-merge June 22, 2026 23:44
@cmraible cmraible changed the title Added log for automations beta flag Added log event when automations beta flag is enabled Jun 22, 2026
@cmraible cmraible enabled auto-merge (squash) June 22, 2026 23:44
@cmraible cmraible merged commit af0c503 into main Jun 22, 2026
49 checks passed
@cmraible cmraible deleted the codex/log-automations-beta-flag branch June 22, 2026 23:53
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