-
Notifications
You must be signed in to change notification settings - Fork 1
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
Test https://github.com/wolfv/quetz/tree/testing #9
Comments
@wolfv, So the above mentioned issue was an error from my side. The persistent volume had the old config, so creating a deployment with Once I fixed this, I was able to test all the other features as well. I have made some changes but I couldn't push as I don't have write access, so I've added diffs of the changes I made below.
|
Thanks, fixed the first issue like you did (and pushed to both |
@najose I've fixed two additional issues I've encountered for the copying. Maybe you can test with the latest state again :) |
quick note that I implemented the feature you asked for re. skipping the authorization for health endpoints. |
@wolfv, Thanks will test it out soon. |
@wolfv, I tested out the latest changes (fix for copying packages, health check with no authN) from the You seem to have missed one fix for handling diff --git a/plugins/quetz_googleiap/quetz_googleiap/middleware.py b/plugins/quetz_googleiap/quetz_googleiap/middleware.py
index 71e05c5..cd18b80 100644
--- a/plugins/quetz_googleiap/quetz_googleiap/middleware.py
+++ b/plugins/quetz_googleiap/quetz_googleiap/middleware.py
@@ -91,7 +91,7 @@ class GoogleIAMMiddleware(BaseHTTPMiddleware):
)
dao.create_channel(channel, user.id, "owner")
- self.google_role_for_user(user_id, dao)
+ self.google_role_for_user(user_id, email, dao)
user_id = uuid.UUID(bytes=user.id)
# drop the db and dao to remove the connection
del db, dao
@@ -105,15 +105,15 @@ class GoogleIAMMiddleware(BaseHTTPMiddleware):
response = await call_next(request)
return response
- def google_role_for_user(self, user_id, dao):
- if not user_id:
+ def google_role_for_user(self, user_id, username, dao):
+ if not user_id or not username:
return
- if user_id in self.server_admin_emails:
- logger.info(f"User {user_id} is server admin")
+ if username in self.server_admin_emails:
+ logger.info(f"User '{username}' with user id '{user_id}' is server admin")
dao.set_user_role(user_id, "owner")
else:
- logger.info(f"User {user_id} is not a server admin")
+ logger.info(f"User '{username}' with user id '{user_id}' is not a server admin")
dao.set_user_role(user_id, "member")
|
@wolfv I have tried testing testing the changes in https://github.com/wolfv/quetz/tree/testing and noted my observations below.
Observations
[googleiam]
section is not configured in the config.toml. But in my testing the section is present in the config. On adding more debug statements into the code, it seems callingconfig.configured_section('googleiam)
callsconfig.get('googleiam')
and this fails with the same error message as the ones seen in the annotated test failures in this PR workflow run - (AttributeError: 'super' object has no attribute 'getattr'). Also "Google IAM is not configured" seems to be raised in the test failure annotations for IAP middleware PRTesting environment
I have a built docker image using the below dockerfile and pushed it a publically accessible registry in case you want to inspect the image I'm using.
Image name:
us-east1-docker.pkg.dev/package-factory-sandbox/quetz-sdgr/quetz-testing:latest
The container startup script creates a deployment and starts Quetz:
Config
I'll add more observations in the GitHub issue as and when I find them. Please let me know when I can test again with the issues resolved in the testing branch.
The text was updated successfully, but these errors were encountered: