Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5da9cd0

Browse files
fix: rebuild & list (#1811)
1 parent fb8081e commit 5da9cd0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

‎hack/rebuild.sh‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,17 @@ for os in $BUILD_PLATFORMS; do
3131
done
3232
echo "[INFO] Built binaries for all platforms in test/ directory"
3333

34-
if [[ -z "${SKIP_INSTALL}" ]]; then
34+
# if not true, install the binary
35+
if [[ "${SKIP_INSTALL}" != "true" ]]; then
3536
if command -v sudo &> /dev/null; then
3637
go build -o test/devpod && sudo mv test/devpod /usr/local/bin/
3738
else
3839
go install .
3940
fi
41+
echo "[INFO] Installed devpod binary to /usr/local/bin"
42+
else
43+
echo "[INFO] Skipping install of devpod binary"
4044
fi
41-
echo "[INFO] Built devpod binary and moved to /usr/local/bin"
4245

4346
if [[ $BUILD_PLATFORMS == *"linux"* ]]; then
4447
cp test/devpod-cli-linux-amd64 test/devpod-linux-amd64

‎pkg/workspace/list.go‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func List(ctx context.Context, devPodConfig *config.Config, skipPro bool, owner
4040
if err != nil {
4141
return nil, err
4242
}
43+
4344
// extract pure workspace list first
4445
for _, result := range proWorkspaceResults {
4546
proWorkspaces = append(proWorkspaces, result.workspaces...)
@@ -135,6 +136,7 @@ type listProWorkspacesResult struct {
135136

136137
func listProWorkspaces(ctx context.Context, devPodConfig *config.Config, owner platform.OwnerFilter, log log.Logger) (map[string]listProWorkspacesResult, error) {
137138
results := map[string]listProWorkspacesResult{}
139+
138140
// lock around `results`
139141
var mu sync.Mutex
140142
wg := sync.WaitGroup{}
@@ -143,12 +145,14 @@ func listProWorkspaces(ctx context.Context, devPodConfig *config.Config, owner p
143145
if !providerContextConfig.Initialized {
144146
continue
145147
}
148+
146149
l := log.ErrorStreamOnly()
147150
providerConfig, err := providerpkg.LoadProviderConfig(devPodConfig.DefaultContext, provider)
148151
if err != nil {
149152
l.Warnf("load provider config for provider \"%s\": %v", provider, err)
150153
continue
151154
}
155+
152156
// only get pro providers
153157
if !providerConfig.IsProxyProvider() && !providerConfig.IsDaemonProvider() {
154158
continue
@@ -184,9 +188,7 @@ func listProWorkspacesForProvider(ctx context.Context, devPodConfig *config.Conf
184188
return nil, fmt.Errorf("cannot list pro workspaces with provider %s", provider)
185189
}
186190
if err != nil {
187-
if log.GetLevel() < logrus.DebugLevel {
188-
log.Warnf("Failed to list pro workspaces for provider %s", provider)
189-
} else {
191+
if log.GetLevel() >= logrus.DebugLevel {
190192
log.Warnf("Failed to list pro workspaces for provider %s: %v", provider, err)
191193
}
192194
return nil, err

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /