Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve validation to catch use of armID as name #3019

Closed
theunrepentantgeek opened this issue May 27, 2023 · 2 comments · Fixed by #3621
Closed

Improve validation to catch use of armID as name #3019

theunrepentantgeek opened this issue May 27, 2023 · 2 comments · Fixed by #3621
Assignees
Milestone

Comments

@theunrepentantgeek
Copy link
Member

theunrepentantgeek commented May 27, 2023

Describe the current behavior

A user inadvertently set up a resource reference this way:

  workspaceResourceReference:
    group: operationalinsights.azure.com
    kind: Workspace
    name: /subscriptions/<rest of the ARM ID>

This didn't work, as the expected structure for references using ARM IDs is this:

  workspaceResourceReference:
    armId: /subscriptions/<rest of the ARM ID>

Describe the improvement

The error message was accurate, but not as informative as it could be.

I'm wondering if we could improve the error handling to detect the case where something goes wrong and name has been populated with something that looks more like an armID than it does like a name.

Perhaps something like some of the errors from git where it gives a suggestion. For example, what if the error included name looks like it might be an ARM ID; did you mean armID: /subscriptions/<rest of the ARM ID> ?

@matthchr
Copy link
Member

We can also consider doing more coverage of cross-resource references in a hand-held end to end sample

@matthchr matthchr added this to the v2.2.0 milestone May 30, 2023
@matthchr matthchr modified the milestones: v2.2.0, v2.3.0 Jul 6, 2023
@matthchr
Copy link
Member

matthchr commented Nov 20, 2023

This seems like something that's probably pretty easy to do?

This name:
name: /subscriptions/<rest of the ARM ID> is a Kuberentes name, so we can verify that it matches expected Kubernetes naming rules.

Also can, if we see /subscriptions point users at the ARM ID field

@matthchr matthchr modified the milestones: v2.6.0, v2.5.0 Nov 20, 2023
@super-harsh super-harsh self-assigned this Dec 4, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Recently Completed in Azure Service Operator Roadmap Dec 5, 2023
@theunrepentantgeek theunrepentantgeek moved this from Recently Completed to Ready for Release in Azure Service Operator Roadmap Dec 11, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants