Skip to content

Conversation

@bacciotti
Copy link
Contributor

@bacciotti bacciotti commented Jul 24, 2025

Summary by Sourcery

Simplify the deployment scripts by removing in-script label validation for test runs and relying on Tekton to handle label checks, while unifying the behavior for missing PR identifiers and enhancing logging.

Enhancements:

  • Remove manual label checks for Jenkins and smoke tests in deployment scripts
  • Delegate label validation to Tekton pipeline
  • Streamline handling of missing PR numbers or labels and add an info log for deployment start

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 24, 2025

Reviewer's Guide

Label validation has been offloaded to the Tekton pipeline; the deployment scripts no longer perform manual PR label checks. The fallback path for missing PR numbers or labels is unified, and an info message is added to indicate that Tekton handles validation.

Class diagram for removal of label validation logic

classDiagram
    class DeployScript {
        - pr_number
        - labels
        + main()
        - Removed: manual label validation logic
    }
    class DeployIQECJI {
        - pr_labels
        + run()
        - Removed: manual label validation logic
    }
Loading

Flow diagram for simplified label validation in deployment scripts

flowchart TD
    A[Start Deployment Script] --> B{PR Number or Labels Present?}
    B -- No --> C[Display: No PR number/labels found. Scheduled/manual test run.]
    C --> D[Display: Proceeding with full smoke tests]
    D --> E[Display: Starting deploy. Label validation was already handled by Tekton.]
    E --> F[Continue Deployment]
    B -- Yes --> E
Loading

File-Level Changes

Change Details Files
Remove manual label-based branching and smoke-test checks
  • Deleted conditional checks for "run-jenkins-tests" and "ok-to-skip-smokes" labels
  • Removed exit logic for missing smoke-test labels
  • Eliminated PR-number/label-specific branches
files/bin/deploy.py
files/bin/deploy-iqe-cji.py
Unify fallback behavior and add Tekton validation notice
  • Replaced separate else blocks with a unified no-PR/label info log
  • Always proceed with full smoke tests when labels are absent
  • Added "[INFO] Starting deploy. Label validation was already handled by Tekton." message
files/bin/deploy.py
files/bin/deploy-iqe-cji.py

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

Copy link

@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 @bacciotti - I've reviewed your changes and they look great!


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.

@bacciotti bacciotti merged commit 853890c into main Jul 24, 2025
1 check passed
@bacciotti bacciotti deleted the cost-6462-check-labels-before-deploying branch July 24, 2025 10:37
@bacciotti bacciotti restored the cost-6462-check-labels-before-deploying branch July 24, 2025 10:48
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