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

@stsewd stsewd added the Status: blocked Issue is blocked on another issue label Jan 22, 2019
@agjohnson agjohnson added this to the 2.9 milestone Jan 22, 2019
@agjohnson agjohnson added the Bug A bug label Jan 22, 2019
@agjohnson agjohnson modified the milestones: 2.9, 3.2, 3.3 Jan 25, 2019
@humitos
Copy link
Member

humitos commented Jan 29, 2019

We can remove the dnspython dependency now, https://github.com/rtfd/readthedocs.org/blob/49134eef84be5cff2cb259c6aac436db41d99fc5/requirements/pip.txt#L44

@ericholscher
Copy link
Member

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

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

Believe it used to be documented.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can update that then

@davidfischer
Copy link
Contributor

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

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

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 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

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

Either works but I think yours is better.

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting, I guess is used more in other areas?

@stsewd stsewd merged commit 3021960 into readthedocs:master Jan 29, 2019
@stsewd stsewd deleted the remove-cname-from-unregister-domain-fixed branch January 29, 2019 23:31
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Status: blocked Issue is blocked on another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants