Skip to content

refactor: thread context through publish sensitive data check#13653

Open
ishwar170695 wants to merge 1 commit intodocker:mainfrom
ishwar170695:refactor/thread-ctx-publish
Open

refactor: thread context through publish sensitive data check#13653
ishwar170695 wants to merge 1 commit intodocker:mainfrom
ishwar170695:refactor/thread-ctx-publish

Conversation

@ishwar170695
Copy link

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

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.

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.

2 participants