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

[23.2] Limit new anon histories #17657

Merged
merged 3 commits into from Mar 13, 2024

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Mar 11, 2024

This is a two-fold fix that should reduce the number of newly created histories.

  • When we first create a new session (e.g. because an initial session cookie hasn't been provided or wasn't valid) we don't create a new history or associate an existing history. Scripts or spiders that don't include a session cookie will not be creating new histories that way.
  • Do return the default history also for anon users in get_or_create_default_history

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

The previous galaxy_session.user guard meant that anon
users would always get a new history.
@mvdbeek mvdbeek changed the base branch from release_24.0 to release_23.2 March 11, 2024 12:41
@mvdbeek mvdbeek marked this pull request as ready for review March 12, 2024 14:51
@mvdbeek mvdbeek changed the title Limit new anon histories [23.2] Limit new anon histories Mar 12, 2024
@github-actions github-actions bot added this to the 23.2 milestone Mar 12, 2024
@mvdbeek
Copy link
Member Author

mvdbeek commented Mar 12, 2024

That's a lot of failing tests, but I think they're all unrelated, the integration tests should all be fixed by #17679

@mvdbeek mvdbeek requested a review from a team March 12, 2024 17:30
Copy link
Contributor

@davelopez davelopez left a comment

Choose a reason for hiding this comment

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

It works correctly on my local testing. There is still a tiny chance of a race condition if the first request doesn't create the history before the next request kicks in but it is much much better now!

Thank you!

@mvdbeek mvdbeek merged commit 6f0711a into galaxyproject:release_23.2 Mar 13, 2024
42 of 49 checks passed
@bernt-matthias
Copy link
Contributor

This apparently broke planemo serve #17821

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.

None yet

3 participants