add support for namespace creation on POST to agents#100
Merged
balanceiskey merged 3 commits intohumanlayer:mainfrom May 14, 2025
Merged
add support for namespace creation on POST to agents#100balanceiskey merged 3 commits intohumanlayer:mainfrom
balanceiskey merged 3 commits intohumanlayer:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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 { |
Contributor
There was a problem hiding this comment.
When creating the namespace, consider handling an AlreadyExists error (e.g. using apierrors.IsAlreadyExists) to account for concurrent namespace creation.
balanceiskey
approved these changes
May 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.