Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions readthedocs/doc_builder/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* fetching instructions etc.
"""

import datetime
import os
import tarfile

Expand Down Expand Up @@ -216,12 +217,20 @@ def checkout(self):
self.data.api_client.project(self.data.project.pk).patch(
{"has_ssh_key_with_write_access": has_ssh_key_with_write_access}
)

now = datetime.datetime.now(tz=datetime.timezone.utc)
hard_failure = now >= datetime.datetime(
2025, 12, 1, 0, 0, 0, tzinfo=datetime.timezone.utc
)
if has_ssh_key_with_write_access:
self.attach_notification(
attached_to=f"project/{self.data.project.pk}",
message_id=MESSAGE_PROJECT_SSH_KEY_WITH_WRITE_ACCESS,
dismissable=True,
)
if hard_failure and settings.RTD_ENFORCE_BROWNOUTS_FOR_DEPRECATIONS:
Copy link
Member

Choose a reason for hiding this comment

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

settings.RTD_ENFORCE_BROWNOUTS_FOR_DEPRECATIONS I assume this setting will True only on commercial, right?

Don't we need to add it here as False?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

we are not using SSH keys on .org, so it should have no effect there; right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, we already check for that just above

if settings.ALLOW_PRIVATE_REPOS:

raise BuildUserError(BuildUserError.SSH_KEY_WITH_WRITE_ACCESS)
else:
self.attach_notification(
attached_to=f"project/{self.data.project.pk}",
message_id=MESSAGE_PROJECT_SSH_KEY_WITH_WRITE_ACCESS,
dismissable=True,
)

identifier = self.data.build_commit or self.data.version.identifier
log.info("Checking out.", identifier=identifier)
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/notifications/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def get_rendered_body(self):
"""
This build has failed because the current deploy key on the repository was created with write permission.
For protection against abuse we've restricted use of these deploy keys.
A read-only deploy key will need to be set up <b>before July 31, 2025</b> to continue building this project.
A read-only deploy key will need to be set up <b>before December 1st, 2025</b> to continue building this project.
Read more about this in our <a href="https://about.readthedocs.com/blog/2025/07/ssh-keys-with-write-access/">blog post</a>.
"""
).strip(),
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/projects/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"""
This project has a deploy key with write access to the repository.
For protection against abuse we've restricted use of these deploy keys.
A read-only deploy key will need to be set up <b>before July 31, 2025</b> to continue building this project.
A read-only deploy key will need to be set up <b>before December 1st, 2025</b> to continue building this project.
Read more about this in our <a href="https://about.readthedocs.com/blog/2025/07/ssh-keys-with-write-access/">blog post</a>.
"""
).strip(),
Expand Down