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

[DYN-3343] Automatically add loaded packages as crash detail #11500

Merged
merged 59 commits into from
Feb 23, 2021

Conversation

Astul-Betizagasti
Copy link
Contributor

Purpose

Automatically include loaded packages information when creating a crash report as a Github Issue through Dynamo

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

Aaron Tang (@QilongTang )

FYIs

Alfredo Pozo (@alfredo-pozo )

Astul-Betizagasti and others added 30 commits July 6, 2020 17:48
Master update from public repo
@QilongTang
Copy link
Contributor

@Astul-Betizagasti I noticed your fork head is not clean, you may want to clean your master in the future before creating the branch on your fork

@Astul-Betizagasti
Copy link
Contributor Author

@QilongTang @aparajit-pratap, Just pushed changes that should address all the previous comments, let me know what you think, thanks.

@Astul-Betizagasti
Copy link
Contributor Author

All changes made, here are some gifs showing the behavior:
No packages
packages1

Some loaded packages
packages2

In the case that @mjkkirschner mentioned, when the package loader is null, the behavior will be similar to the first gif but it will say "(Fill in here)" instead of "No packages where found."

@QilongTang
Copy link
Contributor

QilongTang commented Feb 19, 2021

LGTM with one last comment

}
else
{
markdownText = "No loaded packages where found.";
Copy link
Contributor

Choose a reason for hiding this comment

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

were instead of where

}
else
{
markdownText = "No loaded packages were found.";
Copy link
Contributor

@QilongTang QilongTang Feb 22, 2021

Choose a reason for hiding this comment

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

So I thought about if we need to convert these into resource strings but think it may help the customer but not us. What do you guys think @DynamoDS/dynamo

markdownText = "### Loaded Packages" + Environment.NewLine;
foreach (var name in packagesNames)
{
markdownText += "- " + name + Environment.NewLine;
Copy link
Contributor

Choose a reason for hiding this comment

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

Also do you think we can easily get package versions as well? @Astul-Betizagasti

@Astul-Betizagasti
Copy link
Contributor Author

image
@QilongTang Added the packages versions, let me know of this looks good or do we want to include something like "ver" or "version" in between the name and the version?

@QilongTang
Copy link
Contributor

@Astul-Betizagasti Can you add a unit test in CrashReportingTests.cs covering the new API you added?

@@ -80,7 +85,7 @@ public void StackTraceIncludedInReport()
var dynamoVersion = AssemblyHelper.GetDynamoVersion().ToString();

// Create a crash report to submit
var crashReport = Wpf.Utilities.CrashUtilities.BuildMarkdownContent(dynamoVersion, StackTrace);
var crashReport = Wpf.Utilities.CrashUtilities.BuildMarkdownContent(dynamoVersion, Packages);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would assert below that decoded contains package info. And also make a new test that covers the default state of the API

Copy link
Contributor Author

@Astul-Betizagasti Astul-Betizagasti Feb 22, 2021

Choose a reason for hiding this comment

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

Did the change suggested on the test, but can you expand on the other test you mentioned? The API should work the same as before the changes with the exception of it including more information (which is being checked on that test you linked with the changes you suggested). Are you referring to the method PackagesToMakrdown(PackageLoader packageLoader) in CrashUtilities.cs?

Copy link
Contributor

@QilongTang QilongTang Feb 22, 2021

Choose a reason for hiding this comment

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

yes. I would like a test covering the default state so we can assert the API defaults to No loaded packages were found.

@QilongTang
Copy link
Contributor

Thanks @Astul-Betizagasti Looks good. Once the unit test updated, we should be able to wrap this one up

@QilongTang QilongTang merged commit 4cac452 into DynamoDS:master Feb 23, 2021
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