Skip to content

change output of action - #32

Merged
giovanni-guidini merged 6 commits into
mainfrom
gio/change-output-of-action
Jan 3, 2024
Merged

giovanni-guidini merged 6 commits into
mainfrom
gio/change-output-of-action

Conversation

@giovanni-guidini

Copy link
Copy Markdown
Contributor

Currently the action sets envvars as outputs to run tests.
This is easier for the customer, but we've seen more than a few times
users hitting Linux or GHA command size limits because of the amount
of tests to run.

To solve this problem, the present changes move the output to files
created by the action.
It requires a different - more complicated - command to run tests,
as indicated in README.md, but should still be doable.
And should solve the command size problem too.

@codecov

codecov Bot commented Dec 18, 2023 •

Copy link
Copy Markdown

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (ccd3eab) 47.44% compared to head (efe8822) 48.83%.

Files Patch % Lines
dist/codecov_ats.sh 0.00% 15 Missing ⚠️
src/codecov_ats.sh 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   47.44%   48.83%   +1.39%     
==========================================
  Files           7        7              
  Lines         215      215              
==========================================
+ Hits          102      105       +3     
+ Misses        113      110       -3     
Flag Coverage Δ
bash 39.10% <52.94%> (+1.67%) ⬆️
smart-tests 97.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@giovanni-guidini
giovanni-guidini force-pushed the gio/change-output-of-action branch from 5657e1e to 6577ba2 Compare December 18, 2023 18:31
Comment thread dist/codecov_ats.sh Resolved
Comment thread dist/codecov_ats.sh Resolved
Comment thread .github/workflows/ci.yml Resolved
@giovanni-guidini
giovanni-guidini force-pushed the gio/change-output-of-action branch from ba4d4ed to 966dddb Compare December 22, 2023 16:04
@giovanni-guidini
giovanni-guidini force-pushed the gio/change-output-of-action branch 4 times, most recently from 8e07e7b to 27b1a31 Compare December 22, 2023 17:28
Comment thread .github/workflows/ci.yml Resolved
Comment thread dist/codecov_ats.sh Resolved
Comment thread src/codecov_ats.sh Resolved
Comment thread src/codecov_ats.sh
ats_tests_to_skip_array=($ats_tests_to_skip)

if [[ -z $ats_tests_to_skip ]]; then
say "$y==>$x No tests to skip, running all tests"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are the 2 cases here that I'd like to make sure we're doing.

  1. If no tests are selected to run, pick one at random (so that we dont' run all tests)
  2. If there are no tests to skip, don't pass in any tests so that it runs all tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Point 1 I understand, but can you clarify point 2?
You mean "don't pass any tests" to the tests to run?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wouldn't be to eager to do it if that's the case.

First because changing the action output is exactly to support this scenario, so it's unnecessary to treat this case differently.
Second because, if you think about it, there's a chance that not passing any info would actually cause us to tell the user to run more tests than passing them all, if the user configures collect_test_options. I do think this is unlikely to happen, but still possible.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh, that's a good point. I hadn't considered the collect_test_options

Currently the action sets envvars as outputs to run tests.
This is easier for the customer, but we've seen more than a few times
users hitting Linux or GHA command size limits because of the amount
of tests to run.

To solve this problem, the present changes move the output to files
created by the action.
It requires a different - more complicated - command to run tests,
as indicated in `README.md`, but should still be doable.
And should solve the command size problem too.
JSON requires more involvement of customers. .txt is Easier to use,
as suggested by @thomasrockhu-codecov
* fix some typos
* add random test in "ats_tests_to_run" if no test is selected to run

@thomasrockhu-codecov thomasrockhu-codecov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ship it

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