-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Add support for Trino 470 #705
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation LGTM, many thanks!
It would be great if you could please add some docs for the user. Maybe below https://docs.stackable.tech/home/stable/trino/#_supported_versions? Or put it somewhere else and link to it there.
IMHO it should contain a quick explanation that Trino switches it's S3 implementation and link to trinodb/trino#24878.
Also mention that users can roll back to the legacy using this and that configOverrides, however that it will be removed eventually.
Thanks!
@@ -70,6 +73,7 @@ pub trait ToCatalogConfig { | |||
catalog_name: &str, | |||
catalog_namespace: Option<String>, | |||
client: &Client, | |||
trino_version: u16, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all operators (and all other places in this operator AFAIK) we call it product_version
of type &str
. For consistency reasons it would be great to have that here as well.
However, as Trino is special I like the u16, so mixed feelings here ^^
If we go with u16, we should do it in all places in the operator I'd say.
Just FYI that Starburst versions Trino with a trailing e
(I guess enterprise), e.g. 467-e
. If we want to support that in the future (there have been ideas), a &str would be more robust.
TLDR: I let you decide, but please make it consistent within trino-op
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI that Starburst versions Trino with a trailing e (I guess enterprise), e.g. 467-e.
ROFL, I had done a semver impl just in case, then decided against it since I didn't see any current use cases 🤦.
See 9a695e32394339569b78b1a75ae8c86750d39ecc..72a55733928e79fe5c3dcfde99b6903fc2feb7aa
#diff-44935ae74c
Will respond separately to the first paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all operators (and all other places in this operator AFAIK) we call it product_version of type &str. For consistency reasons it would be great to have that here as well.
However, as Trino is special I like the u16, so mixed feelings here ^^
If we go with u16, we should do it in all places in the operator I'd say.
I feel like it makes sense to represent the Trino version as a number as that is what it appears to be.
In the case of Starburst, the operator behaviour of 467-e
should be the same as 467
. Of course, if that ends up being false and we support both, then we would need to refactor it.
I have updated the JVM module to be consistent: 2640426
More generally, I think we should try to encode the differences in versions rather than having specific supported versions in code. Of course there will be versions we haven't validated against, but also we don't list them as supported, so I feel that is ok.
If all of our products versions can be coerced into semver, that could help too. That way we can still leverage PartialEq and PartialOrd. That could at least keep things consistent across the operators.
But at some point, there will be inconsistency and I think that is ok too. They are all wildly different products with whatever versioning scheme their respective maintainers choose.
// Trino 469 deprecates the Legacy S3 (via the Hadoop FS interface) implementation. | ||
// Trino 470 completely removes Legacy S3 support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it's a bit tricky.
Can you please link to trinodb/trino#24878 in the comments?
According to it, it was deprecated in 470 and will be removed in the future.
No idea what happened before 470 that required this change ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we're jumping straight to 470, would you like me to remove the comment about 469?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense, thanks!
But I let you decide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, I think we should still make the code valid even if we aren't shipping 469. We discovered the change necessary since then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See improved comment in: 661fead
// Copied from: | ||
// - https://trino.io/docs/455/installation/deployment.html#jvm-config | ||
// - https://trino.io/docs/469/installation/deployment.html#jvm-config | ||
"455" | "469" => Ok(vec![ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"455" | "469" => Ok(vec![ | |
"455" | "470" => Ok(vec![ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been changed to support numeric ranges.
See: 2640426
Specifically:
trino-operator/rust/operator-binary/src/config/jvm.rs
Lines 127 to 129 in 2640426
// - https://trino.io/docs/455/installation/deployment.html#jvm-config | |
// - https://trino.io/docs/470/installation/deployment.html#jvm-config | |
455.. => Ok(vec![ |
… S3 connections Although it is technically possible to enable legacy S3 support in Trino 469, we have forced native s3 support since 469 so the warning is written that way.
|
||
## Changed | ||
|
||
- BREAKING: Hard-code `s3.region=us-east-1` until it can be configured by the end user ([#705]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
We either need to merge with this in, or fix the CRD now to handle the s3 region.
@@ -2,5 +2,6 @@ | |||
// This is a separate file, since it is used by both the direct Trino documentation, and the overarching | |||
// Stackable Platform documentation. | |||
|
|||
- 469 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 469 | |
- 470 |
// Trino silently fails to load if `s3.region` is not set. | ||
// We will hard-code it for now so that Trino can work with IONOS | ||
// and Minio, but this will eventually come in via `S3Connection` | ||
// once the CRD has the field. | ||
tracing::warn!("s3.region is currently hard-coded to us-east-1"); | ||
catalog_config.add_property("s3.region", "us-east-1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
We either need to merge with this in, or fix the CRD now to handle the s3 region.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be in favor of adding the region to the S3Connection (via a decision). We need to think about defaults though
Description
Part of stackabletech/docker-images#999.
Caution
Blocked by stackabletech/operator-rs#959.
Definition of Done Checklist
Author
Reviewer
Acceptance