Commit 739c807
authored
Validate provider metadata list entries instead of ignoring them (#71104)
* Validate provider metadata list entries instead of ignoring them
The items blocks for queues, plugins and task-decorators listed their field
names directly under items, where they are not JSON Schema keywords, so the
blocks were inert and any shape passed. A provider author following what those
blocks appeared to document — a dict for queues, or a path key for a decorator
— got no error and was quietly dropped by the consumers instead. Pinning each
section to the shape the provider.yaml files and generated payloads actually
use turns that into a failure at authoring time. The custom-provider howto
named the same nonexistent path field.
Raised in review of #70190.
* Keep runtime provider metadata validation permissive
The runtime schema is documented as deliberately looser than the development
one, and its validate() call is unwrapped in provider discovery, so a single
installed provider emitting an outdated entry shape would abort discovery for
every provider in that process instead of costing just that entry a logged
warning. The structural descriptions stay behind so the schema no longer
documents a shape it never actually enforced.
* Reject unknown keys in provider.yaml decorator and plugin entries
Requiring the right keys does not stop a leftover one sitting beside them, so a
stale `path:` next to a correct `class-name:` still validated — exactly the
confusion this branch set out to remove. Every sibling item block in this
authoring schema already closes itself off this way.1 parent 6a0c3a6 commit 739c807
3 files changed
Lines changed: 54 additions & 39 deletions
File tree
- airflow-core/src/airflow
- providers-summary-docs/howto
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
569 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
570 | 578 | | |
571 | | - | |
572 | | - | |
573 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
574 | 584 | | |
575 | 585 | | |
576 | 586 | | |
| |||
688 | 698 | | |
689 | 699 | | |
690 | 700 | | |
691 | | - | |
692 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
693 | 711 | | |
694 | | - | |
695 | | - | |
696 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
697 | 717 | | |
698 | 718 | | |
699 | 719 | | |
700 | 720 | | |
701 | | - | |
| 721 | + | |
702 | 722 | | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
| 723 | + | |
709 | 724 | | |
710 | 725 | | |
711 | 726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
440 | 445 | | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
445 | 450 | | |
446 | 451 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
454 | 462 | | |
455 | 463 | | |
456 | 464 | | |
457 | 465 | | |
458 | 466 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
0 commit comments