Skip to content

added passing client_tags option to Trino plugin#7633

Merged
yoshiokatsuneo merged 5 commits intogetredash:masterfrom
RoeyoOgen:Feature/adding_client_tags_to_trino_plugin
Feb 25, 2026
Merged

added passing client_tags option to Trino plugin#7633
yoshiokatsuneo merged 5 commits intogetredash:masterfrom
RoeyoOgen:Feature/adding_client_tags_to_trino_plugin

Conversation

@RoeyoOgen
Copy link
Contributor

added the option to pass client tags to trino clusters source

What type of PR is this?

  • [X ] Feature

Description

Added the option to pass client_tags to the Trino cluster

How is this tested?

  • [ X] Unit tests (pytest, jest)

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

redash trino client tag

added the option to pass client tags to trino clusters source
@RoeyoOgen RoeyoOgen changed the title added client_tags added passing client_tags option to Trino plugin Feb 20, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@RoeyoOgen
Copy link
Contributor Author

@kimsehwan96 saw you last touched the Trino code, would love to get a review

@tsuyoshizawa would to get one too :)

Comment on lines 174 to 175
elif isinstance(client_tags, list):
tags = [str(tag).strip() for tag in client_tags]
Copy link
Contributor

@kimsehwan96 kimsehwan96 Feb 22, 2026

Choose a reason for hiding this comment

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

Suggested change
elif isinstance(client_tags, list):
tags = [str(tag).strip() for tag in client_tags]

Is this elif isinstance(client_tags, list): really needed?

The configuration_schema defines client_tags as "type": "string" and ConfigurationContainer.update validates against the schema with jsonschema.validate before saving so a list values would be rejected at write time and never reach this condition!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, thanks!

Copy link
Contributor

@yoshiokatsuneo yoshiokatsuneo left a comment

Choose a reason for hiding this comment

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

Thank you for your PR !


def _get_client_tags(self):
client_tags = self.configuration.get("client_tags")
if not isinstance(client_tags, str):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think just if not client_tags: will be simpler, as client_tags is always string or None and can be empty string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

expected_catalogs = [TestTrino.catalog_name]
self.assertEqual(catalogs, expected_catalogs)

def test_configuration_schema_has_client_tags(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this test is redundant and we don't need this test as configuration_schema is just a constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@RoeyoOgen
Copy link
Contributor Author

RoeyoOgen commented Feb 24, 2026

Thank you for your PR !

Cheers! nice to e-meet :)

finished addressing comments 🤩

@RoeyoOgen
Copy link
Contributor Author

@yoshiokatsuneo can you assist with the failed tests?

@yoshiokatsuneo yoshiokatsuneo merged commit d8bff52 into getredash:master Feb 25, 2026
11 checks passed
@yoshiokatsuneo
Copy link
Contributor

@RoeyoOgen

I just confirmed that the PR works.
Thank you for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants