Skip to content

Conversation

@jdconrad
Copy link
Contributor

Adds changes to ensure the correct caller's module is checked for exclusive file settings.

ES-11136

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM


@Override
protected Path filesSetLastModifiedTime(Path path, FileTime time) throws IOException {
return Files.setLastModifiedTime(path, time);
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how this one is working right now since we only have read access. IIRC this is an edge case for when we restore from a snapshot. We should (as a followup) re-consider how restoring from snapshots should interact with file settings because this breaks the rule that we want to use, only allowing read access to the config directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.

FileData.ofRelativePath(Path.of(""), SHARED_REPO, READ_WRITE),

// exclusive settings file
FileData.ofRelativePath(Path.of("operator/settings.json"), CONFIG, READ).withExclusive(true),
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately I think this needs to be READ_WRITE, see my other comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@jdconrad
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/part-3

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Mar 21, 2025
@jdconrad
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/part-3

@jdconrad jdconrad merged commit 0e5bd3c into elastic:main Mar 31, 2025
22 checks passed
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Mar 31, 2025
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request Apr 1, 2025
Adds changes to ensure the correct caller's module is checked for exclusive file settings.
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Apr 1, 2025
jdconrad added a commit to jdconrad/elasticsearch that referenced this pull request Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Entitlements Entitlements infrastructure >non-issue serverless-linked Added by automation, don't add manually Team:Core/Infra Meta label for core/infra team v8.18.1 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants