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

fix(dashboard): Make preferences.default a nullable field #7068

Closed
wants to merge 1 commit into from

Conversation

desiprisg
Copy link
Contributor

What changed? Why was the change needed?

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

linear bot commented Nov 19, 2024

Copy link

netlify bot commented Nov 19, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit ed0b257
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/673cb5541971750008c83ca6
😎 Deploy Preview https://deploy-preview-7068--novu-stg-vite-dashboard-poc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

}),
channels: channelsSchema,
})
.nullable(),
Copy link
Contributor

Choose a reason for hiding this comment

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

The default preferences isn't nullable, it should always be present. The default preferences for Dashboard-sourced workflows will always be the DEFAULT_WORKFLOW_PREFERENCES, whereas the default preferences for Framework-sourced workflows are that defined in code.

What issue is this solving?

Copy link
Contributor

@rifont rifont Nov 19, 2024

Choose a reason for hiding this comment

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

If no default preferences are supplied, the UpsertWorkflow use-case falls back to DEFAULT_WORKFLOW_PREFERENCES here. So instead, we should not send default.

@rifont
Copy link
Contributor

rifont commented Nov 19, 2024

With the current API validation and implementation, there are no cases where default preferences will be persisted as null. The frontend always calls the PUT /v2/workflows/{id} endpoint with the object retrieved from GET /v2/workflows{id}, so we can safely close this PR.

Any cases where the default: null issue arose are from a previous broken implementation during development of Dashboard V2, and should be considered "corrupt".

@rifont rifont closed this Nov 19, 2024
@rifont rifont deleted the nv-4814-autosave-doesnt-save-workflow-name branch November 19, 2024 16:44
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.

2 participants