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: location info for journey and step #474

Merged
merged 2 commits into from
Mar 21, 2022
Merged

Conversation

vigneshshanmugam
Copy link
Member

  • Part of New push command to sync with monitor management #470
  • Adds Location metadata to the Journey and Step DSL which can be used for formatting the error location and pinpointing to the exact source on the test files. Location metadata is not used anywhere as it lays the foundation for pushing journeys to the monitor management. Will be used in the subsequent PR's.
  • Sourcemap data was broken due to the discrepancies between ts-node which we use to transpile the journey files on the fly and the source-map-support library as both were looking in different places for the original source-maps. ts-node moved to a forked version of the library. More details here - Improvements and bugfixes compared to source-map-support cspotcode/node-source-map-support#24

@apmmachine
Copy link

apmmachine commented Mar 21, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-03-21T21:02:37.846+0000

  • Duration: 13 min 19 sec

Test stats 🧪

Test Results
Failed 0
Passed 149
Skipped 2
Total 151

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM, tested locally

@vigneshshanmugam vigneshshanmugam merged commit 17f7bc7 into main Mar 21, 2022
@vigneshshanmugam vigneshshanmugam deleted the location-info branch March 21, 2022 21:27
Copy link
Contributor

@lucasfcosta lucasfcosta left a comment

Choose a reason for hiding this comment

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

I know this has already been merged, but just wanted to acknowledge I've had a look at it given how important it is for further refinement for the push command.

@@ -315,3 +321,36 @@ export function parseNetworkConditions(args: string): NetworkConditions {

return networkConditions;
}

// default stack trace limit
const dstackTraceLimit = 10;
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 allow setting this value through an environment variable as Jest and others do?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, interesting point. Do you think it provides value? In the past, I had used them when V8 async promise stack trace was not done correctly and even if you do increase the stack trace limit, its only going to show the Jest stack traces which seems not so useful to me. WDYT?

Copy link
Contributor

@lucasfcosta lucasfcosta Mar 23, 2022

Choose a reason for hiding this comment

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

I've previously used this on Deno and I use a similar option to debug errors on test diffs, although that's not exactly a stack trace, it's similar.

I don't think it's a very important change, it just came to mind because it was helpful for me in the past, although in very very few situations.

Also, even if it shows our stack frames, it could be useful to help users report bugs to us (that is, if we don't cut our stack frames straightaway).

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, if its useful let's do it. Let me follow up with a PR.

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.

4 participants