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

IMPROVEMENT: dependencies of daiquiri apps #248

Open
roerch opened this issue Oct 2, 2024 · 3 comments · Fixed by #249
Open

IMPROVEMENT: dependencies of daiquiri apps #248

roerch opened this issue Oct 2, 2024 · 3 comments · Fixed by #249
Assignees
Labels
app:files concern the files-app bug priority:low

Comments

@roerch
Copy link

roerch commented Oct 2, 2024

when trying to remove daiquiri apps (e.g. query) which are not used (in our case by the 4MOST system), I noticed a few "hidden" dependencies, bascially not allowing me to remove some apps due to dependencies in the migrations or in the code itself.

Some examples:
Using the 'files' app requires the stats app due to an import in files/utils.py:13

The 'stats', 'query' and 'jobs' app have a few internal dependencies, which is probably ok, but with the dependecy of the files app, this is three (actually four, see below) additional apps.
E.g.: The 'stats' app requires the query and jobs app due to a dependency in the migrations (0002_data_migration.py and 0003_... depend on query and jobs app).

The query app depends on the metadata app by import in query/process.py:14

@kimakan kimakan self-assigned this Oct 7, 2024
@kimakan kimakan added bug app:files concern the files-app labels Oct 7, 2024
@kimakan
Copy link
Contributor

kimakan commented Oct 8, 2024

The co-dependency between the jobs, metadata and query apps is inevitable. I'm a bit surprised that the dependency on the stats app is de facto hard coded in query etc. I assumed that it should be possible to to use query without stats. For now, I'll just fix the stats dependency in the files app, since it easy to implement and should not have an affect on anything else.
I'm hesitant to touch the old migrations in order to remove the stats dependencies in other apps since it's not clear for me what the consequences will be.

@kimakan kimakan linked a pull request Oct 8, 2024 that will close this issue
@jochenklar
Copy link
Member

Old migrations run only when you setup a new system. So in principle, if the migrations run through on a fresh installation, you're fine. Only if an instance out there is on a specific migration and upgrades thinks can get problematic. I think for daiquiri this chance is pretty low.

@kimakan
Copy link
Contributor

kimakan commented Oct 9, 2024

As of now, I get an error if I setup a new system due to the dependencies in the migrations.
I'll leave the issue open and might look at the problem in more detail later. The dependencies between the apps jobs, query and stats are not as critical since they are always used together anyway.

@kimakan kimakan reopened this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:files concern the files-app bug priority:low
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants