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

feat: reintroduce Lark notification fields in scanEngine #207

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

psyray
Copy link
Contributor

@psyray psyray commented Sep 25, 2024

  • Reintroduced the send_to_lark and lark_hook_url fields in the notification model.
  • These fields were previously removed and are now added back with a new migration file for user upgrading from 2.0.7.

Error are showing in the make logs output saying that send_to_lark db field does not exists.
Migrations has not been made correctly on the upstream repo, so users which have upgraded from 2.0.7 to 2.1.0 does not have the db updated.

Tested and working

Summary by Sourcery

Reintroduce Lark notification fields in the scanEngine's notification model and add a new migration file to ensure proper database updates for users upgrading from version 2.0.7.

New Features:

  • Reintroduce the send_to_lark and lark_hook_url fields in the notification model to support Lark notifications.

Bug Fixes:

  • Fix the issue where users upgrading from version 2.0.7 to 2.1.0 did not have the database updated correctly due to missing Lark notification fields.

- Reintroduced the send_to_lark and lark_hook_url fields in the notification model.
- These fields were previously removed and are now added back with a new migration file for user upgrading from 2.0.7.
@psyray psyray added the bug Something isn't working label Sep 25, 2024
@psyray psyray requested review from AnonymousWP and 0b3ud September 25, 2024 11:51
@psyray psyray self-assigned this Sep 25, 2024
Copy link
Contributor

sourcery-ai bot commented Sep 25, 2024

Reviewer's Guide by Sourcery

This pull request reintroduces the Lark notification fields in the scanEngine, which were previously removed. The changes include adding back the 'send_to_lark' and 'lark_hook_url' fields to the notification model and creating a new migration file to handle the database update for users upgrading from version 2.0.7.

File-Level Changes

Change Details Files
Removal of Lark notification fields from initial migration
  • Removed 'send_to_lark' BooleanField
  • Removed 'lark_hook_url' CharField
web/scanEngine/migrations/0001_initial.py
Addition of new migration file to reintroduce Lark notification fields
  • Created new migration '0007_lark_notification.py'
  • Added 'lark_hook_url' CharField to Notification model
  • Added 'send_to_lark' BooleanField to Notification model
web/scanEngine/migrations/0007_lark_notification.py

Sequence Diagram

No sequence diagram generated.


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@psyray psyray linked an issue Sep 25, 2024 that may be closed by this pull request
3 tasks
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @psyray - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider addressing potential data recovery for users who might have had Lark notification settings before these fields were initially removed.
  • It would be helpful to provide more context in the commit message or PR description about why these fields were initially removed and why they're being reintroduced now.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@AnonymousWP AnonymousWP added enhancement New feature or request and removed bug Something isn't working labels Sep 26, 2024
@AnonymousWP AnonymousWP merged commit c625a5d into release/2.1.0 Sep 26, 2024
5 checks passed
@AnonymousWP AnonymousWP deleted the 204-fix-lark-migration branch September 26, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(release): 2.1.0 hotfixes
2 participants