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

Rename endpoints #5534

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Conversation

sfc-gh-kbregula
Copy link
Contributor

@sfc-gh-kbregula sfc-gh-kbregula commented Oct 13, 2022

📚 Context

Close: #3028
Spec: https://www.notion.so/streamlit/Product-spec-1caef53a784d4482a129aca184c000a5

Please describe the project or issue background here

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe:

🧠 Description of Changes

  • Add bullet points summarizing your changes here

    • This is a breaking API change
    • This is a visible (user-facing) change

Revised:

Insert screenshot of your updated UI/code here

Current:

Insert screenshot of existing UI/code here

🧪 Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

🌐 References

Does this depend on other work, documents, or tickets?

  • Issue: Closes #XXXX

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@sfc-gh-kbregula sfc-gh-kbregula marked this pull request as ready for review October 13, 2022 22:27
@jrieke
Copy link
Collaborator

jrieke commented Oct 18, 2022

Just had a quick look through some things from product side and looks great! Make sure we also update the snippets in the docs that are affected by this. Talk to @snehankekre if you need help, he's owning our docs (might still be OOO though).

lib/streamlit/web/server/routes.py Fixed Show resolved Hide resolved
@sfc-gh-kbregula sfc-gh-kbregula force-pushed the sfc-gh-kbregula-cloud-run-endpoint branch from d439393 to e66e9b7 Compare October 24, 2022 21:39
Copy link
Collaborator

@vdonato vdonato left a comment

Choose a reason for hiding this comment

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

Hey @sfc-gh-kbregula,

We'll want to do this eventually, but I think we may want to hold off for a few months to coordinate with some other teams. I'll follow up in Slack with more details.

For now, I'm requesting changes to ensure this isn't merged, and I think what we'll want to do is close this PR but keep the branch alive until ~January or so, at which point we should be able to make these changes.

Thankfully, these areas of the code are rarely changed, so I don't think leaving the branch alive until then will be too expensive.

@stale
Copy link

stale bot commented Nov 16, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 16, 2022
@vdonato vdonato removed the stale label Nov 22, 2022
@vdonato
Copy link
Collaborator

vdonato commented Nov 23, 2022

@sfc-gh-kbregula heads up that, given the plans that the SiS team currently has (which is to not update their Streamlit lib version until after PrPr launches), we may be able to go ahead and get this change merged into develop rather than waiting until January to do so. We'll just need to make sure that we document the changes necessary for non-OS teams when they first upgrade to a Streamlit version containing these changes.

I'll start a conversation in Slack next week since I think most people on other teams that would have an opinion on this are out this week for the holidays.

@sfc-gh-kbregula sfc-gh-kbregula force-pushed the sfc-gh-kbregula-cloud-run-endpoint branch from d9d229d to f2f8a40 Compare December 6, 2022 01:46
@sfc-gh-kbregula
Copy link
Contributor Author

@vdonato I update the PR. I deleted all deprecation warnings for endpoints that are internal. Now we have the deprecation warnings for the following endpoints:

  • /st-metrics
  • /healthz
  • /script-health-check

@sfc-gh-kbregula sfc-gh-kbregula force-pushed the sfc-gh-kbregula-cloud-run-endpoint branch from 90666cf to bafb6b8 Compare December 7, 2022 11:48
@stale
Copy link

stale bot commented Dec 22, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 22, 2022
@vdonato vdonato removed the stale label Dec 22, 2022
Copy link
Collaborator

@vdonato vdonato left a comment

Choose a reason for hiding this comment

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

Sorry for the delay on reviewing this @sfc-gh-kbregula!

I have two very minor comments, but otherwise this LGTM.

I'm going to leave this in the "Changes requested" state for now because we still need to finalize the exact process we'll be following for making changes that have implications for the SiS team (I was a bit ambitious to think that we could figure this out early), but once that's sorted out, this PR should be ready to be merged.

I hope to get the process for making this change finalized early next year, but I think the only necessary thing to do will be to document the necessary changes that a service replacing the Tornado server will have to implement to be compatible with the Streamlit web client (in this case, just renaming a few endpoints to the new _stcore/* versions)

@@ -77,8 +77,16 @@
# to an unix socket.
UNIX_SOCKET_PREFIX = "unix://"

# The endpoint we serve media files from.
# The endpoints
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think it'd be fine to just remove this comment entirely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 206 to 212
if config.get_option("server.enableXsrfProtection"):
self.set_cookie("_xsrf", self.xsrf_token)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think it should be okay to remove this and allow the /_stcore/health endpoint be reponsible for setting the browser tab's xsrf

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@stale
Copy link

stale bot commented Jan 6, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link
Collaborator

@vdonato vdonato left a comment

Choose a reason for hiding this comment

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

@sfc-gh-kbregula sorry that it took awhile to confirm that we should be able to proceed with this change -- we should be unblocked on being able to merge this PR now!

@sfc-gh-kbregula sfc-gh-kbregula force-pushed the sfc-gh-kbregula-cloud-run-endpoint branch from 8b9dd65 to 4a484d5 Compare January 11, 2023 14:01
@sfc-gh-kbregula
Copy link
Contributor Author

All fixed. When CI passes, I will merge these changes tomorrow.

@sfc-gh-kbregula
Copy link
Contributor Author

We waiting for QA team.

@sfc-gh-kbregula sfc-gh-kbregula force-pushed the sfc-gh-kbregula-cloud-run-endpoint branch from bb17170 to 5dcf626 Compare January 20, 2023 13:56
@sfc-gh-kbregula
Copy link
Contributor Author

QA done. Now I'm doing a rebase and merging the change.

@sfc-gh-kbregula sfc-gh-kbregula merged commit 3664a85 into develop Jan 20, 2023
whitphx added a commit to whitphx/stlite that referenced this pull request Feb 13, 2023
whitphx added a commit to whitphx/stlite that referenced this pull request Feb 14, 2023
whitphx added a commit to whitphx/stlite that referenced this pull request Feb 14, 2023
whitphx added a commit to whitphx/stlite that referenced this pull request Feb 17, 2023
* Update the streamlit submodule to v1.18.1

* Update the wheel file name

* Update react-scripts to 5.0.1

* Replace path with path-browserify in the worker, that were automatically polyfilled by Webpack4 but it isnt' with v5

* Remove worker-loader that has been deprecated for Webpack5

* Update dependencies and craco config in @stlite/sharing adapting to streamlit@1.18.1

* Update dependencies and craco config in @stlite/desktop adapting to streamlit@1.18.1

* Set streamlit-browser dependency version

* [WIP] Override mountable/* with files ejected from a newly scaffolded package with CRA5.0.1

* Customize the build config and dependency list for @stlite/mountable upon the ejected files

* Update dependency versions following the streamlit-browser package

* Fix typing in sharing-editor

* Update mountable/DEVELOPMENT.md

* Update yarn.lock

* Rename the websocket endpoint path following streamlit/streamlit#5534

* Fix packages/kernel/py/e2etests/tests/test_httpserver.py

* Fix the CI to run test-tornado-e2e anytime

* Fix tornado-e2e tests

* Fix CI

* Replace @st.experimental_memo with @st.cache_data in the samples

* Rename the file upload endpoint path following streamlit/streamlit#5534

* Fix BROWSER envvar value for CRA5

* Fix to avoid forbidden access to LocalStorage due to #476

* Add streamlit-browser@^1.18.1 to the deps list of @stlite/mountable

* Fix comments in packages/mountable/config/webpack.config.js

* Remove the type declarations for inline raw-loader import

* Move the deps list from dependencies to devDependencies in @stlite/mountable

* Introduce a hack to handle cross-origin policy of worker creation

* Set local package name for dump_artifacts.ts

* Fix CSP
@sfc-gh-kmcgrady sfc-gh-kmcgrady deleted the sfc-gh-kbregula-cloud-run-endpoint branch October 5, 2023 19:29
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
AlexLiu0608 added a commit to AlexLiu0608/stlite that referenced this pull request Jun 28, 2024
* Update the streamlit submodule to v1.18.1

* Update the wheel file name

* Update react-scripts to 5.0.1

* Replace path with path-browserify in the worker, that were automatically polyfilled by Webpack4 but it isnt' with v5

* Remove worker-loader that has been deprecated for Webpack5

* Update dependencies and craco config in @stlite/sharing adapting to streamlit@1.18.1

* Update dependencies and craco config in @stlite/desktop adapting to streamlit@1.18.1

* Set streamlit-browser dependency version

* [WIP] Override mountable/* with files ejected from a newly scaffolded package with CRA5.0.1

* Customize the build config and dependency list for @stlite/mountable upon the ejected files

* Update dependency versions following the streamlit-browser package

* Fix typing in sharing-editor

* Update mountable/DEVELOPMENT.md

* Update yarn.lock

* Rename the websocket endpoint path following streamlit/streamlit#5534

* Fix packages/kernel/py/e2etests/tests/test_httpserver.py

* Fix the CI to run test-tornado-e2e anytime

* Fix tornado-e2e tests

* Fix CI

* Replace @st.experimental_memo with @st.cache_data in the samples

* Rename the file upload endpoint path following streamlit/streamlit#5534

* Fix BROWSER envvar value for CRA5

* Fix to avoid forbidden access to LocalStorage due to whitphx/stlite#476

* Add streamlit-browser@^1.18.1 to the deps list of @stlite/mountable

* Fix comments in packages/mountable/config/webpack.config.js

* Remove the type declarations for inline raw-loader import

* Move the deps list from dependencies to devDependencies in @stlite/mountable

* Introduce a hack to handle cross-origin policy of worker creation

* Set local package name for dump_artifacts.ts

* Fix CSP
sfc-gh-pchiu pushed a commit to sfc-gh-pchiu/streamlit that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change health check endpoint name
3 participants