Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Ignore flaky test #13631

Merged
merged 5 commits into from
Mar 17, 2023
Merged

Ignore flaky test #13631

merged 5 commits into from
Mar 17, 2023

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Mar 17, 2023

Disabling all of paritytech/polkadot-sdk#48 until they are confirmed to not be flaky anymore.
https://github.com/paritytech/ci_cd/issues/758 should should help to spot and verify the flaky-ness of tests.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added A0-please_review Pull request needs code review. I5-tests Tests need fixing, improving or augmenting. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Mar 17, 2023
Comment on lines 31 to 33
#[cfg(disable_flaky)]
#[allow(dead_code)]
// FIXME: https://github.com/paritytech/substrate/issues/11321
Copy link
Member

Choose a reason for hiding this comment

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

This should also be fixed with my latest pr or have you seen it failing since then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Have not rechecked it. The only ones that seem to be up-to-date flaky are follow_report_multiple_pruned_block and follow_forks_pruned_block.
I can re-enable it if you want.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah please reenable it.

Copy link
Member

Choose a reason for hiding this comment

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

If you also have not seen the other ones failing recently, we should also not disable them

Copy link
Member Author

@ggwpez ggwpez Mar 17, 2023

Choose a reason for hiding this comment

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

Okay just re-checked: returns_status_for_pruned_blocks failed two days ago, so also diabling.
The other two ones are re-enabled.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@@ -1024,6 +1024,9 @@ async fn follow_prune_best_block() {
}

#[tokio::test]
Copy link
Member

Choose a reason for hiding this comment

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

CC @lexnv

Copy link
Contributor

Choose a reason for hiding this comment

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

Extracting the error from the CI job(https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2529507/raw):

--- STDERR:              sc-rpc-spec-v2 chain_head::tests::follow_forks_pruned_block ---
thread 'chain_head::tests::follow_forks_pruned_block' panicked at 'assertion failed: `(left == right)`
  left: `Finalized(Finalized { finalized_block_hashes: ["0x0af997b079e96b7f333bf2fe71cb914ad3eb49355923fd3db96c0cc91243bd7a"], pruned_block_hashes: [] })`,
 right: `BestBlockChanged(BestBlockChanged { best_block_hash: "0x0af997b079e96b7f333bf2fe71cb914ad3eb49355923fd3db96c0cc91243bd7a" })

These seem to be flaky for at least follow_forks_pruned_block, I couldn't find in the logs the error for follow_report_multiple_pruned_block but I expect that to also be affected.

Offhand looking at the code it seems that the Finalized event is received before NewBlock event. Which is not generating the BestBlock before the Finalized.

I expect the error is coming from:

self.best_block_cache = Some(*hash);
},
// This is the first best block event that we generate.
None => {
self.best_block_cache = Some(*hash);

Those lines should already be handled by the generate_import_events.

Thanks for pointing this out! Will create a patch for it!

Copy link
Contributor

Choose a reason for hiding this comment

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

Fix published at: #13632, will make a note to reenable the tests if this PR gets merged first! Thanks!

ggwpez added 2 commits March 17, 2023 15:53
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez
Copy link
Member Author

ggwpez commented Mar 17, 2023

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot paritytech-processbot bot merged commit 44c5c99 into master Mar 17, 2023
@paritytech-processbot paritytech-processbot bot deleted the oty-ignore-test branch March 17, 2023 16:06
@mateo-moon
Copy link
Contributor

Instead of disabling flaky we could use the feature of nextest with retries and marking flaky tests.

breathx pushed a commit to gear-tech/substrate that referenced this pull request Apr 22, 2023
* Ignore flaky test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-enable running_the_node_works_and_can_be_interrupted

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-enable notifications_back_pressure

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Unused import

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@mateo-moon
Copy link
Contributor

mateo-moon commented May 5, 2023

Nextest flaky setting has been turned on and we now collect flaky tests data. Means that you don't need to disable tests manually. They are safe to fail with 5 retries. The results of such tests will be reported.

#13654

@bkchr
Copy link
Member

bkchr commented May 5, 2023

@oleg-plakida where are these reports collected? How can we see them?

nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
* Ignore flaky test

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-enable running_the_node_works_and_can_be_interrupted

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Re-enable notifications_back_pressure

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Unused import

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit I5-tests Tests need fixing, improving or augmenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants