Skip to content
Snippets Groups Projects

Limit test predictions for DirectMapping strategy

Merged David Dieulivol requested to merge ddieulivol-limit_predictions into master
1 unresolved thread

From Draft to Ready

Context

Closes gitlab-org/gitlab#450374 (closed)

What's in this MR?

[Feature] Add limit_percentage and limit_min options for DirectMatching

Edited by David Dieulivol

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Lin Jen-Shin
  • @ddieulivol Thanks! Given this is still in draft and there are things can potentially move, I only reviewed the overall concept. I think it's a great idea! The default should probably be random on the other hand.

    In the future, if we want to make this reproducible, we might want to use a new random object, too. (Random.new, so it doesn't share the seed with the global one, and we can provide the seed independently)

    I really like the idea of using a minimal and percentage, too. Perhaps we don't have to provide the first option, because I don't think that's a good idea anyway :sweat_smile: Or make it clear that it might be intended for debugging only. I see for debugging one might prefer to use a simpler method which is always the same.

    Edited by Lin Jen-Shin
  • Lin Jen-Shin removed review request for @godfat-gitlab

    removed review request for @godfat-gitlab

  • David Dieulivol deleted the ddieulivol-gem_maintenance branch. This merge request now targets the master branch

    deleted the ddieulivol-gem_maintenance branch. This merge request now targets the master branch

  • added 5 commits

    Compare with previous version

  • A deleted user added bugperformance typebug labels

    added bugperformance typebug labels

  • Peter Leitzen
  • Peter Leitzen
  • added 1 commit

    • a2d755d1 - Reintroduce backwards-compatible class methods

    Compare with previous version

  • Peter Leitzen
  • David Dieulivol marked the checklist item !45 (merged) is merged as completed

    marked the checklist item !45 (merged) is merged as completed

  • David Dieulivol marked the checklist item The target branch is master as completed

    marked the checklist item The target branch is master as completed

  • David Dieulivol changed the description

    changed the description

  • added 1 commit

    • 5c547def - Reintroduce backwards-compatible class methods

    Compare with previous version

  • David Dieulivol marked this merge request as ready

    marked this merge request as ready

  • added 2 commits

    • e64ff876 - Use limit_percentage and limit_min as args
    • 3dc995a7 - Reintroduce backwards-compatible class methods

    Compare with previous version

  • Thank you for your feedback @godfat-gitlab . Could you please review this MR again? :bow:

    Since your last review, I did the following:

  • requested review from @godfat-gitlab

  • Peter Leitzen mentioned in issue #27

    mentioned in issue #27

  • @ddieulivol Thanks! I have one suggestion around using an integer instead of using a floating point, and one suggestion to see if we can remove stubs around complex stubs. If not, that's fine!

  • Lin Jen-Shin removed review request for @godfat-gitlab

    removed review request for @godfat-gitlab

  • David Dieulivol resolved all threads

    resolved all threads

  • David Dieulivol resolved all threads

    resolved all threads

  • Thank you for your feedback @godfat-gitlab. Could you please review this MR again? :bow:

    Since your last review, I did the following:

    Edited by David Dieulivol
  • requested review from @godfat-gitlab

  • added 1 commit

    • d20ad4dd - Only allow integer values for limit_percentage

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Lin Jen-Shin
  • Lin Jen-Shin resolved all threads

    resolved all threads

  • Lin Jen-Shin approved this merge request

    approved this merge request

  • Lin Jen-Shin started a merge train

    started a merge train

  • Lin Jen-Shin mentioned in commit 94785f57

    mentioned in commit 94785f57

  • added typefeature label and removed bugperformance typebug labels

  • David Dieulivol resolved all threads

    resolved all threads

  • David Dieulivol mentioned in merge request !49 (merged)

    mentioned in merge request !49 (merged)

  • David Dieulivol mentioned in merge request !52 (merged)

    mentioned in merge request !52 (merged)

  • 34 return if limit_min_valid
    35
    36 raise "Invalid value for limit_min: should be an integer strictly greater than zero"
    37 end
    38
    39 def initialize(map, limit_percentage: nil, limit_min: nil)
    40 @map = map
    41 @limit_percentage = limit_percentage
    42 @limit_min = limit_min
    43 end
    27 44
    28 45 def match(files)
    29 46 Array(files).inject(Set.new) do |result, file|
    30 47 test_files = @map.fetch(file, [])
    48
    49 if limit_percentage
  • Please register or sign in to reply
    Loading