Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Boskos does not allow duplicate resource name even for different types #14

Open
ixdy opened this issue May 29, 2020 · 5 comments
Open
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/testing Categorizes an issue or PR as relevant to SIG Testing.

Comments

@ixdy
Copy link
Contributor

ixdy commented May 29, 2020

Originally filed as kubernetes/test-infra#15054 by @amwat

resources:
- type: bar
  names: 
  - foo
- type: qwe
  names:
  - foo

results in {"error":"duplicated resource name: foo","level":"fatal","msg":"failed to create ranch!" }

This seems like something we should support?

/cc @krzyzacy @ixdy @sebastienvas

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 27, 2020
@krzyzacy
Copy link
Contributor

@detiber
Copy link
Member

detiber commented Aug 27, 2020

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 27, 2020
@wking
Copy link

wking commented Mar 26, 2021

Pinning the links from the previous comment to a specific commit, because master has moved on:

$ git log --date=short --format='%ad %h %s' --first-parent | grep -B1 '2020-08'
2020-09-03 c0841a5 Merge pull request #39 from ixdy/go1.15.1
2020-08-18 984516e Merge pull request #38 from ixdy/boskos-janitor-logging-sinks

So:

@wking
Copy link

wking commented Mar 26, 2021

I was poking around at this today, and I feel like the solution is to bump the ResourceObject CRD to v2, add a spec.name, and use metadata.name for an internal {type}-{name} slug or some such. That will still break if folks use something like:

resources:
- type: a
  names: 
  - b-c
- type: a-b
  names:
  - c

But I can't think of a simple guard for that, because any delimiters we could use could also be in the type or name. We could hash {type} {name} or some such, but that makes the resource names less recognizable. And with the consumed values moving into spec, we'd be free to easily migrate the metadata.name going forward, if we ended up running into problems with whatever approach we hit out of the gate.

However looking through the docs on CRD versions, I don't actually see any provision for mutating resource names. This might be a "drain the existing leases, delete all the existing ResourceObject, install the new CRD, and then push your config into new ResourceObjects" sort of thing. Or can we assume that the only thing touching these ResourceObjects is Boskos itself and wire the conversion into the reaper or some other process that is iterating over ResourceObjects?

@spiffxp spiffxp added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
None yet
Development

No branches or pull requests

7 participants