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

ItemImmutableException: History is immutable #18146

Closed
galaxyproject-sentryintegration bot opened this issue May 14, 2024 · 4 comments
Closed

ItemImmutableException: History is immutable #18146

galaxyproject-sentryintegration bot opened this issue May 14, 2024 · 4 comments

Comments

@galaxyproject-sentryintegration

This might not actually be a bug, but there is probably a usability issue here. You can make all your histories private, and I think that should probably also work for archived and purged histories ? Alternatively we should probably not fail hard here as soon as a single history can't be made private ?

The other issue is that the controller method appears to not turn MessageExceptions into a regular 400 style response. And maybe we should do this via the API ?

Sentry Issue: GALAXY-MAIN-SGB

ItemImmutableException: History is immutable
  File "galaxy/web/framework/decorators.py", line 206, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "galaxy/web/framework/decorators.py", line 94, in decorator
    return func(self, trans, *args, **kwargs)
  File "galaxy/webapps/galaxy/controllers/history.py", line 195, in make_private
    self.history_manager.error_unless_mutable(history)
  File "galaxy/managers/secured.py", line 166, in error_unless_mutable
    raise exceptions.ItemImmutableException(f"{self.model_class.__name__} is immutable")

Uncaught exception in exposed API method:
@davelopez
Copy link
Contributor

And maybe we should do this via the API ?

I'm happy to move this to the API as a FastAPI endpoint. But it wouldn't be correct to target 24.0 for the fixes or is it still ok?

@mvdbeek
Copy link
Member

mvdbeek commented May 22, 2024

I thought we can do with the API already, but I guess just on a single history basis. Yeah, new API is not for 24.0.

@davelopez
Copy link
Contributor

OK, thanks! I will then do the minimal fixes in the existing client controller for 24.0 and follow up on dev (after merge) replacing it with the new API 👍

@davelopez
Copy link
Contributor

Should be fixed in #18200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants