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

fix: properly cascade group permissions to all projects in the group #277

Merged
merged 9 commits into from
Jun 26, 2024

Conversation

olevski
Copy link
Member

@olevski olevski commented Jun 21, 2024

Fixes #274

/deploy

@olevski olevski requested a review from a team as a code owner June 21, 2024 07:28
@RenkuBot
Copy link
Contributor

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

Comment on lines +104 to +107
logging.info(
f"The project namespace ID in Authzed {authzed_group_id} "
f"does not match the expected group ID {correct_group_id}, correcting it..."
)
Copy link
Member

Choose a reason for hiding this comment

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

Logging doesn't work here btw (see #267).

Copy link
Member Author

Choose a reason for hiding this comment

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

I know I hope that it will when we fix the logging setup.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will try swapping the alembic config level to info and see what happens. Hopefully alembic does not flood the console with lots of random messages.

Copy link
Member Author

Choose a reason for hiding this comment

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

Logs look normal with the level set to INFO in alembic. So I will change that.

Copy link
Member

Choose a reason for hiding this comment

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

An easy way to have the logging work in the background job is to use logger = logging.getLogger("background_jobs") and use that.

Copy link
Member

Choose a reason for hiding this comment

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

logger = logging.getLogger("background_jobs")
logger.setLevel(logging.INFO)

Copy link
Member Author

Choose a reason for hiding this comment

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

With logging level set to info in alembic it works, so I will keep it as is.

@@ -163,7 +163,7 @@ async def _get_namespaces(
name=ns.name,
slug=ns.latest_slug if ns.latest_slug else ns.slug,
created_by=ns.created_by,
creation_date=ns.creation_date,
creation_date=None, # NOTE: we do not save creation date in the DB
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should keep an issue to fix the API spec then?

Copy link
Member Author

@olevski olevski Jun 23, 2024

Choose a reason for hiding this comment

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

I opened one here: #283

components/renku_data_services/namespace/orm.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 23, 2024

Pull Request Test Coverage Report for Build 9635700701

Details

  • 50 of 62 (80.65%) changed or added relevant lines in 6 files are covered.
  • 6 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.008%) to 90.15%

Changes Missing Coverage Covered Lines Changed/Added Lines %
bases/renku_data_services/background_jobs/core.py 18 19 94.74%
components/renku_data_services/namespace/db.py 9 10 90.0%
bases/renku_data_services/background_jobs/config.py 2 4 50.0%
components/renku_data_services/namespace/orm.py 11 19 57.89%
Files with Coverage Reduction New Missed Lines %
bases/renku_data_services/background_jobs/config.py 1 54.9%
components/renku_data_services/crc/db.py 1 86.59%
components/renku_data_services/namespace/orm.py 1 83.12%
components/renku_data_services/storage/blueprints.py 1 95.7%
components/renku_data_services/crc/blueprints.py 2 90.13%
Totals Coverage Status
Change from base Build 9614271413: -0.008%
Covered Lines: 8612
Relevant Lines: 9553

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 24, 2024

Pull Request Test Coverage Report for Build 9636072700

Details

  • 43 of 53 (81.13%) changed or added relevant lines in 6 files are covered.
  • 4 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.03%) to 90.188%

Changes Missing Coverage Covered Lines Changed/Added Lines %
bases/renku_data_services/background_jobs/core.py 18 19 94.74%
components/renku_data_services/namespace/db.py 9 10 90.0%
bases/renku_data_services/background_jobs/config.py 2 4 50.0%
components/renku_data_services/namespace/orm.py 4 10 40.0%
Files with Coverage Reduction New Missed Lines %
bases/renku_data_services/background_jobs/config.py 1 54.9%
components/renku_data_services/crc/blueprints.py 1 90.13%
components/renku_data_services/namespace/orm.py 1 87.3%
components/renku_data_services/storage/blueprints.py 1 95.16%
Totals Coverage Status
Change from base Build 9614271413: 0.03%
Covered Lines: 8603
Relevant Lines: 9539

💛 - Coveralls

@olevski olevski merged commit dd68ce2 into main Jun 26, 2024
15 checks passed
@olevski olevski deleted the fix-274 branch June 26, 2024 08:47
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

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.

Group membership does not cascade permissions to projects
5 participants