Fix backward compatibility check
Avoid flagging methods as deleted if it is marked synchronized. Also mark a few more interfaces as internal.
This commit is contained in:
parent
6acb51d66e
commit
c53665fc0b
5 changed files with 17 additions and 5 deletions
14
.github/scripts/backwards_compatibility_check.sh
vendored
14
.github/scripts/backwards_compatibility_check.sh
vendored
|
|
@ -58,14 +58,18 @@ is_non_public_class() {
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ignore methods that change from abstract to non-abstract (and vice versa) if the class is an interface.
|
# Ignore methods that change from abstract to non-abstract (and vice-versa) if the class is an interface.\
|
||||||
ignore_abstract_changes_in_interfaces() {
|
# Ignore methods that change from synchronized to non-synchronized (and vice-versa)
|
||||||
|
ignore_non_breaking_changes() {
|
||||||
local current_class="$1"
|
local current_class="$1"
|
||||||
local class_definition=$(javap -classpath "$LATEST_JAR" "$current_class" | head -2 | tail -1)
|
local class_definition=$(javap -classpath "$LATEST_JAR" "$current_class" | head -2 | tail -1)
|
||||||
if [[ $class_definition == *"interface"* ]]
|
if [[ $class_definition == *"interface"* ]]
|
||||||
then
|
then
|
||||||
LATEST_METHODS=${LATEST_METHODS// abstract / }
|
LATEST_METHODS=${LATEST_METHODS//abstract /}
|
||||||
CURRENT_METHODS=${CURRENT_METHODS// abstract / }
|
CURRENT_METHODS=${CURRENT_METHODS//abstract /}
|
||||||
|
else
|
||||||
|
LATEST_METHODS=${LATEST_METHODS//synchronized /}
|
||||||
|
CURRENT_METHODS=${CURRENT_METHODS//synchronized /}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,7 +107,7 @@ find_removed_methods() {
|
||||||
|
|
||||||
LATEST_METHODS=$(javap -classpath "$LATEST_JAR" "$class")
|
LATEST_METHODS=$(javap -classpath "$LATEST_JAR" "$class")
|
||||||
|
|
||||||
ignore_abstract_changes_in_interfaces "$class"
|
ignore_non_breaking_changes "$class"
|
||||||
|
|
||||||
local removed_methods=$(diff <(echo "$LATEST_METHODS") <(echo "$CURRENT_METHODS") | grep '^<')
|
local removed_methods=$(diff <(echo "$LATEST_METHODS") <(echo "$CURRENT_METHODS") | grep '^<')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,10 @@ package software.amazon.kinesis.coordinator.assignment;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import software.amazon.kinesis.annotations.KinesisClientInternalApi;
|
||||||
import software.amazon.kinesis.leases.Lease;
|
import software.amazon.kinesis.leases.Lease;
|
||||||
|
|
||||||
|
@KinesisClientInternalApi
|
||||||
public interface LeaseAssignmentDecider {
|
public interface LeaseAssignmentDecider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,13 @@
|
||||||
*/
|
*/
|
||||||
package software.amazon.kinesis.coordinator.migration;
|
package software.amazon.kinesis.coordinator.migration;
|
||||||
|
|
||||||
|
import software.amazon.kinesis.annotations.KinesisClientInternalApi;
|
||||||
import software.amazon.kinesis.leases.exceptions.DependencyException;
|
import software.amazon.kinesis.leases.exceptions.DependencyException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface of a state implementation for the MigrationStateMachine
|
* Interface of a state implementation for the MigrationStateMachine
|
||||||
*/
|
*/
|
||||||
|
@KinesisClientInternalApi
|
||||||
public interface MigrationClientVersionState {
|
public interface MigrationClientVersionState {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
*/
|
*/
|
||||||
package software.amazon.kinesis.coordinator.migration;
|
package software.amazon.kinesis.coordinator.migration;
|
||||||
|
|
||||||
|
import software.amazon.kinesis.annotations.KinesisClientInternalApi;
|
||||||
import software.amazon.kinesis.leases.exceptions.DependencyException;
|
import software.amazon.kinesis.leases.exceptions.DependencyException;
|
||||||
import software.amazon.kinesis.leases.exceptions.InvalidStateException;
|
import software.amazon.kinesis.leases.exceptions.InvalidStateException;
|
||||||
|
|
||||||
|
|
@ -28,6 +29,7 @@ import software.amazon.kinesis.leases.exceptions.InvalidStateException;
|
||||||
* 3. Instant roll-forwards - Once any issue has been mitigated, rollfowards are supported instantly
|
* 3. Instant roll-forwards - Once any issue has been mitigated, rollfowards are supported instantly
|
||||||
* with KCL Migration tool.
|
* with KCL Migration tool.
|
||||||
*/
|
*/
|
||||||
|
@KinesisClientInternalApi
|
||||||
public interface MigrationStateMachine {
|
public interface MigrationStateMachine {
|
||||||
/**
|
/**
|
||||||
* Initialize the state machine by identifying the initial state when the KCL worker comes up for the first time.
|
* Initialize the state machine by identifying the initial state when the KCL worker comes up for the first time.
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,12 @@ package software.amazon.kinesis.leases;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import software.amazon.kinesis.annotations.KinesisClientInternalApi;
|
||||||
import software.amazon.kinesis.leases.exceptions.DependencyException;
|
import software.amazon.kinesis.leases.exceptions.DependencyException;
|
||||||
import software.amazon.kinesis.leases.exceptions.InvalidStateException;
|
import software.amazon.kinesis.leases.exceptions.InvalidStateException;
|
||||||
import software.amazon.kinesis.leases.exceptions.ProvisionedThroughputException;
|
import software.amazon.kinesis.leases.exceptions.ProvisionedThroughputException;
|
||||||
|
|
||||||
|
@KinesisClientInternalApi
|
||||||
public interface LeaseDiscoverer {
|
public interface LeaseDiscoverer {
|
||||||
/**
|
/**
|
||||||
* Identifies the leases that are assigned to the current worker but are not being tracked and processed by the
|
* Identifies the leases that are assigned to the current worker but are not being tracked and processed by the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue