Skip to content

feat(AIENG-625): Add support for SMART_TESTS_MATRIX environment varia… - #1360

Merged
psakthivel04 merged 2 commits into
mainfrom
feat/AIENG-625-flavors
Aug 26, 2026
Merged

feat(AIENG-625): Add support for SMART_TESTS_MATRIX environment varia…#1360
psakthivel04 merged 2 commits into
mainfrom
feat/AIENG-625-flavors

Conversation

@psakthivel04

@psakthivel04 psakthivel04 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

This pull request adds support for passing environment-specific "flavors" to the subset command via a new environment variable, and includes tests to verify the new behavior. The main changes introduce reading a JSON matrix from the environment, incorporating it into the payload, and ensuring robust handling and testing of this feature.

Support for matrix flavors via environment variable:

  • Added new environment variable SMART_TESTS_MATRIX (imported as MATRIX_KEY), which is expected to contain a JSON object describing test matrix flavors (e.g. shard, OS). (smart_tests/utils/env_keys.py, smart_tests/commands/subset.py) [1] [2]
  • Updated the subset command to parse the SMART_TESTS_MATRIX environment variable, extract its contents into a flavors dictionary, and include it in the payload sent to the server if present. (smart_tests/commands/subset.py) [1] [2]

Testing and validation:

  • Added tests to verify that when the SMART_TESTS_MATRIX environment variable is set, its contents are correctly sent as flavors in the payload, and that no flavors field is sent when the variable is absent. (tests/commands/test_subset.py)…ble to send flavors in subset payload

@psakthivel04
psakthivel04 force-pushed the feat/AIENG-625-flavors branch from 6ea078b to 21aa9d6 Compare August 17, 2026 06:27
@psakthivel04
psakthivel04 requested a review from Konboi August 17, 2026 10:16
Comment thread smart_tests/utils/env_keys.py Outdated
LEGACY_TOKEN_KEY = "LAUNCHABLE_TOKEN"

# GitHub Actions matrix as JSON, e.g. SMART_TESTS_MATRIX='{"shard":"1","os":"ubuntu"}'
MATRIX_KEY = "SMART_TESTS_MATRIX"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since “matrix” in Smart Tests usually refers to flavors, SMART_TEST_MATRIX could be a little confusing.

It’s a bit longer, but wouldn’t SMART_TEST_GITHUB_ACTIONS_MATRIX or GITHUB_ACTIONS_MATRIX be clearer?

What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Konboi I have updated the code base.

@psakthivel04
psakthivel04 requested a review from Konboi August 25, 2026 07:43
@psakthivel04
psakthivel04 merged commit d390a86 into main Aug 26, 2026
3 checks passed
@psakthivel04
psakthivel04 deleted the feat/AIENG-625-flavors branch August 26, 2026 05:56
This was referenced Aug 17, 2026
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.

2 participants