update CLI could be more informative
Description
Environment
Activity
Ian Young July 5, 2023 at 8:33 AM
Looks good to me:
root@uf01:~/shibboleth-idp-docker# ./console
bash-4.2# bin/update.sh
WARN - Support level for 5.0.0 is Unknown
INFO - No Upgrade available from 5.0.0
Rod Widdowson July 4, 2023 at 12:59 PM
Done as noted (with a swap of order in the output because it makes the "I'm downloading" note more obviously relevant, Typical output
WARN [net.shibboleth.idp.installer.impl.UpdateIdPCLI:172] - Support level for 4.3.0 is OutOfDate
INFO [net.shibboleth.idp.installer.impl.UpdateIdPCLI:189] - Version 4.3.0 can be upgraded to 4.3.1
(tested with the undocumented --pretendVersion
qualifier)
If this looks OK can you close? Thanks
Ian Young July 4, 2023 at 11:50 AM
That code (with the Current case bumped to INFO) makes sense to me.
Rod Widdowson July 3, 2023 at 4:07 PM
Turns out that without the --list
qualifier update only checks for update and emits nothing else.
Proposal is to align this with ReportUpdateStatus:
if (newIdPVersion == null) {
log.info("No upgrade available from {}", version);
} else {
log.warn("Version {} can be upgraded to {}", version, newIdPVersion);
}
final SupportLevel sl = verInfo.getSupportLevel();
switch (sl) {
case Current:
log.debug("Version {} is current");
break;
case Secadv:
log.error("Version {} has known security vulnerabilities", version);
break;
default:
log.warn("Support level for {} is {}", version, sl);
break;
}
The only question being whether debug is the correct level to report a Current
version. I am inclined to bump both to info. The signal to noise ratio at debug for the output command is too high to make debug sensible and in the start up logging an extra line is low cost.
Any thoughts @Ian Young ?
The v5 logs now include:
... No upgrade available from 5.0.0 ... Support level for 5.0.0 is Unknown
I think this is pretty helpful (although we might give some thought to whether it’s worth being more explicit about the 5.0.0 support level, not for the current snapshots but for the upcoming beta).
The
update.sh
cli is a bit more restrained:bash-4.2# bin/update.sh INFO - No Upgrade available from 5.0.0
This is fine as far as it goes, but again I think this is a context in which knowing the support level would be helpful, perhaps particularly in the case of a beta or unreleased version.