Skip to content

[codex] Add Linode cloud adapter#725

Closed
caydyan wants to merge 14 commits into
profullstack:masterfrom
caydyan:codex/add-linode-cloud-adapter
Closed

[codex] Add Linode cloud adapter#725
caydyan wants to merge 14 commits into
profullstack:masterfrom
caydyan:codex/add-linode-cloud-adapter

Conversation

@caydyan

@caydyan caydyan commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Linode / Akamai Cloud provider adapter for the cloud infra platform already listed in the README. The adapter covers token setup, account connection, public type quoting, dry-run-safe provisioning, instance and volume listing/status/destroy paths, and Block Storage pricing fallback.

Also registers linode in the CLI adapter registry, adds default scale pricing, updates the docs category list, and adds the matching pnpm-lock.yaml importer.

Validation

  • git diff --check
  • node --check packages/cloud/linode/src/index.ts
  • node --check packages/cloud/linode/src/index.test.ts
  • corepack pnpm install --frozen-lockfile --lockfile-only --ignore-scripts --filter @profullstack/sh1pt-cloud-linode...
  • Temporary strict TypeScript check against a local core declaration shim passed for packages/cloud/linode/src/index.ts.

Full local pnpm install could not complete because the checkout had no node_modules and repeated install attempts hit npm registry ECONNRESET while resolving unrelated workspace dependencies. The targeted package scripts are included for normal CI: pnpm --filter @profullstack/sh1pt-cloud-linode typecheck and pnpm vitest run packages/cloud/linode/src/index.test.ts.

Notes

The implementation follows the existing cloud adapter shape and keeps dryRun ahead of billable API calls. Non-dry-run image provisioning requires LINODE_ROOT_PASS, authorizedKeys, or authorizedUsers before sending the create request.

@caydyan caydyan force-pushed the codex/add-linode-cloud-adapter branch from a694dd3 to 456e46f Compare June 13, 2026 19:06
@caydyan caydyan marked this pull request as ready for review June 13, 2026 19:08
@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a Linode / Akamai Cloud adapter to the existing cloud provider framework, following the same shape as peer adapters (Hetzner, Vultr, DigitalOcean, etc.). All previously-flagged issues — silent $0 quotes on error, missing dryRun guard in destroy, bypassed maxHourlyPrice for block storage, and silent fallback to a default type when hardware constraints filter all candidates — have been addressed in this revision.

  • New package packages/cloud/linode provides connect, quote, provision, list, destroy, and status, with proper dryRun guards ahead of every billable API call and budget enforcement (maxHourlyPrice) for both compute and block-storage paths.
  • Registry & docs updated in adapter-registry.ts, scale.ts, docs/page.tsx, and pnpm-lock.yaml to wire cloud-linode into the CLI and documentation.
  • Test suite covers pagination, dryRun, 404 fallback for destroy/status, label uniqueness, and all constraint-rejection paths.

Confidence Score: 4/5

Safe to merge; the only remaining concern is that list() silently drops volume data on errors rather than signalling the failure to callers.

The adapter is well-structured with comprehensive tests and all previously-reported gaps corrected. The one open concern — volume listing errors being swallowed silently — means callers can receive a partial resource list without any indication that block-storage entries are missing, which could matter in cost-tracking or multi-cloud comparison flows. It is not a data-loss or security issue, but it does affect observability of the list operation.

packages/cloud/linode/src/index.ts — specifically the list() method's catch block around volume fetching.

Important Files Changed

Filename Overview
packages/cloud/linode/src/index.ts Core Linode adapter — 477 lines covering connect/quote/provision/list/destroy/status with proper dryRun guards and maxHourlyPrice enforcement; one remaining concern is that list() silently swallows volume listing errors, returning a partial result set without signalling the failure to callers.
packages/cloud/linode/src/index.test.ts Comprehensive test suite — covers connect, provision (cpu-vps and block-storage), quote, list pagination, destroy (dryRun and 404 fallback), and status paths; tests added for all constraints that were previously flagged as missing (maxHourlyPrice, hardware constraints, region availability).
packages/cli/src/adapter-registry.ts Adds 'linode' to the cloud adapter list in alphabetical order — straightforward one-line change.
packages/cli/src/commands/scale.ts Adds Linode to the default pricing table at $0.0075/hr — consistent with Nanode 1 GB list price and kept in ascending-price order.
packages/cloud/linode/package.json New package definition with a single workspace dependency on sh1pt-core; version 0.1.15 aligns with the monorepo pattern.
pnpm-lock.yaml Adds the linode importer entry linking to workspace core — minimal, correct lockfile addition.
sites/sh1pt.com/app/docs/page.tsx Docs page cloud category updated to include 'linode' in the provider list — alphabetically ordered, one-line change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[provision called] --> B{dryRun?}
    B -- yes --> C[return stubInstance]
    B -- no --> D{kind == block-storage?}
    D -- yes --> E[Compute hourly rate]
    E --> F{hourly > maxHourlyPrice?}
    F -- yes --> G[throw budget error]
    F -- no --> H[POST /volumes]
    H --> I[return volumeToInstance]
    D -- no --> J[fetchTypes - GET /linode/types]
    J --> K[pickType - filter by region / kind / CPU / memory / GPU / maxHourlyPrice]
    K --> L{match found?}
    L -- no, maxHourlyPrice set --> M[throw maxHourlyPrice error]
    L -- no, hw constraints set --> N[throw hw constraint error]
    L -- no --> O[throw no matching type]
    L -- yes --> P[loginPayload - rootPass / keys / users]
    P --> Q{login credentials present?}
    Q -- no --> R[throw login required error]
    Q -- yes --> S[POST /linode/instances]
    S --> T[return instanceToInstance]
Loading

Reviews (15): Last reviewed commit: "Honor Linode volume price budgets" | Re-trigger Greptile

Comment thread packages/cloud/linode/src/index.ts
Comment thread packages/cloud/linode/src/index.ts Outdated
Comment thread packages/cloud/linode/src/index.ts
@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

Comment thread packages/cloud/linode/src/index.ts Outdated
Comment thread packages/cloud/linode/src/index.ts
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@caydyan caydyan force-pushed the codex/add-linode-cloud-adapter branch from db52b18 to 49f099d Compare June 14, 2026 00:56
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

5 similar comments
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

3 similar comments
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio ralyodio closed this Jun 14, 2026
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

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