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 result reporter tool project #704

Merged
merged 1 commit into from
May 7, 2019
Merged

Conversation

li-boxuan
Copy link
Member

@li-boxuan li-boxuan commented Feb 1, 2019

Closes #555

For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Checklist

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    individually.
    It is not sufficient to have "fixup commits" on your PR,
    our bot will still report the issues for the previous commit.) You will
    likely receive a lot of bot comments and build failures if coala does not
    pass on every single commit!

After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.

Please consider helping us by reviewing other peoples pull requests as well:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@TravisBuddy

This comment has been minimized.

@TravisBuddy

This comment has been minimized.

@TravisBuddy

This comment has been minimized.

@li-boxuan li-boxuan requested a review from jayvdb February 1, 2019 16:51
@li-boxuan
Copy link
Member Author

@TravisBuddy
Copy link

Travis tests have failed

Hey @li-boxuan,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

Ruby: 2.5.1

View build log

docker run -v=$(pwd):/app --workdir=/app coala/base coala --ci
Unable to find image 'coala/base:latest' locally
latest: Pulling from coala/base
















Digest: sha256:125d6cf24929d39db47b3ccd83d6ed1b6a231fc7e8afbf70bc4b5bd87653b0ff
Status: Downloaded newer image for coala/base:latest
Executing section global...
[ERROR][03:52:39] The bear InvalidLinkBear does not fulfill all requirements. You are not connected to the internet.
Executing section commit...
Executing section linecount...
Executing section filenames...
Executing section markdown_filenames...
Executing section spacing...
Executing section yml...
Executing section new_linelength_projects...
Executing section old_linelength_projects...
TravisBuddy Request Identifier: 00d63f80-269e-11e9-bc23-1df458ae209a

improve coala workflow, continuous integration workflow or linters workflow.
For example, pulling the coala results from CI could be a way to inform newbies
of the style problems with their PRs. Pushing the unit test results as XML to
the CI (using combination XML files if necessary). It might also provide
Copy link
Member

Choose a reason for hiding this comment

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

It might also provide should be changed to Providing linters with ...

The applicant is welcomed to propose additional ideas around format topic, to
improve coala workflow, continuous integration workflow or linters workflow.
For example, pulling the coala results from CI could be a way to inform newbies
of the style problems with their PRs. Pushing the unit test results as XML to
Copy link
Member

Choose a reason for hiding this comment

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

Can you please explain, In what way would pushing the unit test results as XML to the CI help?

I mean, Isn't our CI run when someone makes a PR. And whenever CI is run all the unit tests are executed by default and the results can be seen. Sorry if this might sound silly, but I haven't yet come across a case when we had to push the XML's of unit tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

@KVGarg
Copy link
Contributor

KVGarg commented Mar 24, 2019

I'm getting a lot confused over coding-phase 3. I'm not able to figure out what has to be done in that phase. Please help me in the last phase also. It would a great help to me.
Till coding phase 2, the coala results can be converted to various other formats acc. to JUnit, Checkstyle, Clover and TAP. And each of them has its own schema specification/configuration. Also, I've understood how to write a linter bear. But I'm not able to figure out that

  1. what does "Provide various linter with a set of classes" means? Does that mean, we have to lint over the converted coala results and for that, we have to create a new separate class for each different output format i.e. 4 new classes??
  2. Also does "output formats for their cli" means that we have to display converted coala results into the CLI?
  3. And, can you please help me know what type of "handling" has to be carried out over JSON/XML reports?

Sorry if these questions seem to be silly, I just want to get more in deep so that I can research more about them in the right direction

@li-boxuan
Copy link
Member Author

I'm getting a lot confused over coding-phase 3. I'm not able to figure out what has to be done in that phase

Just a kind reminder: the applicant's proposal does not have to follow the rough schedule I proposed. That's just a very rough and simple schedule.

what does "Provide various linter with a set of classes" means

This has nothing to do with coala. We want to make our work more meaningful in that our upstream linters can use our work. For example, we provide a library that they can easily use to support different output formats.

Also does "output formats for their cli" means that we have to display converted coala results into the CLI

Same as the answer above.

And, can you please help me know what type of "handling" has to be carried out over JSON/XML reports

For example, validation.

@li-boxuan
Copy link
Member Author

@AkshJain99 I've answered the same question before (see my comment above)


- A tool that converts JSON results to JUnit format is implemented, tested,
and documented.
- Test and add doc regarding how to upload coala results into Circle CI and
Copy link
Member Author

Choose a reason for hiding this comment

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

Candidates need to think about this - can we make it automatic? What change do we need to make to existing CI configs used in coala?

Copy link
Member

Choose a reason for hiding this comment

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

@li-boxuan , what actually you mean by automatic here ?
I mean here we need tool that take coala Json response and convert it into corresponding junit response
is it. so should be done automatically here according to you 🤔

Copy link
Member Author

@li-boxuan li-boxuan Apr 1, 2019

Choose a reason for hiding this comment

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

Nope, I am not talking about the format itself.

I mean, how to make the "upload" process itself automatic. I didn't spend too much time investigating, so this question is left for students. For example, (maybe) Circle CI allows uploading a report (with JUnit format) in every continuous integration check. Maybe that requires some configuration in .circleci/config.yml.

EDIT: seems https://circleci.com/docs/2.0/configuration-reference/#store_test_results might be what we need. Then we can make pull requests to all coala repositories which use these CIs.

Copy link
Member

Choose a reason for hiding this comment

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

ohh okay will think about it and will mention it in my proposal

Copy link
Member Author

Choose a reason for hiding this comment

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

To add a bit more, currently there is one problem with using coala in CIs - it is very hard to locate where the error is. We have to look for errors in the massive log. This is one of the motivations why we need to report results to CIs.


- Provide various linters with a solid set of classes and output formats for
their CLI.
- Handle JSON/xml reports from linters before feeding into linter bears.
Copy link
Member Author

Choose a reason for hiding this comment

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

Students should investigate coala/coala#5910 a bit.
That might be out of the scope of this project, but it would be good to mention in the proposal.

Copy link
Member

Choose a reason for hiding this comment

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

yes i was also wondering for the issue might be helpful for us

@li-boxuan li-boxuan mentioned this pull request Apr 3, 2019
@li-boxuan li-boxuan force-pushed the format_converter branch from 0977749 to f19f787 Compare May 7, 2019 12:11
@TravisBuddy
Copy link

Travis tests have failed

Hey @li-boxuan,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

Ruby: 2.5.1

View build log

docker run -v=$(pwd):/app --workdir=/app coala/base coala --ci
Unable to find image 'coala/base:latest' locally
latest: Pulling from coala/base
















Digest: sha256:125d6cf24929d39db47b3ccd83d6ed1b6a231fc7e8afbf70bc4b5bd87653b0ff
Status: Downloaded newer image for coala/base:latest
Executing section global...
[ERROR][12:14:25] The bear InvalidLinkBear does not fulfill all requirements. You are not connected to the internet.
Executing section commit...
Executing section linecount...
Executing section filenames...
Executing section markdown_filenames...
Executing section spacing...
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/README.md
|    |++++| /app/README.md
|  34|  34| 1. Install [asdf-vm](https://asdf-vm.github.io/asdf/#/core-manage-asdf-vm) for your OS.
|  35|  35| 2. Using asdf-vm, install [ruby](https://github.com/asdf-vm/asdf-ruby).
|  36|  36| 3. Install Jekyll
|  37|    |-    
|    |  37|+
|  38|  38|         $ gem install jekyll bundler
|  39|  39| 
|  40|  40| ### Clone and Run
[INFO][12:14:28] Applied 'ShowPatchAction' on 'README.md' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/README.md
|    |++++| /app/README.md
|  40|  40| ### Clone and Run
|  41|  41| 
|  42|  42| Clone coala Projects repository
|  43|    |-    
|    |  43|+
|  44|  44|     $ git clone https://github.com/coala/projects.git
|  45|  45|     
|  46|  46| Run coala Projects website
[INFO][12:14:28] Applied 'ShowPatchAction' on 'README.md' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/README.md
|    |++++| /app/README.md
|  42|  42| Clone coala Projects repository
|  43|  43|     
|  44|  44|     $ git clone https://github.com/coala/projects.git
|  45|    |-    
|    |  45|+
|  46|  46| Run coala Projects website
|  47|  47| 
|  48|  48|     $ cd projects
[INFO][12:14:28] Applied 'ShowPatchAction' on 'README.md' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/data/locale/en/README.md
|    |++++| /app/data/locale/en/README.md
|  34|  34| 1. Install [asdf-vm](https://asdf-vm.github.io/asdf/#/core-manage-asdf-vm) for your OS.
|  35|  35| 2. Using asdf-vm, install [ruby](https://github.com/asdf-vm/asdf-ruby).
|  36|  36| 3. Install Jekyll
|  37|    |-    
|    |  37|+
|  38|  38|         $ gem install jekyll bundler
|  39|  39| 
|  40|  40| ### Clone and Run
[INFO][12:14:28] Applied 'ShowPatchAction' on 'data/locale/en/README.md' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/data/locale/en/README.md
|    |++++| /app/data/locale/en/README.md
|  40|  40| ### Clone and Run
|  41|  41| 
|  42|  42| Clone coala Projects repository
|  43|    |-    
|    |  43|+
|  44|  44|     $ git clone https://github.com/coala/projects.git
|  45|  45|     
|  46|  46| Run coala Projects website
[INFO][12:14:28] Applied 'ShowPatchAction' on 'data/locale/en/README.md' from 'SpaceConsistencyBear'.
|    | [NORMAL] SpaceConsistencyBear:
|    | Line contains following spacing inconsistencies:
|    | - Trailing whitespaces.
|----|    | /app/data/locale/en/README.md
|    |++++| /app/data/locale/en/README.md
|  42|  42| Clone coala Projects repository
|  43|  43|     
|  44|  44|     $ git clone https://github.com/coala/projects.git
|  45|    |-    
|    |  45|+
|  46|  46| Run coala Projects website
|  47|  47| 
|  48|  48|     $ cd projects
[INFO][12:14:28] Applied 'ShowPatchAction' on 'data/locale/en/README.md' from 'SpaceConsistencyBear'.
Executing section html...
Executing section yml...
Executing section new_linelength_projects...
Executing section old_linelength_projects...
Executing section cli...
TravisBuddy Request Identifier: ac59dc00-70c1-11e9-9978-d3cb5d6526c6

@jayvdb jayvdb merged commit f19f787 into coala:master May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Result reporter tool
7 participants