Skip to content

ARROW-11317: [Rust] Include the prettyprint feature in CI Coverage - #9262

Closed
alamb wants to merge 2 commits into
apache:masterfrom
alamb:alamb/run_prettyprint_ci
Closed

ARROW-11317: [Rust] Include the prettyprint feature in CI Coverage#9262
alamb wants to merge 2 commits into
apache:masterfrom
alamb:alamb/run_prettyprint_ci

Conversation

@alamb

@alambalamb commented Jan 19, 2021

Copy link
Copy Markdown
Contributor

This PR changes the Rust CI job to include the prettyprint feature. (so we have CI coverage of that feature)

As @paddyhoran noted, passing in feature flags to the root workspace doesn't do anything, and as it turns out we already invoke cargo test for the arrow crate separately. Prior to this PR I think that just ran the same tests again with the same features. After this PR, the second run of the arrow tests are run with the prettyprint feature

Here is evidence that the tests are running twice. I picked a PR (randomly)
https://github.com/apache/arrow/pull/9258/checks?check_run_id=1725967358

If you look at the logs for the run-tests action
Screen Shot 2021-01-19 at 7 42 13 AM

You can see that the same test is run twice:

2021-01-19T07:02:49.9476111Z test compute::kernels::boolean::tests::test_nonnull_array_is_not_null ... ok
2021-01-19T07:02:49.9476854Z test compute::kernels::boolean::tests::test_nonnull_array_is_null ... ok
2021-01-19T07:02:49.9477616Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_not_null ... ok
2021-01-19T07:02:49.9478427Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_null ... ok
2021-01-19T07:02:49.9479207Z test compute::kernels::boolean::tests::test_nullable_array_is_null ... ok
2021-01-19T07:02:49.9479948Z test compute::kernels::boolean::tests::test_nullable_array_is_not_null ... ok
2021-01-19T07:02:49.9480744Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_not_null ... ok
2021-01-19T07:02:49.9481640Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_null ... ok
2021-01-19T07:02:49.9487019Z test compute::kernels::boolean::tests::test_nullif_int_array_offset ... ok
2021-01-19T07:02:49.9487773Z test compute::kernels::boolean::tests::test_nullif_int_array ... ok
...
2021-01-19T07:07:23.4568865Z test compute::kernels::boolean::tests::test_nonnull_array_is_not_null ... ok
2021-01-19T07:07:23.4569576Z test compute::kernels::boolean::tests::test_nonnull_array_is_null ... ok
2021-01-19T07:07:23.4570337Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_not_null ... ok
2021-01-19T07:07:23.4571133Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_null ... ok
2021-01-19T07:07:23.4571885Z test compute::kernels::boolean::tests::test_nullable_array_is_not_null ... ok
2021-01-19T07:07:23.4572614Z test compute::kernels::boolean::tests::test_nullable_array_is_null ... ok
2021-01-19T07:07:23.4573383Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_not_null ... ok
2021-01-19T07:07:23.4574183Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_null ... ok
2021-01-19T07:07:23.4574929Z test compute::kernels::boolean::tests::test_nullif_int_array ... ok
2021-01-19T07:07:23.4575636Z test compute::kernels::boolean::tests::test_nullif_int_array_offset ... ok

@alamb
alambforce-pushed the alamb/run_prettyprint_ci branch from 1e5dc72 to f0b002fCompareJanuary 19, 2021 12:52
Comment thread.github/workflows/rust.yml Outdated

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

this appears to run all the arrow tests twice -- once in the main workspace and once in the arrow crate again. I am not sure that is adding any value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was introduced when I was trying to test the SIMD and non-SIMD versions of the code. Feature options were not being respected within the sub-crates when supplied at the workspace level, see here. So the solution was to move into the sub-crate to enable/disable the feature.

Quickly reading through the cargo issues, it's not clear that this has been resolved yet.

@alambalambJan 19, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

AH, that makes sense @paddyhoran -- I think the feature flag test for simd got moved to an entire different job, namely the linux-test-simd job below. I think I need to re-instante the second CI test but run the tests with the pretty print option. I'll try and do that tomorrow

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

In fact the CI test failed, exactly as you predicted https://github.com/apache/arrow/runs/1727917047 -- namely that you can't specify --features in the root of the workspace:

Run export CARGO_HOME="/github/home/.cargo"
error: --features is not allowed in the root of a virtual workspace
note: while this was previously accepted, it didn't actually do anything
help: change the current directory to the package directory, or use the --manifest-path flag to the path of the package
Error: Process completed with exit code 101.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A solution could be to exclude arrow from the initial cargo test, then test it after cd arrow, with the prettyprint (and other future) feature.

Or has this been resolved?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

It has been resolved (though the resolution was to keep running the tests for arrow twice)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To be fair, running the arrow tests is a second or so, so the harm is pretty small. Re-compiling DataFusion's dependencies would have been a different beast ^_^

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Is everyone ok if I merge this in I think it will have minimal effect on overall test times (will require arrow to get recompiled one additional time I think)

@alamb
alamb marked this pull request as ready for review January 19, 2021 12:53
@github-actions

Copy link
Copy Markdown

@codecov-io

codecov-io commented Jan 19, 2021

Copy link
Copy Markdown

Codecov Report

Merging #9262 (063a7c8) into master (e7c69e6) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #9262 +/- ##
=======================================
Coverage 81.62% 81.62% =======================================
Files 215 215 Lines 52520 52520 =======================================
+ Hits 42870 42871 +1 + Misses 9650 9649 -1 
Impacted FilesCoverage Δ
rust/parquet/src/encodings/encoding.rs95.05% <0.00%> (+0.19%)⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7c69e6...063a7c8. Read the comment docs.

@alamb
alambforce-pushed the alamb/run_prettyprint_ci branch from f0b002f to 063a7c8CompareJanuary 20, 2021 11:41
@alambalamb changed the title ARROW-11317: Run tests once in CI (not twice) and include prettyprint featureARROW-11317: [Rust] Include the prettyprint feature in CI CoverageJan 20, 2021
@alamb

alamb commented Jan 20, 2021

Copy link
Copy Markdown
ContributorAuthor

You can now see that the pretty print tests are running:

Screen Shot 2021-01-20 at 8 12 13 AM

kszucs pushed a commit that referenced this pull request Jan 25, 2021
This PR changes the Rust CI job to include the prettyprint feature. (so we have CI coverage of that feature)
As @paddyhoran noted, passing in feature flags to the root workspace doesn't do anything, and as it turns out we already invoke `cargo test` for the `arrow` crate separately. Prior to this PR I think that just ran the same tests again with the same features. After this PR, the second run of the arrow tests are run with the `prettyprint` feature
Here is evidence that the tests are running twice. I picked a PR (randomly)
https://github.com/apache/arrow/pull/9258/checks?check_run_id=1725967358
If you look at the logs for the run-tests action
![Screen Shot 2021-01-19 at 7 42 13 AM](https://user-images.githubusercontent.com/490673/105036642-c4188680-5a2a-11eb-8968-c570d855724e.png)
You can see that the same test is run twice:
```
2021-01-19T07:02:49.9476111Z test compute::kernels::boolean::tests::test_nonnull_array_is_not_null ... ok
2021-01-19T07:02:49.9476854Z test compute::kernels::boolean::tests::test_nonnull_array_is_null ... ok
2021-01-19T07:02:49.9477616Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_not_null ... ok
2021-01-19T07:02:49.9478427Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_null ... ok
2021-01-19T07:02:49.9479207Z test compute::kernels::boolean::tests::test_nullable_array_is_null ... ok
2021-01-19T07:02:49.9479948Z test compute::kernels::boolean::tests::test_nullable_array_is_not_null ... ok
2021-01-19T07:02:49.9480744Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_not_null ... ok
2021-01-19T07:02:49.9481640Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_null ... ok
2021-01-19T07:02:49.9487019Z test compute::kernels::boolean::tests::test_nullif_int_array_offset ... ok
2021-01-19T07:02:49.9487773Z test compute::kernels::boolean::tests::test_nullif_int_array ... ok
...
2021-01-19T07:07:23.4568865Z test compute::kernels::boolean::tests::test_nonnull_array_is_not_null ... ok
2021-01-19T07:07:23.4569576Z test compute::kernels::boolean::tests::test_nonnull_array_is_null ... ok
2021-01-19T07:07:23.4570337Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_not_null ... ok
2021-01-19T07:07:23.4571133Z test compute::kernels::boolean::tests::test_nonnull_array_with_offset_is_null ... ok
2021-01-19T07:07:23.4571885Z test compute::kernels::boolean::tests::test_nullable_array_is_not_null ... ok
2021-01-19T07:07:23.4572614Z test compute::kernels::boolean::tests::test_nullable_array_is_null ... ok
2021-01-19T07:07:23.4573383Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_not_null ... ok
2021-01-19T07:07:23.4574183Z test compute::kernels::boolean::tests::test_nullable_array_with_offset_is_null ... ok
2021-01-19T07:07:23.4574929Z test compute::kernels::boolean::tests::test_nullif_int_array ... ok
2021-01-19T07:07:23.4575636Z test compute::kernels::boolean::tests::test_nullif_int_array_offset ... ok
```
Closes#9262 from alamb/alamb/run_prettyprint_ci
Authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Signed-off-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.62%. Comparing base (e7c69e6) to head (063a7c8).

Additional details and impacted files
@@ Coverage Diff @@## master #9262 +/- ##
=======================================
Coverage 81.62% 81.62% =======================================
Files 215 215 Lines 52520 52520 =======================================
+ Hits 42870 42871 +1 + Misses 9650 9649 -1 

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@alamb@codecov-io@codecov-commenter@vertexclique@nevi-me@jorgecarleitao@paddyhoran