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

feat(console): DNS validation for custom domain CNAME records. #2357

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

betimshahini
Copy link
Contributor

@betimshahini betimshahini commented Jun 2, 2023

Description

Adds indicator for validating CNAME records on the custom domain page. CNAME validitiy check is now included as part of the custom domain validity indicator on the page. The same is done in Passport to check whether custom domain is active.

Related Issues

Testing

  • Set custom domain to one that matches the CNAME value in the Cusom domain page -> validated. Passport routes to custom domain correctly.
  • Leave unset, or set to another value -> not validated. Passport doesn't route to custom domain.

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)

szkl
szkl previously approved these changes Jun 2, 2023
@betimshahini betimshahini marked this pull request as ready for review June 5, 2023 12:51
@@ -87,6 +92,7 @@ const getErrorFromTRPCClientError = (error: any): Error => {
}
} else if (error.data && 'zodError' in error.data) {
const cause = (error.data as { zodError: object }).zodError
console.debug('ZOD', cause)
Copy link
Contributor

Choose a reason for hiding this comment

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

Intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

Comment on lines +274 to +276
for (const dnsRec of stored.dns_records) {
dnsRec.value = await getDNSRecordValue(dnsRec.name, dnsRec.record_type)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this block need exception handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as other comment.

szkl
szkl previously approved these changes Jun 5, 2023
Comment on lines +64 to +66
for (const dnsRec of stored.dns_records) {
dnsRec.value = await getDNSRecordValue(dnsRec.name, dnsRec.record_type)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this block need exception handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per convo, it would get picked up by the next alarm run until it eventually validates fully. Any errors will propagate up to the caller in Console, which will log for visibility.

@szkl szkl merged commit f1cb1d7 into main Jun 5, 2023
12 checks passed
@szkl szkl deleted the chore/2332-dns-recs-validator branch June 5, 2023 20:24
poolsar42 pushed a commit that referenced this pull request Jun 5, 2023
* DNS validation for custom domain CNAME records.

* Custom domain validation includes CNAME validation

* Removed unnecessary debug statement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(console): Add DNS record validators for custom domains
2 participants