Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filtering of Node-RED logs when in HA mode #2367

Merged
merged 22 commits into from
Jun 30, 2023
Merged

Allow filtering of Node-RED logs when in HA mode #2367

merged 22 commits into from
Jun 30, 2023

Conversation

hardillb
Copy link
Contributor

part of #2260

Description

Allows filtering of logs for HA instances to only show logs from a single replica

Related Issue(s)

#2260

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 flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

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

@hardillb hardillb requested a review from joepavitt June 29, 2023 10:40
@knolleary knolleary changed the title Ha logs Allow filtering of Node-RED logs when in HA mode Jun 29, 2023
@joepavitt
Copy link
Contributor

joepavitt commented Jun 30, 2023

Functionally, all looks good. Does need E2E test though, but I'll cover them now @hardillb. Having to pull in main though to get the latest E2E testing framework for EE features.

@hardillb
Copy link
Contributor Author

@joepavitt I've just pushed a tiny update to insert the src markers into the stub drivers fake log output that should help with the tests

@joepavitt
Copy link
Contributor

Thanks Ben, was stubbing the API responses with the src attribute in, but for some reason they're not showing in the UI atm, working on it.

it('display a marker to indicuate with HA replica the logs are from, if present', () => {
// Modify our Instance so that HA is enabled
cy.intercept('GET', '/api/*/projects/*', (req) => {
req.continue((res) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Pezmc TIL about req.continue() to modify a response in Cypress, rather than mock up a full response, came in real handy here, and flagging in case you'd not seen it before.

@joepavitt joepavitt self-requested a review June 30, 2023 14:37
@joepavitt joepavitt merged commit 36fd7a9 into main Jun 30, 2023
4 checks passed
@joepavitt joepavitt deleted the ha-logs branch June 30, 2023 14:37
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.

None yet

2 participants