Skip to content

upcoming: [DPS-33210] Handle creation and edit for stream and destination - #12823

Merged
jaalah-akamai merged 7 commits into
linode:developfrom
mduda-akamai:feature/DPS-33120-handle-creation-and-edit-for-stream-and-destination
Sep 16, 2025
Merged

jaalah-akamai merged 7 commits into
linode:developfrom
mduda-akamai:feature/DPS-33120-handle-creation-and-edit-for-stream-and-destination

Conversation

@mduda-akamai

@mduda-akamai mduda-akamai commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

Changes 🔄

  • FormSubmitBar
    • Refactor to use in both Destination and Stream forms
    • Add Test Connection Button
  • Create/Edit Destination:
    • Move id from form to breadcrumb
    • Use FormSubmitBar
    • Add snackbars to Test Connection/Edit/Create actions' success and error
    • Add verifying if Destination has proper configuration (call to api)
    • Block Create/Edit if Test Connection isn't done
  • Create/Edit Stream
    • Move id from form to breadcrumb
    • Handle Create/Edit/Test Connection actions
    • Add snackbars to Test Connection/Edit/Create actions' success and error
    • Add verifying if Destination has proper configuration (call to api)
    • Block Create/Edit if Test Connection isn't done
  • Add POST v4beta/monitor/streams/destinations/verify in APIv4 and mocks
  • Add query for POST v4beta/monitor/streams/destinations/verify

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • No customers / Not applicable

Target release date 🗓️

First half of September 2025 / devcloud

Preview 📷

Before After
old edit destination new edit destination
old edit stream new edit stream

How to test 🧪

Prerequisites

(How to setup test environment)

  • Open Local Dev Tools
  • Enable MSW, set Base Preset to CRUD
  • Apply

Verification steps

  • Check if Testing connection works and unlocks Creating/Editing Stream/Destination. It shouldn't be necessary if the existing destination is selected in Stream form
  • Check if Creating/Editing Stream/Destination works properly, proper snackbars are visible after each action
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
📱 Providing mobile support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@mduda-akamai
mduda-akamai marked this pull request as ready for review September 5, 2025 13:40
@mduda-akamai
mduda-akamai requested a review from a team as a code owner September 5, 2025 13:40
@mduda-akamai
mduda-akamai requested review from bnussman-akamai and cpathipa and removed request for a team September 5, 2025 13:40
@mduda-akamai mduda-akamai self-assigned this Sep 5, 2025
Comment thread packages/validation/src/datastream.schema.ts Outdated
Comment thread packages/manager/src/features/DataStream/Shared/FormSubmitBar/FormSubmitBar.tsx Outdated
Comment on lines +62 to +72
.catch((error) => {
return enqueueSnackbar(
getAPIErrorOrDefault(
error,
'There was an issue creating your destination'
)[0].reason,
{
variant: 'error',
}
);
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to handle field errors returned by the API?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you mean like this?

const { field, reason } = getAPIErrorOrDefault(
  error,
  'There was an issue creating your destination'
)[0];

const message = field ? `${field}: ${reason}` : reason;
return enqueueSnackbar(message, {
  variant: 'error',
});

Or perhaps you know a better way to handle this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

I've added field errors as in example from you. And left snackbars with simple text message as it is something we want to show.

Comment on lines +130 to +138
} catch (error) {
enqueueSnackbar(
getAPIErrorOrDefault(
error,
`There was an issue ${mode === 'create' ? 'creating' : 'editing'} your stream`
)[0].reason,
{ variant: 'error' }
);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same thing here. Do we need to handle field errors that the API may return?

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.

same here in 2 places. For destination creation and for stream creation part

…t-for-stream-and-destination

# Conflicts:
#	packages/manager/src/features/DataStream/Streams/StreamForm/Clusters/StreamFormClusters.test.tsx
@linode-gh-bot

Copy link
Copy Markdown

Cloud Manager UI test results

🎉 746 passing tests on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing746 Passing9 Skipped35m 53s

@github-project-automation github-project-automation Bot moved this from Review to Approved in Cloud Manager Sep 16, 2025
@jaalah-akamai
jaalah-akamai merged commit 44bfec1 into linode:develop Sep 16, 2025
35 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Merged in Cloud Manager Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants