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

Safeguard hooks when user incorrectly registers a hook class in settings.py #4392

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

ravi-kumar-pilla
Copy link
Contributor

Description

Resolves #2769

Development notes

  • Added a condition while registering the user defined hooks.
  • Added pytest.

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

@ravi-kumar-pilla ravi-kumar-pilla changed the title Improve error message when user incorrectly registers a hook class in settings.py Safeguard hooks when user incorrectly registers a hook class in settings.py Jan 2, 2025
@ravi-kumar-pilla ravi-kumar-pilla marked this pull request as ready for review January 3, 2025 07:12
@ravi-kumar-pilla ravi-kumar-pilla requested review from noklam and ElenaKhaustova and removed request for merelcht January 3, 2025 07:13
Copy link
Contributor

@noklam noklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please also update the release notes.

Copy link
Contributor

@ElenaKhaustova ElenaKhaustova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

+1 to update release notes.

@ravi-kumar-pilla ravi-kumar-pilla merged commit 5721eda into main Jan 6, 2025
39 of 40 checks passed
@ravi-kumar-pilla ravi-kumar-pilla deleted the fix/add-checks-for-hooks branch January 6, 2025 19:20
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.

Safe guard Hook Argument in settings.py
3 participants