Skip to content

Fix Streamlit startup blocked by expired Debian repository - #138

Merged
EvenSol merged 1 commit into
mainfrom
fix/streamlit-bundled-java-20260908
Sep 8, 2026
Merged

EvenSol merged 1 commit into
mainfrom
fix/streamlit-bundled-java-20260908

Conversation

@EvenSol

@EvenSol EvenSol commented Sep 8, 2026

Copy link
Copy Markdown
Owner

The September 8 Streamlit Cloud deployment fails in apt-get update because its configured bullseye-security release metadata has expired. This happens before Python dependencies are installed or welcome.py runs. The app's only APT dependency is default-jre.

This PR removes packages.txt and installs Java 21 through the pinned jdk4py==21.0.8.2 Python wheel. The entrypoint configures JAVA_HOME before pages import NeqSim, respects an explicitly supplied Java installation, and retains the existing XStream module-access options.

It also:

  • Adds a fresh-process regression that proves the running JVM comes from the wheel, executes a native TP flash and cooler process, and saves, loads, and reruns that process.
  • Makes all three CI jobs install the application's actual requirements and adds the Java regression to the CI gate.
  • Repairs the existing direct-link test's page mock so it allows Streamlit to execute the entrypoint. Its 21 failing subcases were reproduced on unchanged main 55b9006 with Streamlit 1.63.0 before this test correction.
  • Documents installation, Java overrides, the APT failure, and the deployment/reboot procedure.

Validation completed locally with Python 3.12.13, NeqSim 3.19.0, JPype 1.7.1, Streamlit 1.63.0, and bundled Java 21.0.8:

  • python -m pip install -r requirements.txt and python -m pip check: passed.
  • PYTHONPATH=. python tests/test_java_runtime.py -v: 3 passed, including native process save/load.
  • PYTHONPATH=. python tests/test_experimental_links.py -v: 3 passed.
  • PYTHONPATH=. python tests/test_navigation_warm_import.py -v: 3 passed.
  • PYTHONPATH=. python tests/test_app_navigation.py -v: 6 passed, including all 21 experimental route subcases.
  • Actual welcome.py and TP Flash page exercised through Streamlit AppTest with a 90/10 methane/ethane feed at 50 °C and 50 bara: calculation succeeded and the JVM's java.home matched the bundled runtime.
  • Python compilation of all changed Python files, workflow YAML/dependency checks, and git diff --check: passed.
  • No pre-commit configuration exists in this repository.

Documentation impact: README installation and deployment guidance updated in this PR.

VALIDATION PENDING CI. The live Streamlit deployment has not been changed or verified. After merge, let Streamlit rebuild its Python dependencies; use Manage app → Reboot app if the failed instance does not rebuild automatically.

References:

@EvenSol
EvenSol marked this pull request as ready for review September 8, 2026 12:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T12:57:43.566621Z e7ebcb9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@EvenSol
EvenSol merged commit 3a116e1 into main Sep 8, 2026
2 of 3 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.

1 participant