fix(test, computing-unit): restore ComputingUnitManagingServiceSpec compilation after the avatar rename - #7635
Open
eugenegujing wants to merge 1 commit into
Conversation
…ompilation after the avatar rename Rename the two ComputingUnitManagingResourceSpec references to ownerGoogleAvatar, which apache#7563 renamed to ownerAvatar. The module's test sources did not compile, so none of its 116 tests could run.
Contributor
Backport auto-label reportThis
|
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
Author
|
/request-review @aglinxinyuan |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7635 +/- ##
============================================
+ Coverage 89.29% 89.40% +0.10%
- Complexity 4359 4375 +16
============================================
Files 1177 1177
Lines 46831 46831
Branches 5224 5224
============================================
+ Hits 41817 41867 +50
+ Misses 3269 3217 -52
- Partials 1745 1747 +2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
ComputingUnitManagingResourceSpecreferences a field namedownerGoogleAvatarin two assertions, butDashboardWorkflowComputingUnitdeclares it asownerAvatar(ComputingUnitManagingResource.scala:162).maintherefore fails to compile its test sources:This renames the two references. The diff is two lines; no production file is touched and no assertion's meaning changes.
Because Scala test compilation is per module, the impact is wider than two assertions: no test in
computing-unit-managing-servicehas been able to run.ComputingUnitHelpersSpec,AdminComputingUnitResourceSpec,KubernetesClientSpecandComputingUnitAccessResourceSpecwere all taken down with it.This is merge skew. #7563 (
06845321b) renamed the field and correctly updated the two specs that referenced it at the time —AdminComputingUnitResourceSpecandComputingUnitHelpersSpec, both of which useownerAvataronmaintoday.ComputingUnitManagingResourceSpechad no avatar assertions then, so there was nothing to update. #7580 (c7e7362a4) then added them from a branch based before the rename, and its CI ran against that older base.git merge-base --is-ancestor 06845321b c7e7362a4returns true, so the rename was already onmainwhen #7580 landed.Any related issues, documentation, discussions?
Closes #7634
Introduced by the interaction of #7563 (the
ownerGoogleAvatar→ownerAvatarrename) and #7580 (which added the avatar assertions from a pre-rename base).How was this PR tested?
sbt "ComputingUnitManagingService/Test/compile"fails onmainwith the two errors above and succeeds on this branch.sbt "ComputingUnitManagingService/test"on this branch: 116 tests across 8 suites, all passing. None of those 116 could run onmain.ComputingUnitManagingResourceSpecitself passes 31/31 — the two assertions were already correct, so nothing about their meaning had to change, only the field name they read.No other module is affected: the change is confined to one test file in one module and renames a field reference to match an existing declaration. A repo-wide
sbt Test/compileacross all sixteen aggregated modules succeeds on this branch.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5)