[codex] Add Linode cloud adapter#725
Conversation
a694dd3 to
456e46f
Compare
Greptile SummaryThis 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
Confidence Score: 4/5Safe 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
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]
Reviews (15): Last reviewed commit: "Honor Linode volume price budgets" | Re-trigger Greptile |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
🤖 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: |
db52b18 to
49f099d
Compare
|
🤖 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: |
5 similar comments
|
🤖 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: |
|
🤖 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: |
|
🤖 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: |
|
🤖 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: |
|
🤖 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: |
|
🤖 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: |
3 similar comments
|
🤖 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: |
|
🤖 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: |
|
🤖 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: |
|
🤖 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: |
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
linodein the CLI adapter registry, adds default scale pricing, updates the docs category list, and adds the matchingpnpm-lock.yamlimporter.Validation
git diff --checknode --check packages/cloud/linode/src/index.tsnode --check packages/cloud/linode/src/index.test.tscorepack pnpm install --frozen-lockfile --lockfile-only --ignore-scripts --filter @profullstack/sh1pt-cloud-linode...packages/cloud/linode/src/index.ts.Full local
pnpminstall could not complete because the checkout had nonode_modulesand repeated install attempts hit npm registryECONNRESETwhile resolving unrelated workspace dependencies. The targeted package scripts are included for normal CI:pnpm --filter @profullstack/sh1pt-cloud-linode typecheckandpnpm vitest run packages/cloud/linode/src/index.test.ts.Notes
The implementation follows the existing cloud adapter shape and keeps
dryRunahead of billable API calls. Non-dry-run image provisioning requiresLINODE_ROOT_PASS,authorizedKeys, orauthorizedUsersbefore sending the create request.