Skip to content
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

chore(domains): Cloudflare SSL removal when downgrading apps #2527

Merged

Conversation

Cosmin-Parvulescu
Copy link
Contributor

Description

  • Added domain removal to reconciliation function
  • Added domain removal to plan downgrade action

Related Issues

Testing

  • Downgraded app, noticed no more custom domain upon reactivation
  • Updated subscription in stripe dashboard, noticed no more custom domain upon reactivation
  • Bypassed entitlement removal restriction, removed all entitlements, noticed no more custom domain upon reactivation

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@Cosmin-Parvulescu Cosmin-Parvulescu added the enhancement Indicates new feature requests label Jul 20, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu self-assigned this Jul 20, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the chore/domains/cloudflare-SSL-removal-when-downgrading-apps branch from 245522a to 4da616f Compare July 20, 2023 11:03
@Cosmin-Parvulescu Cosmin-Parvulescu marked this pull request as ready for review July 20, 2023 13:54
szkl
szkl previously approved these changes Jul 20, 2023
Comment on lines 302 to 310
for (const app of reconciliations.filter((r) => r.customDomain)) {
try {
await starbaseClient.deleteCustomDomain.mutate({
clientId: app.clientID,
})
} catch (e) {
console.error(`Failed to delete custom domain for app ${app.clientID}`)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to execute them asynchronously?

@@ -83,6 +84,7 @@ export const reconcileAppSubscriptions = async ({
devEmail: app.devEmail,
appName: app.app?.name ?? 'Undefined',
plan,
customDomain: app.customDomain ? true : false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
customDomain: app.customDomain ? true : false,
customDomain: Boolean(app.customDomain)

@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the chore/domains/cloudflare-SSL-removal-when-downgrading-apps branch from 1662be7 to e9b77f0 Compare July 21, 2023 11:26
Copy link
Contributor

@maurerbot maurerbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modal to confirm downgrade if pro features enabled (e.g. custom domain)

@Cosmin-Parvulescu
Copy link
Contributor Author

modal to confirm downgrade if pro features enabled (e.g. custom domain)

image

@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the chore/domains/cloudflare-SSL-removal-when-downgrading-apps branch from a7c7144 to 6cda509 Compare July 25, 2023 09:41
@betimshahini betimshahini merged commit 16ccd49 into main Jul 25, 2023
2 checks passed
@betimshahini betimshahini deleted the chore/domains/cloudflare-SSL-removal-when-downgrading-apps branch July 25, 2023 17:42
@maurerbot maurerbot restored the chore/domains/cloudflare-SSL-removal-when-downgrading-apps branch July 27, 2023 14:19
@maurerbot maurerbot deleted the chore/domains/cloudflare-SSL-removal-when-downgrading-apps branch July 27, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(domains): Cloudflare SSL removal when downgrading apps
4 participants