Skip to content

[Backport 3.1] Activate Detect Breaking Changes Github Action since we have 3.0.0 baseline #18538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/detect-breaking-change.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: "Detect Breaking Changes"
on:
pull_request:
branches-ignore:
- main # This branch represents a to-be-released version of OpenSearch where breaking changes are allowed
- '3.0' # We must establish a baseline 3.0 release version before adding enforcement
pull_request

jobs:
detect-breaking-change:
Expand All @@ -18,7 +15,7 @@ jobs:
with:
cache-disabled: true
arguments: japicmp
gradle-version: 8.11
gradle-version: 8.14
build-root-directory: server
- if: failure()
run: cat server/build/reports/java-compatibility/report.txt
Expand Down
17 changes: 16 additions & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ tasks.named("sourcesJar").configure {
tasks.register("japicmp", me.champeau.gradle.japicmp.JapicmpTask) {
logger.info("Comparing public APIs from ${version} to ${japicmpCompareTarget}")
// See please https://github.com/siom79/japicmp/issues/201
compatibilityChangeExcludes = [ "METHOD_ABSTRACT_NOW_DEFAULT" ]
compatibilityChangeExcludes = [ "METHOD_ABSTRACT_NOW_DEFAULT", "METHOD_ADDED_TO_INTERFACE" ]
oldClasspath.from(files("${buildDir}/japicmp-target/opensearch-${japicmpCompareTarget}.jar"))
newClasspath.from(tasks.named('jar'))
onlyModified = true
Expand All @@ -404,6 +404,21 @@ tasks.register("japicmp", me.champeau.gradle.japicmp.JapicmpTask) {
failOnSourceIncompatibility = true
annotationIncludes = ['@org.opensearch.common.annotation.PublicApi', '@org.opensearch.common.annotation.DeprecatedApi']
annotationExcludes = ['@org.opensearch.common.annotation.InternalApi']
// Already broken APIs, excluding them for now
classExcludes = [
"org.opensearch.action.DocWriteRequest",
"org.opensearch.cluster.ClusterInfo",
"org.opensearch.cluster.service.PendingClusterTask",
"org.opensearch.index.IndexService",
"org.opensearch.indices.IndicesService",
"org.opensearch.index.IndexModule",
"org.opensearch.index.store.remote.filecache.FileCacheStats",
"org.opensearch.index.store.remote.filecache.FileCache",
"org.opensearch.index.store.remote.utils.cache.CacheUsage",
"org.opensearch.index.store.remote.utils.cache.stats.CacheStats",
"org.opensearch.index.query.QueryCoordinatorContext",
"org.opensearch.index.shard.IndexShard"
]
txtOutputFile = layout.buildDirectory.file("reports/java-compatibility/report.txt")
htmlOutputFile = layout.buildDirectory.file("reports/java-compatibility/report.html")
dependsOn downloadJapicmpCompareTarget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

import org.opensearch.Version;
import org.opensearch.common.Priority;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.core.common.io.stream.StreamInput;
Expand All @@ -58,6 +59,7 @@ public class PendingClusterTask implements Writeable {
private boolean executing;
private long timeInExecution;

@InternalApi
public PendingClusterTask(StreamInput in) throws IOException {
insertOrder = in.readVLong();
priority = Priority.readFrom(in);
Expand All @@ -69,6 +71,7 @@ public PendingClusterTask(StreamInput in) throws IOException {
}
}

@InternalApi
public PendingClusterTask(long insertOrder, Priority priority, Text source, long timeInQueue, boolean executing, long timeInExecution) {
assert timeInQueue >= 0 : "got a negative timeInQueue [" + timeInQueue + "]";
assert insertOrder >= 0 : "got a negative insertOrder [" + insertOrder + "]";
Expand Down
3 changes: 3 additions & 0 deletions server/src/main/java/org/opensearch/index/IndexModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.opensearch.common.SetOnce;
import org.opensearch.common.TriFunction;
import org.opensearch.common.annotation.ExperimentalApi;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.logging.DeprecationLogger;
import org.opensearch.common.settings.Setting;
Expand Down Expand Up @@ -271,6 +272,7 @@ public final class IndexModule {
* @param engineFactory the engine factory
* @param directoryFactories the available store types
*/
@InternalApi
public IndexModule(
final IndexSettings indexSettings,
final AnalysisRegistry analysisRegistry,
Expand Down Expand Up @@ -299,6 +301,7 @@ public IndexModule(
this.compositeIndexSettings = compositeIndexSettings;
}

@InternalApi
public IndexModule(
final IndexSettings indexSettings,
final AnalysisRegistry analysisRegistry,
Expand Down
3 changes: 3 additions & 0 deletions server/src/main/java/org/opensearch/index/IndexService.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.CheckedFunction;
import org.opensearch.common.Nullable;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Setting.Property;
Expand Down Expand Up @@ -203,6 +204,7 @@ public class IndexService extends AbstractIndexComponent implements IndicesClust
private volatile TimeValue refreshInterval;
private volatile boolean shardLevelRefreshEnabled;

@InternalApi
public IndexService(
IndexSettings indexSettings,
IndexCreationContext indexCreationContext,
Expand Down Expand Up @@ -344,6 +346,7 @@ public IndexService(
}
}

@InternalApi
public IndexService(
IndexSettings indexSettings,
IndexCreationContext indexCreationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package org.opensearch.index.query;

import org.opensearch.action.IndicesRequest;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.action.ActionListener;
import org.opensearch.core.common.io.stream.NamedWriteableRegistry;
Expand All @@ -35,6 +36,7 @@ public class QueryCoordinatorContext implements QueryRewriteContext {
private final QueryRewriteContext rewriteContext;
private final IndicesRequest searchRequest;

@InternalApi
public QueryCoordinatorContext(QueryRewriteContext rewriteContext, IndicesRequest searchRequest) {
this.rewriteContext = rewriteContext;
this.searchRequest = searchRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import org.opensearch.common.Nullable;
import org.opensearch.common.SetOnce;
import org.opensearch.common.annotation.ExperimentalApi;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.collect.Tuple;
import org.opensearch.common.concurrent.GatedCloseable;
Expand Down Expand Up @@ -379,6 +380,7 @@ Runnable getGlobalCheckpointSyncer() {
private volatile AsyncShardRefreshTask refreshTask;
private final ClusterApplierService clusterApplierService;

@InternalApi
public IndexShard(
final ShardRouting shardRouting,
final IndexSettings indexSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

package org.opensearch.index.store.remote.filecache;

import org.opensearch.common.annotation.ExperimentalApi;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.core.common.io.stream.Writeable;
Expand All @@ -32,7 +33,7 @@
*
* @opensearch.api
*/
@ExperimentalApi
@PublicApi(since = "2.7.0")
public class FileCacheStats implements Writeable, ToXContentFragment {

private final long active;
Expand All @@ -44,6 +45,7 @@ public class FileCacheStats implements Writeable, ToXContentFragment {
private final long misses;
private final FileCacheStatsType statsType;

@InternalApi
public FileCacheStats(
final long active,
long total,
Expand All @@ -64,6 +66,7 @@ public FileCacheStats(
this.statsType = statsType;
}

@InternalApi
public FileCacheStats(final StreamInput in) throws IOException {
this.statsType = FileCacheStatsType.fromString(in.readString());
this.active = in.readLong();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.opensearch.common.CheckedFunction;
import org.opensearch.common.CheckedSupplier;
import org.opensearch.common.Nullable;
import org.opensearch.common.annotation.InternalApi;
import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.cache.policy.CachedQueryResult;
import org.opensearch.common.cache.service.CacheService;
Expand Down Expand Up @@ -420,6 +421,7 @@ protected void doStart() {
threadPool.schedule(this.cacheCleaner, this.cleanInterval, ThreadPool.Names.SAME);
}

@InternalApi
public IndicesService(
Settings settings,
PluginsService pluginsService,
Expand Down Expand Up @@ -587,6 +589,7 @@ protected void closeInternal() {
.addSettingsUpdateConsumer(CLUSTER_DEFAULT_INDEX_MAX_MERGE_AT_ONCE_SETTING, this::onDefaultMaxMergeAtOnceUpdate);
}

@InternalApi
public IndicesService(
Settings settings,
PluginsService pluginsService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@

public abstract boolean shouldUseTimeSeriesDescSortOptimization();

public abstract boolean getStarTreeIndexEnabled();
public boolean getStarTreeIndexEnabled() {
return false;

Check warning on line 523 in server/src/main/java/org/opensearch/search/internal/SearchContext.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/search/internal/SearchContext.java#L523

Added line #L523 was not covered by tests
}

public int maxAggRewriteFilters() {
return 0;
Expand Down
Loading