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

1.2.0 can't download in environments that don't have external services available #19

Closed
doughsay opened this issue Aug 14, 2019 · 5 comments

Comments

@doughsay
Copy link

The download task fails if the Elixir application can't fully start when using ua_inspector 1.2.0.

If the Elixir application depends on external services to boot (for example a postgres database), and the database is not reachable, then the download task fails.

This appears to be a new requirement in 1.2.0, as in 1.1.0 this didn't happen.

This breaks my build process because it involves building docker images. The docker image runs mix ua_inspector.download during build, but allows no external connections, therefore the application fails to boot and the build fails.

@mneudert
Copy link
Member

Can you try if running the download without the mix task fixes your problem?

mix run --no-start -e "UAInspector.Downloader.download()"

Depending on your configuration this should work without starting any applications. Until there is a fix to have a configuration of "applications required for the mix task to work" in place instead of just starting everything.

@mneudert
Copy link
Member

I think I have a fix that does not require any configuration changes but this time it should get some proper verification before breaking other things: https://github.com/elixir-inspector/ua_inspector/tree/v1.2

This should only try to load the code required for the initializer modules without starting the complete application. Can you verify this is the case?

/ping @smaximov it would be great if you could also test this as it might affect you and I do no longer trust my simple local test app for this stuff :)

@smaximov
Copy link

@mneudert, 9ac280b works for me.

@doughsay
Copy link
Author

@mneudert thanks for jumping on this so quickly!

Unfortunately, 9ac280b still starts my entire umbrella application.

On the other hand, manually running the download function does work for me for now. I will change my dockerfile build script to use that for now.

Thanks!

eteubert added a commit to podlove/radiator that referenced this issue Aug 18, 2019
A bug in 1.2.0 tries to start the whole application by default, which is problematic in the context of a Dockerfile.

See elixir-inspector/ua_inspector#19
@mneudert
Copy link
Member

Closing as this should be no issue anymore since release v2.0.0. I just missed mentioning it outside of the Changelog 😅

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

No branches or pull requests

3 participants