- 
    Type:Bug 
- 
    Resolution: Fixed
- 
    Priority:Major - P3 
- 
    Affects Version/s: 8.2.0-rc0
- 
    Component/s: None
- 
    None
- 
        Catalog and Routing
- 
        Fully Compatible
- 
        ALL
- 
        CAR Team 2025-04-28, CAR Team 2025-05-12
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
SERVER-99545 introduced the initial definition of Operation FCV along with logic to parse it, validating that is one of the following values:
- GenericFCV::kLatest
- GenericFCV::kLastContinuous
- GenericFCV::kLastLTS
- GenericFCV::kUpgradingFromLastLTSToLatest
- GenericFCV::kDowngradingFromLatestToLastLTS
- GenericFCV::kUpgradingFromLastContinuousToLatest
- GenericFCV::kDowngradingFromLatestToLastContinuous
- GenericFCV::kUpgradingFromLastLTSToLastContinuous
However, this logic has a flaw: When LastLTS == LastContinuous, then GenericFCV::kUpgradingFromLastLTSToLastContinuous is an alias for FeatureCompatibilityVersion::kInvalid. This makes the parser accept the string "invalid" as a valid OFCV value.
Furthermore, kUpgradingFromLastLTSToLatest and kUpgradingFromLastContinuousToLatest may be aliases, which makes the returned message contain duplicate values:
{
	"ok" : 0,
	"errmsg" : "Invalid feature compatibility version value 'asdas'. Expected one of the following versions: ''8.1', '8.0', '8.0', 'upgrading from 8.0 to 8.1', 'downgrading from 8.1 to 8.0', 'upgrading from 8.0 to 8.1', 'downgrading from 8.1 to 8.0', 'invalid'",
	"code" : 2,
	"codeName" : "BadValue"
}
- is caused by
- 
                    SERVER-99545 Introduce the VersionContext type -         
- Closed
 
-