Skip to content

chore: Bump rules_testing to 0.4.0 from 0.0.5#1306

Merged
chrislovecnm merged 2 commits intobazel-contrib:mainfrom
rickeylev:rules_testing.0.4.0
Jul 11, 2023
Merged

chore: Bump rules_testing to 0.4.0 from 0.0.5#1306
chrislovecnm merged 2 commits intobazel-contrib:mainfrom
rickeylev:rules_testing.0.4.0

Conversation

@rickeylev
Copy link
Copy Markdown
Collaborator

@rickeylev rickeylev commented Jul 11, 2023

This uses the 0.4.0 release of rules_python, which has several features we can make use of

  • Various internal APIs have been made public
  • target_compatible_with can be set to skip tests by platform
  • Unit tests are easier to write

Also adds rules_license 0.0.7, which is a dependency of rules_testing.

Work towards #1297

This uses the 0.4.0 release of rules_python, which has several features
we can make use of
 * Various internal APIs have been made public
 * target_compatible_with can be set to skip tests by platform
 * Unit tests are easier to write

Work towards bazel-contrib#1297
@rickeylev rickeylev requested a review from chrislovecnm July 11, 2023 03:23
@rickeylev
Copy link
Copy Markdown
Collaborator Author

fyi @aignas this version of rules testing has the helpers that make writing unit tests easier

@aignas
Copy link
Copy Markdown
Collaborator

aignas commented Jul 11, 2023

Yeah, I bumped it in #1294 already, but I am happy to rebase/merge in once this is merged.

@aignas
Copy link
Copy Markdown
Collaborator

aignas commented Jul 11, 2023

I've found that I needed to also add rules_licence into the internal_deps.bzl to get it to work. I was having the following issue:

ERROR: /private/var/tmp/_bazel_ignas.anikevicius/4dee77d851edd2d6539c56c842f51cfb/external/rules_testing/BUILD:26:8: @rules_testing//:package_license: missing value for mandatory attribute 'license_kinds' in '_license' rule
ERROR: /private/var/tmp/_bazel_ignas.anikevicius/4dee77d851edd2d6539c56c842f51cfb/external/rules_testing/lib/BUILD:110:11: every rule of type do_nothing implicitly depends upon the target '@rules_testing//:package_license', but this target could not be found because of: Target '@rules_testing//:package_license' contains an error and its package is in error
ERROR: Analysis of target '//tests/pip_hub_repository/entry_point:template_is_interpolated_correctly' failed; build aborted:
INFO: Elapsed time: 9.603s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (11 packages loaded, 131 targets configured)
ERROR: Couldn't start the build. Unable to run tests

@chrislovecnm
Copy link
Copy Markdown
Contributor

chrislovecnm commented Jul 11, 2023

I've found that I needed to also add rules_licence into the internal_deps.bzl to get it to work. I was having the following issue:

ERROR: /private/var/tmp/_bazel_ignas.anikevicius/4dee77d851edd2d6539c56c842f51cfb/external/rules_testing/BUILD:26:8: @rules_testing//:package_license: missing value for mandatory attribute 'license_kinds' in '_license' rule
ERROR: /private/var/tmp/_bazel_ignas.anikevicius/4dee77d851edd2d6539c56c842f51cfb/external/rules_testing/lib/BUILD:110:11: every rule of type do_nothing implicitly depends upon the target '@rules_testing//:package_license', but this target could not be found because of: Target '@rules_testing//:package_license' contains an error and its package is in error
ERROR: Analysis of target '//tests/pip_hub_repository/entry_point:template_is_interpolated_correctly' failed; build aborted:
INFO: Elapsed time: 9.603s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (11 packages loaded, 131 targets configured)
ERROR: Couldn't start the build. Unable to run tests

Does this PR need to do that @aignas?

@chrislovecnm
Copy link
Copy Markdown
Contributor

@rickeylev see #1294 (review)

can we get that update here?

@rickeylev
Copy link
Copy Markdown
Collaborator Author

Does this PR need to upgrade rules_license

Not strictly, no. I think what's happening is the parts of rules_testing Ignas is using end up pulling in rules_license, while the parts we're currently using don't. CI is happy and all the existing rules_testing tests pass.

But sure, I can also add rules_license in this PR. Done.

@chrislovecnm
Copy link
Copy Markdown
Contributor

@rickeylev CI is being cranky

@rickeylev
Copy link
Copy Markdown
Collaborator Author

Flakes, all good now.

Copy link
Copy Markdown
Contributor

@chrislovecnm chrislovecnm left a comment

Choose a reason for hiding this comment

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

LGTM

@chrislovecnm chrislovecnm added this pull request to the merge queue Jul 11, 2023
Merged via the queue into bazel-contrib:main with commit 95ad6cc Jul 11, 2023
@rickeylev rickeylev deleted the rules_testing.0.4.0 branch July 11, 2023 16:35
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