Skip to content

Minor fixes for local development #552

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

Merged
merged 2 commits into from
May 21, 2025

Conversation

bheesham
Copy link
Contributor

I finally got annoyed enough to change things, removing requirements for tooling (wrappers around running flask or some local env manager).

Jira: IAM-950

@bheesham bheesham force-pushed the drop-dashes-from-env-names branch from cf7268b to 9a3f0d3 Compare April 25, 2025 00:44
@bheesham
Copy link
Contributor Author

I'll need to update the env file for local development stashed away in 1Pass after merging.

@dividehex
Copy link
Contributor

@bheesham Just for historical context the "SSO-DASHBOARD" was a namespace prefix used by the Everett Config library. The first underscore in the env name string was the separator. This change would have broken that... BUT, since Everett has been removed many commits ago, you could go further and remove the entire prefix for all ENVs. Your call.

@bheesham
Copy link
Contributor Author

remove the entire prefix for all ENVs

Ou, yeah, I like that idea.

I'll do the thing!

bheesham added 2 commits May 20, 2025 12:06
The environment names were dictated by some library we no longer use. I removed
that dependency, but kept the environment variables the same to not break stuff
anything.

This commit changes that to be shell-friendly. Before, if you wanted to write a
script to run the app, you'd need to resort to using either an external app, or
`env -S $(< envfile) flask ...`.

By swapping to dashes we're a little more generic in the kinds of ways you can
call the app.

Jira: IAM-950
Generally just sorta nice to be able to talk to Redis by default.

This allows you to run the app using:

    flask -A dashboard.app run -p 8000

(Assuming you have your environment set up for local dev, see previous commit.)

Jira: IAM-950
@bheesham bheesham force-pushed the drop-dashes-from-env-names branch from 9a3f0d3 to b84aa60 Compare May 20, 2025 16:06
@bheesham
Copy link
Contributor Author

@dividehex Done! I cleaned up some bits around FLASK_DEBUG as well -- Flask will read this variable regardless of our configuration method.

Copy link
Contributor

@dividehex dividehex left a comment

Choose a reason for hiding this comment

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

🎸 Excellent clean up!

@bheesham bheesham merged commit 7dc9fe4 into mozilla-iam:master May 21, 2025
1 check passed
@bheesham bheesham deleted the drop-dashes-from-env-names branch May 21, 2025 20:42
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.

2 participants