Skip to content

Conversation

@samxbr
Copy link
Contributor

@samxbr samxbr commented Jun 26, 2025

This doesn't make Enterprise GeoIP downloader project-aware, it simply removes the deprecated methods. Since there are quite some work involved in making these classes project-aware, and Enterprise GeoIP is not available in serverless anyway, we will mark these classes @NotMultiProjectCapable and revisit them later when Enterprise GeoIP becomes available in serverless.

@samxbr samxbr added >non-issue :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP labels Jun 26, 2025
@samxbr samxbr marked this pull request as ready for review June 26, 2025 03:46
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jun 26, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@samxbr samxbr changed the title Remove deprecated multi-project methods in Enterprise GeoIP Remove deprecated multi-project methods in Enterprise GeoIP downloader Jun 26, 2025
void updateDatabases() throws IOException {
var clusterState = clusterService.state();
var geoipIndex = clusterState.getMetadata().getProject().getIndicesLookup().get(EnterpriseGeoIpDownloader.DATABASES_INDEX);
var geoipIndex = clusterState.getMetadata()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe assign a local variable like this (i.e. move the annotation)

@NotMultiProjectCapable(description = "Enterprise GeoIP not available in serverless")
final var projectId = ProjectId.DEFAULT;

That makes it easier to understand/read why we're hardcoding the default project ID here as there is only one reference to the default project ID and it has the annotation directly above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to EnterpriseGeoIpDownloaderTaskExecutor, there will likely be more changes needed than just the project ID (project ID is the easy one to spot). I can make a local variable on the project ID, I think it's better to also keep the class level annotation as a reminder to review the whole class again.

import static org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.ENABLED_SETTING;
import static org.elasticsearch.ingest.geoip.GeoIpDownloaderTaskExecutor.POLL_INTERVAL_SETTING;

@NotMultiProjectCapable(description = "Enterprise GeoIP not available in serverless")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't immediately see why we need this annotation here, am I missing something? Can you move it to the specific lines that need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are probably many lines that need this if we put it at line level, and some are unclear to me how it will work yet (for example the secure settings). The intention for this annotation at class level is that the whole class needs to be reviewed again on which specific lines needs to be changed when it become serverless available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update the description to make the intention clearer

Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samxbr samxbr merged commit 86c7787 into elastic:main Jul 15, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >non-issue Team:Data Management Meta label for data/management team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants