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

Find out where/why rtd activates a version after building it #4793

Closed
stsewd opened this issue Oct 22, 2018 · 9 comments
Closed

Find out where/why rtd activates a version after building it #4793

stsewd opened this issue Oct 22, 2018 · 9 comments

Comments

@stsewd
Copy link
Member

stsewd commented Oct 22, 2018

Not sure how to classify this issue, but we kind of need to figure out why are we activating a version after building it, it may be a bug or it is by design.

Raised in #4733 (comment)

@stsewd
Copy link
Member Author

stsewd commented Oct 22, 2018

@humitos
Copy link
Member

humitos commented Oct 23, 2018

@stsewd good work!

First of all, I think we don't need to send the active=True in that PATCH.

On the other hand, I come up with some questions:

  • why we would build a version that it's not active?
  • in case we want to build a version that it's not active, why we would like to mark it as active after building it?

@agjohnson @ericholscher you may remember some use case for this. Otherwise, I think we can remove the active argument from the PATCH.

Also, we should confirm that removing this we still can work around #4001.

@agjohnson
Copy link
Contributor

I'm lost on the two points above as well. I'd say we don't want to build it at all if its inactive, and we certainly shouldn't be changing active=True.

Perhaps this was a case to catch the initial import of a project? When the latest version is maybe not active yet? Just guessing at this...

@stsewd
Copy link
Member Author

stsewd commented Oct 24, 2018

I tested this locally, removing active from the patch works, and it doesn't break things like the first import, as we create the latest and stable with active=True

https://github.com/rtfd/readthedocs.org/blob/dfc8fc9eba8dc9caae171ca0b3e8f6a71594e088/readthedocs/builds/managers.py#L37-L59

The only parts where we are triggering builds on inactive versions are: on webhooks (fix in #4733), and when triggering manually a build (from django shell?).

If we want to move the check to trigger build, we need to refactor the other places, and we lose the ability to build inactive versions

@humitos
Copy link
Member

humitos commented Oct 25, 2018

In my opinion, I think that removing it from the PATCH is ok.

I don't think we want to move the check of the inactive version inside the trigger_build function. Do you have a different opinion?

@stsewd
Copy link
Member Author

stsewd commented Oct 25, 2018

Do you have a different opinion?

Nope, same. Also, that is easier than touching the rest of the code p:

@ericholscher
Copy link
Member

I guess I still don't understand -- what is the case that's happening where we are building a set of docs that we don't want to set to active?

@stsewd
Copy link
Member Author

stsewd commented Oct 26, 2018

@ericholscher here #4672, but we have a fix for that #4733, but the active=True in this code doesn't make much sense

@ericholscher
Copy link
Member

I guess I just don't see the bug as "building activates the version", but more that we shouldn't be triggering the build for inactive versions in that case -- I think in general if we're building docs they should be activated, but I could see the argument for that happening in the code that calls the build, not the build itself.

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

No branches or pull requests

4 participants