grimoirelab-elk icon indicating copy to clipboard operation
grimoirelab-elk copied to clipboard

[gitlabcomments] Add enricher to handle gitlab comments

Open vchrombie opened this issue 5 years ago • 15 comments

This PR proposes a new gitlab enricher to handle gitlab comments. The old enricher is left in place to avoid breaking changes with existing customer dashboards.

Ref: https://github.com/chaoss/grimoirelab/issues/208

vchrombie avatar May 26 '20 21:05 vchrombie

The PR has a lot of pending work, I will be working on this. I will mark ready for review after completing some good work.

Please let me know if you are having any suggestions. Thanks.

vchrombie avatar May 26 '20 21:05 vchrombie

Hi @vchrombie , please ping me when I can review this PR. I had a look at the current status and the start looks promising :)

WRT tests (if this can be of any help), you should run Perceval and copy some docs to a test file, which will be finally put in the folder tests/data. The name is important since it is used to automatically identify the file and load its content (https://github.com/chaoss/grimoirelab-elk/blob/master/tests/base.py#L137)

If needed you can tweak the test data (e.g., changing value attributes) to make sure that all code is covered when running the tests.

valeriocos avatar May 30 '20 12:05 valeriocos

Hi @valeriocos I have completed the major part of the PR. I am yet to complete the __get_reactions function and I am working on that right now.

vchrombie avatar Jun 04 '20 13:06 vchrombie

Thanks for the update @vchrombie

valeriocos avatar Jun 04 '20 13:06 valeriocos

I will mark this PR ready-for-review once I complete the __get_reactions function too. :rocket:

vchrombie avatar Jun 04 '20 21:06 vchrombie

Pull Request Test Coverage Report for Build 1227039055

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 30 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.5%) to 82.719%

Files with Coverage Reduction New Missed Lines %
/home/runner/work/grimoirelab-elk/grimoirelab-elk/grimoire_elk/utils.py 30 66.54%
<!-- Total: 30
Totals Coverage Status
Change from base Build 1220934812: 0.5%
Covered Lines: 9042
Relevant Lines: 10931

💛 - Coveralls

coveralls avatar Jun 06 '20 21:06 coveralls

https://github.com/chaoss/grimoirelab-elk/pull/881#pullrequestreview-425802955

Thanks for the review @valeriocos. I have just updated the PR with the changes you have suggested.

Can you add the tests and schema?

Sure, I will be working on it and add them here soon.

vchrombie avatar Jun 07 '20 13:06 vchrombie

Hi @valeriocos

Recent updates to the PR

  1. I removed the reactions mapping as we discussed it is not needed and also implemented the new __get-reactions() function.
  2. added the schema using the gitlabcomments-mrs/issues_enriched index.
  3. added the tests, (highly need a review on this as I'm not really good with it).

I'm right now checking the coverage, will update the PR if needed.

Once the PR is perfect, I can squash the commits and rebase them with the latest changes too.

vchrombie avatar Jun 09 '20 19:06 vchrombie

Thanks @valeriocos. I left a lot of things pending, my bad. I will get back to you after fixing them. :+1:

vchrombie avatar Jun 10 '20 18:06 vchrombie

No worries, thank you for working on this PR

valeriocos avatar Jun 10 '20 18:06 valeriocos

Also, I have made a small script to generate schema file of an es index, generate-es-index-schema-py. This was built on top of @animeshk08's script as it had some backlogs.

The script can be improved by adding the idea of default field and adding descriptions. Please leave your comments in the gist or you can open an issue here, vchrombie/grimoirelab-scripts. Feedback is highly welcomed. ^^

vchrombie avatar Jun 11 '20 19:06 vchrombie

Hi @valeriocos I have updated the PR as per your suggestions. Can you review this when you are free? Thanks.

vchrombie avatar Jun 12 '20 11:06 vchrombie

please @vchrombie ping me when the PR is ready for review, thanks

valeriocos avatar Jun 16 '20 07:06 valeriocos

Coming from outside and having dismissed GrimoireLab previously for lacking GitLab support, I would still like to see it support additional code forges other than GitHub, as per the arguments in inhttps://github.com/chaoss/grimoirelab/issues/284#issuecomment-827155190).

Is there something me as an outsider can contribute to the formal aspects of the PR, in so the remaining technical questions can be answered more easily? Speaking of:

  • [ ] rebase on master
  • [ ] update elk readme
  • [ ] add mordred supported data sources documentation (PR)
  • [ ] update tests for edge cases and error conditions

almereyda avatar Apr 26 '21 21:04 almereyda

Hi @almereyda, thanks for your comment.

Coming from outside and having dismissed GrimoireLab previously for lacking GitLab support

Sorry about it, but the current GrimoireLab supports analyzing issues and merge requests from the gitlab projects (reference). This PR is an additional enricher which can analyze the comments of the gitlab issues and mrs. I couldn't complete it because I completely forgot about this.

Is there something me as an outsider can contribute to the formal aspects of the PR, in so the remaining technical questions can be answered more easily? Speaking of:

Thanks for offering help, I appreciate it. But, I think I can complete the work on this PR. I can pull some time during the coming weekend and complete the pending work.

vchrombie avatar Apr 27 '21 15:04 vchrombie