Skip to content

RHINENG-27056: add cji for the db-migration job#2245

Merged
TenSt merged 1 commit into
RedHatInsights:masterfrom
TenSt:stepan/RHINENG-27056-add-cji-for-db-migration-job
Jun 24, 2026
Merged

RHINENG-27056: add cji for the db-migration job#2245
TenSt merged 1 commit into
RedHatInsights:masterfrom
TenSt:stepan/RHINENG-27056-add-cji-for-db-migration-job

Conversation

@TenSt

@TenSt TenSt commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This PR:

  • adds CJI for the db-migration job

Summary by Sourcery

Add configuration to invoke the db-migration job as a ClowdJobInvocation in the patchman application.

New Features:

  • Introduce a ClowdJobInvocation resource for the db-migration job in the patchman app.

Build:

  • Add a DB_MIGRATION_DISABLED parameter to control db-migration job execution via deployment configuration.

@TenSt TenSt requested a review from a team as a code owner June 23, 2026 17:27
@sourcery-ai

sourcery-ai Bot commented Jun 23, 2026

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

Reviewer's Guide

Adds a ClowdJobInvocation (CJI) resource to trigger the db-migration job and introduces a parameter to optionally disable this job via configuration.

File-Level Changes

Change Details Files
Introduce a ClowdJobInvocation to run the db-migration job with optional disabling via parameter.
  • Define a new ClowdJobInvocation resource configured for the patchman app to run the db-migration job, with runOnNotReady enabled.
  • Wire the ClowdJobInvocation disabled flag to a new DB_MIGRATION_DISABLED parameter for runtime control over job execution.
  • Add DB_MIGRATION_DISABLED to the parameters list with default value set to false and a clarifying comment about its purpose.
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, and left some high level feedback:

  • The inline comment for DB_MIGRATION_DISABLED (“Disable db-migration job execution”) is slightly confusing given the default false value (which means the job is enabled); consider clarifying the wording to reflect that true disables the job.
  • Double-check that disabled: ${{DB_MIGRATION_DISABLED}} will be rendered as a proper boolean in the generated manifest (not a string), or explicitly coerce it if the templating system does not handle that automatically.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The inline comment for `DB_MIGRATION_DISABLED` (“Disable db-migration job execution”) is slightly confusing given the default `false` value (which means the job is enabled); consider clarifying the wording to reflect that `true` disables the job.
- Double-check that `disabled: ${{DB_MIGRATION_DISABLED}}` will be rendered as a proper boolean in the generated manifest (not a string), or explicitly coerce it if the templating system does not handle that automatically.

## Individual Comments

### Comment 1
<location path="deploy/clowdapp.yaml" line_range="769-771" />
<code_context>
 - {name: JOBS_CONFIG, value: ''}

+# DB migration
+- {name: DB_MIGRATION_DISABLED, value: 'false'} # Disable db-migration job execution
 # VMaaS sync
 - {name: VMAAS_SYNC_SCHEDULE, value: '*/5 * * * *'} # Cronjob schedule definition
</code_context>
<issue_to_address>
**suggestion:** Clarify the default value vs. inline comment for `DB_MIGRATION_DISABLED`

The name `DB_MIGRATION_DISABLED` with default `'false'` and the comment “Disable db-migration job execution” is misleading, since `'false'` actually means “do not disable.” Please update the comment to describe the behavior more explicitly (e.g., “Set to 'true' to disable db-migration job execution”), or, if feasible, rename/invert the flag so its value matches the described behavior.

```suggestion
# DB migration
- {name: DB_MIGRATION_DISABLED, value: 'false'} # Set to 'true' to disable db-migration job execution
# VMaaS sync
```
</issue_to_address>

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 and I'll use the feedback to improve your reviews.

Comment thread deploy/clowdapp.yaml
jlsherrill
jlsherrill previously approved these changes Jun 23, 2026
@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.04%. Comparing base (b2d5a7d) to head (81e3623).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2245      +/-   ##
==========================================
- Coverage   59.06%   59.04%   -0.03%     
==========================================
  Files         138      138              
  Lines        8848     8848              
==========================================
- Hits         5226     5224       -2     
- Misses       3076     3078       +2     
  Partials      546      546              
Flag Coverage Δ
unittests 59.04% <ø> (-0.03%) ⬇️

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.

@TenSt TenSt force-pushed the stepan/RHINENG-27056-add-cji-for-db-migration-job branch from f537a10 to 81e3623 Compare June 23, 2026 17:34
@TenSt TenSt merged commit 762d0e8 into RedHatInsights:master Jun 24, 2026
8 checks passed
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