Repository navigation
mgr/dashboard: fix stale nvmeof spec tests from a semantic merge conflict - #69894
Conversation
…lict mgr-dashboard-frontend-unittests has been failing on main since 2026-07-01, unrelated to whatever PR triggers it. Bisected to cfe1230, the merge commit for PR ceph#68180. 6182e67 ("mgr/dashboard: NVMe Onboarding Setup Cards") moved gateway group selection out of NvmeofSubsystemsComponent and NvmeofNamespacesListComponent into a new NvmeofGatewayGroupFilterComponent, dropping gwGroups, updateGroupSelectionState, handleGatewayGroupsError, onGroupClear, and getSubsystems from both. Clean on its own. PR ceph#68180 forked from main in April, before that refactor existed, and added three new tests against the old API. Also clean on its own, and never rebased. Both PRs only touch lines the other doesn't, so when ceph#68180 merged 34 minutes after 6182e67, git's 3-way merge combined them without a conflict. The merge is the only place the bug exists: new tests calling methods the sibling parent had already deleted. TypeError at runtime, TS2339/TS2551 from tsc, every run since. CI never caught it: GitHub was showing ceph#68180's make check as green from a run a full day older than 6182e67. nvmeof-namespaces-list.component.spec.ts: the dedup test is real, current logic, it just called the old listNamespaces() instead of fetchData(). Fixed the call. The other two duplicate NvmeofGatewayGroupFilterComponent's own spec; removed. nvmeof-subsystems.component.spec.ts: same story, all three duplicate the filter component's spec; removed. Both removed error tests also checked preventDefault() on the error object, which had no coverage elsewhere. Added that to NvmeofGatewayGroupFilterComponent's spec, and hit a second bug while writing it: the file's throwError(() => err) is the RxJS 7 factory overload, this project is on RxJS 6.6.3, so it was emitting the arrow function itself as the error. The existing error test never noticed since it only checks side effects, not the error's identity. Used throwError(err) instead. Verified: jest passes on all three spec files (was 6 failing), tsc -p tsconfig.spec.json --noEmit is clean (was 17 errors), full block/nvmeof sweep is 29/29 suites, 216/216 tests. Fixes: cfe1230 Signed-off-by: Kefu Chai <[email protected]>
|
jenkins test windows |
|
@kotreshhr Kotresh thanks for adding Ilya as a reviewer. but this change is all about dashboard testing, while IIUC, Ilya is more of a maintainer of RBD. i am happy to have more eyes on this fix. but just wanted to make sure this issue gets fixed sooner, as it's a regression. |
I just wanted more eyes on this as I am blocked. I am nudging whomever possible. |
|
jenkins test api |
|
FYI this is fixed here f869805 |
There is an RBD PR blocked by this: #67968 |
|
FYI @kotreshhr |
Definitely not -- this can't wait for any bigger PR. |
idryomov
left a comment
There was a problem hiding this comment.
the file's throwError(() => err) is the RxJS 7 factory overload, this project is on RxJS 6.6.3, so it was emitting the arrow function itself as the error. The existing error test never noticed since it only checks side effects, not the error's identity. Used throwError(err) instead.
Shouldn't the existing test (should disable and set error placeholder on API error?) be massaged to avoid the arrow function syntax as well?
|
I'm waiving |
|
@idryomov for dashboard we wait for API tests, any reason to waive off that ? Additionally the bigger PR was ready to merge , best place to waive of windows tests. And that PR was important for dash as well. Kindly consult @ceph/dashboard before merging. Thanks |
This PR doesn't touch anything outside of unit tests and my understanding is that unit tests are being run as part of
I interpreted your #69894 (comment) and "can merge whichever ready first" comment on Slack as no preference for either PR. Choosing between rushing this PR (which is a targeted fix) vs #69750 (which is a much bigger feature PR where the unit tests fixup just got appended), this PR was an obvious choice. Kefu's commit message here is very helpful, covering every singe detail while the fixup commit in #69750 had literally nothing in terms of description. On top of that, Kefu has preserved some
My apologies, I didn't mean to step on your toes. I take |
mgr-dashboard-frontend-unittests has been failing on main since 2026-07-01, unrelated to whatever PR triggers it. Bisected to cfe1230, the merge commit for PR #68180.
6182e67 ("mgr/dashboard: NVMe Onboarding Setup Cards") moved gateway group selection out of NvmeofSubsystemsComponent and NvmeofNamespacesListComponent into a new NvmeofGatewayGroupFilterComponent, dropping gwGroups, updateGroupSelectionState, handleGatewayGroupsError, onGroupClear, and getSubsystems from both. Clean on its own.
PR #68180 forked from main in April, before that refactor existed, and added three new tests against the old API. Also clean on its own, and never rebased. Both PRs only touch lines the other doesn't, so when #68180 merged 34 minutes after 6182e67, git's 3-way merge combined them without a conflict. The merge is the only place the bug exists: new tests calling methods the sibling parent had already deleted. TypeError at runtime, TS2339/TS2551 from tsc, every run since. CI never caught it: GitHub was showing #68180's make check as green from a run a full day older than 6182e67.
nvmeof-namespaces-list.component.spec.ts: the dedup test is real, current logic, it just called the old listNamespaces() instead of fetchData(). Fixed the call. The other two duplicate NvmeofGatewayGroupFilterComponent's own spec; removed.
nvmeof-subsystems.component.spec.ts: same story, all three duplicate the filter component's spec; removed.
Both removed error tests also checked preventDefault() on the error object, which had no coverage elsewhere. Added that to
NvmeofGatewayGroupFilterComponent's spec, and hit a second bug while writing it: the file's throwError(() => err) is the RxJS 7 factory overload, this project is on RxJS 6.6.3, so it was emitting the arrow function itself as the error. The existing error test never noticed since it only checks side effects, not the error's identity. Used throwError(err) instead.
Verified: jest passes on all three spec files (was 6 failing), tsc -p tsconfig.spec.json --noEmit is clean (was 17 errors), full block/nvmeof sweep is 29/29 suites, 216/216 tests.
Fixes: cfe1230
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.