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

Default config for non heroku environments #59

Closed
jasonsbrooks opened this issue Apr 26, 2023 · 3 comments · Fixed by #60
Closed

Default config for non heroku environments #59

jasonsbrooks opened this issue Apr 26, 2023 · 3 comments · Fixed by #60

Comments

@jasonsbrooks
Copy link

jasonsbrooks commented Apr 26, 2023

The default config for non Heroku environments is currently set as follows:

return cls(None, "", env)

so API_BASE_URL is set as an empty string.

The code that determines if Judoscale should run, though, seems to compare API_BASE_URL against None:

if judoconfig["API_BASE_URL"] is None:

We've been seeing Judoscale attempting to run locally on our dev machines, and pretty sure it's because this check is returning True.

Should the default config instead return return cls(None, None, env) so the API_BASE_URL is set to None instead of ""? Or alternatively should the check be if judoconfig["API_BASE_URL"]:? Happy to put up a pull request if this seems reasonable.

@karls
Copy link
Collaborator

karls commented Apr 27, 2023

Hey @jasonsbrooks,

Thanks for this bug report. I'm able to reproduce this locally and I'm going to patch this today.

@jasonsbrooks
Copy link
Author

Awesome, thanks so much @karls !

@karls karls closed this as completed in #60 Apr 28, 2023
karls added a commit that referenced this issue Apr 28, 2023
* Fix detecting if Judoscale should report metrics. Fixes #59

* Update sample apps
@karls
Copy link
Collaborator

karls commented Apr 28, 2023

Hey @jasonsbrooks,

I've just released 1.4.1, which should fix the issue you're seeing. 🙌🏻

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 a pull request may close this issue.

2 participants