Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test ran 6*50 times without failing with this fix.
NDF that was fixed:
cluster_test.go:1386: account shouldn't be marked as clean shutdown or not require a sync, got true false
Example: https://github.com/SiaFoundation/renterd/actions/runs/11496423699/job/31998008008
The problem was that after the restart of the cluster, when we first fetch the account, the account gets created and sometimes synced (since created accounts are unclean and need to be synced).
Whenever it got synced before the check the test failed.
While debugging I noticed that the GET route for fetching accounts only returns the account id which I thought was odd anyway so I updated it to return the full account. So the route returns the freshly created, unclean account right away without a chance to sync it. Which fixes the NDF.