Repository navigation
fix(core): don't poll or stream CloudWatch logs for local processing jobs - #6428
Open
AkshayShah03 wants to merge 1 commit into
Open
AkshayShah03 wants to merge 1 commit into
AkshayShah03 wants to merge 1 commit into
Conversation
…jobs In local mode the processing container runs to completion inside _start_new (the local client's create_processing_job), and the job only exists locally. Since aws#6369, Processor.run/ScriptProcessor.run with wait=True still went through logs_for_processing_job (the default logs=True), which tails CloudWatch via the boto session, or _wait_for_processing_job. Without AWS credentials or CloudWatch access that fails after the job has already succeeded. v2 avoided this through a no-op LocalSession.logs_for_processing_job, which the module-level helper now bypasses. Skip the wait for LocalSession, since the job is already complete. Relates to aws#5549
AkshayShah03
requested a deployment
to
manual-approval
October 10, 2026 15:29 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 10, 2026 15:29 — with
GitHub Actions
Waiting
AkshayShah03
requested a deployment
to
manual-approval
October 10, 2026 15:29 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: Relates to #5549
Description of changes:
In local mode, the processing container runs to completion inside
_start_new:LocalSagemakerClient.create_processing_jobcalls_LocalProcessingJob.start, which streams the container output until it exits and then marks the jobCompleted. The job only exists locally.Since #6369,
Processor.runandScriptProcessor.runwithwait=Truego through the module-levellogs_for_processing_job(the defaultlogs=True) or_wait_for_processing_job. The DescribeProcessingJob call from #5549 now goes to the local client.logs_for_processing_job, however, still tails CloudWatch through the session's boto session, so a local job fails after it has succeeded when there are no AWS credentials or no CloudWatch permissions.v2 avoided this through
LocalSession.logs_for_processing_job, a no-op that v3'sLocalSessionstill defines, but the module-level helper bypasses it.This change skips the wait for a
LocalSession, since the job is already complete. It usesisinstance(..., LocalSession)rather thangetattr(..., "local_mode"), so the existing tests that use plainMock()sessions keep exercising the wait paths.Testing:
ProcessorandScriptProcessorin local mode, each withlogs=Trueandlogs=False. All 4 fail before this change.tests/unit/test_processing.pyand the model monitor tests: 224 passed.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.