canonical / canonical/spread

google backend fails if username contains `@` or `.`

Open
#227 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
127
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Spread fails with an unfriendly error if the username contains non-standard characters.

This occurs on my corporate-provisioned laptop where my username is an email address:

```bash
> spread google:
2025-04-11 11:35:45 Cannot allocate google:ubuntu-24.04-64: cannot allocate new Google server for ubuntu-24.04-64: invalid value for field 'resource.labels': ''. Label value 'callahan.kovacs@canonical.com' violates format constraints. The value can only contain lowercase letters, numeric characters, underscores and dashes. The value can be at most 63 characterslong. International characters are allowed
```

One workaround is to change `$USER` when running spread:
```bash
USER=hotdog spread google:
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name a file or test; begin by tracing the Google backend's handling of the username and the resource label shown in the error. Confirm the intended behavior for usernames containing @ or . and verify that Google allocation works without requiring a USER override.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp, go
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.