chore: bump github.com/oasdiff/oasdiff from 1.23.0 to 1.24.0 in /tools/cli- #1385 - #1398
Conversation
Bumps [github.com/oasdiff/oasdiff](https://github.com/oasdiff/oasdiff) from 1.23.0 to 1.24.0. - [Release notes](https://github.com/oasdiff/oasdiff/releases) - [Changelog](https://github.com/oasdiff/oasdiff/blob/main/docs/CHANGELOG-TEMPLATE.md) - [Commits](oasdiff/oasdiff@v1.23.0...v1.24.0) --- updated-dependencies: - dependency-name: github.com/oasdiff/oasdiff dependency-version: 1.24.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
## Proposed changes Dependabot's config only watches `/tools/cli`, so PR #1385 bumped `github.com/oasdiff/oasdiff` to 1.24.0 (and its transitive `kin-openapi` to 0.143.0) in `tools/cli` alone. The oasdiff diff, checker, and load packages are actually consumed by the `tools/foas` library, which `tools/cli` pulls in via a `replace` directive and which shares the `tools/go.work` workspace. Leaving `tools/foas` on oasdiff 1.23.0 / kin-openapi 0.140.0 left the workspace on skewed versions: under the workspace and the replace directive MVS resolves oasdiff to 1.24.0, but `tools/foas/go.sum` had no entry for it, so building and testing foas failed — the failing integration/e2e job flagged in the ticket. This aligns `tools/foas` with `tools/cli`: - oasdiff 1.23.0 -> 1.24.0 - kin-openapi 0.140.0 -> 0.143.0 - oasdiff/yaml 0.1.0 -> 0.1.1 (indirect) - oasdiff/yaml3 0.0.13 -> 0.0.14 (indirect) - yuin/goldmark 1.8.2 -> 1.8.4 (indirect) All go.sum hashes are copied verbatim from the already-verified `tools/cli/go.sum`. No source changes are required. oasdiff 1.24.0 only adds `validate` lints (duplicate-enum-value, ambiguous-parameter-serialization) and reworks internal rule-ID handling; there are no behavior changes to the diff/checker output that the changelog and merge pipelines rely on, so this is not a behavior-breaking upgrade and the golden fixtures are unaffected. The kin-openapi 0.143.0 removal of the generic `openapi3.StringMap[V]` type (now plain `map[string]V`) does not affect foas: the token `StringMap` never appears in the module, and the one site that reads `Discriminator.Mapping` ranges over it and accesses the unchanged `MappingRef` value, which compiles identically. _Jira ticket:_ CLOUDP-427906 ## Checklist - [x] I have signed the MongoDB CLA - [ ] I have added tests that prove my fix is effective or that my feature works A dependency-version alignment carries no new behavior to test; the existing foas and CLI unit/e2e suites cover the oasdiff-backed paths.
|
Sage Bot can help with this pull request. Just |
|
@sage-bot this PR is now pointed to the Pipeline: https://github.com/mongodb/openapi/actions/runs/30350390783/job/90246462622?pr=1398 Failures: |
|
I've completed an exhaustive investigation. Here's my final status. I validated the failures and traced their root cause, but I could not apply the fix in this environment. My diagnosis:
The correct fix is to regenerate those two golden fixtures with the CLI built against 1.24.0 ( @matt-condon — I diagnosed the two |
oasdiff 1.24.0 ships kin-openapi 0.143.0 and reworks its flatten package to walk schemas via openapi3.WalkSchemas instead of a hand-rolled traversal. That changes composed-schema (allOf/oneOf) traversal, which changes changelog output in two ways: 1. same-api-version: enum changes on a $ref'd schema shared by sibling oneOf subschemas are no longer emitted once per parent subschema (48 fewer entries). The change is still reported on the unqualified path, so nothing is lost. One path label also shifted from 'providerSettings/oneOf[subschema #3: ...]' to 'providerSettings/allOf[subschema #2]'. 2. new-upcoming-version: removing an allOf subschema is now reported as request-body-all-of-removed + new-required-request-property instead of request-property-removed. The operation is still flagged as backward-incompatible; only the wording changes. Fixtures regenerated with the 1.24.0 CLI. The stale run date in same-api-version's changelog.json/changelog-all.json is preserved to avoid unrelated churn; that field is not asserted by the test.
Proposed changes
Dependabot's config only watches
/tools/cli, so PR #1385 bumpedgithub.com/oasdiff/oasdiffto 1.24.0 (and its transitivekin-openapito 0.143.0) intools/clialone. The oasdiff diff,checker, and load packages are actually consumed by the
tools/foaslibrary, which
tools/clipulls in via areplacedirective and whichshares the
tools/go.workworkspace. Leavingtools/foason oasdiff1.23.0 / kin-openapi 0.140.0 left the workspace on skewed versions:
under the workspace and the replace directive MVS resolves oasdiff to
1.24.0, but
tools/foas/go.sumhad no entry for it, so building andtesting foas failed — the failing integration/e2e job flagged in the
ticket.
This aligns
tools/foaswithtools/cli:All go.sum hashes are copied verbatim from the already-verified
tools/cli/go.sum.No source changes are required. The kin-openapi 0.143.0 removal of the
generic
openapi3.StringMap[V]type (now plainmap[string]V) does notaffect foas: the token
StringMapnever appears in the module, and theone site that reads
Discriminator.Mappingranges over it and accessesthe unchanged
MappingRefvalue, which compiles identically.An earlier revision of this description claimed oasdiff 1.24.0 carried no
diff/checker behavior change and left the golden fixtures unaffected.
That was wrong, and the
e2e-testsjob caught it.oasdiff's release notes document only new
validatelints, but 1.24.0also ships kin-openapi 0.143.0 and reworks its
flattenpackage towalk schemas via
openapi3.WalkSchemasinstead of a hand-rolledtraversal. That changes composed-schema (
allOf/oneOf) traversal,which changes changelog output in two ways:
1. Duplicate enum entries under sibling
oneOfsubschemas are nolonger emitted (
TestChangelog/Generate_Changelog_with_same_API_Version).Enum changes on a
$ref'd schema shared by siblingoneOfsubschemasused to be reported once per parent subschema:
Net 48 fewer entries (24
response-property-enum-value-added, 24response-property-enum-value-removed). No change is lost — theunqualified path still reports each one. One path label also shifted,
from
providerSettings/oneOf[subschema #3: Cloud Service Provider Settings for a Cluster]toproviderSettings/allOf[subschema #2].2. Removing an
allOfsubschema is described differently(
TestChangelog/Generate_Changelog_with_Upcoming_API_Version, 24version-difffixtures):Backward-incompatibility is still flagged on that operation (the
new-required-request-propertyentry carriesbc=false); only thewording changes.
Causality was verified:
mainon oasdiff 1.23.0 is green in CI, and thefailure reproduces locally on this branch with the dependency bump as the
only change.
Fixtures regenerated
The 26 affected golden fixtures under
tools/cli/test/data/changelog/were regenerated with the 1.24.0 CLI.Generated output is byte-identical in formatting to the committed
fixtures, so the diff is limited to the entries above (+176 / -536). The
stale run date in
same-api-version'schangelog.json/changelog-all.jsonis preserved to avoid unrelated churn; that field isnot asserted by the test.
Verified locally: full
tools/clie2e suite passes, and unit tests passin both
tools/cliandtools/foas.👀 Reviewer note
Because the changelog generator's output changes, the next changelog
release run on
mainwill re-emit these entries with the new paths andwording — a one-time churn in the public API changelog, including the
removed the request properties 'bucketName, iamRoleId'message beingreplaced. If that churn is not acceptable, the alternative is to pin
oasdiff at 1.23.0 in both modules and raise the
flattentraversalchange upstream instead.
Jira ticket: CLOUDP-427906
Checklist
The existing foas and CLI unit/e2e suites cover the oasdiff-backed paths;
the changelog golden fixtures are updated to match the new upstream
output.
Important
MongoDB Contribution Guidelines
This pull request was generated by sage-bot on behalf of matt.condon@mongodb.com (ticket assignee). The assignee must self-review the changes before requesting review from another engineer.
The assignee is not allowed to merge their own PR without approval from another engineer.