Commit 549f90a
committed
Fix compat-test failures from asserting on unreleased MessageQueueTrigger.queue
Provider distributions must keep passing tests against previously
released Airflow versions. BaseEventTrigger.queue is a new attribute
added by this branch, so any Airflow release before it ships doesn't
have the attribute at all, and BaseTrigger has no class-level default
either in those older releases. Assertions on trigger.queue therefore
raised AttributeError under the 3.0.6/3.1.8/3.3.0 compat test jobs.
Guard with getattr(trigger, "queue", None), matching the same pattern
already used for this attribute in airflow.serialization.encoders.1 parent 24bde08 commit 549f90a
2 files changed
Lines changed: 6 additions & 5 deletions
File tree
- providers
- common/messaging/tests/unit/common/messaging/triggers
- ibm/mq/tests/unit/ibm/mq/queues
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | | - | |
| 236 | + | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
0 commit comments