From d933b96769f114777351859d1b9a8735935e7751 Mon Sep 17 00:00:00 2001 From: Maxwell Weru Date: Mon, 2 Oct 2023 05:19:22 +0300 Subject: [PATCH] Fix naming for ContainerApp jobs --- .../Consumers/TriggerUpdateJobsEventConsumer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/Tingle.Dependabot/Consumers/TriggerUpdateJobsEventConsumer.cs b/server/Tingle.Dependabot/Consumers/TriggerUpdateJobsEventConsumer.cs index 63b9874d..306d7416 100644 --- a/server/Tingle.Dependabot/Consumers/TriggerUpdateJobsEventConsumer.cs +++ b/server/Tingle.Dependabot/Consumers/TriggerUpdateJobsEventConsumer.cs @@ -83,8 +83,9 @@ public async Task ConsumeAsync(EventContext context, Can // create the job job = new UpdateJob { - // no prefixing/formatting because we use this to create azure resources which have name restrictions - Id = FlakeId.Id.Create().ToString(), + // we use this to create azure resources which have name restrictions + // alphanumeric, starts with a letter, does not contain "--", upto 32 characters + Id = $"job-{FlakeId.Id.Create()}", // flake is 19 chars, total is 23 chars Created = DateTimeOffset.UtcNow, Status = UpdateJobStatus.Scheduled,