Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: schedule autobuild directly on TestExecutorAutostopTemplateDisabled#10453

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 1 commit intomainfromspike/flake-test-executor
Nov 1, 2023

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedNov 1, 2023
edited
Loading

Fixes flake seen here:https://github.com/coder/coder/actions/runs/6716682414/job/18253279654

The test used a cron schedule to compute autobuild ticks, with ticks every hour on the hour. The default TTL was set to an hour. Usually, the next tick is less than one hour in the future, unless the test runs at :00 past the hour, which it did in my flake'd
run. But, given that this is an autostop test, the cron schedule is irrelevant (such schedules are used for auto_start_). So, I've removed it from the test and compute the build ticks directly.

Also, the test originally had the workspace TTL set to longer than the default template TTL, and then tested that no build happened when the tick was prior to both. This seems odd to me, as we want to demonstrate the the executor disregards the workspace TTL.
So, I changed the test to set the workspace TTL shorter, and then send in a tick between the two, verify that we don't autostop, then a tick after the template TTL and verify that we do.

@spikecurtisGraphite App
Copy link
ContributorAuthor

Current dependencies on/for this PR:

Thisstack of pull requests is managed byGraphite.

Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Makes sense to me, nice fix! Do you think we'll have similar issues with other tests using cron?

@spikecurtisGraphite App
Copy link
ContributorAuthor

Makes sense to me, nice fix! Do you think we'll have similar issues with other tests using cron?

I don't think so --- the problem here was mismatch between cron and TTL. For autostart it really does use cron.

However, I do think that these tests are needlessly fragile in that they aren't controlling the times closely. Ideally the workspaces would be created at a fixed time, and the build ticks would also be fixed by the test. Right now, the workspaces are created at whatever time the test runs, and then we compute tick times relative to the creation time. That means that to the extent we test edge cases, we do it stochastically, rather than figuring out the edge cases and writing tests for them.

@spikecurtisspikecurtis merged commit95ce697 intomainNov 1, 2023
@spikecurtisspikecurtis deleted the spike/flake-test-executor branchNovember 1, 2023 11:16
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsNov 1, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mafredrimafredrimafredri approved these changes

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@spikecurtis@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp