The Wayback Machine - https://web.archive.org/web/20260409105906/https://github.com/docker/compose/pull/13653
Skip to content

refactor: thread context through publish sensitive data check#13653

Merged
glours merged 1 commit intodocker:mainfrom
ishwar170695:refactor/thread-ctx-publish
Mar 23, 2026
Merged

refactor: thread context through publish sensitive data check#13653
glours merged 1 commit intodocker:mainfrom
ishwar170695:refactor/thread-ctx-publish

Conversation

@ishwar170695
Copy link
Copy Markdown
Contributor

composeFileAsByteReader used context.TODO() as a placeholder, severing
cancellation propagation. If the parent context is cancelled (e.g. Ctrl+C),
the loader call would continue running.

Threads the real ctx through preChecks -> checkForSensitiveData -> composeFileAsByteReader. No behavioral change.

Signed-off-by: Ishwar <ishwarcm@iitbhilai.ac.in>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes context cancellation propagation during the publish pre-checks by threading the caller’s ctx through the sensitive-data scan path, replacing a context.TODO() placeholder so that a cancelled publish can properly stop loader work.

Changes:

  • Pass ctx from publish into preChecks.
  • Thread ctx through checkForSensitiveData into composeFileAsByteReader.
  • Use the real ctx in loader.LoadWithContext instead of context.TODO().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

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

LGTM

@glours glours enabled auto-merge (rebase) March 23, 2026 11:04
@glours glours merged commit b18354b into docker:main Mar 23, 2026
42 of 43 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ishwar170695 ishwar170695 deleted the refactor/thread-ctx-publish branch March 23, 2026 11:20
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.

3 participants