Skip to content

[Request]: TECH DEBT - Custom type for resource labels. #1359

Description

@jglogan

Feature or enhancement request details

As @Ronitsabhaya75 observed in #1123, our ManagedResource uses a [String: String] to represent metadata labels, which can admit data that's not valid.

Further, the only label validation that we were performing was in NetworkConfiguration.

I'm starting to put together a proposal for what a 1.0 API/SDK should encompass and will be using network resource management as a proving ground. I'll post that as a discussion topic within the next few days and then we can go back and forth between incremental changes and refining the network type until we've established a nice set of patterns that we can apply to the other resource types.

We need to keep individual PRs minimal so that they are readily reviewable. This first bit of work:

  • Creates a new ResourceLabels type.
  • Adds an AppError type that supports structured logging and delegates message presentation to the error receiver, and derives a ResourceLabels.LabelError subtype to represent label validation errors.
  • Extracts the label validation code from NetworkConfiguration into this type (relocating unit tests as necessary).
  • Revises all affected code paths.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. self-assigned this
    on Mar 27, 2026
  2. added theissue type on Mar 27, 2026
  3. jglogan commented on Mar 28, 2026

    @jglogan
    ContributorAuthor

    @saehejkang I'm finally getting back to being able to look at PRs and I remembered your #1126 for the managed resource error type.

    Let's have a look at both of these and see how best to reconcile them.

  4. added this to the 2026-04 milestone on Apr 7, 2026
  5. added a commit that references this issue on Apr 7, 2026
    e37dcc1
  6. added a commit that references this issue on Aug 28, 2026
    48a7fed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions