Skip to content

feat(selectivity): add ability to save incomplete dumps#1247

Merged
KuznetsovRoman merged 1 commit intomasterfrom
TESTPLANE-970.save_incomplete_dump
Apr 28, 2026
Merged

feat(selectivity): add ability to save incomplete dumps#1247
KuznetsovRoman merged 1 commit intomasterfrom
TESTPLANE-970.save_incomplete_dump

Conversation

@KuznetsovRoman
Copy link
Copy Markdown
Member

@KuznetsovRoman KuznetsovRoman commented Apr 23, 2026

Issue

If test run is failed, all dumps are lost, and we have to rerun all tests.

Solution

We can save incomplete data (in cooperation with lastFailedOnly mode) in order to rerun only failed tests, which is much faster

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/testplane@1247

commit: 3381a68

dependencies.modules.forEach(dependency => this._addModuleDependency(dependency));
}

async save(readExisting?: boolean): Promise<void> {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

"readExisting = false" had no use case here, and nobody was relying on it here.

Removing it leds to better UX

Comment on lines +37 to +39
if ((isRunFailed || browserConfig.lastFailed.only) && !saveIncompleteDumpOnFail) {
continue;
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So, with "saveIncompleteDumpOnFail" we can save data even if test run is failed or "lastFailed" filter was used

const { enabled, testDependenciesPath, saveIncompleteDumpOnFail } = browserConfig.selectivity;

if (selectivityShouldWrite(enabled) && !selectivityRoots.includes(testDependenciesPath)) {
if ((isRunFailed && !saveIncompleteDumpOnFail) || browserConfig.lastFailed.only) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

dump cleanup is different: if "browserConfig.lastFailed.only" is enabled, clear should not be performed, because it would remove dependencies for fresh tests, that were just skipped with "lastFailedOnly"

if (!config.selectivity.saveIncompleteDumpOnFail) {
logger.warn(`Disabling selectivity for ${browserId}: lastFailedOnly mode is enabled`);
} else {
debugSelectivity(`Not skipping tests for ${browserId}: lastFailedOnly mode controls it`);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Intended behavior, dont need to warn anything


if (config.lastFailed.only) {
if (!config.selectivity.saveIncompleteDumpOnFail) {
logger.warn(`Disabling selectivity for ${browserId}: lastFailedOnly mode is enabled`);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not intended, writing warning

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-970.save_incomplete_dump branch 2 times, most recently from 31966b4 to d2bd34e Compare April 28, 2026 14:42
@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-970.save_incomplete_dump branch from d2bd34e to 3381a68 Compare April 28, 2026 14:45
@KuznetsovRoman KuznetsovRoman merged commit 0bd7556 into master Apr 28, 2026
7 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-970.save_incomplete_dump branch April 28, 2026 15:08
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