Core <-> Proxy version comparison

as of ##5113, we have a new feature that warns us if core and proxy versions do not match. Right now the comparison is very strict: it’s the whole version without the tag. It means that is incompatible with 1.18.0.

I would suggest relaxing this condition to at least x.y.z comparison. It will make the versions mentioned in previous example compatible.


I agree, I think checking x and y but not z would be better.

We’ve never made a formal statement about requirements. In general we try to keep compatibility. Checking z values is without a doubt already too much because we always commit to compatibility within a y-stream.

I’m not aware of any breakages in the past where y±1 or even y±2 was an issue. I’d say that if y is ±1 then it should be info rather than warning to allow for upgrades.

1 Like

I think we should compare x.y at most, if for example foreman 1.18.1 is incompatible with proxy 1.18.0 that means we have a bug in one of them that needs to be fixed, and in general this shouldn’t happen (and afair hasn’t).
y±1 should be possible if we make sure we properly deprecate any changes in the api between foreman an proxy, but i’m not sure how well we enforce it. In any case this should ideally occur only during upgrades.

+1 on x.y. While we might be compatible with older releases, we should still warn the user to get the proxy to the same version as the server, as otherwise, there would not be a reason why to release a new proxy version in the first place, if it wasn’t better than the older version.

Thinking about it, maybe we should warn on foreman x.y and proxy x.(y-1) but on proxy x.(y+1) it should just be an info. We’ve always tried to stay compatible and @Dmitri_Dolguikh has suggested that the upgrade advice should always be to first upgrade the proxies and then Foreman itself. IMHO that makes sense.

I was not talking about log message. We have a UI feature that shows a warning sign near outdated proxies on /smart_proxies page.
This means that we don’t have to worry about upgrade scenarios at all.

IMHO we do. Users can have a phased roll out where they upgrade over the course of days. The UI should handle that as well. We shouldn’t cry wolf and a warning really has to be a warning IMHO. Users might otherwise ignore them.

1 Like

OK, I’ll file an issue about it. The fix would be warn if x.y version of proxy is less than foreman’s.


foreman <-> proxy:
1.18.1 <-> 1.18.0 : OK
1.19.0 <-> 1.18.0 : Warn
1.18.0 <-> 1.19.0 : OK

Does it sound good?

Yes, though maybe Foreman 1.18.0 and Proxy 1.20.0 should also be a warning.

Created an issue for it: Bug #24567: Relax foreman proxy compatibility check condition - Foreman