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

Add Build managers and Update Build Querysets. #5779

Merged

Conversation

saadmk11
Copy link
Member

@saadmk11 saadmk11 commented Jun 8, 2019

This is a continuation of #5750.

Tasks:

  • Add Build Model Managers
  • Update Build Querysets with internal and external managers everywhere.
  • Add tests for new Managers

@saadmk11 saadmk11 added the PR: work in progress Pull request is not ready for full review label Jun 8, 2019
@ericholscher
Copy link
Member

@saadmk11 Is it possible to have this PR have a base of saadmk11:version-update? That way we can see the only the changes in this branch.

@stsewd
Copy link
Member

stsewd commented Jun 12, 2019

@ericholscher github only allows to do that with branches in the same repo, not for forks. So, we could push the other branch to this repo to have that feature.

@ericholscher
Copy link
Member

Pushed them up, you can see it here: version-update...build-manager-update

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.

Looks good, a similar approach 👍

@@ -116,7 +116,6 @@ def api(self, user=None, detail=True):

class BuildQuerySet(SettingsOverrideObject):
_default_class = BuildQuerySetBase
_override_setting = 'BUILD_MANAGER'
Copy link
Member

Choose a reason for hiding this comment

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

We can't change this setting. We need to be able to still override this.

Copy link
Member Author

@saadmk11 saadmk11 Jun 12, 2019

Choose a reason for hiding this comment

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

@ericholscher actually we are now using BuildManager not BuildQueryset.as_manager() so i put this settings in the BuildManager.
https://github.com/rtfd/readthedocs.org/blob/3f93788ea69ad90c6230f4e9d19aae43a8428020/readthedocs/builds/managers.py#L176

@saadmk11 saadmk11 force-pushed the build-manager-update branch from 3f93788 to 5607164 Compare June 13, 2019 13:04
@saadmk11 saadmk11 force-pushed the build-manager-update branch from adfa2af to de5ce44 Compare June 14, 2019 06:18
@saadmk11 saadmk11 requested review from ericholscher and a team June 14, 2019 17:47
@saadmk11 saadmk11 removed the PR: work in progress Pull request is not ready for full review label Jun 14, 2019
@saadmk11 saadmk11 force-pushed the build-manager-update branch from aa9bae6 to 5d6c750 Compare June 17, 2019 20:12
@saadmk11 saadmk11 force-pushed the gsoc-19-pr-builder branch from 05951cf to 5a05b6c Compare June 18, 2019 09:52
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.

This looks mostly good currently. I will merge it into the feature branch here soon.

# builds in the build list page
self.project_slug = self.kwargs.get('project_slug', None)
self.project = get_object_or_404(
Project.objects.protected(self.request.user),
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't used protected, let's just use public.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ericholscher This is default in the base class should we change this?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ericholscher This is default in the base class and we were using it should we change it?

@ericholscher
Copy link
Member

Will merge this now, and we can fix up any issues later.

@ericholscher ericholscher merged commit 0beaad6 into readthedocs:gsoc-19-pr-builder Jun 18, 2019
@saadmk11 saadmk11 deleted the build-manager-update branch June 19, 2019 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants