Skip to content

Conversation

@maigl
Copy link
Contributor

@maigl maigl commented Jan 19, 2023

Sorry...

I committed some un-tested idea where I wanted to remove the ugly '-' and '_' in the shortid.
It doesn't work like that, and currently the runner name generation is broken!

Michael Kuhnt michael.kuhnt@mercedes-benz.com Mercedes-Benz Tech Innovation GmbH (ProviderInformation)

prefix = params.DefaultRunnerPrefix
}
name := fmt.Sprintf("%s-%s", prefix, shortid.MustNew(0, shortidABC, 42).String())
name := fmt.Sprintf("%s-%s", prefix, shortid.MustGenerate())
Copy link
Member

Choose a reason for hiding this comment

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

Let's use the

newID, err := shortid.Generate()
if err != nil {
    return errors.Wrap(err, "generating ID")
}

We don't want to panic here.

@gabriel-samfira
Copy link
Member

No worries. Didn't catch the usage of Must either. I really need to find some time and add more test coverage!

@maigl maigl requested a review from gabriel-samfira January 19, 2023 13:26
@gabriel-samfira gabriel-samfira merged commit 4f2808e into cloudbase:main Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants