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

build(coverage): enable code coverage for java and python #11992

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

chakru-r
Copy link
Collaborator

@chakru-r chakru-r commented Nov 29, 2024

Enable coverage for java and python code by using a common gradle script plugins.
A subsequent PR will add consumption of these coverage files into a code coverage analysis tool from a github action.
UI and scala code not part of this PR.

Checklist

  • [ x] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

Enable coverage for java and python code by using a common gradle script
plugins.
A subsequent PR will add consumption of these coverage files into a code
coverage analysis tool from a github action.
UI and scala code not part of this PR.
@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata product PR or Issue related to the DataHub UI/UX devops PR or Issue related to DataHub backend & deployment community-contribution PR or Issue raised by member(s) of DataHub Community labels Nov 29, 2024
@chakru-r chakru-r marked this pull request as ready for review November 29, 2024 16:08
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Nov 29, 2024
Comment on lines +13 to +15
--cov=src was added via setup.cfg in many of the python projects but for some reason, was not getting picked up
consistently, so adding it explicitly. Centralizing these params would make it easier to adjust them for all python
projects (with overrides being in the sub-project build script.)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The --cov=src thing being required is a bit worrying. In general, I prefer having stuff in configs instead of specifying things on the command line. We can update the setup.cfg files in the python directories if that's necessary

That said, if you spent a bunch of time messing with this and this was the only way you got stuff to work, then it's not a blocker

Copy link
Collaborator Author

@chakru-r chakru-r Dec 2, 2024

Choose a reason for hiding this comment

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

I'll relook at this another time. I think the cause is related to the equivalent of https://github.com/chakru-r/datahub/blob/master/metadata-ingestion/setup.cfg#L107-L116 across the other python projects.

That said, it may help if some of these settings - especially those that are common should not be required to be specified in each project - only overrides or deviations are added if applicable. (For a separate discussion/PR)

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Nov 29, 2024
@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Dec 2, 2024
@datahub-cyborg datahub-cyborg bot added merge-pending-ci A PR that has passed review and should be merged once CI is green. and removed needs-review Label for PRs that need review from a maintainer. labels Dec 2, 2024
@david-leifker
Copy link
Collaborator

Failed tests fixed here.

@david-leifker david-leifker merged commit 85b42e3 into datahub-project:master Dec 3, 2024
81 of 82 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community devops PR or Issue related to DataHub backend & deployment ingestion PR or Issue related to the ingestion of metadata merge-pending-ci A PR that has passed review and should be merged once CI is green. product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants