Skip to content

Conversation

@eikek
Copy link
Member

@eikek eikek commented Oct 23, 2025

When projects or groups are removed, the containing entities are removed as well. This wasn't propagated to the search engine. Deleting users does not apply, because this is not implemented yet (in case they have data).

/deploy

@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ds-1075.dev.renku.ch

eikek added 7 commits October 23, 2025 15:26
When deleting a project, contained data connectors should be deleted
as well. This is currently handled by a trigger in the db watching the
`entity_slugs` table.
Removes the trigger that did this before and implements it into the
corresponding repositories
@eikek eikek force-pushed the eikek/931-entity-removal-search branch from b3693f8 to d2a5da4 Compare October 23, 2025 13:26
@coveralls
Copy link

Pull Request Test Coverage Report for Build 18750422297

Details

  • 42 of 42 (100.0%) changed or added relevant lines in 6 files are covered.
  • 8 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.04%) to 86.844%

Files with Coverage Reduction New Missed Lines %
components/renku_data_services/crc/core.py 1 79.03%
components/renku_data_services/notebooks/util/retries.py 1 59.38%
components/renku_data_services/namespace/blueprints.py 2 97.56%
components/renku_data_services/storage/blueprints.py 4 91.06%
Totals Coverage Status
Change from base Build 18746754278: 0.04%
Covered Lines: 22761
Relevant Lines: 26209

💛 - Coveralls

@eikek eikek linked an issue Oct 23, 2025 that may be closed by this pull request
@eikek eikek marked this pull request as ready for review October 24, 2025 05:37
@eikek eikek requested review from a team, SalimKayal and sgaist as code owners October 24, 2025 05:37
Comment on lines +276 to +282
projs = await session.execute(
select(distinct(schemas.EntitySlugORM.project_id))
.join(schemas.NamespaceORM, schemas.NamespaceORM.id == schemas.EntitySlugORM.namespace_id)
.where(schemas.NamespaceORM.group_id == group.id)
.where(schemas.EntitySlugORM.project_id.is_not(None))
)
projs = [e for e in projs.scalars().all() if e]
Copy link
Member

@leafty leafty Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this is too many projects at the moment, see this comment: #1004 (comment)

If there was any data connector in a project that was moved out, then there is a remaining entry in the EntitySlugORM table which will match that moved project and the project will get wrongly deleted.

We can look at merging this PR now or decide to fix the slug table issue first. Not sure what is best.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, great you spotted this! Unfortunate, but I probably would fix the other issue first or maybe disable the "move a project" feature for the next release so things get not messed up even more.

Copy link
Member

@leafty leafty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution looks good to me 👍 .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an empty file would be fine. "Only here to make pytest work." is not correct anyway, __init__.py files are required to make a folder a Python module, so almost all folders with Python source code would have a __init__.py file in them, except for folders containing Python scripts or other types of non-module cases.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thanks for the explanation. For me it is confusing that pytest works when I give it the test_xyz.py file, but it doesn't work when it tries to collect test cases. So it is sort of correct to say it makes pytest work :-) I'll remove the comment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some entity removal does not update the search

5 participants