threadheap / serverless-ide-vscode

Serverless IDE: Enhanced support for AWS SAM and CloudFormation in VS Code
https://serverless-ide.com/
195 stars 45 forks source link

"Unexpected property destinations" when setting failure destinations for kinesis streams #169

Closed samskiter closed 1 year ago

samskiter commented 2 years ago

Code (copied from the above documentation link):

functions:
  preprocess2:
    handler: handler.preprocess
    events:
      - stream:
          arn: arn:aws:kinesis:region:XXXXXX:stream/foo
          batchSize: 100
          maximumRetryAttempts: 10
          startingPosition: LATEST
          enabled: false
          destinations:
            onFailure:
              arn:
                Fn::GetAtt:
                  - MyQueue
                  - Arn
              type: sqs

The IDE: image

As this is clearly a supported feature of serverless, I would not expect the serverless IDE to generate an error for this setup

As above

KillDozerX2 commented 2 years ago

I think this might a schema issue for serverless. @pavelvlasov I noticed you have your own schema for serverless. You could use the one from schema store.

pavelvlasov commented 1 year ago

Hey @KillDozerX2! Thanks for the suggestion. Unfortunately using schema from the schema store would break inline documentation. I'm thinking in favor of removing validation from future releases, as I don't have enough resources to maintain it in a good shape and just keep and autocomplete / documentation part.

Anyway, the issue should be resolved in the next release.

KillDozerX2 commented 1 year ago

if you want, I can maintain a fork for serverless framework. But would require some knowledge transfer.

pavelvlasov commented 1 year ago

@KillDozerX2 that's not a bad idea 👍 It would require adding a "description" field to the entities in the schema, like here (maybe even extending the existing one instead of the fork) and making sure the new schema does not break anything in the plugin logic.

KillDozerX2 commented 1 year ago

I actually maintain the schema, so it should be okay for me to do it. I will look into what you suggested. Thanks

pavelvlasov commented 1 year ago

@KillDozerX2 awesome! Let me know if you made any progress on it and, I can check if the change of the schema does not break anything.