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

Remove logic for guessing slug from an unregistered domain #5143

Merged

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Jan 22, 2019

I messed up #4730 trying to solve the conflicts. See the another PR for the discussion (sorry!)

Close #1991

@agjohnson agjohnson added this to the 2.9 milestone Jan 22, 2019
@agjohnson agjohnson added the Bug label Jan 22, 2019
@agjohnson agjohnson removed this from the 2.9 milestone Jan 25, 2019
@agjohnson agjohnson added this to the 3.2 milestone Jan 25, 2019
@agjohnson agjohnson removed this from the 3.2 milestone Jan 25, 2019
@agjohnson agjohnson added this to the 3.3 milestone Jan 25, 2019
@humitos
Copy link
Member

@humitos humitos commented Jan 29, 2019

@ericholscher
Copy link
Member

@ericholscher ericholscher commented Jan 29, 2019

I think this is ready to go, but I think we need to do a bit more work to reduce the possible downsides. We have some manual migration steps, but any project that is missed will randomly have their Domain stop working. This is not a great experience, so I think we should:

  • Create a specific 404/error page for missing Domain entries, which gives users more details on the error and links to the docs on how to fix it
  • Log all invalid domains somewhere, perhaps Redis, with a counter, and then log an error if we hit some reasonable number (10, 20?) to Sentry, so that we can catch "real" domains rather than typos.

Copy link
Member

@ericholscher ericholscher left a comment

Solid changes. 👍

please review our <a href="{{ docsurl }}">custom domain documentation</a>.
In the past, we allowed custom domains to point to us without configuring the domain in the Read the Docs dashboard
and we attempted to intelligently guess the correct project.
This was never explicitly supported and documented. It just happened to work.
Copy link
Member

@ericholscher ericholscher Jan 29, 2019

Believe it used to be documented.

Copy link
Contributor

@davidfischer davidfischer Jan 29, 2019

I can update that then

@davidfischer
Copy link
Contributor

@davidfischer davidfischer commented Jan 29, 2019

Log all invalid domains somewhere, perhaps Redis, with a counter, and then log an error if we hit some reasonable number (10, 20?) to Sentry, so that we can catch "real" domains rather than typos.

We have logs over the last 3 months. I added the domain where the following were true:

  • DNS pointed to readthedocs
  • I could reasonably verify that the domain was controlled by the project
  • A page requiring the DNS happened 20+ times in a month (60x in the last 90 days)

Copy link
Contributor

@davidfischer davidfischer left a comment

I added to this PR but I'll selfishly approve it. We should probably wait on at least one more approval.

Copy link
Member

@ericholscher ericholscher left a comment

Believe I am 👍 on this change. We should watch for DNS errors after the deploy though, and make sure we don't break anyone important.

@stsewd
Copy link
Member Author

@stsewd stsewd commented Jan 29, 2019

Going to fix the tests

<p>
{% with docsurl='https://docs.readthedocs.io/en/stable/custom_domains.html' %}
{% blocktrans trimmed %}
If you control this domain and believe this is in error,
Copy link
Member Author

@stsewd stsewd Jan 29, 2019

Shouldn't be is an error?

Suggested change
If you control this domain and believe this is in error,
If you control this domain and believe this is an error,

Copy link
Contributor

@davidfischer davidfischer Jan 29, 2019

Either works but I think yours is better.

Copy link
Member Author

@stsewd stsewd Jan 29, 2019

Interesting, I guess is used more in other areas?

@stsewd stsewd merged commit 3021960 into readthedocs:master Jan 29, 2019
1 of 2 checks passed
@stsewd stsewd deleted the remove-cname-from-unregister-domain-fixed branch Jan 29, 2019
Copy link
Member

@humitos humitos left a comment

💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants