Skip to content

Conversation

Xiangs18
Copy link
Contributor

No description provided.

@Xiangs18 Xiangs18 requested a review from ialarmedalien as a code owner March 21, 2025 18:36
Comment on lines +7 to +11
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
with:
name: '${{ github.event.repository.name }}-develop'
tags: br-${{ github.ref_name }}
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copy link

codecov bot commented Mar 21, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@Xiangs18
Copy link
Contributor Author

It's not 100% the same, but it's close enough.

Before:
Screenshot 2025-03-21 at 5 27 49 PM

Now:
Screenshot 2025-03-21 at 5 28 54 PM

@Xiangs18 Xiangs18 changed the title [WIP] SECURITY-49: Add GHA workflows SECURITY-49: Add GHA workflows Mar 22, 2025
.coveragerc Outdated
Comment on lines 4 to 9
relation_engine_server/api_versions/*
relation_engine_server/exceptions.py
relation_engine_server/main.py
relation_engine_server/utils/auth.py
relation_engine_server/utils/bulk_import.py
relation_engine_server/utils/parse_json.py No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

Why are these omitted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because those files are not included in the original coverage, if our goal is not to produce the original coverage, we don't need to omit them.

Copy link
Member

Choose a reason for hiding this comment

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

How are they excluded from the original coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original coverage was produced when I added coverage report --omit=*/test_* in 64926da. I am not sure why they were excluded from the original coverage, even though most of these files have 0% coverage.

Copy link
Member

Choose a reason for hiding this comment

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

So there's nothing in the configuration that excludes them in the prior setup? Just coverage is dropping them for some reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not find any coverage configuration in the codebase that excluded them in the prior setup. What are your thoughts on this? Should we include them if there are no particular reasons to omit these files?

Copy link
Member

Choose a reason for hiding this comment

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

We definitely shouldn't seemingly arbitrarily exclude files just because the prior setup excluded them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

Standard question about whether the boilerplate workflows are up to date

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

👍

token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

docker_build_and_push:
Copy link
Member

Choose a reason for hiding this comment

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

Is this still necessary given the other workflows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not following this. Are you asking if the code coverage upload step is necessary?

Copy link
Member

Choose a reason for hiding this comment

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

No, I'm asking if docker_build_and_push is necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both Docker Hub and GHA can host images. In that regard, the workflow here is kind of redundant. The only concern I have is whether other services are pulling the latest relation engine image from Docker Hub.

Copy link
Member

Choose a reason for hiding this comment

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

No services should be pulling images at all. Rancher may be pulling the image, but if you delete that chunk of the yaml the image will still be there, so next time we want to update we just switch docker to GHA

Copy link
Member

Choose a reason for hiding this comment

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

  • other than the catalog, and that's not for core services

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

coverage html --omit=*/test_*

# run importer/, relation_engine_server/, spec/, scripts/, and client_src/ tests
pytest -vv --cov=. --cov-branch --cov-report=term --cov-report=xml
Copy link
Member

Choose a reason for hiding this comment

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

Do you not need to exclude the test directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, done.

Copy link
Member

@MrCreosote MrCreosote left a comment

Choose a reason for hiding this comment

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

LGTM. @bio-boris do you want to review?

Copy link
Contributor

@bio-boris bio-boris left a comment

Choose a reason for hiding this comment

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

LGTM

@Xiangs18 Xiangs18 merged commit f352adf into develop Mar 24, 2025
12 checks passed
@Xiangs18 Xiangs18 deleted the dev-add_codecov branch March 24, 2025 20:58
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.

3 participants