Skip to content

feat: Add deprecation warning to code owner celery task decorator - #550

Closed
rahulkanneri-2u wants to merge 1 commit into
openedx:masterfrom
rahulkanneri-2u:boms-241/celery-decorator-deprecation-warning
Closed

feat: Add deprecation warning to code owner celery task decorator#550
rahulkanneri-2u wants to merge 1 commit into
openedx:masterfrom
rahulkanneri-2u:boms-241/celery-decorator-deprecation-warning

Conversation

@rahulkanneri-2u

@rahulkanneri-2u rahulkanneri-2u commented Sep 1, 2026

Copy link
Copy Markdown

Adds a DeprecationWarning and a monitoring custom attribute to set_code_owner_attribute / set_code_owner_attribute_from_module, to signal the upcoming removal and give visibility into which callers still use it before it is removed.

Refs #469

Description:

Adds a DeprecationWarning and a deprecated_code_owner_celery_monitoring monitoring custom attribute inside set_code_owner_attribute / set_code_owner_attribute_from_module. This is purely additive (no behavior change) and gives downstream teams a signal, plus dashboard visibility into which modules still call the decorator, ahead of its eventual removal.

JIRA:

#469

Dependencies:

None.

Merge deadline:

None currently. The Willow branch cut was delayed to early January 2027, so there's no immediate deadline pressure on this change.

Installation instructions:

None.

Testing instructions:

  1. Decorate a function with @set_code_owner_attribute (or call set_code_owner_attribute_from_module directly).
  2. Call the decorated function.
  3. Expect a DeprecationWarning to be raised, and a deprecated_code_owner_celery_monitoring custom attribute to be set with the calling module name.
  4. If no warning is raised, or the custom attribute is missing - check failed. See test_set_code_owner_attribute_deprecation_warning, test_set_code_owner_attribute_from_module_deprecation_warning, and test_set_code_owner_attribute_from_module_deprecated_custom_attribute in test_utils.py.

Reviewers:

  • tag reviewer

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Create a tag
  • Check new version is pushed to PyPi after tag-triggered build is
    finished.
  • Delete working branch (if not needed anymore)
    Author concerns:

List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.

Adds a DeprecationWarning and a monitoring custom attribute to
set_code_owner_attribute / set_code_owner_attribute_from_module, to
signal the upcoming removal and give visibility into which callers
still use it before it is removed.

Refs openedx#469
@vgulati-apphelix

Copy link
Copy Markdown
Contributor

@rahulkanneri-2u Please update the ticket reference to github ticket id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants