Skip to content

Conversation

@Jakeii
Copy link
Member

@Jakeii Jakeii commented Oct 15, 2025

What does this change?

Exclude tests set to off from being validated and deployed.

Why?

Tests that are turned off should not be served.

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

@Jakeii Jakeii added the fix label Oct 15, 2025
@github-actions
Copy link

github-actions bot commented Oct 15, 2025

@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Oct 15, 2025
@Jakeii Jakeii marked this pull request as ready for review October 15, 2025 15:10
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Oct 15, 2025
@github-actions
Copy link

github-actions bot commented Oct 15, 2025

@Jakeii Jakeii force-pushed the jlk/dont-serve-tests-set-to-off branch from 6eaf0d3 to 165b25f Compare October 16, 2025 11:11
@Jakeii Jakeii force-pushed the jlk/dont-serve-tests-set-to-off branch from 165b25f to fe93951 Compare October 16, 2025 11:12
@Jakeii Jakeii added the run_chromatic Runs chromatic when label is applied label Oct 17, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Oct 17, 2025
export const ABTests: ABTest[] = [];
const ABTests: ABTest[] = [];

const activeABtests = ABTests.filter((test) => test.status === 'ON');
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking low-priority possibly-daft question for my own curiosity: Should we also filter out tests that have expired at this point?

Copy link
Member Author

@Jakeii Jakeii Oct 20, 2025

Choose a reason for hiding this comment

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

No thats a sensible question! Expired tests are already ignored by Fastly. They also still currently fail the AB test validation (and CI).

Will address stopping them from breaking the validation (as we discussed in the WebEx catchup), separately! Which will likely involve filtering them out here 👍

Copy link
Member Author

@Jakeii Jakeii Oct 20, 2025

Choose a reason for hiding this comment

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

Sorry Monday brain, I added a prompt to the expiration error, https://github.com/guardian/dotcom-rendering/pull/14684/files#diff-4202f37f98d009ed152e65d2bb1a06b05cc758b7b4857bb77628fbdb058b2623L15

The idea is that if you encounter someone else's expired test while adding your own, you can simply set it to off. Hopefully will encourage informing the team!

And we can also hopefully later add a mechanism to alert teams to their expire tests.

Copy link
Contributor

@SiAdcock SiAdcock Oct 20, 2025

Choose a reason for hiding this comment

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

Thanks @Jakeii, I thought Fastly might be filtering out the expired tests. I guess I was thinking, we're doing some filtering here and some filtering on Fastly... why not do it all here? I haven't thought about it too deeply though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes, didn't answer your question did I!

Only on tests are validated, we can't exclude expired tests as we still want them to be validated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yes, that makes sense. So the owners of expired tests can receive some sort of notification that the test has indeed expired. Thanks for connecting the dots for me! 😊

@Reettaphant Reettaphant added fix and removed fix labels Oct 21, 2025
Copy link
Contributor

@cemms1 cemms1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Jakeii Jakeii merged commit 8b6f76b into main Oct 21, 2025
38 checks passed
@Jakeii Jakeii deleted the jlk/dont-serve-tests-set-to-off branch October 21, 2025 14:30
@gu-prout
Copy link

gu-prout bot commented Oct 21, 2025

Seen on PROD (merged by @Jakeii 8 minutes and 54 seconds ago) Please check your changes!

@Reettaphant Reettaphant added the fix Departmental tracking: fix label Oct 21, 2025
emma-imber pushed a commit that referenced this pull request Oct 29, 2025
* Don't serve ab tests set to off

* make test more explicit

* don't upload inactive tests to fastly

* remove expiry method

* metrics

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

Labels

dotcom-rendering fix Departmental tracking: fix Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants