Skip to content

Commit

Permalink
Add missing feature flag for persistence module (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayangler authored Aug 23, 2023
1 parent c2640e4 commit ac38913
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cdk-infra/lib/constructs/worker/worker-env-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class WorkerEnvConstruct extends Construct {
const gatsbyBaseUrl = StringParameter.valueFromLookup(this, `${ssmPrefix}/frontend/base_url`);
// doing this for the time being, but I think we don't need to necessarily retrieve this from ssm for feature branches, nor would we want to in that case
const previewBuildEnabled = StringParameter.valueFromLookup(this, `${ssmPrefix}/flag/preview_build/enabled`);
const featureFlagUpdatePages = StringParameter.valueFromLookup(this, `${ssmPrefix}/flag/update_pages`);
const entitlementCollection = StringParameter.valueFromLookup(
this,
`${ssmPrefix}/atlas/collections/user/entitlements`
Expand All @@ -67,6 +68,7 @@ export class WorkerEnvConstruct extends Construct {
GITHUB_BOT_USERNAME: githubBotUsername,
GATSBY_BASE_URL: gatsbyBaseUrl,
PREVIEW_BUILD_ENABLED: previewBuildEnabled,
FEATURE_FLAG_UPDATE_PAGES: featureFlagUpdatePages,
USER_ENTITLEMENT_COL_NAME: entitlementCollection,
NPM_EMAIL: npmEmail,
REPO_BRANCHES_COL_NAME: repoBranchesCollection,
Expand Down
2 changes: 1 addition & 1 deletion src/job/jobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ export abstract class JobHandler {
if (!gatsbySiteId) {
const message = `User ${githubUsername} does not have a Gatsby Cloud Site ID.`;
this._logger.warn('Gatsby Cloud Preview Webhook', message);
throw new Error(message);
return;
}

const url = `${previewWebhookURL}/${gatsbySiteId}`;
Expand Down

0 comments on commit ac38913

Please sign in to comment.