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 create commit to empty-upload command #654

Merged
merged 3 commits into from
Mar 11, 2025

Conversation

michelletran-codecov
Copy link
Contributor

This is so that we can also create the commit before uploading. The create-commit is optional (i.e. if users don't pass in values, then their workflow shouldn't break). It will only create a commit if the values are passed.

This is so that we can also create the commit before uploading.
The create-commit is optional (i.e. if users don't pass in values, then their workflow shouldn't break).
It will only create a commit if the values are passed.
@michelletran-codecov michelletran-codecov force-pushed the 1250_create_commit_during_upload branch from cded5db to f9c8a47 Compare March 10, 2025 14:26
Copy link

github-actions bot commented Mar 10, 2025

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Copy link

codecov bot commented Mar 10, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
3580 5 3575 0
View the top 3 failed test(s) by shortest run time
api.temp.calculator.test_calculator::test_divide
Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError
api.temp.calculator.test_calculator::test_divide
Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError
api.temp.calculator.test_calculator::test_divide
Stack Traces | 0.001s run time
def
                test_divide():
                > assert Calculator.divide(1, 2) == 0.5
                E assert 1.0 == 0.5
                E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
                E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
                .../temp/calculator/test_calculator.py:30: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@michelletran-codecov michelletran-codecov requested a review from a team March 10, 2025 16:39
):
with sentry_sdk.start_transaction(op="task", name="Empty Upload"):
with sentry_sdk.start_span(name="empty_upload"):
enterprise_url = ctx.obj.get("enterprise_url")
args = get_cli_args(ctx)

if parent_sha and pull_request_number and branch:
Copy link
Contributor

Choose a reason for hiding this comment

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

is this necessary to check for? I would assume that not every empty_upload would be on a PR for example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh true. I added these here to check if I should create a commit. I don't want to call create commit if the user is not intending to create a commit (i.e. old workflow). But these fields were all optional for the create-commit command anyways, so maybe it's fine to remove the check. I'll check on this.

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 think we can remove the check. The create-commit logic seems to check that a commit exists before it adds, so it doesn't create duplicate updates.

@michelletran-codecov michelletran-codecov force-pushed the 1250_create_commit_during_upload branch from 05a0e33 to 0703f0f Compare March 11, 2025 00:21
This is because build is failing for 3.13
@michelletran-codecov michelletran-codecov force-pushed the 1250_create_commit_during_upload branch from 0703f0f to 9acf3ae Compare March 11, 2025 00:54
@michelletran-codecov michelletran-codecov force-pushed the 1250_create_commit_during_upload branch from 9acf3ae to 2e3d4c6 Compare March 11, 2025 01:00
@michelletran-codecov michelletran-codecov merged commit 30cba3f into main Mar 11, 2025
11 checks passed
@michelletran-codecov michelletran-codecov deleted the 1250_create_commit_during_upload branch March 11, 2025 14:36
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.

2 participants