Skip to content

Conversation

@osmman
Copy link
Collaborator

@osmman osmman commented Jul 18, 2025

Summary by Sourcery

Enhancements:

  • Add --master_hold_interval=5s and --master_hold_jitter=15s flags to the election arguments for the logsigner deployment

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 18, 2025

Reviewer's Guide

This PR updates the Trillian Logsigner deployment setup by injecting two new election-related flags—master_hold_interval and master_hold_jitter—into the pod’s startup arguments to fine-tune leadership hold timing.

Class diagram for updated Logsigner deployment arguments

classDiagram
    class EnsureSignerDeployment {
        +EnsureSignerDeployment(instance, labels)
    }
    EnsureSignerDeployment : --election_system=k8s
    EnsureSignerDeployment : --lock_namespace=$(NAMESPACE)
    EnsureSignerDeployment : --lock_holder_identity=$(POD_NAME)
    EnsureSignerDeployment : +--master_hold_interval=300
    EnsureSignerDeployment : +--master_hold_jitter=900
Loading

File-Level Changes

Change Details Files
Introduce master hold timing flags to the Logsigner election process
  • Added --master_hold_interval=300 to container args
  • Added --master_hold_jitter=900 to container args
internal/controller/trillian/utils/server-deployment.go

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

@red-hat-konflux
Copy link
Contributor

red-hat-konflux bot commented Jul 18, 2025

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
operator-v1-0 no kind "ProjectDevelopmentStream" is registered for version "projctl.konflux.dev/v1beta1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:83"
operator no kind "Project" is registered for version "projctl.konflux.dev/v1beta1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:83"
operator-template no kind "ProjectDevelopmentStreamTemplate" is registered for version "projctl.konflux.dev/v1beta1" in scheme "k8s.io/client-go/kubernetes/scheme/register.go:83"

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 @osmman - 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.

- minimum interval to hold master set to 5s
- maximum interval to hold master set to 15s

Signed-off-by: Tomas Turek <tturek@redhat.com>
@osmman osmman force-pushed the tturek/trillian-election branch from 8dbe455 to 475c0db Compare July 18, 2025 09:03
@osmman osmman requested a review from bouskaJ July 18, 2025 09:39
@osmman osmman added the bug Something isn't working label Jul 18, 2025
@bouskaJ bouskaJ merged commit 46160a7 into main Jul 21, 2025
35 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants