Skip to content

fix: workflow job event queue misconfiguration. #3710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lambdas/functions/webhook/src/ConfigResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export class Config {
this.repositoryAllowList = JSON.parse(repositoryAllowListEnv) as Array<string>;
const queuesConfigEnv = process.env.RUNNER_CONFIG || '[]';
this.queuesConfig = JSON.parse(queuesConfigEnv) as Array<QueueConfig>;
this.workflowJobEventSecondaryQueue = process.env.WORKFLOW_JOB_EVENT_SECONDARY_QUEUE || undefined;
this.workflowJobEventSecondaryQueue = process.env.SQS_WORKFLOW_JOB_QUEUE || undefined;
}
}
6 changes: 3 additions & 3 deletions lambdas/functions/webhook/src/sqs/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('Test sending message to SQS.', () => {

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

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

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

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

const mockSQS = {
Expand Down