Dispatch option on gunicorn version#143
Merged
nsoranzo merged 1 commit intogalaxyproject:mainfrom Feb 24, 2026
Merged
Conversation
no-control-socket gunicorn option
Member
|
How I didn't think about that? 🙄 What about checking the gunicorn version? diff --git a/gravity/state.py b/gravity/state.py
index deb96e7..7aa7e1c 100644
--- a/gravity/state.py
+++ b/gravity/state.py
@@ -104,6 +104,19 @@ class ConfigFile(BaseModel):
exec(fh.read(), {}, locs)
return locs["VERSION"]
+ @property
+ def gunicorn_version(self):
+ if galaxy_installed:
+ from gunicorn import __version__
+ return __version__
+ else:
+ galaxy_requirements_file = os.path.join(self.galaxy_root, "requirements.txt")
+ with open(galaxy_requirements_file) as fh:
+ for line in fh:
+ if line.startswith("gunicorn=="):
+ return line.split("==")[1].strip()
+ raise RuntimeError("gunicorn version not found in Galaxy requirements.txt")
+
@field_validator("galaxy_root", mode="after")
def _galaxy_root_required(cls, value: Optional[str], info: ValidationInfo) -> Optional[str]:
if value is None:
@@ -317,7 +330,7 @@ class GalaxyGunicornService(Service):
def command_template(self):
template = self._command_template
try:
- if Version(self.config.galaxy_version) >= Version("26.1.0.dev0"):
+ if Version(self.config.gunicorn_version) >= Version("25.1.0"):
template += " --no-control-socket"
except Exception:
pass |
Member
Author
|
gravity doesn't need to be installed in same venv, so I think this would be a step back in the isolation and goals we set out for gravity initially ... but maybe that's ok ? |
Member
It uses the same pattern of the |
Member
Author
|
Which does this: where galaxy_installed is: so that doesn't require same env |
Member
Author
|
I should start reading the diff to the end ... |
0e6a9e8 to
240b10e
Compare
Much better fix, thank you Nicola!
240b10e to
c6e5fb5
Compare
no-control-socket gunicorn option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dev is now using a gunicorn version below 25.1.0, so this flag doesn't exist