Skip to content

Only run AppVeyor linting check on branches which aren't master - #12378

Merged
seanbudd merged 2 commits into
masterfrom
try-appveyor-fix
May 10, 2021
Merged

Only run AppVeyor linting check on branches which aren't master#12378
seanbudd merged 2 commits into
masterfrom
try-appveyor-fix

Conversation

@seanbudd

@seanbudd seanbudd commented May 7, 2021

Copy link
Copy Markdown
Member

Link to issue number:

None

Summary of the issue:

Master builds are currently failing at the linting step such as

Lint checking doesn't need to occur for master builds

Description of how this pull request fixes the issue:

Don't run the appveyor lint checking on master branches

Testing strategy:

Known issues with pull request:

Change log entries:

None

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual tests.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.

@seanbudd
seanbudd requested a review from a team as a code owner May 7, 2021 06:13
@seanbudd
seanbudd requested a review from michaelDCurran May 7, 2021 06:13
@seanbudd seanbudd added this to the 2021.1 milestone May 7, 2021
@seanbudd
seanbudd force-pushed the try-appveyor-fix branch from a89fdcc to 157ca8b Compare May 7, 2021 06:17
@seanbudd seanbudd changed the title only run linting diff on branches which aren't master Only run AppVeyor linting check on branches which aren't master May 7, 2021
@seanbudd
seanbudd requested a review from feerrenrut May 7, 2021 06:47
Comment thread appveyor.yml Outdated

# Flake8 Linting
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -ne "master") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doesn't this also need to be done for any other build that doesn't have a "target": EG release builds / beta builds / try build?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Originally, we only did linting for PRs. I'm guessing the aim recently was to also enable linting for at least try builds. Personally, I think we only need lint checks for prs and nothing more, as it is prs by which code gets into NVDA.
However, if there is a strong argument for also enabling linting for try builds, then the if check should be pretty much that it happens for prs (APPVEYOR_PULL_REQUEST_NUMBER is defined) or APPVEYOR_REPO_BRANCH starts with "try-". Anything else should not do linting.
We do not need to do linting on official branches or releases as code can only get to them from prs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, I guess I wasn't clear enough. I meant we should avoid linting release builds / beta / try builds. It only makes sense to lint PR builds.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Isn't helpful to know if a try-build can be linted when merged with master? I didn't see a reason to why it would be specifically excluded if the aim is to land code on master (eventually).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are different reasons for a try build. It may just be a prototype, in this case a failed lint is just a distraction. If the goal is to get the code merged, the same commit will likely be used as the HEAD on the PR branch, which should get a lint.

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd say we merge this now, to get alpha builds passing again. Happy to have a followup on the other build types if necessary later.

Comment thread appveyor.yml Outdated

# Flake8 Linting
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -ne "master") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Originally, we only did linting for PRs. I'm guessing the aim recently was to also enable linting for at least try builds. Personally, I think we only need lint checks for prs and nothing more, as it is prs by which code gets into NVDA.
However, if there is a strong argument for also enabling linting for try builds, then the if check should be pretty much that it happens for prs (APPVEYOR_PULL_REQUEST_NUMBER is defined) or APPVEYOR_REPO_BRANCH starts with "try-". Anything else should not do linting.
We do not need to do linting on official branches or releases as code can only get to them from prs.

@seanbudd
seanbudd requested a review from michaelDCurran May 10, 2021 00:16
@seanbudd
seanbudd merged commit a2a6e23 into master May 10, 2021
@seanbudd
seanbudd deleted the try-appveyor-fix branch May 10, 2021 01:03
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.

3 participants