galaxyproject / galaxy

Data intensive science for everyone.
https://galaxyproject.org
Other
1.33k stars 966 forks source link

ItemImmutableException: History is immutable #18146

Closed galaxyproject-sentryintegration[bot] closed 1 day ago

galaxyproject-sentryintegration[bot] commented 2 weeks ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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 commented 1 day ago

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