Conversation
This lets us share custom dashboards, as well as any changes in pending PRs. The job gets automatically deleted in 3 days if the users forgets to delete it.
| if err != nil { | ||
| return "", fmt.Errorf("determine current user: %w", err) | ||
| } | ||
| name := strings.Trim(nonLabelChars.ReplaceAllString(strings.ToLower(u.Username), "-"), "-") |
There was a problem hiding this comment.
Two users can end up with the same default suffix, so one can delete the other's preview. currentUser lowercases the username, turns every run of other characters into -, and truncates to 24 characters, so different usernames can map to the same suffix. up starts by deleting everything with the matching label (line 288).
For example, j.doe and j_doe (or J-Doe) all get the suffix j-doe, and when one of them runs up it silently tears down the other's preview. This is low severity. Consider warning before deleting a Job this machine didn't create, for example by recording the real username in an annotation and checking it first.
There was a problem hiding this comment.
this seems ok for now. This data shouldn't be critical
This lets us share custom dashboards, as well as any changes in pending PRs.
The job gets automatically deleted in 3 days if the users forgets to delete it.