Skip to content

mgr/dashboard: fix stale nvmeof spec tests from a semantic merge conflict - #69894

Merged
idryomov merged 1 commit into
ceph:mainfrom
tchaikov:wip-fix-nvmeof-spec
Jul 2, 2026
Merged

idryomov merged 1 commit into
ceph:mainfrom
tchaikov:wip-fix-nvmeof-spec

Conversation

@tchaikov

@tchaikov tchaikov commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

…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]>
@tchaikov

tchaikov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@tchaikov

tchaikov commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@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.

@kotreshhr

Copy link
Copy Markdown
Contributor

@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.

@kotreshhr
kotreshhr requested a review from nizamial09 July 2, 2026 06:41
@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test api

@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

FYI this is fixed here f869805

@idryomov

idryomov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

this change is all about dashboard testing, while IIUC, Ilya is more of a maintainer of RBD

There is an RBD PR blocked by this: #67968

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Jul 2, 2026
@tchaikov

tchaikov commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor Author

FYI this is fixed here f869805

@afreen23 shall i close this PR in favor of #69750 ? if yes, i am happy to close mine.

@dnyanee1997

Copy link
Copy Markdown
Contributor

FYI @kotreshhr

@idryomov

idryomov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

FYI this is fixed here f869805

@afreen23 shall i close this PR in favor of #69885 ? if yes, i am happy to close mine.

#69885 seems to be a completely unrelated PR? I don't see any open PR that includes f86980584d33d80bb8de0a98e44064047e4ad159.

@tchaikov

tchaikov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

FYI this is fixed here f869805

@afreen23 shall i close this PR in favor of #69885 ? if yes, i am happy to close mine.

#69885 seems to be a completely unrelated PR? I don't see any open PR that includes f869805.

@idryomov sorry, it's #69750

@afreen23

afreen23 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

FYI this is fixed here f869805

@afreen23 shall i close this PR in favor of #69885 ? if yes, i am happy to close mine.

Lets not, will merge this if this is ready first

@idryomov

idryomov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

sorry, it's #69750

Definitely not -- this can't wait for any bigger PR.

@idryomov idryomov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

@idryomov

idryomov commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

I'm waiving ceph windows tests failure -- #69901 is blocked by make check failure that is fixed here.

@idryomov
idryomov merged commit 3b9dfd0 into ceph:main Jul 2, 2026
19 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Jul 2, 2026
@tchaikov
tchaikov deleted the wip-fix-nvmeof-spec branch July 2, 2026 08:03
@afreen23

afreen23 commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

@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

@idryomov

idryomov commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

@idryomov for dashboard we wait for API tests, any reason to waive off that ?

This PR doesn't touch anything outside of unit tests and my understanding is that unit tests are being run as part of make check, not as part of ceph API tests.

Additionally the bigger PR was ready to merge , best place to waive of windows tests.

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 preventDefault coverage while the fixup commit in #69750 was pure removal.

And that PR was important for dash as well. Kindly consult @ceph/dashboard before merging.

My apologies, I didn't mean to step on your toes. I take make check failures very seriously -- anything that impacts/unblocks other PRs must be merged ASAP and I just try to help with that whenever I can (in this case by waiving the Windows failure).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants