Skip to content

Conversation

BenjaminPelletier
Copy link
Member

This PR takes a small step toward #1218 by placing the actual webapp Flask server in app.py rather than init.py. This does not resolve the issue as other __init__s still automatically pull in webapp, but this is a start.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review October 10, 2025 19:19
Copy link
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1,6 +0,0 @@
from monitoring.mock_uss import SERVICE_MESSAGESIGNING, config
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this removal intended? Is it because the check made here is unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, it was removed because SERVICE_MESSAGESIGNING is no longer as easily accessible and it didn't seem worthwhile to adapt this check, but that functionality change probably should probably be in a separate PR; I've re-added the check without the constant.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, and now I'm recalling the other reason: Config.CERT_BASE_PATH doesn't exist, nor does ENV_KEY_CERT_BASE_PATH -- basically, this code is broken.

webapp = MockUSS(__name__)
webapp.secret_key = os.environ.get("SECRET_KEY") or os.urandom(24)
if os.environ.get("MOCK_USS_PROXY_VALUES"):
values = os.environ.get("MOCK_USS_PROXY_VALUES", "").split(",")
Copy link
Contributor

Choose a reason for hiding this comment

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

FTR: checked this change

@BenjaminPelletier BenjaminPelletier merged commit cceed5f into interuss:main Oct 15, 2025
21 checks passed
@BenjaminPelletier BenjaminPelletier deleted the mock_uss-webapp branch October 15, 2025 15:49
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