Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestEphemeralAccountSync NDF #1622

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

ChrisSchinnerl
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl commented Oct 24, 2024

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.

@ChrisSchinnerl ChrisSchinnerl self-assigned this Oct 24, 2024
@ChrisSchinnerl ChrisSchinnerl marked this pull request as ready for review October 24, 2024 09:54
@ChrisSchinnerl ChrisSchinnerl changed the title Debug TestEphemeralAccountSync NDF Fix TestEphemeralAccountSync NDF Oct 24, 2024
@ChrisSchinnerl ChrisSchinnerl merged commit cbb8f84 into dev Oct 25, 2024
9 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the chris/ephemeral-account-sync-ndf branch October 25, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants