From b49510557288459238632accd72d710fb1b5f233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Fri, 18 Oct 2024 12:10:08 +0200 Subject: [PATCH] [eas-build-job] Add `appId` and `initiatingUserId` to all job schemas (#450) We want the new orchestrator to not need to know about initiating user ID or app ID. https://github.com/expo/workflow-orchestration/blob/a035d7ea5fa0af1bbdaeca86e862ef99e6a54c4d/internal/watcher/watcher.go#L395-L400 After this is merged, going to upgrade and add them in `www` and `turtle-v2`. Once this is done, going to make them required and remove the properties from `turtle-v2`. --- packages/eas-build-job/src/android.ts | 6 ++++++ packages/eas-build-job/src/generic.ts | 3 +++ packages/eas-build-job/src/ios.ts | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/packages/eas-build-job/src/android.ts b/packages/eas-build-job/src/android.ts index e31d75f0..53142e13 100644 --- a/packages/eas-build-job/src/android.ts +++ b/packages/eas-build-job/src/android.ts @@ -112,6 +112,9 @@ export interface Job { loggerLevel?: LoggerLevel; workflowInterpolationContext?: never; + + initiatingUserId?: string; + appId?: string; } const SecretsSchema = Joi.object({ @@ -177,4 +180,7 @@ export const JobSchema = Joi.object({ submitProfile: Joi.string(), }), loggerLevel: Joi.string().valid(...Object.values(LoggerLevel)), + + initiatingUserId: Joi.string(), + appId: Joi.string(), }); diff --git a/packages/eas-build-job/src/generic.ts b/packages/eas-build-job/src/generic.ts index 94b73493..d4040c9a 100644 --- a/packages/eas-build-job/src/generic.ts +++ b/packages/eas-build-job/src/generic.ts @@ -39,6 +39,9 @@ export namespace Generic { triggeredBy: z.literal(BuildTrigger.GIT_BASED_INTEGRATION), loggerLevel: z.nativeEnum(LoggerLevel).optional(), workflowInterpolationContext: StaticWorkflowInterpolationContextZ.optional(), + + initiatingUserId: z.string().optional(), + appId: z.string().optional(), }); const PathJobZ = CommonJobZ.extend({ diff --git a/packages/eas-build-job/src/ios.ts b/packages/eas-build-job/src/ios.ts index e30eb6a3..995107fc 100644 --- a/packages/eas-build-job/src/ios.ts +++ b/packages/eas-build-job/src/ios.ts @@ -126,6 +126,9 @@ export interface Job { loggerLevel?: LoggerLevel; workflowInterpolationContext?: never; + + initiatingUserId?: string; + appId?: string; } const SecretsSchema = Joi.object({ @@ -211,4 +214,7 @@ export const JobSchema = Joi.object({ submitProfile: Joi.string(), }), loggerLevel: Joi.string().valid(...Object.values(LoggerLevel)), + + initiatingUserId: Joi.string(), + appId: Joi.string(), });