Skip to content

Clytwynec/dont fail diff quality for todo - #6122

Merged
clytwynec merged 1 commit into
masterfrom
clytwynec/dont-fail-diff-quality-for-todo
Dec 8, 2014
Merged

Clytwynec/dont fail diff quality for todo#6122
clytwynec merged 1 commit into
masterfrom
clytwynec/dont-fail-diff-quality-for-todo

Conversation

@clytwynec

Copy link
Copy Markdown
Contributor

No description provided.

@clytwynec
clytwynec force-pushed the clytwynec/dont-fail-diff-quality-for-todo branch from 4b6c323 to 74ba348 Compare December 3, 2014 14:26
@clytwynec

Copy link
Copy Markdown
Contributor Author

@benpatterson @jzoldak Please review

@clytwynec

Copy link
Copy Markdown
Contributor Author

FYI: https://jenkins.testeng.edx.org/job/edx-all-tests-auto-pr/18993/ is the build with these changes along with a new TODO. I've since removed the TODO commit and rebased to fix the unit test failures.

@jzoldak

jzoldak commented Dec 3, 2014

Copy link
Copy Markdown
Contributor

I also just cherry-picked your commits onto my PR #6111 which was failing the quality shard due to commits.

@benpatterson

Copy link
Copy Markdown
Contributor

If we're disabling this for the pylint runs, do we still need to fix run_quality (the flag disabling this rule) ? If someone were to introduce a TODO, would diff-quality find it and error on it?

@clytwynec

Copy link
Copy Markdown
Contributor Author

@benpatterson diff-quality didn't fail when I tested adding a new TODO.

I think that is because it is using the files generated in the run_pylint step. I'm not sure how it will play out if you only use run_quality though (without running pylint like we do in all-tests.sh first).

Looking at this comment ...

    # If pylint reports exist, use those
    # Otherwise, `diff-quality` will call pylint itself

... my guess is it would fail because we are not passing the disable flag to diff-quality. I'll look into whether or not that requires a change to diff-quality.

@benpatterson

Copy link
Copy Markdown
Contributor

Well, I mainly bring it up because -- I thought -- the way we had diff-quality set up had a bug, where the 'disable' option wasn't being recognized or used correctly...

@clytwynec

Copy link
Copy Markdown
Contributor Author

Ok. So after a bit more investigating, it looks like the --disable=fixme option in run_quality works. The issue is that diff-quality only runs pylint if it doesn't find existing reports. Since we are using run_pylint before run_quality in all-tests.sh and run_pylint wasn't disabling fixme, diff-quality was checking against reports that count TODOs.

So, with this change, if one uses run_quality locally (having not already generated any reports, it will use disable fixme. However, if you use run_pylint first, without passing -d fixme, it will not disable fixme the next time you use run_quality as it is using the previously generated files.

@benpatterson

Copy link
Copy Markdown
Contributor

Ahhh... Ok, that makes sense.

I know you put work into this, but in this case, would we be better off just globally disabling fixme in the pylintrc? If we have to disable it in both pylint runs anyway with the switches....

@clytwynec

Copy link
Copy Markdown
Contributor Author

I think that makes sense... though we may want to add a way for people to explicitly find TODOs.

@benpatterson

Copy link
Copy Markdown
Contributor

@sarina @singingwolfboy care to weigh in?

@sarina

sarina commented Dec 3, 2014

Copy link
Copy Markdown
Contributor

I am fine with pretty much any approach. If we end up putting fixme disable in pylintrc, I might want to see a script that will print out all the fixme violations just so we can easily understand what that tech debt is (and perhaps, monitor it)

Comment thread scripts/all-tests.sh Outdated

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.

Please use the violation name (fixme) rather than the violation code (W0511) -- names are much clearer.

@clytwynec
clytwynec force-pushed the clytwynec/dont-fail-diff-quality-for-todo branch from 514864c to 7e01230 Compare December 5, 2014 14:13
@sarina

sarina commented Dec 8, 2014

Copy link
Copy Markdown
Contributor

@clytwynec - can we get this merged?

@clytwynec

Copy link
Copy Markdown
Contributor Author

Waiting on re-review. @benpatterson @jzoldak

@benpatterson

Copy link
Copy Markdown
Contributor

@clytwynec I have some comments/questions about the find_fixme script. Would it be possible to split that out into a separate PR so we can get the pylintrc changes in?

Otherwise I can comment here...thought I'd stop and ask first.

@clytwynec
clytwynec force-pushed the clytwynec/dont-fail-diff-quality-for-todo branch from 7e01230 to 25d76da Compare December 8, 2014 14:20
@clytwynec clytwynec mentioned this pull request Dec 8, 2014
@clytwynec

Copy link
Copy Markdown
Contributor Author

@benpatterson

Copy link
Copy Markdown
Contributor

Right on.

👍 on this change. I'll look at the other PR as well.

clytwynec pushed a commit that referenced this pull request Dec 8, 2014
…r-todo

Clytwynec/dont fail diff quality for todo
@clytwynec
clytwynec merged commit 6821fd4 into master Dec 8, 2014
@sarina
sarina deleted the clytwynec/dont-fail-diff-quality-for-todo branch December 8, 2014 15:15
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.

5 participants