Skip to content

[Feature Request] [Gradle Checks] Allow annotation of InternalApi on classes not meant to be consumed outside of OpenSearch  #13308

Closed
@gbbafna

Description

@gbbafna

Is your feature request related to a problem? Please describe

Coming from #13275 (comment)

RemoteStorePathStrategy is an internal API and is not supposed by to used/extended by plugins . However we can't mark it internal api .

error: The element org.opensearch.index.remote.RemoteStorePathStrategy is part of the public APIs but is marked as @InternalApi (referenced by org.opensearch.index.IndexSettings) 
error: The element org.opensearch.index.remote.RemoteStorePathStrategy is part of the public APIs but is marked as @InternalApi (referenced by org.opensearch.index.snapshots.blobstore.RemoteStoreShardShallowCopySnapshot) 

RemoteStorePathStrategy's constructor has to be public as RemoteStoreShardShallowCopySnapshot needs to create it .

Some more context : #13244

To get around these issues, all the classes we introduced had to marked as PublicAPI , even though they were not meant to be consumed outside of OpenSearch. Whenever we make changes to these classes, the detect breaking changes workflow will fail , even though these are not consumed outside of OpenSearch core.

Describe the solution you'd like

In cases like this, we should allow the class/function etc to be marked as InternalApi.

Related component

Build

Describe alternatives you've considered

Do nothing . In such cases such classes will be PublicApi and we will get a lot of breaking changes, even they are not actually.

Additional context

No response

Metadata

Metadata

Assignees

Labels

BuildBuild Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement.enhancementEnhancement or improvement to existing feature or requestv2.16.0Issues and PRs related to version 2.16.0v3.0.0Issues and PRs related to version 3.0.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions