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 flaky AppInsights DI tests #632

Merged
merged 3 commits into from
May 6, 2024
Merged

Conversation

martinothamar
Copy link
Contributor

@martinothamar martinothamar commented May 6, 2024

Description

Hopefully fixes flaky DI tests for App Insights.
Example race: https://github.com/Altinn/app-lib-dotnet/actions/runs/8967112868/job/24623968605

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

Copy link
Member

@ivarne ivarne left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand what this test is really verifying, but if this is less likely to cause DI failures it's good with me.

@martinothamar
Copy link
Contributor Author

We had an issue a little while back where AppInsights logs weren't being shipped. This was tracked down to AppInsights SDK silently giving up on an error condition where it couldn't handle keyed services in the DI container. See this test as an example:
image

The other PR is #594
In the next major version we will hopefully drop App Insights SDK, so then we can remove all this junk 😄

Copy link

sonarcloud bot commented May 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@martinothamar martinothamar merged commit 48830d5 into main May 6, 2024
10 checks passed
@martinothamar martinothamar deleted the fix/harden-appinsights-di-tests branch May 6, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants