Add a step that stores diff info about a pull/merge request#5499
Add a step that stores diff info about a pull/merge request#5499p12tic merged 3 commits intobuildbot:masterfrom
Conversation
master/buildbot/steps/diffinfo.py
Outdated
| from buildbot.process import results | ||
|
|
||
|
|
||
| class DiffInfo(buildstep.ShellMixin, buildstep.BuildStep): |
There was a problem hiding this comment.
I guess this shall be GitDiffInfo...
|
|
||
| The `DiffInfo` step gathers information about differences between the current revision and the last common ancestor of this revision and another commit or branch. | ||
| This information is useful for various reporters to be able to identify new warnings that appear in newly modified code. | ||
| The diff information is stored as a custom json as transient build data via ``setBuildData`` function. |
There was a problem hiding this comment.
we probably need a spec for this data, so that other VCS can generate the same data.
| self.expectOutcome(result=results.SUCCESS, state_string="diffinfo") | ||
|
|
||
| diff_info = ( | ||
| b'[{"source_file": "a/file1", "target_file": "/dev/null", ' + |
There was a problem hiding this comment.
I would strip the 'a/' which is git specific.
There was a problem hiding this comment.
Added --no-prefix option to git to get rid of these.
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Codecov Report
@@ Coverage Diff @@
## master #5499 +/- ##
==========================================
- Coverage 91.69% 91.67% -0.03%
==========================================
Files 338 339 +1
Lines 36179 36230 +51
==========================================
+ Hits 33175 33213 +38
- Misses 3004 3017 +13
Continue to review full report at Codecov.
|
Ref: buildbot/buildbot#5499 git-svn-id: file:///srv/repos/svn-community/svn@915582 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Ref: buildbot/buildbot#5499 git-svn-id: file:///srv/repos/svn-community/svn@915582 9fca08f4-af9d-4005-b8df-a31f2cc04f65
See buildbot/buildbot#5499 for the new unidiff dependency git-svn-id: file:///srv/repos/svn-community/svn@915851 9fca08f4-af9d-4005-b8df-a31f2cc04f65
See buildbot/buildbot#5499 for the new unidiff dependency git-svn-id: file:///srv/repos/svn-community/svn@915851 9fca08f4-af9d-4005-b8df-a31f2cc04f65
This step will be useful for reporters to know which warnings have been generated in changed code.
I think for now let's not merge the PR, it will become clear whether it works well enough or not once I'll have some reporters that could consume the data and will test everything end to end.
Contributor Checklist:
master/buildbot/newsfragmentsdirectory (and read theREADME.txtin that directory)