Skip to content

chore: align the source of the list of available providers with the source of providers#528

Merged
dubinsky merged 1 commit intoskevetter:mainfrom
dubinsky:available-providers
Mar 2, 2026
Merged

chore: align the source of the list of available providers with the source of providers#528
dubinsky merged 1 commit intoskevetter:mainfrom
dubinsky:available-providers

Conversation

@dubinsky
Copy link

@dubinsky dubinsky commented Mar 1, 2026

Summary by CodeRabbit

  • Chores
    • Updated the source used to fetch the default provider list.
    • Revised the displayed header to reflect the new source.
    • Standardized provider list output to ensure it prints to standard output.

@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

Warning

Rate limit exceeded

@dubinsky has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 0edf4f8 and e81d500.

📒 Files selected for processing (1)
  • cmd/provider/list-default-providers.go
📝 Walkthrough

Walkthrough

Updated the provider list command to fetch repositories from the GitHub user skevetter instead of loft-sh, and adjusted the printed header and output to write to stdout.

Changes

Cohort / File(s) Summary
GitHub API User Update
cmd/provider/list-default-providers.go
Changed GitHub API request to fetch repositories from skevetter (was loft-sh), updated the printed header text, and switched provider name printing to use os.Stdout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the GitHub API source from loft-sh to skevetter for fetching the list of available providers, aligning it with the source used elsewhere in the codebase.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
cmd/provider/list-default-providers.go (1)

22-22: Extract the GitHub owner into a shared constant to prevent future drift.

The owner (skevetter) is now duplicated across the API URL and printed label. Centralizing it keeps these values aligned going forward.

♻️ Proposed refactor
+const availableProvidersGitHubOwner = "skevetter"
+
 func getDevpodProviderList() error {
-	req, err := http.NewRequest("GET", "https://api.github.com/users/skevetter/repos?per_page=100", nil)
+	req, err := http.NewRequest("GET", fmt.Sprintf("https://api.github.com/users/%s/repos?per_page=100", availableProvidersGitHubOwner), nil)
 	if err != nil {
 		return err
 	}
@@
-	fmt.Println("List of available providers from skevetter:")
+	fmt.Printf("List of available providers from %s:\n", availableProvidersGitHubOwner)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmd/provider/list-default-providers.go` at line 22, Extract the GitHub owner
string into a single shared constant (e.g., Owner or githubOwner) and use that
constant wherever the owner is used instead of the literal "skevetter"; update
the http.NewRequest call that builds the URL (the line with req, err :=
http.NewRequest("GET",
"https://api.github.com/users/skevetter/repos?per_page=100", nil)) to format the
URL using the constant and also replace any printed labels or logging that
currently embed "skevetter" so they reference the same constant (ensuring
consistent owner value across the request and output).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@cmd/provider/list-default-providers.go`:
- Line 22: Extract the GitHub owner string into a single shared constant (e.g.,
Owner or githubOwner) and use that constant wherever the owner is used instead
of the literal "skevetter"; update the http.NewRequest call that builds the URL
(the line with req, err := http.NewRequest("GET",
"https://api.github.com/users/skevetter/repos?per_page=100", nil)) to format the
URL using the constant and also replace any printed labels or logging that
currently embed "skevetter" so they reference the same constant (ensuring
consistent owner value across the request and output).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a2622a and 5eb81fa.

📒 Files selected for processing (1)
  • cmd/provider/list-default-providers.go

@dubinsky
Copy link
Author

dubinsky commented Mar 1, 2026

With this change, the list of available providers becomes shorter, since not all Loft providers are currently forked (and released) into the community fork; if some of the missing providers are, as I suspect, needed, their repositories need to be forked and set up, and releases made; missing are:

  • azure
  • civo
  • digitalocean
  • dockerless
  • ecs
  • terraform

@skevetter
Copy link
Owner

I'm going to wait to first fork the remaining providers before merging.

@dubinsky
Copy link
Author

dubinsky commented Mar 2, 2026

I'm going to wait to first fork the remaining providers before merging.

Why? Remaining providers are already not installable, since workspace/provider.go#providerPrefix is skevetter/devpod-provider-; this change does not block the old Loft providers, it just makes the list reflect the existing reality ;)

@skevetter
Copy link
Owner

skevetter commented Mar 2, 2026

I'm going to wait to first fork the remaining providers before merging.

Why? Remaining providers are already not installable, since workspace/provider.go#providerPrefix is skevetter/devpod-provider-; this change does not block the old Loft providers, it just makes the list reflect the existing reality ;)

Valid. I was not aware of the current situation. Thank you for pointing that out.

@dubinsky dubinsky force-pushed the available-providers branch from 5eb81fa to 0edf4f8 Compare March 2, 2026 03:01
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cmd/provider/list-default-providers.go (1)

3-14: ⚠️ Potential issue | 🔴 Critical

Add missing os import and fix invalid os.STDOUT symbol.

Line 47 uses os.STDOUT, but os is not imported. Additionally, os.STDOUT is not a valid Go symbol; the correct symbol is os.Stdout. This will fail to compile.

Suggested fix
 import (
 	"context"
 	"encoding/json"
 	"fmt"
 	"io"
 	"net/http"
+	"os"
 	"strings"
@@
-			fmt.Fprintln(os.STDOUT, "\t", name)
+			fmt.Fprintln(os.Stdout, "\t", name)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmd/provider/list-default-providers.go` around lines 3 - 14, The code
references os.STDOUT but doesn't import os and uses the wrong symbol; update the
import block to include "os" and replace any use of os.STDOUT with the correct
os.Stdout (e.g., in the function that writes JSON or uses fmt.Fprint to output
to os.Stdout), ensuring all references (os.STDOUT -> os.Stdout) and imports are
corrected so the code compiles.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@cmd/provider/list-default-providers.go`:
- Around line 3-14: The code references os.STDOUT but doesn't import os and uses
the wrong symbol; update the import block to include "os" and replace any use of
os.STDOUT with the correct os.Stdout (e.g., in the function that writes JSON or
uses fmt.Fprint to output to os.Stdout), ensuring all references (os.STDOUT ->
os.Stdout) and imports are corrected so the code compiles.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5eb81fa and 0edf4f8.

📒 Files selected for processing (1)
  • cmd/provider/list-default-providers.go

@dubinsky dubinsky force-pushed the available-providers branch 2 times, most recently from 1e6b7ce to 36235a2 Compare March 2, 2026 03:06
…ource of providers

Signed-off-by: Leonid Dubinsky <dub@podval.org>
@dubinsky dubinsky force-pushed the available-providers branch from 36235a2 to e81d500 Compare March 2, 2026 03:15
Copy link
Owner

@skevetter skevetter left a comment

Choose a reason for hiding this comment

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

Action items for me:

  1. fork, configure, publish remaining providers.
  2. make repo URL configurable and centralize to simplify future changes.

@dubinsky dubinsky merged commit 43aa42d into skevetter:main Mar 2, 2026
40 checks passed
@dubinsky dubinsky deleted the available-providers branch March 2, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants