Add tests for active-repositories feature#11684
Conversation
|
I asked Claude to give me an idea of the test coverage. Its response:
Where:
|
These tests were generated by Claude code, but manually reviewed.
andreabedini
left a comment
There was a problem hiding this comment.
I left a couple of comments but otherwise LGTM.
Not a deal breaker but any chance you can add a simple test for this edge case behaviour?
-- Note: currently if 'ActiveRepoRest' is provided more than once,
-- rest-repositories will be multiple times in the output.
| @?= sort [foo1, bar1] | ||
| , testCase "Merge+Override: override repo replaces all versions of overlapping package" $ | ||
| -- repoFoo12 has foo-1.0 and foo-1.1; repoFoo2 has only foo-2.0. | ||
| -- Override means repoFoo2 wins the entire 'foo' bucket. |
There was a problem hiding this comment.
This comments seems wrong. Below we have
repoFoo12 = PackageIndex.fromList [foo1, foo2]
So repoFoo12 has foo-1.0 and foo-2.0. I am not sure what was intended.
| pkgs | ||
| :: [(PackageIndex.PackageIndex PackageIdentifier, CombineStrategy)] | ||
| -> [PackageIdentifier] | ||
| pkgs = sort . PackageIndex.allPackages . foldl combineIndex mempty |
There was a problem hiding this comment.
| pkgs = sort . PackageIndex.allPackages . foldl combineIndex mempty | |
| pkgs = sort . PackageIndex.allPackages . foldl' combineIndex mempty |
This is extra picky but since we say Mirrors the addIndex / foldl' in getSourcePackagesAtIndexState we might as well reproduce the same behaviour.
BTH I am not sure testing a reimplementation is a good idea, it will go out of sync with the actual code and lose all its value. Can we perhaps export from IndexUtils the functions we want to test here?
Merge Queue Status
This pull request spent 1 hour 5 minutes 23 seconds in the queue, including 3 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
Merge Queue Status
This pull request spent 11 minutes 12 seconds in the queue, including 44 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
|
A changelog file is missing, here is a suggestion: |
Merge Queue Status
This pull request spent 10 minutes 45 seconds in the queue, including 4 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
Merge Queue Status
This pull request spent 11 minutes 20 seconds in the queue, including 26 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
Merge Queue Status
This pull request spent 10 minutes 48 seconds in the queue, including 32 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
Merge Queue Status
This pull request spent 6 hours 5 minutes 24 seconds in the queue, including 3 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
Merge Queue Status
This pull request spent 1 hour 59 minutes 18 seconds in the queue, including 12 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
|
Do we know why this is being repeatedly queued without a merge label? The Mergify summary doesn't show it matching any of the merge rules (correct), and even if it were the presence of unresolved comments and lack of reviews should be blocking it from entering the queue at all. |
|
@Mergifyio refresh |
✅ Pull request refreshed |
|
I will rebase against master and address @andreabedini 's comments on Tuesday, April 7th |
Merge Queue Status
This pull request spent 1 hour 46 minutes 54 seconds in the queue, including 2 seconds running CI. Required conditions to merge
ReasonPull request #11684 has been dequeued merge conditions no longer match:
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. |
This PR only contains tests, which were generated by Claude code, and then manually reviewed. Unfortunately I have not worked much on Cabal so my manual review may not be up-to-scratch.
This PR was submitted in preparation for taking over the work in #8997 and getting it merged. One of the things mentioned in that PR was that need for tests for the
active-repositoriesfeature.Include the following checklist in your PR: