Skip to content

Conversation

@mfleader
Copy link
Collaborator

@mfleader mfleader commented Jun 25, 2025

  • Adds a Kustomize plugin to set a given Resource's Namespace to the Operator owner instance's Namespace.
  • Factors out Name validation behavior into plugins.go for reuse in namespace.go.

@mfleader mfleader self-assigned this Jun 25, 2025
@mfleader mfleader added enhancement New feature or request exciting stuff! Just for Matt labels Jun 25, 2025
@mfleader mfleader requested a review from VaishnaviHire June 25, 2025 19:28
@mfleader mfleader force-pushed the kustomize-plugin-ns branch from 93d0894 to 1c0322c Compare June 25, 2025 19:29
@mfleader mfleader marked this pull request as ready for review June 25, 2025 20:07
@mfleader mfleader requested a review from rhdedgar June 25, 2025 21:04
@mfleader mfleader requested a review from leseb June 26, 2025 13:14
@mfleader mfleader force-pushed the kustomize-plugin-ns branch from 1c0322c to fdce3ad Compare June 26, 2025 14:15
@mfleader mfleader requested review from rhuss and skamenan7 and removed request for leseb and skamenan7 June 26, 2025 14:54
@VaishnaviHire
Copy link
Collaborator

/lgtm

Copy link
Collaborator

@rhuss rhuss left a comment

Choose a reason for hiding this comment

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

Some minor comments, feel free to improve on that if you agree or skip it, too (no hard feelings)


_, err := CreateNamespacePlugin("")
require.Error(t, err)
assert.Contains(t, err.Error(), "namespace cannot be empty")
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Usually I would not check on literal error message, but that key context components are contained. E.g. here I would check that "namespace" is included for the context and for "empty" as the error kind. Not necessarily the exact wording, that makes the test more robust for refactorings but still captures the essence.


// ValidateName uses the strictest naming rule (for Namespaces) to ensure
// the provided name string is valid for any given Resource.
func ValidateName(name string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe the function name should reflect that it's for the stronge validation of a DNS name, and not for all resource. Something like ValidateDNSResourceName or so.

@rhuss rhuss added the lgtm-with-suggestions Optional PR update requested. Remove to automerge. label Jun 27, 2025
@rhuss
Copy link
Collaborator

rhuss commented Jun 27, 2025

@mfleader @leseb @VaishnaviHire @skamenan7 @rhdedgar @Elbehery

While working on the PR (pardonnez-mois for hijacking the issue :), I would quickly raise a proposal:

  • Adding a lgtm-with-suggestions that a PR reviewer can add when she only has optional suggestions to add, but no hard feelings and don't want to prevent merging the PR. It's just to seed some proposal that are not hard arguments (stuff, that we usually name as nits)
  • The author of the PR the can remove that label to trigger an auto-merge (when the other conditions are met, too) or add the suggestions (in this case, a new approval is needed, and hopefully the automation could remove that label on additional change, much like approvals are removed after additional changes)

This allows us to have some more flexibility, moves back some responsibility to the author and hopefully helps in unblocking and speeding-up things.

wdyt ?

@leseb
Copy link
Collaborator

leseb commented Jun 27, 2025

I'm not sure how I feel about this. Typically, "nits" still require changes; what I consider "nit" is something small but still needs to be addressed (maybe I got the understanding of "nit" wrong, though).

If no action is required, I would typically start the comment with: "No action required: ...", then leave it up to the PR author to address or not. I might still leave an approval, also. This happened recently with @mfleader, I had a "no action required" item, approved the PR, and it got merged. @mfleader then followed up with another PR because he felt the item made sense. If I had a strong opinion I wouldn't have had approved the PR in the first place.

Also btw, approvals are not reset on push, we haven't configured that yet, and I'm all for it even though it could slow us down.

All that said, I'm not sure if this label should block merging (I know it's the entire point of the label) :). It feels like more burden to the author to manage the label :)

@rhdedgar
Copy link
Collaborator

Interesting, I could see striking a balance between the two options. Nits could still require changes, and lgtm-with-suggestions could be for non-required suggestions.

That does raise the question, do we want to use the lgtm-with-suggestions label only for very small things that won't require a re-review? Example: changing the wording on some print / log output.

Otherwise, there might be some impactful code that gets pushed after the review and approval.

If it's only for small things, I do think it would be helpful to have some kind of label to convey "I approve the PR, but want to give the author time to address optional suggestions". Then the author can merge it later, even if the approver / reviewer isn't still online at the time.

@mfleader
Copy link
Collaborator Author

I agree with @leseb on their points, except I did not think nits had to be addressed, but I'm also happy to accept their definition. Additionally, I think it is time for this conversation to be moved from this pr b/c it is now blocking the conclusion and merging of this pr.

mfleader and others added 5 commits July 1, 2025 08:37
…e to the operator instance's namespace

Signed-off-by: Matthew F Leader <mleader@redhat.com>

Co-authored-by: Vaishnavi Hire <vhire@redhat.com>
Signed-off-by: Matthew F Leader <mleader@redhat.com>
Signed-off-by: Matthew F Leader <mleader@redhat.com>
Signed-off-by: Matthew F Leader <mleader@redhat.com>
Signed-off-by: Matthew F Leader <mleader@redhat.com>
@mfleader mfleader force-pushed the kustomize-plugin-ns branch from e1b921b to 003105a Compare July 1, 2025 12:37
@mfleader mfleader requested review from rhuss and skamenan7 July 1, 2025 13:09
@mfleader mfleader removed request for rhdedgar and skamenan7 July 1, 2025 13:09
@mfleader mfleader removed the lgtm-with-suggestions Optional PR update requested. Remove to automerge. label Jul 1, 2025
@mfleader mfleader requested review from rhuss and removed request for rhuss July 1, 2025 14:32
@mergify mergify bot merged commit 23867eb into llamastack:main Jul 1, 2025
6 checks passed
VaishnaviHire pushed a commit to VaishnaviHire/llama-stack-k8s-operator that referenced this pull request Jul 16, 2025
…mastack#81)

- [X] Adds a Kustomize plugin to set a given Resource's Namespace to the Operator owner instance's Namespace.
- [X] Factors out `Name` validation behavior into `plugins.go` for reuse in `namespace.go`.

Approved-by: VaishnaviHire
(cherry picked from commit 23867eb)
@mfleader mfleader deleted the kustomize-plugin-ns branch July 23, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request exciting stuff! Just for Matt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants