Skip to content

refactor!: Remove cross-region CWL routing from log config options - #1050

Merged
MarinMaksutaj merged 1 commit into
aws-deadline:mainlinefrom
MarinMaksutaj:revert-cross-region-cwl-routing
Aug 12, 2026
Merged

refactor!: Remove cross-region CWL routing from log config options#1050
MarinMaksutaj merged 1 commit into
aws-deadline:mainlinefrom
MarinMaksutaj:revert-cross-region-cwl-routing

Conversation

@MarinMaksutaj

@MarinMaksutaj MarinMaksutaj commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What was the problem/requirement? (What/Why)

#997 (a3ce25c) added cross-region CloudWatch Logs routing: the worker agent reads a region from the log configuration options and routes session logs to that region. This code is redundant: workers already route session logs to the home region by default today, so the extra region handling is not needed.

What was the solution? (How)

Remove the cross-region routing added in #997. This is mostly a revert, but not a pure one, which is why it is typed refactor! rather than revert:

Removed (from #997):

  • The region key in the log configuration options and all handling of it
  • Region parameter threading through construct_worker_log_config, LogConfiguration, and the CloudWatch Logs client creation in the entrypoint
  • The unit tests covering the region option

Kept (from #997):

  • The log_constants.py extraction (minus the region key). feat(mrf): Use region from log config options for cross-region CWL ro… #997 moved the log config option key constants out of log_sync/cloudwatch.py into a leaf module, which broke a module-level cyclic import chain (sessions/log_config -> log_sync/cloudwatch -> scheduler). A pure revert reintroduces that cycle and CodeQL flags it with 5 errors. cloudwatch.py re-exports the constants for backwards compatibility.

What is the impact of this change?

The worker agent no longer honors a region in the log configuration options; CloudWatch Logs clients use the default routing.

How was this change tested?

Unit tests (3047 passed), ruff check, ruff format, and mypy all pass.

Was this change documented?

No documentation changes needed; the removed option was not documented.

Is this a breaking change?

Yes.

BREAKING CHANGE: the worker agent no longer honors a region in the log configuration options; CloudWatch Logs clients use the default routing.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@MarinMaksutaj
MarinMaksutaj requested a review from a team as a code owner August 12, 2026 22:15
@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Aug 12, 2026
Comment thread src/deadline_worker_agent/log_sync/cloudwatch.py Fixed
Comment thread src/deadline_worker_agent/log_sync/cloudwatch.py Fixed
@MarinMaksutaj
MarinMaksutaj force-pushed the revert-cross-region-cwl-routing branch from 08ec7cf to e0083f3 Compare August 12, 2026 22:19
This reverts commit a3ce25c (aws-deadline#997),
keeping the log_constants.py extraction so the log config option key
constants stay in a leaf module and do not reintroduce a cyclic import.
This code is redundant: workers already route session logs to the home
region by default, so the region handling in the log config options is
not needed.

BREAKING CHANGE: the worker agent no longer honors a region in the log
configuration options.

Signed-off-by: MarinMaksutaj <19916629+MarinMaksutaj@users.noreply.github.com>
@MarinMaksutaj
MarinMaksutaj force-pushed the revert-cross-region-cwl-routing branch from e0083f3 to 4c9b055 Compare August 12, 2026 22:24
@MarinMaksutaj
MarinMaksutaj enabled auto-merge (squash) August 12, 2026 22:28
@@ -4,4 +4,3 @@

LOG_CONFIG_OPTION_GROUP_NAME_KEY = "logGroupName"
LOG_CONFIG_OPTION_STREAM_NAME_KEY = "logStreamName"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Release tooling will silently drop this breaking change from the CHANGELOG.

The commit subject is revert!: ..., but revert is not in allowed_tags in pyproject.toml:241-252. python-semantic-release ignores commits whose type is not in allowed_tags, so this commit will not produce a CHANGELOG entry and (on its own) will not trigger a version bump.

This is not hypothetical — every prior revert: commit in this repo is absent from CHANGELOG.md:

  • revert: Revert "chore: remove MANIFEST_REPORTING_FEATURE code (#855)" (#864)
  • revert: Revert "test(debug): add e2e pytest session timeout ... (#793)" (#813)

That matters more than usual here because the feature being removed was shipped and announced. CHANGELOG.md:20 (v0.31.0) says:

Cross-region CloudWatch Logs routing now uses the region specified in log configuration options, enabling proper log delivery for multi-region fleet configurations. (#997)

So as things stand, 0.31.0 advertises the feature, and the release that removes it says nothing — leaving users who configured a region log option with no signal that the agent has stopped honoring it. The BREAKING CHANGE: trailer in the commit body does not rescue this, since the commit type is filtered out before the trailer is considered.

Options, roughly in order of least churn:

  1. Retype the subject to an allowed tag that carries the semantics, e.g. fix!: or refactor!:, keeping the BREAKING CHANGE: trailer so it lands in the CHANGELOG.
  2. Add revert to allowed_tags (and probably patch_tags) if reverts should be first-class going forward — this also fixes the general case rather than just this PR.

Worth confirming against your release process which you prefer; either way the current subject means the removal ships unannounced.

@MarinMaksutaj MarinMaksutaj changed the title revert!: Remove cross-region CWL routing from log config options refactor!: Remove cross-region CWL routing from log config options Aug 12, 2026
@MarinMaksutaj
MarinMaksutaj disabled auto-merge August 12, 2026 22:38
@MarinMaksutaj
MarinMaksutaj enabled auto-merge (squash) August 12, 2026 22:40

@godobyte godobyte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please check prior revert PR and follow the revert commit convention. The title should show up as revert with the prior commit.

e.g. #813

@godobyte

Copy link
Copy Markdown
Contributor

Could you update PR description to follow the PR template.

@MarinMaksutaj
MarinMaksutaj disabled auto-merge August 12, 2026 22:56
@MarinMaksutaj
MarinMaksutaj enabled auto-merge (squash) August 12, 2026 22:57
@MarinMaksutaj
MarinMaksutaj disabled auto-merge August 12, 2026 22:57
@MarinMaksutaj
MarinMaksutaj enabled auto-merge (squash) August 12, 2026 22:57
@MarinMaksutaj
MarinMaksutaj disabled auto-merge August 12, 2026 22:58
@MarinMaksutaj
MarinMaksutaj merged commit 553ed6c into aws-deadline:mainline Aug 12, 2026
38 checks passed
@MarinMaksutaj
MarinMaksutaj deleted the revert-cross-region-cwl-routing branch August 12, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants