Skip to content

Step Functions: Improve Logging and Error Detection for Unsupported Service Integrations #12223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 10, 2025

Conversation

MEPalma
Copy link
Contributor

@MEPalma MEPalma commented Feb 3, 2025

Motivation

Currently, the Step Functions V2 interpreter does not check nor log unsupported API actions for supported optimized service integrations at creation time, leading to a lack of visibility for users (#12210). Additionally, when a boto schema for the request and/or return type is unavailable, the normalization logic proceeds without logging the issue, leading to misleading error messages for unsupported api actions (#12210). Similarly, unsupported service tasks are only checked at runtime, which delays error detection.

Changes

  • Added cheking and logging for unsupported API actions for optimized service integrations at creation time.
  • Improved normalization logic for boto types by logging incidents when schemas are unavailable.
  • Enhanced logging for fully unsupported service tasks at creation time, making error detection more consistent with the now other creation error events.
  • Added snapshot tests for unsupported API actions
  • Fixed DynamoDB snapshot tests that were now aws validated

@MEPalma MEPalma added the semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases label Feb 3, 2025
@MEPalma MEPalma added this to the 4.2 milestone Feb 3, 2025
@MEPalma MEPalma requested review from joe4dev and gregfurman February 3, 2025 17:32
@MEPalma MEPalma self-assigned this Feb 3, 2025
@localstack-bot
Copy link
Collaborator

Currently, only patch changes are allowed on master. Your PR labels (semver: minor) indicate that it cannot be merged into the master at this time.

Copy link

github-actions bot commented Feb 3, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 51m 52s ⏱️ -29s
4 093 tests +2  3 777 ✅ +2  316 💤 ±0  0 ❌ ±0 
4 095 runs  +2  3 777 ✅ +2  318 💤 ±0  0 ❌ ±0 

Results for commit 40b0b19. ± Comparison against base commit b4acd16.

This pull request removes 3 and adds 5 tests. Note that renamed tests count towards both.
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_put_delete_item
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_put_get_item
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_put_update_get_item
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_base_integrations[DYNAMODB_PUT_DELETE_ITEM]
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_base_integrations[DYNAMODB_PUT_GET_ITEM]
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_base_integrations[DYNAMODB_PUT_QUERY]
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_base_integrations[DYNAMODB_PUT_UPDATE_GET_ITEM]
tests.aws.services.stepfunctions.v2.services.test_dynamodb_task_service.TestTaskServiceDynamoDB ‑ test_invalid_integration

♻️ This comment has been updated with latest results.

@MEPalma MEPalma added semver: patch Non-breaking changes which can be included in patch releases semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases and removed semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases semver: patch Non-breaking changes which can be included in patch releases labels Feb 5, 2025
Copy link
Contributor

@gregfurman gregfurman left a comment

Choose a reason for hiding this comment

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

LGTM 👍 This looks great, Marco! One or two small grammar suggestions for comments but feel free to ignore.

def from_state_props(self, state_props: StateProps) -> None:
super().from_state_props(state_props=state_props)
def _validate_service_integration_is_supported(self):
# As no aws-sdk support catalog is available, let invalid aws-sdk integration to fail at runtime.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: spelling

Suggested change
# As no aws-sdk support catalog is available, let invalid aws-sdk integration to fail at runtime.
# As no aws-sdk support catalog is available, allow invalid aws-sdk integration to fail at runtime.

@@ -25,6 +25,10 @@ class StateTaskServiceUnsupported(StateTaskServiceCallback):
def __init__(self):
super().__init__(supported_integration_patterns=_SUPPORTED_INTEGRATION_PATTERNS)

def _validate_service_integration_is_supported(self):
# Attempts to execute any derivation logging this incident on creation.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: grammar

Suggested change
# Attempts to execute any derivation logging this incident on creation.
# Attempts to execute any derivation; logging this incident on creation.

@MEPalma MEPalma merged commit 35cd175 into master Feb 10, 2025
31 checks passed
@MEPalma MEPalma deleted the MEP-sfn-vaidate_service_integration_on_creation branch February 10, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants