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 Configuration for PR Builder Through Config File #6046

Closed
saadmk11 opened this issue Aug 7, 2019 · 10 comments
Closed

Add Configuration for PR Builder Through Config File #6046

saadmk11 opened this issue Aug 7, 2019 · 10 comments
Labels
Needed: design decision A core team decision is required

Comments

@saadmk11
Copy link
Member

saadmk11 commented Aug 7, 2019

So, travis does this in the config file to allow users to skip the CI on some branches.

  • Do we want to offer that level of customization?
  • do we have cases where the user only wants to report the status on some branches?
  • Disabling the PR builder setting means don't report the status and not build the docs from the PR or just not report the status?

Originally posted by @stsewd in #6014 (comment)

Continuing from the initial comment by @stsewd, We want some kind of customization through the config file for External versions. Maybe for enabling or disabling PR Builds for a project or Disabling for a certain PR.

We need to discuss this issue and figure out how we want the users to interact with the PR Builder. My initial opinion is we add PR Builder Enabling and Disabling feature in the config file for a project. and Also we can do something like this for skipping specific PR Building #3457

Need the @readthedocs/core Teams thoughts on this :)

@saadmk11 saadmk11 added the Needed: design decision A core team decision is required label Aug 7, 2019
@saadmk11 saadmk11 changed the title Configuration File Update for PR Builder Add Configuration for PR Builder Through Config File Aug 7, 2019
@ericholscher
Copy link
Member

I think the config file feels like the right place for this. If we don't have a strong opinion, I think that copying what travis and others do here probably makes the most sense. So allowing it to be turned on in the config, specifying which branches to build against. The main downside is that it requires us to clone the code in order to figure out if we need to trigger a build, which feels a bit complicated.

@stsewd
Copy link
Member

stsewd commented Aug 9, 2019

So, just putting more context here from the slack discussion.

Currently, we parse the config file after clone (this is so we can support manual import).
Given that, we can't put any setting that modifies if the PR should be build or not.

One option is having a global setting to enable the feature, and to have control over all pull requests, we can use the automation rules (extend them to support external versions and run the rules before building the PRs)

An action for the rules is given a pattern, only build PRs that match that pattern.

Other action can be build PR but not report status (codecov has this feature, we don't wait for other check in the list, but we can review the coverage report anyway).

@stsewd
Copy link
Member

stsewd commented Aug 22, 2019

Also related to #2593

@pllim
Copy link
Contributor

pllim commented Aug 22, 2019

Hello. I really like this feature and I have begun to roll it out to my projects. So, thank you very much!

In my workflow, I find something like [skip rtd] in the commit message to prevent it from running is more useful. This way, PR authors themselves can control it from commit to commit, without having to tinker with config files unrelated to the PR. This is akin to [skip ci] on Travis, Appveyor, or CircleCI. Most of the PRs I deal with are against master branch, so I don't have strong feelings about supporting a per-branch setting.

@humitos
Copy link
Member

humitos commented Sep 3, 2019

One option is having a global setting to enable the feature, and to have control over all pull requests, we can use the automation rules (extend them to support external versions and run the rules before building the PRs)

I may be lacking some context here, but I think that having everything in the same place is the way to go. That's it "Automated Rules" in my mind.

There you can control what versions (internal or external) to build, activate, make stable, etc. I think it makes the UX clearer in the sense that you control everything from there instead of "some" from there and some others from the config file.

Besides, we do not need to build all the version/branch name parsing/logic again. We already have it for the Automated Rules.

As an extra point, allows us to even do not trigger the build at all and save resources.

Sounds like a win-win (users-us) to me.

@ericholscher
Copy link
Member

Yea, I think my main concern is that we're moving configuration out of the YAML file again, and into the database. The whole goal was to try and keep as much logic in the YAML as possible, and now we're drifting back the other direction :/

@agjohnson
Copy link
Contributor

I tend to agree that the best UX is in automation rules, and also want to be selective about what we're putting into the config file. Project level options are a good fit for the config file. This seems like a project level setting because what do we do when the config file in one branch specifies a different list of branches to exclude? Only using the config from the default branch seems like a bit of a hack compared to building out automation rules.

@humitos
Copy link
Member

humitos commented Sep 9, 2019

Project level options are a good fit for the config file.

I remember from our old conversations that we said "Version level options are good for Config File and Project level are good candidates for DB".

I understand @ericholscher's point, but I think that it's preferable to have this global settings in the DB to avoid triggering a build and having different settings on different versions that it's suppose to affect the Project globally.

@agjohnson
Copy link
Contributor

I remember from our old conversations that we said "Version level options are good for Config File and Project level are good candidates for DB".

Heh, odd. This has been my point for a long time now, yeah. I almost certainly was trying to write "version level options are a good fit" 🤷

@humitos
Copy link
Member

humitos commented Sep 15, 2023

We tried to implement this idea in #3457 and it went off the road, adding too much complexity to our platform. In the end, we decided to close the PR and don't introduce this feature.

@humitos humitos closed this as completed Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

6 participants