Skip to content
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

How to report bug in StepFunctionsLocal.jar ? #6846

Closed
anentropic opened this issue Mar 16, 2024 · 3 comments
Closed

How to report bug in StepFunctionsLocal.jar ? #6846

anentropic opened this issue Mar 16, 2024 · 3 comments
Labels
blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days

Comments

@anentropic
Copy link

I know that users of SAM may also be users of the StepFunctionsLocal.jar mock server as recommended in the SAM docs

The tool itself doesn't seem to be on GitHub and the docs don't provide any link where to report bugs?

Do the SAM team have any contact with the authors of that tool within AWS?

I was getting this error when trying to execute my statemachine:

[400] StartExecution <= Invalid State Machine Definition: 'Parse error: State Machine contained a syntax error.'

There are some obvious problems with this error (and error logging by that tool generally):

  • no stack trace
  • no line number or context for where in my statemachine definition the "syntax error" exists

I had to decompile the jar in order to attach a debugger (painful)

Catching the error in JDB allows to see the real problem:

e.getMessage() = "Unrecognized field "ProcessorConfig" (class com.amazonaws.stepfunctions.local.model.definition.states.BranchDefinition), not marked as ignorable (3 known properties: "States", "StartAt", "Comment"])
    at [Source: (String)"{"StartAt": "Invoke-PreparePartitionsLambda", "States": {"Invoke-PreparePartitionsLambda": {"Next": "Partitions-Map", "Retry": [{"ErrorEquals": ["Lambda.ClientExecutionTimeoutException", "Lambda.ServiceException", "Lambda.AWSLambdaException", "Lambda.SdkClientException"], "IntervalSeconds": 2, "MaxAttempts": 6, "BackoffRate": 2}], "Type": "Task", "ResultSelector": {"partitioned.$": "$.Payload"}, "Resource": "arn:aws:states:::lambda:invoke", "Parameters": {"FunctionName": "ETLPreparePartiti"[truncated 1518 chars]; line: 1, column: 853] (through reference chain: com.amazonaws.stepfunctions.local.model.definition.WorkflowDefinition["States"]->java.util.LinkedHashMap["Partitions-Map"]->com.amazonaws.stepfunctions.local.model.definition.states.MapStateDefinition["ItemProcessor"]->com.amazonaws.stepfunctions.local.model.definition.states.BranchDefinition["ProcessorConfig"])"

OK, so it's in my Map state, which necessarily has an ItemProcessor, and the serializer code in the tool is not expecting to see a ProcessorConfig key in the ItemProcessor

Looking at the decompiled sources I can see that com.amazonaws.stepfunctions.local.model.definition.states.MapStateDefinition defines ItemProcessor as a BranchDefinition which is a non-specific type that lacks implementation for the ProcessorConfig field which is documented here

When I define the state via CDK the ProcessorConfig field is always generated, it's not something I can omit myself

At the moment it looks like I have to do some post-processing of the ASL definition generated by CDK to filter out the unsupported field before forwarding it to the mock server for creation

Apologies for the off-topic issue, just trying to find any way of getting in touch with the devs of this otherwise super useful tool! Even if there's license issues or something that prevent it being published to GitHub it'd be great if some kind of issue tracker could be provided.

@anentropic anentropic added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Mar 16, 2024
@mildaniel
Copy link
Contributor

Hi @anentropic, thanks for reporting. Unfortunately, this seems like this isn't related to the AWS SAM CLI and there isn't much we can do here. I recommend reaching out to AWS support for any non-open source issues you may have.

@mildaniel mildaniel added blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Mar 20, 2024
@hnnasit
Copy link
Contributor

hnnasit commented Apr 16, 2024

Closing as this has been inactive for a while and it does not seem to be related to SAM CLI. Feel free to open a new issue if you have any questions/concerns.

@hnnasit hnnasit closed this as completed Apr 16, 2024
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days
Projects
None yet
Development

No branches or pull requests

3 participants