Skip to content

[Cleanup] Clean up uses of LegacyESVersions #18387

Open
1 of 4 issues completed
Open
Feature
1 of 4 issues completed
@msfroh

Description

@msfroh

Is your feature request related to a problem? Please describe

Now that we have released OpenSearch 3.0, we should probably start to clean up use of the LegacyESVersion class.

Describe the solution you'd like

I started to do this, thinking it would be quick and easy. It turns out to be more work than I thought, and should probably be broken down into some sub-tasks:

  • Remove the upgrade-cli module. Its description is "A CLI tool for upgrading to OpenSearch 1.x from a supported Elasticsearch version." There are no supported Elasticsearch versions for 3.x.
  • Clean up uses of LegacyESVersion.fromString. This is where we have some very old versions being referenced.
  • Remove uses of constants from LegacyESVersion. In IndexMetadata, we can just assert unconditionally. The harder one is RemoteSnasphotDirectory. I strongly disagree with the extended compatibility feature on principle. That said, if we're going to let users shoot themselves in the foot anyway, IMO we should only let them do it going back to OpenSearch 1.0.
  • Move idToVersion and stringToVersion maps from LegacyESVersion to Version.
  • I think we can then remove LegacyESVersion.

Related component

Other

Describe alternatives you've considered

We could keep LegacyESVersion around through the 3.x line and remove it in time for 4.0?

Additional context

No response

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions