-
Notifications
You must be signed in to change notification settings - Fork 42
add support for namespace creation on POST to agents #100
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
add support for namespace creation on POST to agents #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Changes requested ❌
Reviewed everything up to a0393a2 in 1 minute and 35 seconds. Click for details.
- Reviewed
382lines of code in5files - Skipped
0files when reviewing. - Skipped posting
3draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. acp/config/rbac/namespace_permissions_binding.yaml:13
- Draft comment:
Consider adding a newline at the end of the file for consistency. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While having a newline at the end of files is a common convention, this is a very minor formatting issue. It's the kind of thing that should be handled by automated tooling or git configuration, not manual code review comments. It doesn't affect functionality and is not a significant code quality issue. Missing newlines at end of files can cause issues with some tools and make diffs less clean. It's a widely accepted best practice to include them. While true, this is too minor an issue for a PR comment. It should be handled by automated formatting tools or git configuration, not manual review. Delete this comment as it's too minor an issue and should be handled by automated tooling rather than manual review comments.
2. acp/config/rbac/namespace_permissions_patch.yaml:14
- Draft comment:
Consider adding a newline at the end of the file for consistency. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While having a newline at the end of files is a common convention, this is a very minor stylistic issue. Most modern editors handle this automatically. This kind of comment doesn't point out a functional issue or code quality problem that meaningfully impacts the codebase. Missing newlines at end of file can cause issues with some tools and make diffs less clean. It's a widely accepted best practice in software development. While true, this is such a minor issue that it doesn't warrant a PR comment. Most CI systems or pre-commit hooks would catch this if it was important to the team. Delete this comment as it's too minor of an issue to warrant a PR comment and would likely be handled by automated tools if the team cares about it.
3. acp/internal/server/server_test.go:406
- Draft comment:
The custom errorK8sClient simulates errors for namespace GETs; ensure this simulation is scoped only to namespace objects so that other resource tests are not inadvertently affected. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%The comment is suggesting to ensure that the error simulation is scoped correctly. This is asking the author to ensure something, which violates the rules. It doesn't provide a specific suggestion or ask for a specific test to be written.
Workflow ID: wflow_CDppyYm2RmnpUkq0
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
| }, | ||
| } | ||
|
|
||
| if err := s.client.Create(ctx, &namespace); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When creating the namespace, consider handling an AlreadyExists error (e.g. using apierrors.IsAlreadyExists) to account for concurrent namespace creation.
Important
Add support for automatic namespace creation in agent and task creation, with updated RBAC and tests.
createAgentandcreateTaskinserver.gonow ensure the namespace exists before proceeding.ensureNamespaceExistsfunction to check and create namespaces if needed.namespace_permissions_patch.yamlandnamespace_permissions_binding.yamlfor namespace management permissions.kustomization.yamlto include new RBAC files.server_test.gofor namespace auto-creation and error handling during namespace creation.This description was created by
for a0393a2. You can customize this summary. It will automatically update as commits are pushed.