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] Fix tool shed webapp #17597

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/galaxy/webapps/base/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ def _ensure_valid_session(self, session_cookie: str, create: bool = True) -> Non
galaxy_session = self.__create_new_session(prev_galaxy_session, user_for_new_session)
galaxy_session_requires_flush = True
self.galaxy_session = galaxy_session
self.get_or_create_default_history()
if self.webapp.name == "galaxy":
self.get_or_create_default_history()
self.__update_session_cookie(name=session_cookie)
else:
self.galaxy_session = galaxy_session
Expand Down
4 changes: 4 additions & 0 deletions lib/tool_shed/webapp/buildapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class ToolShedGalaxyWebTransaction(GalaxyWebTransaction):
def repositories_hostname(self) -> str:
return url_for("/", qualified=True).rstrip("/")

def get_or_create_default_history(self):
# tool shed has no concept of histories
return None
Copy link
Member

Choose a reason for hiding this comment

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

This may complicate type annotation when we add it. What about guarding the change in #17557 with a if self.webapp.name == "galaxy": instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

I assume the type checking would fail anyway on attempting to create the history, so this is maybe a bit easier ?

Copy link
Member

Choose a reason for hiding this comment

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

You can raise NotImplementedError, I suppose?

mvdbeek marked this conversation as resolved.
Show resolved Hide resolved


class CommunityWebApplication(galaxy.webapps.base.webapp.WebApplication):
injection_aware: bool = True
Expand Down
Loading