Fix repository naming mismatch for Elasticsearch 8.x installation on Debian #812
+4
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The repository installation for Elasticsearch version 8.x was failing on Debian due to inconsistent repository naming between install and remove actions.
Problem
In
resources/install_repository.rb
, the:install
and:remove
actions used different naming schemes for repositories:elastic-8.x
(using major version)elastic-8.11.4.x
(using full version)This mismatch prevented proper repository cleanup and could interfere with subsequent installations.
Example
When installing Elasticsearch version "8.11.4":
The install action would create a repository named
elastic-8.x
, but the remove action would attempt to deleteelastic-8.11.4.x
, which doesn't exist.Solution
Modified the
:remove
action to extract the major version consistently with the:install
action:Benefits
The repository URLs generated are now correctly formatted:
https://artifacts.elastic.co/packages/8.x/apt
https://artifacts.elastic.co/packages/7.x/apt
Fixes #802.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
artifacts.elastic.co
curl -I REDACTED
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.