Skip to content

Stop accessing System Indices directly in REST tests #62501

@gwbrown

Description

@gwbrown

As part of formalizing System Indices in Elasticsearch (#50251), we will be restricting access to System Indices via the REST interface, except by means of purpose-built APIs. For example, accessing .watches directly will not be allowed - all interaction with the .watches index via the REST API should use the purpose-built Watcher APIs.

If it is necessary to access System Indices via the REST API today, an API should be added to fulfill that need rather than using generic APIs to do so.

There are a number of places in our REST tests which access System Indices directly. These tests will be modified by #60945 to avoid failures by consuming the deprecation warning as necessary, but that is not a long-term solution. The tests below should be evaluated to determine if there is a necessary API that is currently missing, and if so, add that API and convert the test to use it. If not, we should determine an alternate method for testing the functionality which does not directly access System Indices via the REST API.

Tests/test-related methods which currently access System Indices directly via the REST API:

Test Framework

Tasks

  • delete_by_query/80_slices.yml - Multiple slices with wait_for_completion=false
  • delete_by_query/80_slices.yml - Multiple slices with rethrottle
  • reindex/80_slices.yml - Multiple slices with wait_for_completion=false
  • reindex/80_slices.yml - Multiple slices with rethrottle
  • update_by_query/80_slices.yml - Multiple slices with wait_for_completion=false
  • update_by_query/80_slices.yml - Multiple slices with rethrottle
  • rolling_upgrade .. upgraded_cluster/10_basic.yml - Find a task result record from the old cluster

Transforms

  • TransformUsageIT.testUsage
  • TransformConfigurationIndexIT.testDeleteConfigurationLeftOver
  • TranformInternalIndexIT.testUpdateDeletesOldTransformConfig
  • TransformRestTestCase.wipeTransforms
  • TranformRobustnessIT.beEvilAndDeleteTheTransformIndex
  • rolling-upgrade .. upgraded_cluster/80_transform_jobs_crud.yml - Test index mappings for latest internal index and audit index

ML

Watcher

Security

  • FullClusterRestartIT.testSecurityNativeRealm
  • users/10_basic.yml - Test put user with password hash

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed Coordination/Task ManagementIssues for anything around the Tasks API - both persistent and node level.:Security/SecuritySecurity issues without another label:mlMachine learning:ml/TransformTransform>testIssues or PRs that are addressing/adding testsMetaTeam:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.Team:MLMeta label for the ML teamTeam:SecurityMeta label for security team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions