Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context to Azure Service Bus Message callback #43370

Conversation

perry2of5
Copy link
Contributor

The original callback only took the message as a parameter. However, users may want to push status or location information into XComs and so callbacks need access to the context (or the XComs, but context is more general). This commit changes the code to pass the context.

NOTE: This is a BREAKING CHANGE.

Closes #43361

@perry2of5 perry2of5 force-pushed the pass-ctxt-to-azure-svc-bus-msg-callback-43361-inspect branch from 8793230 to 2e3b446 Compare October 24, 2024 22:57
@potiuk
Copy link
Member

potiuk commented Oct 25, 2024

NOTE: This is a BREAKING CHANGE.

Indeed. Can you please add a note on top of the changelog for the provider explaining the breaking change and what the users should do to switch?

@perry2of5 perry2of5 force-pushed the pass-ctxt-to-azure-svc-bus-msg-callback-43361-inspect branch from 2e3b446 to b5a3685 Compare October 25, 2024 17:18
@perry2of5
Copy link
Contributor Author

Added note. Thanks for letting me know what to do.

@perry2of5 perry2of5 force-pushed the pass-ctxt-to-azure-svc-bus-msg-callback-43361-inspect branch 2 times, most recently from 8763be9 to b9807d6 Compare October 25, 2024 17:45
@perry2of5
Copy link
Contributor Author

Hmmm...the contributing guide says "update the provider.yaml file with the new (breaking) version of the provider", but the provider.yaml says "note that those versions are maintained by release manager - do not update them manually". I assume I don't need to change provider.yaml and that putting my comment about the breaking change in the PR is enough. Is that true?

@potiuk
Copy link
Member

potiuk commented Oct 25, 2024

Yes. No need to update versions, just update changelog - and any clarifications in our contributing docs are also very good contributions (just saying!)

@perry2of5
Copy link
Contributor Author

Built provider locally and tested end-to-end in flow. Everything worked as expected.

The original callback only took the message as a paramter. However,
users may want to push status or location information into XComs and
so callbacks need access to the context (or the XComs, but context is
more general). This commit changes the code to pass the context

NOTE: This is a BREAKING CHANGE.

Fixes 43361
@perry2of5 perry2of5 force-pushed the pass-ctxt-to-azure-svc-bus-msg-callback-43361-inspect branch from b9807d6 to d62e12e Compare October 25, 2024 23:34
@potiuk potiuk merged commit 93ad181 into apache:main Oct 26, 2024
56 checks passed
@perry2of5 perry2of5 deleted the pass-ctxt-to-azure-svc-bus-msg-callback-43361-inspect branch October 28, 2024 16:13
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* Add context to Azure Service Bus Message callback

The original callback only took the message as a paramter. However,
users may want to push status or location information into XComs and
so callbacks need access to the context (or the XComs, but context is
more general). This commit changes the code to pass the context

NOTE: This is a BREAKING CHANGE.

Fixes 43361

* Add breaking change note to CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure Service Bus message receiver does not pass context to callback method
2 participants