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

[Merged by Bors] - TrinoClusters must specify a catalogLabelSelector #277

Closed
wants to merge 7 commits into from

Conversation

sbernauer
Copy link
Member

@sbernauer sbernauer commented Sep 7, 2022

Description

During bumping the demos to the 22.09 i noticed that the following spec from the Trino tests and docs is invalid

apiVersion: trino.stackable.tech/v1alpha1
kind: TrinoCluster
metadata:
  name: simple-trino
spec:
  version: 387-stackable0.1.0
  catalogLabelSelector:
    trino: simple-trino

instead it should be

# ...
  catalogLabelSelector:
    matchLabels:
      trino: simple-trino

Nobody noticed this, as the field catalogLabelSelector is optional. If it is not provided, the (nonexistent) Labelselector will match every TrinoCatalog withing the same Namespace and the test passed anyway.
This behavior sounds unsafe/unwanted so i suggest to make it explicit by requiring a Labelselector.

Although this change is technically breaking, the TrinoCatalog feature change has been release for a single day now, so impact should be pretty minimal. It would be greatif we could include this Change in 22.09, so that we reduce the number of breaking changes between Platform releases

Review Checklist

  • Code contains useful comments
  • CRD change approved (or not applicable)
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)
  • Cargo.toml only contains references to git tags (not specific commits or branches)
  • Helm chart can be installed and deployed operator works (or not applicable)

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But breaking change without discussion?

@sbernauer sbernauer changed the title TrinoClusters now must specify a catalogLabelSelector TrinoClusters must specify a catalogLabelSelector Sep 8, 2022
@sbernauer
Copy link
Member Author

We discussed this in Slack and Lars, Sönke and Teo approved (send you the link)
Could you please give a final approval?

@sbernauer
Copy link
Member Author

Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please wait for the tests!

@sbernauer sbernauer mentioned this pull request Sep 8, 2022
13 tasks
@sbernauer
Copy link
Member Author

Tests succeeded

@sbernauer
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Sep 8, 2022
# Description

During bumping the demos to the 22.09  i noticed that the following spec from the Trino tests and docs is invalid
```
apiVersion: trino.stackable.tech/v1alpha1
kind: TrinoCluster
metadata:
  name: simple-trino
spec:
  version: 387-stackable0.1.0
  catalogLabelSelector:
    trino: simple-trino
```
instead it should be 
```
# ...
  catalogLabelSelector:
    matchLabels:
      trino: simple-trino
```
Nobody noticed this, as the field `catalogLabelSelector` is optional. If it is not provided, the (nonexistent) Labelselector will match every TrinoCatalog withing the same Namespace and the test passed anyway.
This behavior sounds unsafe/unwanted so i suggest to make it explicit by requiring a Labelselector.

Although this change is technically breaking, the `TrinoCatalog` feature change has been release for a single day now, so impact should be pretty minimal. It would be greatif we could include this Change in 22.09, so that we reduce the number of breaking changes between Platform releases

## Review Checklist

- [x] Code contains useful comments
- [x] CRD change approved (or not applicable)
- [x] (Integration-)Test cases added (or not applicable)
- [x] Documentation added (or not applicable)
- [x] Changelog updated (or not applicable)
- [x] Cargo.toml only contains references to git tags (not specific commits or branches)
- [x] Helm chart can be installed and deployed operator works (or not applicable)


Once the review is done, comment `bors r+` (or `bors merge`) to merge. [Further information](https://bors.tech/documentation/getting-started/#reviewing-pull-requests)
@bors
Copy link
Contributor

bors bot commented Sep 8, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title TrinoClusters must specify a catalogLabelSelector [Merged by Bors] - TrinoClusters must specify a catalogLabelSelector Sep 8, 2022
@bors bors bot closed this Sep 8, 2022
@bors bors bot deleted the make-catalogLabelSelector-mandatory branch September 8, 2022 10:44
bors bot pushed a commit that referenced this pull request Sep 8, 2022
Proposing a release that's part of 22.09 to combine the TrinoCatalog feature (#263) with a fix that's a breaking change (#277).

By including trino-operator 0.6.0 in 22.09 we don't have a breaking change between platform releases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants