Skip to content

Commit

Permalink
Add a new integration-download command to bodhi-ci.
Browse files Browse the repository at this point in the history
Prior to this commit, if several bodhi-ci processes were run in
parallel, each of them would download their own copy of the
database dump. Currently this is how CentOS CI runs our tests, and
this led to a problem where one process would overrwrite the file
that another process was currently reading, which led to problems.

This new command allows us to run a single process of bodhi-ci to
download the integration test datatbase dumps before we fan out to
many processes in CentOS CI. Combined with the prior commit that
skips downloading recently modified files, we can now be sure that
the fanned out processes in CentOS CI will not write files that
others are reading, because they will all skip the download job
now.

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
  • Loading branch information
bowlofeggs committed Feb 6, 2019
1 parent 7092c4f commit ead873e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
21 changes: 16 additions & 5 deletions devel/ci/bodhi-ci
Expand Up @@ -299,6 +299,15 @@ def integration_build(concurrency, container_runtime, failfast, pyver, release,
_run_jobs(_build_jobs_list('integration-build', concurrency, release, pyvers=pyver))


@cli.command("integration-download")
@concurrency_option
@failfast_option
@tty_option
def integration_download(concurrency, failfast, tty):
"""Download the database dumps for integration testing."""
_run_jobs(_build_jobs_list('integration-download', concurrency, releases=[], pyvers=[3]))


@cli.command()
@archive_option
@concurrency_option
Expand Down Expand Up @@ -1145,11 +1154,13 @@ def _build_jobs_list(
buffer_output = concurrency != 1 and len(releases) != 1
jobs = [] # type: typing.List[Job]
integration_deps_build_jobs = [] # type: typing.List[Job]
if command in ('all', 'integration-build', 'integration') and 3 in pyvers:
integration_deps_build_jobs.extend([
IntegrationBuildJob(app_name=app_name, release="prod", buffer_output=buffer_output)
for app_name in ("resultsdb", "waiverdb", "greenwave")
])
if command in ('all', 'integration-build', 'integration', 'integration-download') \
and 3 in pyvers:
if command != 'integration-download':
integration_deps_build_jobs.extend([
IntegrationBuildJob(app_name=app_name, release="prod", buffer_output=buffer_output)
for app_name in ("resultsdb", "waiverdb", "greenwave")
])
# Download the DB dumps
integration_deps_build_jobs.extend([
IntegrationDumpDownloadJob(app_name="waiverdb", release="prod", buffer_output=buffer_output),
Expand Down
3 changes: 3 additions & 0 deletions devel/ci/cico.pipeline
Expand Up @@ -155,6 +155,9 @@ node('bodhi') {
synctoduffynode('bodhi')
}

// Download the database dumps for the integration tests.
bodhi_ci('integration', 'integration-download', 'download', '')

parallel(
f28: {test_release('f28')},
f29: {test_release('f29')},
Expand Down

0 comments on commit ead873e

Please sign in to comment.