cloudfoundry / cloudfoundry/cloud_controller_ng

label_selector parser is too draconian re white-space

Open
#1,444 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement unscheduled v3-only
Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

See also https://github.com/cloudfoundry/cloud_controller_ng/issues/1443

Summing up 5 known issues:

Given this label_selector: environment in (production, staging), tier=backend

There are at least 4 known errors related to white-space handling:

  1. Space required before open-paren:
environment in(production, staging), tier=backend
                        ^
  1. Space forbidden inside comma-separated in-block (issue #1443):
environment in (production, staging), tier=backend
                                             ^
  1. Space forbidden after and-type comma:
environment in (production, staging), tier=backend
                                                             ^
  1. Spaces forbidden around equal-sign:
environment in (production, staging), tier =backend
                                                                   ^
  1. Trailing spaces forbidden
environment in (production, staging), tier=backend[SPACE]
                                                                                   ^
  1. Leading spaces forbidden
[SPACE]environment in (production, staging), tier=backend
^

The examples in the Kub document appear more forgiving of white-space. They don't talk about it, at least

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

Locate the label_selector parser and compare its whitespace rules with the Kubernetes document referenced in the issue. Reproduce the six examples, then verify that leading, trailing, separator, parenthesis, and equals-sign whitespace are handled as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, ruby
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.