galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

ItemImmutableException: History is immutable

Open galaxyproject-sentryintegration[bot] opened this issue 1 year ago • 3 comments

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:

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?

davelopez avatar May 22 '24 08:05 davelopez

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.

mvdbeek avatar May 22 '24 08:05 mvdbeek

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 :+1:

davelopez avatar May 22 '24 09:05 davelopez

Should be fixed in https://github.com/galaxyproject/galaxy/pull/18200

davelopez avatar May 31 '24 09:05 davelopez