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

Set default A records on user request #57972

Merged
merged 11 commits into from
Nov 17, 2021
Merged

Conversation

delputnam
Copy link
Contributor

@delputnam delputnam commented Nov 11, 2021

Changes proposed in this Pull Request

  • Add the capability to set the default A records and remove an existing root A/AAAA records.

Testing instructions

Set non-default A and AAAA records on a domain.
You can also set the pointsToWpcom value for the test domain to false to make it easier to test.

In the DNS menu, use the action button at the top of page and select the option to reset the default A records.
Make sure that you get the success message and that the page is re-rendered with the new records.
Also use the patch instructions to fake an error and make sure that the error message is shown and the rendered records are unchanged.

Also make sure that the deleted records and the added records are in the same changeset.

@delputnam delputnam self-assigned this Nov 11, 2021
@delputnam delputnam added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature Group] Emails & Domains Features related to email integrations and domain management. labels Nov 11, 2021
@github-actions
Copy link

github-actions bot commented Nov 11, 2021

@matticbot
Copy link
Contributor

matticbot commented Nov 11, 2021

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~3 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-main                   -29 B  (-0.0%)       -3 B  (-0.0%)
entry-login                  -29 B  (-0.0%)       -3 B  (-0.0%)
entry-gutenboarding          -29 B  (-0.0%)       -3 B  (-0.0%)
entry-domains-landing        -29 B  (-0.0%)       -3 B  (-0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~103 bytes added 📈 [gzipped])

name     parsed_size           gzip_size
domains       +399 B  (+0.0%)     +103 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit add/call-set-default-a-records on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@matticbot
Copy link
Contributor

This PR modifies the release build for notifications

To test your changes on WordPress.com, run install-plugin.sh notifications add/call-set-default-a-records on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-elI-p2

@delputnam delputnam requested a review from a team November 12, 2021 13:57
@delputnam delputnam marked this pull request as ready for review November 12, 2021 13:58
@delputnam delputnam force-pushed the add/call-set-default-a-records branch from dea4220 to dd7008b Compare November 12, 2021 20:10
@delputnam delputnam marked this pull request as draft November 12, 2021 20:41
@delputnam delputnam force-pushed the add/call-set-default-a-records branch from dd5e93d to eeb6737 Compare November 12, 2021 21:14
@delputnam delputnam marked this pull request as ready for review November 12, 2021 21:35
@@ -1,7 +1,6 @@
import { Button } from '@automattic/components';
import { useI18n } from '@wordpress/react-i18n';
import { domainManagementDnsAddRecord } from 'calypso/my-sites/domains/paths';
import './dns-breadcrumb-button.scss';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is handled by the breadcrumb styles now.

Copy link
Contributor

@rafaelgallani rafaelgallani left a comment

Choose a reason for hiding this comment

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

LGTM! I left a single minor comment.

Tests:

Successful restore:

restore-default-records-save.mov

Simulating an error:

image

@delputnam delputnam merged commit 6fdc940 into trunk Nov 17, 2021
@delputnam delputnam deleted the add/call-set-default-a-records branch November 17, 2021 11:07
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 17, 2021
@a8ci18n
Copy link

a8ci18n commented Nov 17, 2021

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/6978902

Hi @delputnam, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • Default A records restored
  • Failed to restore the default A records

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Nov 29, 2021

Translation for this Pull Request has now been finished.

nelsonec87 pushed a commit that referenced this pull request Dec 9, 2021
* Set default A records on user request

* dispatch prop types

* Better types for promises

* Styles are now handled by the breadcrumb component, so no need for these

* WIP

* re-add updateDns

* Bug fixes

* Bug fixes

* Make update call for root records

* Not using success/error methods in the DnsRecords component

* Remove optional chaining operator for required prop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature Group] Emails & Domains Features related to email integrations and domain management.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants