stackabletech / stackabletech/operator-rs

label_selector::convert_label_selector_to_query_string && pod_utils::pod_matches_multiple_label_values should return all Errors in a list instead of one-by-one

Open
#127 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Rust
Stars
167
Forks
19
Avg merge
1d 6h
Merged PRs (30d)
9

Description

Currently convert_label_selector_to_query_string will check the passed LabelSelector and as soon as it hits any error it will return that error.
There might be more than one error in the LabelSelector though.

We'd like to change the Error (InvalidLabelSelector) to contain a list of strings instead of a single string and return all errors in one go.

An example of how this could be handled can be found in the Zookeeper Operator:
https://github.com/stackabletech/zookeeper-operator/blob/ffd0d3d5fc47d0f9878f3675eeaae741ca09483b/crd/src/util.rs#L164

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at label_selector::convert_label_selector_to_query_string and pod_utils::pod_matches_multiple_label_values, then locate the InvalidLabelSelector definition. Compare the requested behavior with the linked Zookeeper Operator example. Done means both functions collect every validation error and return them together as a list rather than stopping at the first error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.