-
Notifications
You must be signed in to change notification settings - Fork 98
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
feature(views-with-tablets): enable testing materialized views with tablets #9615
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -737,7 +737,8 @@ Set type of ssh library to use. Could be 'fabric' (default) or 'libssh2' | |
|
||
## **experimental_features** / SCT_EXPERIMENTAL_FEATURES | ||
|
||
unlock specified experimental features | ||
Unlock specified experimental features. The 'views-with-tablets` feature is enabled in the default configuration, but it should not be enabled when testing versions older than 2025.1-dev or 6.3-dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 6.3-dev won't exist |
||
|
||
|
||
**default:** N/A | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ | |
from sdcm.utils.user_profile import get_profile_content | ||
from sdcm.utils.version_utils import ( | ||
get_node_supported_sstable_versions, | ||
ComparableScyllaVersion, | ||
is_enterprise, | ||
get_node_enabled_sstable_version | ||
) | ||
|
@@ -221,7 +222,9 @@ def _upgrade_node(self, node, upgrade_sstables=True, new_scylla_repo=None, new_v | |
|
||
if self.params.get("enable_tablets_on_upgrade"): | ||
scylla_yaml_updates.update({"enable_tablets": True}) | ||
|
||
version = ComparableScyllaVersion(self.scylla_version) | ||
if self.is_enterprise and version >= "2025.1.0~dev" or not self.is_enterprise and version >= "6.3.0~dev": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the upcoming versioning changes, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 6.3.0-dev does exists, it never gonna be released |
||
scylla_yaml_updates.update({"experimental_features": ["views-with-tablets"]}) | ||
Comment on lines
+225
to
+227
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need something similar in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assumed we reused the original There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know, someone need to cross check it in the code Anyhow I would recommend appending to the flags, now the code is override anything that any might have put in there before There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We restore original scylla.yaml file. See following: |
||
if self.params.get('test_sst3'): | ||
scylla_yaml_updates.update({"enable_sstables_mc_format": True}) | ||
|
||
|
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 is not technically true, they can be created in tablet keyspaces right now but we want to forbid this. We introduced an experimental feature first, now we want to adjust the test and, finally, we will forbid creating materialized views without the experimental feature being enabled.
Just clarifying so that other reviewers won't get confused why tests that use MVs are still working. I recommend updating the description.
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.
It would be great if the feature were enabled programmatically for the base version as well, but I'm not familiar with SCT enough to tell you how to do that. @fruch perhaps you will know?
If it's not feasible, alternatively you could add a comment near the
experimental_features
key which explains when theviews-with-tablets
feature needs to be provided and when not.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 updated the description for the current state
I'm not sure there is such a way in general for all tests. I saw that when tablets were introduced, we added a
enable_tablets_on_upgrade
config option that we used on specific test pipelines - we could probably do something like that here as well, but currently no tests would use it, as we don't have tests for upgrading to 2025.1, and the developers that were adding these tests would have to remember about it.For now I added a comment for the
experimental_features
configuration optionThere 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.
The only downside of using this in default for everything, that is gonna block people from using older versions
And it's gonna waste lots of people's time,
We are using older releases during development
I think this is different from the regular extra configuration in scylla yaml that wasn't there before, and existence of it does not break anything
I think moving it into the with the same version logic you used in upgrade tests
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.
Older versions of scylla which do not support this experimental feature will not recognize it, and will fail to start. If we are using SCT with older versions of scylla then it sounds like it will be a problem.
@fruch is there a way to adjust the configuration programmatically?
I found an old PR which removed the experimental "tablets" feature from SCT (#7512). It looks like the approach there was to modify Jenkinsfiles (
configurations/raft/enable_raft_experimental.yaml
). Would it be a viable approach here instead of adding "views-with-tablets" to the list of default features?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.
@piodul
I agree with @fruch that defaults must not limit us to only one scylla version.
For example, I use various scylla versions with the
master
SCT branch all the time.Yes, additional small file in the
configurations
is good solution.Also, note that each CI job can be provided with the updated SCT config option in the jenkins pipeline
extra_environment_variables
parameter.One of the recent examples:
In this case it is not needed to update SCT configs.
So, choose whatever fits your needs better.
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.
By the way, today I was hit with the same problem in test/cqlpy/run's "--release" feature which is supposed to allow running old versions of Scylla, but the newly added views-with-tablets doesn't work on old versions. My fix is scylladb/scylladb#22350. Basically test/cqlpy/run.py has a rather-ugly list of configuration "overrides", specific options that need to be added or removed from specific past versions. This list is ugly, but isn't long or hard, and I'm rather please with the power it gives me to run tests against old versions (e.g., just today in scylladb/scylladb#22354 I wrote a test and then ran it against 10 different versions of Scylla).
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.
@piodul
there two place we can do it programmatically:
proposed_scylla_yaml
, where we readappend_scylla_yaml
and use itsct_config.py
aftersct_config.get_version_based_on_conf()
is called, and we have the version informationthe first is the simplest, but it's buried in not so clear place
the 2nd might be better and clear place for more changes per release we need to do in SCT configuration.