Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 0a2577e

Browse files
fix: workflow job event queue misconfiguration. (#3710)
Fixed the issue with workflow job queue misconfiguration introduced during the PR f2112ea
1 parent 6fa667f commit 0a2577e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: lambdas/functions/webhook/src/ConfigResolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export class Config {
1010
this.repositoryAllowList = JSON.parse(repositoryAllowListEnv) as Array<string>;
1111
const queuesConfigEnv = process.env.RUNNER_CONFIG || '[]';
1212
this.queuesConfig = JSON.parse(queuesConfigEnv) as Array<QueueConfig>;
13-
this.workflowJobEventSecondaryQueue = process.env.WORKFLOW_JOB_EVENT_SECONDARY_QUEUE || undefined;
13+
this.workflowJobEventSecondaryQueue = process.env.SQS_WORKFLOW_JOB_QUEUE || undefined;
1414
}
1515
}

Diff for: lambdas/functions/webhook/src/sqs/index.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('Test sending message to SQS.', () => {
8080

8181
it('sends webhook events to workflow job queue', async () => {
8282
// Arrange
83-
process.env.WORKFLOW_JOB_EVENT_SECONDARY_QUEUE = sqsMessage.QueueUrl;
83+
process.env.SQS_WORKFLOW_JOB_QUEUE = sqsMessage.QueueUrl;
8484
const config = new Config();
8585

8686
// Act
@@ -93,7 +93,7 @@ describe('Test sending message to SQS.', () => {
9393

9494
it('Does not send webhook events to workflow job event copy queue', async () => {
9595
// Arrange
96-
process.env.WORKFLOW_JOB_EVENT_SECONDARY_QUEUE = '';
96+
process.env.SQS_WORKFLOW_JOB_QUEUE = '';
9797
const config = new Config();
9898
// Act
9999
await sendWebhookEventToWorkflowJobQueue(message, config);
@@ -104,7 +104,7 @@ describe('Test sending message to SQS.', () => {
104104

105105
it('Catch the exception when even copy queue throws exception', async () => {
106106
// Arrange
107-
process.env.WORKFLOW_JOB_EVENT_SECONDARY_QUEUE = sqsMessage.QueueUrl;
107+
process.env.SQS_WORKFLOW_JOB_QUEUE = sqsMessage.QueueUrl;
108108
const config = new Config();
109109

110110
const mockSQS = {

0 commit comments

Comments
 (0)