Skip to content

[CI] Multiple invocations of repository_s3/20_repository_permanent_credentials can interact #32458

@droberts195

Description

@droberts195

repository_s3/20_repository_permanent_credentials/Snapshot and Restore with repository-s3 using permanent credentials failed with the following error:

Failure at [repository_s3/20_repository_permanent_credentials:64]: expected [2xx] status code but api [snapshot.create] returned [400 Bad Request] [{"error":{"root_cause":[{"type":"invalid_snapshot_name_exception","reason":"[repository_permanent:snapshot-one] Invalid snapshot name [snapshot-one], snapshot with the same name already exists","stack_trace":"InvalidSnapshotNameException[[repository_permanent:snapshot-one] Invalid snapshot name [snapshot-one], snapshot with the same name already exists]

This does not trivially reproduce, but it looks like it could happen if there were two test runs in CI at the same time for the same branch. CI sets the environment variable amazon_s3_base_path={branch} and this is what the test uses for its "permanent" repository.

The full failure log is https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+third-party-tests/35/console

The repro command is:

./gradlew :plugins:repository-s3:integTestRunner \
  -Dtests.seed=1FD0A748E26205B \
  -Dtests.class=org.elasticsearch.repositories.s3.RepositoryS3ClientYamlTestSuiteIT \
  -Dtests.method="test {yaml=repository_s3/20_repository_permanent_credentials/Snapshot and Restore with repository-s3 using permanent credentials}" \
  -Dtests.security.manager=true \
  -Dtests.locale=sv-SE \
  -Dtests.timezone=America/Lower_Princes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions