Skip to content

🔄 Update lab URLs, Sync phone deployment config on usercache put#1092

Merged
JGreenlee merged 2 commits intoe-mission:masterfrom
JGreenlee:update_urls_mar2026
Mar 30, 2026
Merged

🔄 Update lab URLs, Sync phone deployment config on usercache put#1092
JGreenlee merged 2 commits intoe-mission:masterfrom
JGreenlee:update_urls_mar2026

Conversation

@JGreenlee
Copy link
Copy Markdown
Member

🔄 update lab URLs

This should finish off the lab name change updates in this repo


🔄 Sync phone deployment config on usercache put

The phone will now include i) the current app version, and ii) the version of the deployment config it is currently using, in every usercache/put request.
On the server, we will check if the phone's config is outdated and if the app version is high enough to upgrade to the server's copy of the config; if yes the server will send its copy in the response

This should finish off the lab name change updates in this repo
The phone will now include i) the current app version, and ii) the version of the deployment config it is currently using, in every usercache/put request.
On the server, we will check if the phone's config is outdated and if the app version is high enough to upgrade to the server's copy of the config; if yes the server will send its copy in the response
Copy link
Copy Markdown
Contributor

@shankari shankari left a comment

Choose a reason for hiding this comment

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

Given time sensitivity, let's merge this now and add tests later

# If the server's STUDY_CONFIG doesn't match the opcode, skip the version check.
# This happen on stage where the server is on stage-program but some opcodes are stage-study or stage-timeuse.
# This is not an issue on prod since 1 deployment has 1 config.
if STUDY_CONFIG not in user_token:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would put in an explicit check for stage like we do in other places in https://github.com/e-mission/nrel-openpath-join-page/blob/58f653ebaac8e8d5aac0bd78cc01a410c2333447/frontend/index.html#L556

This will also allow additional error handling for the case where the server or the deployment config is misconfigured.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, it would be good to add a unit test for this in emission/tests/netTests/TestWebserver.py (copilot can do this pretty quickly)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I initially just had this check if STUDY_CONFIG was stage-program and return None if it was.
I changed it to check for a mismatch between opcode and STUDY_CONFIG, since this should actually work on stage-program opcodes and we don't want to return early for those.

Noted on better error handling, though. we can do that with a 2-level check.
If opcode and STUDY_CONFIG mismatch and we are on stage: no problem, log debug
If opcode and STUDY_CONFIG mismatch and not on stage: log error

@JGreenlee JGreenlee merged commit 24cfb5c into e-mission:master Mar 30, 2026
5 checks passed
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