cloudfoundry / cloud_controller_ng

Cloud Foundry Cloud Controller
Apache License 2.0
191 stars 357 forks source link

label_selector parser is too draconian re white-space #1444

Open ericpromislow opened 5 years ago

ericpromislow commented 5 years ago

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
                        ^
  2. Space forbidden inside comma-separated in-block (issue #1443):

    environment in (production, staging), tier=backend
                                             ^
  3. Space forbidden after and-type comma:

    environment in (production, staging), tier=backend
                                                             ^
  4. Spaces forbidden around equal-sign:

    environment in (production, staging), tier =backend
                                                                   ^
  5. Trailing spaces forbidden

    environment in (production, staging), tier=backend[SPACE]
                                                                                   ^
  6. 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

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/168488761

The labels on this github issue will be updated when the story is started.

ericpromislow commented 5 years ago

I'm working on this during flex time, so if anyone else wants to work on this pls contact me