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

fix: session regeneration #12864

Merged
merged 5 commits into from
Jan 2, 2025
Merged

fix: session regeneration #12864

merged 5 commits into from
Jan 2, 2025

Conversation

kaytwo
Copy link
Contributor

@kaytwo kaytwo commented Dec 30, 2024

Changes

  • What does this change?

Ensures that session IDs get regenerated when regenerate() is called. This fixes #12863.

  • Don't forget a changeset! pnpm exec changeset

Testing

Built astro with this change locally and ran it against https://stackblitz.com/edit/github-muwk6ati-gxwf5xkb?file=src%2Fpages%2Findex.astro and it functions as expected (new uuid shown on every refresh).

Docs

Docs should not be needed - this aligns the code's functionality with the current docs.

Copy link

changeset-bot bot commented Dec 30, 2024

🦋 Changeset detected

Latest commit: 943d49f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) labels Dec 30, 2024
@github-actions github-actions bot removed the pkg: example Related to an example package (scope) label Dec 30, 2024
Copy link

codspeed-hq bot commented Dec 30, 2024

CodSpeed Performance Report

Merging #12864 will not alter performance

Comparing kaytwo:main (943d49f) with main (96c4b92)

Summary

✅ 4 untouched benchmarks

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Can you please add a new test (or update the existing ones)?

@kaytwo
Copy link
Contributor Author

kaytwo commented Dec 30, 2024

The existing tests are unit only - this is why they pass, as they don't model the interaction with the request rendering/cookie setting process. If you can point me at an example of a simple existing SSR / cookie setting & checking test, I can give it a shot.

@kaytwo
Copy link
Contributor Author

kaytwo commented Dec 30, 2024

@ematipico added a test that fails on main but succeeds on this branch.

Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@ematipico ematipico merged commit 440d8a5 into withastro:main Jan 2, 2025
3 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Astro sessions "regenerate" currently non functional
3 participants