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

Clarify instructions for "Process this rule at most (times)" #149

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Eccenux
Copy link

@Eccenux Eccenux commented Nov 12, 2024

Form-doc update as described in issue #148.

Testing done

Checked with xhtml validator: https://validator.w3.org/check

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Not relevant Link to relevant pull requests, esp. upstream and downstream changes
  • Not relevant Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.21%. Comparing base (032ec92) to head (60a4c15).
Report is 25 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #149      +/-   ##
============================================
+ Coverage     99.13%   99.21%   +0.08%     
- Complexity      124      135      +11     
============================================
  Files            27       29       +2     
  Lines           231      256      +25     
  Branches         17       18       +1     
============================================
+ Hits            229      254      +25     
  Misses            1        1              
  Partials          1        1              

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

@@ -2,12 +2,23 @@
<p>The rule will stop being processed after a certain number of matched builds.
Once this condition is met, only the other rules will continue to be processed.</p>

<p><b>Use cases</b></p>
<p>This feature provides the option to control the number of builds the rule can process. It may save a significant amount of time when the build history is long.</p>
<p>Internally and in the documentation, this value is called <code>matchAtMost</code>.</p>
Copy link
Member

Choose a reason for hiding this comment

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

from the user perspective this is valuable how to use/configure and not how this is named internally

<li>If <code>matchAtMost = -1</code>, there is no limitation; all builds will be evaluated.</li>
<li>If <code>matchAtMost = 0</code>, no builds will be evaluated. This disables the rule, as it will not apply to any build.</li>
<li>If <code>matchAtMost > 0</code>, this rule will only be applied <code>matchAtMost</code> times
in each build history manager process (in each loop over builds after a build).</li>
Copy link
Member

Choose a reason for hiding this comment

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

build history manager process -> plugin, if I understand correctly meaning

Copy link
Author

Choose a reason for hiding this comment

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

I meant the process the plugin follows after each build. Haven't looked much in the code but I guess there is some function that is executed as a hook/event from Jenkins. That function has some algorithm (process).


<p><b>Use cases</b></p>
<p>This feature provides the option to control the number of builds the rule can process.
If used with specific actions it can save a significant amount of time when the build history is long.</p>
Copy link
Member

Choose a reason for hiding this comment

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

this suggests that the option has only performance impact while the better performance is only side effect - the real purpose of this flag is to make sure that action is executed at mostn times

Copy link
Author

Choose a reason for hiding this comment

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

Hm... This was the original use case actually :-)

<p>This feature provides the option to control the number of builds the rule can process.
If used with specific actions it can save a significant amount of time when the build history is long.</p>

<p>This feature also provides the option to skip a number of builds while processing builds.
Copy link
Member

Choose a reason for hiding this comment

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

not also - this is the only feature

Copy link
Author

@Eccenux Eccenux Nov 14, 2024

Choose a reason for hiding this comment

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

I think the original use case is still valid. You can use matchAtMost to skip tail (and maybe save some time) and you can also use it to skip head (and preserve top builds).

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