Skip to content

Build: cleanup VCS support to remove unused methods #8940

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

Closed
humitos opened this issue Feb 17, 2022 · 0 comments · Fixed by #8968
Closed

Build: cleanup VCS support to remove unused methods #8940

humitos opened this issue Feb 17, 2022 · 0 comments · Fixed by #8968
Assignees
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code Sprintable Small enough to sprint on

Comments

@humitos
Copy link
Member

humitos commented Feb 17, 2022

Since the deploy that implements the Celery Handlers, we are always starting the build from a fresh and cleaned environment. No cache is used at all.

So, we should be able to delete all the code related to update the repository by calling git fetch and similar. Take a look at

def fetch(self):
# --force lets us checkout branches that are not fast-forwarded
# https://github.com/readthedocs/readthedocs.org/issues/6097
cmd = ['git', 'fetch', 'origin',
'--force', '--tags', '--prune', '--prune-tags']
if self.use_shallow_clone():
cmd.extend(['--depth', str(self.repo_depth)])
if self.verbose_name and self.version_type == EXTERNAL:
if self.project.git_provider_name == GITHUB_BRAND:
cmd.append(
GITHUB_PR_PULL_PATTERN.format(id=self.verbose_name)
)
if self.project.git_provider_name == GITLAB_BRAND:
cmd.append(
GITLAB_MR_PULL_PATTERN.format(id=self.verbose_name)
)
code, stdout, stderr = self.run(*cmd)
return code, stdout, stderr
as example.

@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Feb 17, 2022
@humitos humitos added the Sprintable Small enough to sprint on label Mar 2, 2022
@humitos humitos self-assigned this Aug 1, 2023
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Aug 1, 2023
@humitos humitos moved this from Planned to In progress in 📍Roadmap Aug 2, 2023
@humitos humitos moved this from In progress to Needs review in 📍Roadmap Aug 9, 2023
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code Sprintable Small enough to sprint on
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant