Skip to content

1.4.2 patch release breaks backward compatibility #645

@jonatan-ivanov

Description

@jonatan-ivanov

Not sure what versioning strategy does the project follows (seemingly semver?) but it seems a recent patch release upgraded minor versions (see 1.4.2).

This means that if someone wants to upgrade from 1.4.1 to 1.4.2 which is a patch upgrade they also need to introduce minor version upgrades of other dependencies otherwise they will get errors like:

Caused by: java.lang.NoSuchMethodError: 'boolean io.grpc.LoadBalancer.acceptResolvedAddresses(io.grpc.LoadBalancer$ResolvedAddresses)'
	at io.grpc.internal.AutoConfiguredLoadBalancerFactory$AutoConfiguredLoadBalancer.tryAcceptResolvedAddresses(AutoConfiguredLoadBalancerFactory.java:142)
	at io.grpc.internal.ManagedChannelImpl$NameResolverListener$1NamesResolved.run(ManagedChannelImpl.java:1854)
	at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:94)
	at io.grpc.SynchronizationContext.execute(SynchronizationContext.java:126)
	at io.grpc.internal.ManagedChannelImpl$RealChannel.newCall(ManagedChannelImpl.java:962)

In this particular case it seems in io.grpc.LoadBalancer this

public boolean acceptResolvedAddresses(ResolvedAddresses resolvedAddresses)

was changed to

public Status acceptResolvedAddresses(ResolvedAddresses resolvedAddresses)

This might not be a direct issue of grpc-kotlin since a breaking change like this should not be introduced in grpc-api in a minor release (though LoadBalancer has @ExperimentalApi 🤷🏼) but since it does minor version upgrades in a patch release, it introduces this issue for the users. Though, I don't know the versioning strategy of the grpc-java either and I did not dig deeper in the dependency tree.

Is it possible to issue a new release of 1.4 (1.4.4) that only contains patch version upgrades compared to 1.4.1 (or knowingly compatible minor version upgrades) and release 1.5.0 with the incompatible minor version upgrades?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions