Commit 0eaefff
fix(cloud-assembly-schema):
The way it's currently specified, the `unconfiguredBehavesLike` field
that's in the Cloud Assembly Schema requires the CLI to know the current
major version of the CDK Library to properly evaluate:
It looks like `unconfiguredBehavesLike: { v1: ..., v2: ... }` subfields,
and that requires the CLI to know whether to look in the `v1` or `v2`
subfield (and in the future `v3`, `v4`, etc...).
That is unnecessary: since the CDK Library knows its own current version
so it could just have communicated `unconfiguredBehavesLike: true` to
accurately reflect its current behavior, without the consumer needing to
know anything about the version.
The CLI code right now is only reading the `v2` field, but that will
become inaccurate if we ever release CDKv3.
In this PR, we're saying that the `v2` subfield is the "official"
location of this value going forward. `v1` should be ignored if present
(but is still included to not trip up any JSON Schema validation).
This leads to the least amount of interference with the existing
ecosystem (no forced upgrade by CDK users and no backwards compatibility
path in the CLI to potentially read 2 fields).
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license
---------
Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>unconfiguredBehavesLike contains info for multiple versions (#782)1 parent 2a428d7 commit 0eaefff
File tree
3 files changed
+75
-9
lines changed- packages/@aws-cdk/cloud-assembly-schema
- lib/cloud-assembly
- schema
3 files changed
+75
-9
lines changedLines changed: 37 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
279 | 312 | | |
280 | | - | |
| 313 | + | |
281 | 314 | | |
282 | 315 | | |
283 | 316 | | |
| |||
Lines changed: 37 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
509 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
510 | 513 | | |
511 | 514 | | |
512 | 515 | | |
513 | 516 | | |
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
517 | | - | |
518 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
519 | 552 | | |
520 | 553 | | |
521 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
0 commit comments