Skip to content

feat: add createGPUDroplet, getGPUDroplet, updateGPUDroplet and deleteGPUDroplet components#3746

Open
felixgateru wants to merge 8 commits intosuperplanehq:mainfrom
felixgateru:feat/do-gpu-droplets
Open

feat: add createGPUDroplet, getGPUDroplet, updateGPUDroplet and deleteGPUDroplet components#3746
felixgateru wants to merge 8 commits intosuperplanehq:mainfrom
felixgateru:feat/do-gpu-droplets

Conversation

@felixgateru
Copy link
Copy Markdown
Collaborator

Implements: #3484

What changed:

Added four new DigitalOcean GPU droplet management components: Create GPU Droplet, Get GPU Droplet, Update GPU Droplet, and Delete GPU Droplet.

Why:

Enable users to provision and manage GPU-powered DigitalOcean droplets.

How:

Backend:

  • Created four new component files in pkg/integrations/digitalocean/
  • Extended client.go with GPU-specific methods
  • Updated list_resources.go to handle new GPU resource types
  • Added tests

Frontend:

  • Created UI mappers in web_src/src/pages/workflowv2/mappers/digitalocean/
  • Registered all mappers and event states in index.ts

Demo

https://youtu.be/X-xxFkwiV1w

@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

@felixgateru felixgateru force-pushed the feat/do-gpu-droplets branch from 9b037dc to 1945916 Compare March 27, 2026 09:14
@felixgateru felixgateru marked this pull request as ready for review March 27, 2026 09:48
Comment thread pkg/integrations/digitalocean/list_resources.go
Comment thread pkg/integrations/digitalocean/create_gpu_droplet.go
Comment thread pkg/integrations/digitalocean/list_resources.go Outdated
Comment thread pkg/integrations/digitalocean/list_resources.go Outdated
@felixgateru felixgateru force-pushed the feat/do-gpu-droplets branch 2 times, most recently from 2b525e8 to 2a96f65 Compare March 27, 2026 12:43
Comment thread pkg/integrations/digitalocean/create_gpu_droplet.go
Comment thread pkg/integrations/digitalocean/client.go
Comment thread web_src/src/pages/workflowv2/mappers/digitalocean/create_gpu_droplet.ts Outdated
@felixgateru felixgateru force-pushed the feat/do-gpu-droplets branch from ef5f019 to cb8f5fd Compare March 27, 2026 15:55
Comment thread pkg/integrations/digitalocean/client.go
Comment thread pkg/integrations/digitalocean/client.go Outdated
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
@felixgateru felixgateru force-pushed the feat/do-gpu-droplets branch from cb8f5fd to 4c64fde Compare March 27, 2026 21:03
Comment thread pkg/integrations/digitalocean/create_gpu_droplet.go
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
eventId: rootEvent.id ?? "",
},
];
}
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.

New shared utility duplicates existing local functions

Low Severity

The new baseEventSections in utils.ts duplicates an identical function already defined locally in ~15 existing mapper files (e.g., create_droplet.ts, get_droplet.ts, delete_droplet.ts, assign_reserved_ip.ts, copy_object.ts, etc.). The new GPU mappers import from utils.ts, but all existing mappers still use their own private copies. Introducing a shared version without migrating existing callers means the duplication actually increases — the codebase now has N+1 copies instead of N.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

const rootTriggerNode = nodes.find((n) => n.id === rootEvent.nodeId);
if (!rootTriggerNode?.componentName) {
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.

Missing fallback in shared baseEventSections causes empty event sections

Low Severity

The new shared baseEventSections in utils.ts returns an empty array when rootTriggerNode?.componentName is falsy. The established pattern in other mappers (e.g., create_alert_policy.ts) falls back to componentName via rootTriggerNode?.componentName ?? componentName, ensuring event sections are still rendered. This means GPU droplet components will silently show no event sections in edge cases where other components would still display them.

Fix in Cursor Fix in Web

@AleksandarCole AleksandarCole requested a review from gaga1307 April 9, 2026 11:49
@AleksandarCole AleksandarCole added the pr:stage-3/3 Ready for full, in-depth, review label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:stage-3/3 Ready for full, in-depth, review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants