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 this to In progress in Pull Request Builder via automation Jun 8, 2019
@ericholscher
Copy link
Member

@ericholscher ericholscher commented Jun 11, 2019

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

@ericholscher ericholscher commented Jun 12, 2019

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

Copy link
Member

@ericholscher ericholscher left a comment

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

@ericholscher ericholscher Jun 12, 2019

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

Copy link
Member Author

@saadmk11 saadmk11 Jun 12, 2019

@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 Jun 13, 2019
@saadmk11 saadmk11 force-pushed the build-manager-update branch from adfa2af to de5ce44 Jun 14, 2019
@saadmk11 saadmk11 force-pushed the build-manager-update branch from aa9bae6 to 5d6c750 Jun 17, 2019
@saadmk11 saadmk11 force-pushed the gsoc-19-pr-builder branch from 05951cf to 5a05b6c Jun 18, 2019
Copy link
Member

@ericholscher ericholscher left a comment

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

@ericholscher ericholscher Jun 18, 2019

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

Copy link
Member Author

@saadmk11 saadmk11 Jun 19, 2019

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

Copy link
Member Author

@saadmk11 saadmk11 Jun 19, 2019

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

@ericholscher
Copy link
Member

@ericholscher ericholscher commented Jun 18, 2019

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
Pull Request Builder automation moved this from In progress to Done Jun 18, 2019
@saadmk11 saadmk11 deleted the build-manager-update branch Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants