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

refactor(core): Decouple user events from internal hooks (no-changelog) #10292

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

ivov
Copy link
Contributor

@ivov ivov commented Aug 5, 2024

Follow-up to: #10280

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Aug 5, 2024
@@ -101,7 +99,6 @@ export class MeController {
this.authService.issueCookie(res, user, req.browserId);

const fieldsChanged = Object.keys(payload);
this.internalHooks.onUserUpdate({ user, fields_changed: fieldsChanged });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pre-existing bug: Even when updating a single field, all fields exist in the payload, so all fields are being reported as having changed. To be fixed separately.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a follow-up for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll follow up on this, won't forget

this.internalHooks.onUserRoleChange({
user: req.user,
target_user_id: targetUser.id,
target_user_new_role: ['global', payload.newRoleName].join(' '),
Copy link
Contributor Author

@ivov ivov Aug 5, 2024

Choose a reason for hiding this comment

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

Pre-existing bug: The target user's new role is being reported e.g. as 'global global:member'. To be fixed separately.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a followup for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll follow up on this, won't forget

tomi
tomi previously approved these changes Aug 5, 2024
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

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

Nice work 💯 Just questions about the follow up of those bugs discovered

@@ -101,7 +99,6 @@ export class MeController {
this.authService.issueCookie(res, user, req.browserId);

const fieldsChanged = Object.keys(payload);
this.internalHooks.onUserUpdate({ user, fields_changed: fieldsChanged });
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a follow-up for that?

this.internalHooks.onUserRoleChange({
user: req.user,
target_user_id: targetUser.id,
target_user_new_role: ['global', payload.newRoleName].join(' '),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a followup for this?

Copy link
Contributor

github-actions bot commented Aug 5, 2024

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Aug 5, 2024



Test summary

392 0 0 0Flakiness 0


Run details

Project n8n
Status Passed
Commit 506654d
Started Aug 5, 2024 10:02 AM
Ended Aug 5, 2024 10:07 AM
Duration 04:38 💡
OS Linux Debian -
Browser Electron 118

View run in Cypress Cloud ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

@ivov ivov merged commit c0f3693 into master Aug 5, 2024
28 checks passed
@ivov ivov deleted the decouple-user-events-from-internal-hooks branch August 5, 2024 10:07
MiloradFilipovic added a commit that referenced this pull request Aug 5, 2024
* master:
  feat(editor): Auto-add LLM chain for new LLM nodes on empty canvas (#10245)
  fix(core): Fix user telemetry bugs (#10293)
  refactor(core): Remove stray log from telemetry event relay (no-changelog) (#10295)
  refactor(core): Decouple user events from internal hooks (no-changelog) (#10292)
  feat(core): Support community packages in scaling-mode  (#10228)
  test(core): Move unit tests closer to testable components (no-changelog) (#10287)
  fix(core): Webhook and form baseUrl missing (#10290)
  refactor(core): Port cache config (no-changelog) (#10286)
@janober
Copy link
Member

janober commented Aug 7, 2024

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants