-
Notifications
You must be signed in to change notification settings - Fork 160
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
#984 single file publish works with Service connectors #1237
#984 single file publish works with Service connectors #1237
Conversation
72ed9c2
to
bca20f2
Compare
bca20f2
to
8d61703
Compare
@dotnet-policy-service agree |
5cbc34b
to
b96c399
Compare
Hey @thompson-tomo, Thanks for digging into this, I see what you're doing here and I see how it allows the application to continue when published as a single file, but I'm trying to understand if this should be the right behavior. Swallowing the exception is fine if you're not really dependent on whatever Steeltoe feature is doing the assembly scan (in addition to your Connectors example, I see a reference in Discovery too and I'm not sure if there are others), but it seems like it could also introduce confusion due to the blind spot it could create... I'm assuming Connectors wouldn't really work after this change - how does your application handle a silent failure here? |
Hi @TimHess The example application I included is the shell of my production app where I am encountering the issue. The application works as does the example, my understanding is it is trying to find a dll which doesn't exist due to being published as a single file hence throwing null reference. In the case of single file the library is already loaded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for including the repro, it can be removed from the PR now as this sample can be used for your scenario as well as service discovery.
I think this will work with a few more changes as noted. I pushed a commit that added and updated helper methods that can ensure the contents of these assemblies are not optimized out at build time
src/Common/src/Abstractions/Exceptions/SingleFilePublishedException.cs
Outdated
Show resolved
Hide resolved
Thanks @TimHess i will review your comments, test the changes on the weekend & come back to you with my results. Hopefully all is successful. |
a2e2539
to
ed25a49
Compare
@TimHess Changes have been made as suggested and all is working as expected in my production app. Let me know if you need anything else from me to get this merged in & it will also need to be ported to v4 release branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run Steeltoe.All |
Azure Pipelines successfully started running 1 pipeline(s). |
|
Description
This fix enables dotnet application's published as a single file to work which would previously fail due to an issue loading files
Fixes #984
Quality checklist
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.