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

Not reading dsn config at compile time #441

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Not reading dsn config at compile time #441

merged 1 commit into from
Nov 16, 2020

Conversation

Sgoettschkes
Copy link
Contributor

This PR attempts to fix #440.

As described in the bug report, the :dsn config value got read at compile time, failing if something else then a value that can be parsed by URI.parse/1 is present.

I added a test as well but I'm not 100% happy as it does not confirm that Sentry.config.dsn/0 is not called at compile time but rather that a call to root_source_code_paths does not evaluate the dsn config variable. Calling get_config without the check_dsn: false option at compile time somewhere else will result in the same error and is not catched by my test. I'm currently not sure on how to test this.

@mitchellhenke mitchellhenke merged commit 6e14a5c into getsentry:master Nov 16, 2020
@mitchellhenke
Copy link
Contributor

Thank you so much for catching this and sending a fix!

I will look further into the case you mentioned, but I think releasing this fix is more urgent 🙂

@Sgoettschkes Sgoettschkes deleted the issue/440 branch November 16, 2020 15:37
@Sgoettschkes
Copy link
Contributor Author

Thanks for the fast response! I'm glad I could contribute back!

@Sgoettschkes Sgoettschkes restored the issue/440 branch November 16, 2020 15:39
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.

Version 8.0.3 fails due to configuration evaluated at compile time
2 participants