Page MenuHomePhabricator

[CI] Fix the preview timeout potential failure
ClosedPublic

Authored by Fabien on Apr 12 2023, 08:33.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC29ae0eb2eae1: [CI] Fix the preview timeout potential failure
Summary

While the preview is working, the timeout might not. This timeout is implemented by spawning an at command to stop the docker container running the website. It is run from the build directory of the build and at memorize this directory, trying to cd into it before the command is run. This is an issue especially on CI because the build directory might very well have been deleted before the command is run, failing to stop the container.
This diff fixes the issue by spawning the at command from the user home directory instead.

Test Plan

Change the preview duration to 2 minutes for the e.cash website by appending timeout_minutes: 2 to the docker configuration, then:

./contrib/teamcity/build-configurations.py preview-e.cash
rm -rf ./abc-ci-builds/preview-e.cash

Run docker ps, check the preview is running fine.
Wait a couple minutes, run docker ps again and check the container has been stopped successfully.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_at_cwd
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23226
Build 46071: Build Diff
Build 46070: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Apr 12 2023, 08:33
PiRK added a subscriber: PiRK.
PiRK added inline comments.
contrib/teamcity/build-configurations.py
234
This revision is now accepted and ready to land.Apr 12 2023, 13:04