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

add endpoint spec to get events from a test run #2255

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

mathnogueira
Copy link
Member

@mathnogueira mathnogueira commented Mar 27, 2023

This PR adds the openAPI spec to get events generated from a test run. The model is based on diagram on #2040

classDiagram
    Event <|-- DataStoreConnection
    Event <|-- Polling
    Event <|-- Output
    Event : string type
    Event : enum[trigger, trace, test] stage
    Event : string description
    Event : date created_at
    Event : string test_id
    Event : string run_id

    class DataStoreConnection{
      DataStoreTestConnection info
    }

    class Polling{
      int number_of_spans
      int iteration_number
      string reason_of_next_iteration
      boolean is_complete
    }

    class Output{
      string warning
      string error
      string output_name
    }
Loading

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@mathnogueira mathnogueira linked an issue Mar 27, 2023 that may be closed by this pull request
PollingInfo:
type: object
properties:
numberSpans:
Copy link
Collaborator

Choose a reason for hiding this comment

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

can these properties be generalized in a way that's not so tied to the timing profile? Meaning: right now, we only support time based polling profile, but we know we'll support different strategies in the near future. Is there a way we could model this so it's more "polymorphic"?

Copy link
Member Author

Choose a reason for hiding this comment

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

we could add a type field and then add objects to represent each type, would that be enough?

Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense, that's the approach we took on all similar situations

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Comment on lines +51 to +52
- warning
- error
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include a info type?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's worth unless we want to show in the event log what are the values for each output after they were resolved. @xoscar what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the info type is not something we'll be using in the near future so I think its fine to not have it

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, makes sense @mathnogueira

Copy link
Collaborator

@xoscar xoscar left a comment

Choose a reason for hiding this comment

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

The team comments make sense, other than that this LGTM!

@xoscar
Copy link
Collaborator

xoscar commented Mar 27, 2023

Actually, can we consider adding the specs for this as well? #2183

@mathnogueira
Copy link
Member Author

Actually, can we consider adding the specs for this as well? #2183

added it

@mathnogueira mathnogueira merged commit 100915b into main Mar 28, 2023
@mathnogueira mathnogueira deleted the feat/error-handling-openapi branch March 28, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Error Handling] Open API Specs
5 participants