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

Fix transaction run reporting #2617

Merged
merged 3 commits into from May 30, 2023
Merged

Fix transaction run reporting #2617

merged 3 commits into from May 30, 2023

Conversation

danielbdias
Copy link
Contributor

@danielbdias danielbdias commented May 30, 2023

This PR fixes the transaction run reporting that sometimes can be shown incorrectly to the user on both FE and CLI.

Context: https://www.loom.com/share/581dbc852ef140bc9dc150977cc08c5b
Test against OTel demo: https://www.loom.com/share/58ca611ad27c47248cd4221fca5770f4

Changes

  • Added guard clause on CLI to avoid fatal errors on test formatting
  • Fixed GetTransactionRunSteps query to return steps in the correct order
  • Added support to ExitCLI on test run actions allowing us to debug CLI e2e tests on Test Run (tests to be added in another PR)

Fixes

Checklist

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes on this file are unrelated to the PR's main objective, but they can help us in the future.
We are changing all calls to os.Exit here to a cliExit function to help us to mock os.Exit calls (which we use to debug CLI e2e tests).

@@ -31,7 +31,7 @@ var testRunCmd = &cobra.Command{
environmentOptions := append(baseOptions, actions.WithClient(utils.GetResourceAPIClient("environments", cliConfig)))
environmentActions := actions.NewEnvironmentsActions(environmentOptions...)

runTestAction := actions.NewRunTestAction(cliConfig, cliLogger, client, environmentActions)
runTestAction := actions.NewRunTestAction(cliConfig, cliLogger, client, environmentActions, ExitCLI)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@schoren schoren left a comment

Choose a reason for hiding this comment

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

LGTM! the loom was a great explanation of the issue and fix!

@danielbdias danielbdias merged commit e02077a into main May 30, 2023
27 checks passed
@danielbdias danielbdias deleted the fix/test-formatting branch May 30, 2023 13:05
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.

None yet

2 participants