Repository navigation
fix: validate checkpoint SubType constraints - #851
Draft
OKAN-SOFTWARE wants to merge 3 commits into
Draft
OKAN-SOFTWARE wants to merge 3 commits into
OKAN-SOFTWARE wants to merge 3 commits into
Conversation
This branch has not been 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
Fixes #836.
Description of changes
This PR brings the Python local checkpoint server's
OperationUpdate.SubTypevalidation into alignment with the AWS service model.Previously, the local runner could accept subtype values that the AWS service rejects. Consequently, an execution could pass locally but fail when deployed.
Changes implemented:
OperationUpdate.SubTypebefore applying checkpoint updates.[a-zA-Z0-9-_]+pattern.ValidationExceptionwith the invalid value, its 1-based update position, and the violated constraint.FAILED.Root cause and design
The checkpoint validator previously checked operation-state consistency without enforcing the service-model constraints on
SubType.The fix adds validation at the shared checkpoint entry point, protecting requests regardless of how they were constructed.
The in-memory service client also needed to handle the new validation exception consistently with the production client. Without this handling, the local runner retried invalid checkpoint requests until execution timeout instead of treating them as unrecoverable failures.
Scope and design decisions:
SubType, as requested in [Testing]: Local checkpoint server accepts a SubType the service rejects #836.ValidationExceptionrepresents the service's HTTP 400 response.The design follows the service constraints described in #836. Maintainer feedback on the approach is welcome; prior design approval was not obtained.
Regression coverage
Tests cover:
Validation results
git diff --check— passed.The Python testing-package run produced two deprecation warnings but no test failures.
CI status
The upstream Python package, JavaScript examples, and cloud test workflows currently report
action_required. Their results are pending; these statuses should not be interpreted as passing tests.Review status
This PR remains a draft pending outstanding CI and cross-language verification and maintainer design feedback.
Contribution checklist
SubTypevalidation.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.