Skip to content

[7550] Fix rbac specs failing in CI #7555

Merged
n-lark merged 1 commit into
mainfrom
7550-ci-issues
Jun 18, 2026
Merged

[7550] Fix rbac specs failing in CI #7555
n-lark merged 1 commit into
mainfrom
7550-ci-issues

Conversation

@n-lark

@n-lark n-lark commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

These specs flaked because the Remote Instances page fires two concurrent /teams/{id}/devices requests on load, the full list and a nameless statusOnly poll, and the before() hook's intercept matched both.

It intermittently captured the response without device names and every devices.find(i => i.name === …) returned undefined. The fix narrows the intercept to the full request (which always carries page=1, unlike the statusOnly poll), making the captured data match up.

Related Issue(s)

Resolves #7550

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@n-lark n-lark requested review from cstns and hardillb June 17, 2026 21:01
@n-lark n-lark self-assigned this Jun 17, 2026
@n-lark n-lark changed the title Fix rbac/rbac-viewer-contextual.spec.js failing in CI [7550] Fix rbac specs failing in CI Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.95%. Comparing base (525a175) to head (495aed4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7555   +/-   ##
=======================================
  Coverage   76.95%   76.95%           
=======================================
  Files         410      410           
  Lines       21002    21002           
  Branches     5117     5117           
=======================================
  Hits        16162    16162           
  Misses       4840     4840           
Flag Coverage Δ
backend 76.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cstns

cstns commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Should we maybe dig into the root cause of why there are two concurrent /teams/{id}/devices calls happening? That feels like it might be the actual thing that's out of place here, rather than the e2e tests themselves

@n-lark

n-lark commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Hey @cstns so the two calls are:

  1. loadDevices()/devices?limit=25&page=1 — the paginated table data (25 full device objects → this.devices).
  2. pollForDeviceStatuses()/devices?statusOnly=true — all devices, status-only fields → this.allDeviceStatuses.

If we wanted to split the statuses into their own endpoint we could but I think that is a larger refactor than we should handle for this ticket.

When I pick back up Replace HTTP polling of instance / device status with MQTT-over-WS
#7324 I could take a look at changing this in parallel if we think that is worth our time.

@n-lark n-lark merged commit fab5b55 into main Jun 18, 2026
29 checks passed
@n-lark n-lark deleted the 7550-ci-issues branch June 18, 2026 13:23
@cstns

cstns commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

#7324 I could take a look at changing this in parallel if we think that is worth our time.

needs a look at for sure but well see if we actually need to do something about it

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix rbac specs failing in CI

3 participants