Skip to content

RHINENG-26122: enable account_advisory backfill job - #2346

Open
Dugowitch wants to merge 1 commit into
RedHatInsights:masterfrom
Dugowitch:backfill
Open

Dugowitch wants to merge 1 commit into
RedHatInsights:masterfrom
Dugowitch:backfill

Conversation

@Dugowitch

@Dugowitch Dugowitch commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Enable the job to backport notified from to-be-retired advisory_account_data to the new account_advisory table.

Secure Coding Practices Checklist GitHub Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Summary by Sourcery

Deployment:

  • Enable the scheduled account_advisory backfill job in the deployment configuration.

@Dugowitch
Dugowitch requested a review from a team as a code owner September 25, 2026 13:46
@sourcery-ai

sourcery-ai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

The deployment configuration activates the daily account_advisory backfill cronjob, allowing it to backport the notified state from advisory_account_data into account_advisory.

File-Level Changes

Change Details Files
Enable the scheduled account_advisory backfill job in the deployment configuration.
  • Change the backfill suspend flag from true to false so the cronjob can execute.
  • Retain the existing daily 03:00 UTC schedule.
deploy/clowdapp.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="deploy/clowdapp.yaml" line_range="967" />
<code_context>
 # Backfill account_advisory
 - {name: ACCOUNT_ADVISORY_BACKFILL_SCHEDULE, value: '0 3 * * *'} # Cronjob schedule definition
-- {name: ACCOUNT_ADVISORY_BACKFILL_SUSPEND, value: 'true'} # Suspended until ready to run
+- {name: ACCOUNT_ADVISORY_BACKFILL_SUSPEND, value: 'false'} # Suspended until ready to run

 # Database admin
</code_context>
<issue_to_address>
**nitpick:** The parameter is set to `false`, which enables the scheduled job, but the comment says it is “Suspended until ready to run.” Operators reading the deployment configuration are given the opposite of the actual runtime state.

**Suggested fix:** Update the comment to describe that the cronjob is enabled, or change the value to `true` if the job is not yet ready to run.

```suggestion
- {name: ACCOUNT_ADVISORY_BACKFILL_SUSPEND, value: 'false'} # Enable cronjob execution
```
</issue_to_address>

Sourcery assessment

Needs a human reviewer. This enables a production-scheduled backfill that will write account advisory data; if its selection or transformation is wrong, incorrect records can remain after reverting the configuration. The affected data should be repairable by correcting and rerunning the backfill, so the impact is bounded rather than irreversible.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread deploy/clowdapp.yaml
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.95%. Comparing base (2bbe3de) to head (57ef123).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2346   +/-   ##
=======================================
  Coverage   58.95%   58.95%           
=======================================
  Files         150      150           
  Lines        9605     9605           
=======================================
  Hits         5663     5663           
  Misses       3348     3348           
  Partials      594      594           
Flag Coverage Δ
unittests 58.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants