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

feat+fix(engine): Implement resource identifiers module + fix Temporal clashing workflow ID #174

Merged
merged 5 commits into from
Jun 16, 2024

Conversation

daryllimyt
Copy link
Contributor

@daryllimyt daryllimyt commented Jun 16, 2024

Features

  • Implement (revamped utils) identifiers module, which contains a suite of methods, types, and validators for Tracecat resource identifiers.
    • We leverage pydantic's StringConstraint with regex + typing.Annotated to achieve runtime pattern checking
    • Also contains method to create action keys/refs and workflow run ids etc.
  • Add ResourcePrefix to centralize all resource class identifiers

Changes

  • Align our world view with Temporal - we distinguish between workflow, workflow execution (a running workflow instance), and workflow runs (a try/attempt of a running instance).
    • See updated contexts.RunContext

Testing

  • Updated tests to use a fixed test id, workflow tests passing

@daryllimyt daryllimyt self-assigned this Jun 16, 2024
@github-actions github-actions bot added the enhancement New feature or request label Jun 16, 2024
@topher-lo topher-lo marked this pull request as ready for review June 16, 2024 18:19
Copy link
Contributor

@topher-lo topher-lo left a comment

Choose a reason for hiding this comment

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

Would prefer if gen_id was generate_id

…ry + distinguish between workflow execution and run
@daryllimyt daryllimyt merged commit 1424f42 into main Jun 16, 2024
2 checks passed
@daryllimyt daryllimyt deleted the fix/workflow-id-concurrency-clash branch June 16, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants