sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Add `IntegrationExecutionContext.stepMetadata` and propagate custom config type data

Open aiwilliams opened this issue 3 years ago • 2 comments

Improved the IntegrationStep and IntegrationInvocationConfig type definitions to allow for expressing the type of the IntegrationExecutionConfig that is returned from loadExecutionConfig and passed to executionHandler functions.

This can be a patch release. The type parameters are optional.

aiwilliams avatar Sep 17 '22 04:09 aiwilliams

  • TInstanceConfig represents the instance configuration and TExecutionConfig represents the result of loadExecutionConfig. Most of the changes are related to propagating this information throughout the code.
  • I thought it worthwhile to rename TConfig and TIntegrationConfig to make them the same value, and figured TInstanceConfig was the clearest choice.
  • I added an additional fixture for an integration that leverages these types while keeping the simpler, existing fixture integration to ensure that we are not required to provide these types when an integration doesn't have custom types.

aiwilliams avatar Sep 19 '22 16:09 aiwilliams

Do you believe this will be a non-breaking version?

I believe it should be non-breaking.

Can we help with the testing in handful of integrations?

That will be helpful to coordinate, yes!

I made some other changes last week that worked fine for a graph-* project to adopt (tests/build went fine for the integration) but didn't "just work" when deployed to production: https://jptrone.slack.com/archives/C0174AZA75J/p1663180832691149

I'll be sure to link a local build of these into the jupiter-managed-integration runtime package, but then it will be necessary to deploy an integration that adopts the versions to jupiterone-dev and make sure it works.

aiwilliams avatar Sep 19 '22 22:09 aiwilliams