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
Ensure file_uploader doesn't trigger needless reruns #7641
Merged
AnOctopus
merged 3 commits into
streamlit:develop
from
AnOctopus:fix/file-uploader-triggers
Nov 1, 2023
Merged
Ensure file_uploader doesn't trigger needless reruns #7641
AnOctopus
merged 3 commits into
streamlit:develop
from
AnOctopus:fix/file-uploader-triggers
Nov 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AnOctopus
added
type:regression
This bug is a regression
security-assessment-completed
change:bugfix
impact:users
labels
Oct 31, 2023
vdonato
reviewed
Oct 31, 2023
frontend/lib/src/components/widgets/FileUploader/FileUploader.tsx
Outdated
Show resolved
Hide resolved
vdonato
approved these changes
Oct 31, 2023
kajarenc
added a commit
that referenced
this pull request
Nov 1, 2023
* Add playwright regression test for issue #7556
4 tasks
vdonato
pushed a commit
that referenced
this pull request
Nov 2, 2023
LukasMasuch
added a commit
that referenced
this pull request
Nov 13, 2023
* Build releases directly from tags instead of release branches (#7580) * Get rid of unused release candidate workflow * Just build releases directly from tag instead of release branch * Get rid of unused scripts * Add back branch check to verify that corresponding PR exists * Docstrings for App testing (#7587) * Make the outline for expanders appear on focus-visible and not focus (#7592) * Add new libraries to attributions (#7599) * Add new libraries to attributions * Update metrics_util.py * Up version to 1.28.0 * Fix: MPA Nav expand arrow (#7634) Update dependency array for isOverflowing check - does not always register changes in clientHeight after initial expand & collapse. Add expanded to dependency array to ensure check of scrollHeight vs. clientHeight * Tweak "forgot config" SnowflakeConnection error message (#7652) * Fix app testing repr bug for `st.container` (#7644) * Ensure file_uploader doesn't trigger needless reruns (#7641) * Fix trigger value regression with `st.rerun` (#7643) * Greatly narrow errors that we retry in SnowflakeConnection (#7645) * Fix issue for st.camera_input and chat_input, add regression test for file_uploader (#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears #7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns #7641 for st.camera_input * Up version to 1.28.1 * Add fix to enforce pyarrow version * temp fix mypy upper bound, to avoid broken CI (#7713) * Update version to 1.28.2 --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com> Co-authored-by: Ken McGrady <ken.mcgrady@gmail.com> Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com> Co-authored-by: Amanda Walker <amanda@amandawalker.io> Co-authored-by: Karen Javadyan <kajarenc@gmail.com>
willhuang1997
added a commit
that referenced
this pull request
Nov 28, 2023
… a key (#7760) * Add support for timedelta type to `st.dataframe`, `st.data_editor` and `st.table`. (#7689) * Add support for timedelta type * Add tests * Move timedelta to supported types * Improve timedelta support * Improve implementation * Rename to convert to seconds * Fix type util test * Fix unit tests * Add timedelta index * Update notices file * Update snapshots * Update snapshots * Apply review comments * Add Python 3.12 support (#7663) Updates Streamlit for Python 3.12 compatibility We have a test that checks interaction with langchain (callback handler), which is not yet 3.12-compatible. These are skipped when running on 3.12. ALL_PYTHON_VERSIONS are extended with 3.12 for our Github Actions runners Refactor a few tests to use self.assertEqual instead of deprecated self.assertEqualS Bump revision of insert-licence pre-commit hook to work with Python 3.12 * Add border parameter to container and form (#7455) * Add border parameter to container and form * Add border parameter * Add snapshots * Add note to form docstring * Add exhaustive proto stability tests (#7635) * temp fix mypy upper bound, to avoid broken CI (#7713) * Enforce pyarrow version for arrow-based custom components (#7695) * Release Streamlit version 1.28.2 (#7716) * Build releases directly from tags instead of release branches (#7580) * Get rid of unused release candidate workflow * Just build releases directly from tag instead of release branch * Get rid of unused scripts * Add back branch check to verify that corresponding PR exists * Docstrings for App testing (#7587) * Make the outline for expanders appear on focus-visible and not focus (#7592) * Add new libraries to attributions (#7599) * Add new libraries to attributions * Update metrics_util.py * Up version to 1.28.0 * Fix: MPA Nav expand arrow (#7634) Update dependency array for isOverflowing check - does not always register changes in clientHeight after initial expand & collapse. Add expanded to dependency array to ensure check of scrollHeight vs. clientHeight * Tweak "forgot config" SnowflakeConnection error message (#7652) * Fix app testing repr bug for `st.container` (#7644) * Ensure file_uploader doesn't trigger needless reruns (#7641) * Fix trigger value regression with `st.rerun` (#7643) * Greatly narrow errors that we retry in SnowflakeConnection (#7645) * Fix issue for st.camera_input and chat_input, add regression test for file_uploader (#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears #7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns #7641 for st.camera_input * Up version to 1.28.1 * Add fix to enforce pyarrow version * temp fix mypy upper bound, to avoid broken CI (#7713) * Update version to 1.28.2 --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com> Co-authored-by: Ken McGrady <ken.mcgrady@gmail.com> Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com> Co-authored-by: Amanda Walker <amanda@amandawalker.io> Co-authored-by: Karen Javadyan <kajarenc@gmail.com> * Bump actions/setup-node from 3 to 4 (#7628) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 0.27.2 to 1.6.0 in /frontend (#7708) * Bump axios from 0.27.2 to 1.6.0 in /frontend Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v0.27.2...v1.6.0) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update NOTICES --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Vincent Donato <vincent@streamlit.io> * Directly use package name in setup.py (#7717) * Directly use package name in setup.py * Fix update name script to replace correct name * Remove unnecessary PIL dependency in st.image docstring (#7728) * Allow to access external server IP via https. (#7712) Fallback to HTTPS endpoint call to check external IP if HTTP call failed. --------- Co-authored-by: Lars Hillebrand <lars.patrick.hillebrand@iais.fraunhofer.de> Co-authored-by: Karen Javadyan <kajarenc@gmail.com> * Allow a service managing a Streamlit runtime to set its own session IDs (#7544) * Move `dg_stack` into a `ContextVar` to support `with` blocks in separate threads (#7715) * Bump actions/github-script from 6 to 7 (#7738) Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Improve st.connection caching behavior (#7730) * hack to compute connection cache function keys based on ttl, max_entries and dsn * Fix ttl and connection name behavior for all connections and factory * Add explanatory comments * More explanatory comment tweaks * Avoid adding new `.` characters to function qualnames --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> * Pin playwright version to < 1.40 (#7747) * Pin playwright version to < 1.40 * Add comment * Use "loading skeletons" throughout Streamlit (#7598) * Implement both app-wide skeleton and suspense skeleton. Still need tests. * Slow down the animation a little bit. * Awww yisss. MFing tests. * Address comments * Make skeleton look nicer in sidebar * Make DeckGlJsonChart withMapboxToken use Skeleton instead of "Loading..." * Lint * Fix assignment to const * Add test for mapbox skeleton * Make skeleton color overridable with postMessage * Make a couple more e2e tests use AppSkeleton rather than "Please wait..." * Make e2e tests not depend on skeletons. Instead, use new data-teststate attribute. * Add query params for: no loading screen; old "Please wait" loading screen * Fix AppNode test elements.alert check * Lint * Fix tests by creating a test-only "initial" state * Fix e2e bug. "should not exist" -> "should exist" * Pin playwright version to < 1.40 (#7747) * Pin playwright version to < 1.40 * Add comment * Add skeleton_background_color to NewSession.proto * Fix arguments to cypress, whenever we call it manually. * Add ability to pass function to matchThemedSnapshots() * Ooops, remove Cypress upgrade code that was accidentally committed. --------- Co-authored-by: Lukas Masuch <Lukas.Masuch@gmail.com> * Migrate `st.button` e2e test to playwright (#7755) * Add wait time * Migrate button test to playwright * Add snapshots * Replace deprecated `find_executable` from `distutils.spawn` with recommended `which` from `shutil` (#7756) Replace deprecated find_executable from distutils.spawn with recommended which from shutil PEP: https://peps.python.org/pep-0632/ * add app_heartbeat BackMsg type and send it when receiving SEND_APP_HEARTBEAT window message (#7682) * Remove outdated snapshots (#7758) * Update docstrings for release 1.29 (#7759) * Style tweaks for connections docstrings * Add border to container example * Update data_editor docsring for timedelta addition * Fix link format * Clarify data_editor note re: timedelta * Add ability to set query param key to tuple or set, but not dictionary * Fix minor typo in server.scriptHealthCheckEnabled help (#7762) * fix: component dev url typo (#7746) * Don't use hash on floats in hashing.py (#7754) * Don't use hash on floats Python's hash is salted with a random number. This will not work across restarts. Instead, use struct.pack to get the bytes of a float. * Run autoformatter --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> * Fix another url typo (#7764) * Fix typing issues with altair (#7769) * Fix typing issues with altair * Fix mypy issues * Fix mypy issues * Remove altair from test dependencies * Address comments --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Lukas Masuch <Lukas.Masuch@gmail.com> Co-authored-by: Karen Javadyan <kajarenc@gmail.com> Co-authored-by: Vincent Donato <vincent@streamlit.io> Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com> Co-authored-by: Ken McGrady <ken.mcgrady@gmail.com> Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com> Co-authored-by: Amanda Walker <amanda@amandawalker.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Snehan Kekre <snehan.minerva@gmail.com> Co-authored-by: Lars Hillebrand <37187985+LarsHill@users.noreply.github.com> Co-authored-by: Lars Hillebrand <lars.patrick.hillebrand@iais.fraunhofer.de> Co-authored-by: eric-skydio <eric@skydio.com> Co-authored-by: Thiago Teixeira <103002884+sfc-gh-tteixeira@users.noreply.github.com> Co-authored-by: Pat Finnigan <pat.finnigan@snowflake.com> Co-authored-by: Samuel Dion-Girardeau <samueldg@users.noreply.github.com> Co-authored-by: Observed Observer <270001151@qq.com> Co-authored-by: Andreas Kirsch <blackhc@gmail.com>
eric-skydio
pushed a commit
to eric-skydio/streamlit
that referenced
this pull request
Dec 20, 2023
eric-skydio
pushed a commit
to eric-skydio/streamlit
that referenced
this pull request
Dec 20, 2023
… file_uploader (streamlit#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears streamlit#7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns streamlit#7641 for st.camera_input
eric-skydio
pushed a commit
to eric-skydio/streamlit
that referenced
this pull request
Dec 20, 2023
* Build releases directly from tags instead of release branches (streamlit#7580) * Get rid of unused release candidate workflow * Just build releases directly from tag instead of release branch * Get rid of unused scripts * Add back branch check to verify that corresponding PR exists * Docstrings for App testing (streamlit#7587) * Make the outline for expanders appear on focus-visible and not focus (streamlit#7592) * Add new libraries to attributions (streamlit#7599) * Add new libraries to attributions * Update metrics_util.py * Up version to 1.28.0 * Fix: MPA Nav expand arrow (streamlit#7634) Update dependency array for isOverflowing check - does not always register changes in clientHeight after initial expand & collapse. Add expanded to dependency array to ensure check of scrollHeight vs. clientHeight * Tweak "forgot config" SnowflakeConnection error message (streamlit#7652) * Fix app testing repr bug for `st.container` (streamlit#7644) * Ensure file_uploader doesn't trigger needless reruns (streamlit#7641) * Fix trigger value regression with `st.rerun` (streamlit#7643) * Greatly narrow errors that we retry in SnowflakeConnection (streamlit#7645) * Fix issue for st.camera_input and chat_input, add regression test for file_uploader (streamlit#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears streamlit#7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns streamlit#7641 for st.camera_input * Up version to 1.28.1 * Add fix to enforce pyarrow version * temp fix mypy upper bound, to avoid broken CI (streamlit#7713) * Update version to 1.28.2 --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com> Co-authored-by: Ken McGrady <ken.mcgrady@gmail.com> Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com> Co-authored-by: Amanda Walker <amanda@amandawalker.io> Co-authored-by: Karen Javadyan <kajarenc@gmail.com>
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
Mar 22, 2024
… file_uploader (streamlit#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears streamlit#7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns streamlit#7641 for st.camera_input
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this pull request
Mar 22, 2024
* Build releases directly from tags instead of release branches (streamlit#7580) * Get rid of unused release candidate workflow * Just build releases directly from tag instead of release branch * Get rid of unused scripts * Add back branch check to verify that corresponding PR exists * Docstrings for App testing (streamlit#7587) * Make the outline for expanders appear on focus-visible and not focus (streamlit#7592) * Add new libraries to attributions (streamlit#7599) * Add new libraries to attributions * Update metrics_util.py * Up version to 1.28.0 * Fix: MPA Nav expand arrow (streamlit#7634) Update dependency array for isOverflowing check - does not always register changes in clientHeight after initial expand & collapse. Add expanded to dependency array to ensure check of scrollHeight vs. clientHeight * Tweak "forgot config" SnowflakeConnection error message (streamlit#7652) * Fix app testing repr bug for `st.container` (streamlit#7644) * Ensure file_uploader doesn't trigger needless reruns (streamlit#7641) * Fix trigger value regression with `st.rerun` (streamlit#7643) * Greatly narrow errors that we retry in SnowflakeConnection (streamlit#7645) * Fix issue for st.camera_input and chat_input, add regression test for file_uploader (streamlit#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears streamlit#7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns streamlit#7641 for st.camera_input * Up version to 1.28.1 * Add fix to enforce pyarrow version * temp fix mypy upper bound, to avoid broken CI (streamlit#7713) * Update version to 1.28.2 --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com> Co-authored-by: Ken McGrady <ken.mcgrady@gmail.com> Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com> Co-authored-by: Amanda Walker <amanda@amandawalker.io> Co-authored-by: Karen Javadyan <kajarenc@gmail.com>
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this pull request
Apr 16, 2024
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this pull request
Apr 16, 2024
… file_uploader (streamlit#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears streamlit#7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns streamlit#7641 for st.camera_input
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this pull request
Apr 16, 2024
* Build releases directly from tags instead of release branches (streamlit#7580) * Get rid of unused release candidate workflow * Just build releases directly from tag instead of release branch * Get rid of unused scripts * Add back branch check to verify that corresponding PR exists * Docstrings for App testing (streamlit#7587) * Make the outline for expanders appear on focus-visible and not focus (streamlit#7592) * Add new libraries to attributions (streamlit#7599) * Add new libraries to attributions * Update metrics_util.py * Up version to 1.28.0 * Fix: MPA Nav expand arrow (streamlit#7634) Update dependency array for isOverflowing check - does not always register changes in clientHeight after initial expand & collapse. Add expanded to dependency array to ensure check of scrollHeight vs. clientHeight * Tweak "forgot config" SnowflakeConnection error message (streamlit#7652) * Fix app testing repr bug for `st.container` (streamlit#7644) * Ensure file_uploader doesn't trigger needless reruns (streamlit#7641) * Fix trigger value regression with `st.rerun` (streamlit#7643) * Greatly narrow errors that we retry in SnowflakeConnection (streamlit#7645) * Fix issue for st.camera_input and chat_input, add regression test for file_uploader (streamlit#7646) Add playwright regression test for issue With st.file_uploader and st.chat_input, first message disappears streamlit#7556 Replicate changes from Ensure file_uploader doesn't trigger needless reruns streamlit#7641 for st.camera_input * Up version to 1.28.1 * Add fix to enforce pyarrow version * temp fix mypy upper bound, to avoid broken CI (streamlit#7713) * Update version to 1.28.2 --------- Co-authored-by: Vincent Donato <vincent@streamlit.io> Co-authored-by: Debbie Matthews <debbie.matthews@snowflake.com> Co-authored-by: Ken McGrady <ken.mcgrady@gmail.com> Co-authored-by: Maya Barnes <63436329+mayagbarnes@users.noreply.github.com> Co-authored-by: Amanda Walker <amanda@amandawalker.io> Co-authored-by: Karen Javadyan <kajarenc@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
Prevent file uploader from triggering a bogus rerun after the first run, which interferes with triggers.
GitHub Issue Link (if applicable)
#7556
Testing Plan
Manually tested, no tests added because I'm tired and trying to resolve these regressions fast
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.