Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

PD-257019 sanitize execution name bug fix #843

Open
wants to merge 2 commits into
base: PD-257019-producer-async-fixes
Choose a base branch
from

Conversation

rishuyadavbv
Copy link
Contributor

What Are We Doing Here?

Execution name sanitization and unit test for stepfn

Here’s a more concise pointwise summary of the sanitizeExecutionName method:

  1. Purpose: Sanitizes execution names by replacing invalid characters and truncating length.

  2. Input Validation:

    • Throws IllegalArgumentException for null or empty strings.
  3. Trimming: Removes leading and trailing whitespace.

  4. Character Replacement: Replaces invalid characters (non-alphanumeric, non-hyphen, non-underscore) with underscores.

  5. Validity Check:

    • Throws IllegalArgumentException if the sanitized name is empty or consists only of underscores.
  6. Length Truncation: Truncates the sanitized name to the last 69 characters if it exceeds this length.

  7. Logging: Optionally logs the sanitized name if it differs from the original.

  8. Return: Returns the sanitized execution name.

Tests:

  • Added unit test for StepFunctionService to check all edge case scenarios

@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from PD-257019-producer-async-fixes to main November 4, 2024 12:05
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from main to master November 4, 2024 12:15
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from master to PD-257019-producer-async-fixes November 4, 2024 12:15
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from PD-257019-producer-async-fixes to master November 4, 2024 12:17
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from master to PD-257019-producer-async-fixes November 4, 2024 12:17
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from PD-257019-producer-async-fixes to master2 November 4, 2024 12:19
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from master2 to PD-257019-producer-async-fixes November 4, 2024 12:20
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from PD-257019-producer-async-fixes to master2 November 4, 2024 12:20
@nabajyotiDash-hub nabajyotiDash-hub changed the base branch from master2 to PD-257019-producer-async-fixes November 4, 2024 12:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant