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

--local-checkout-dir runs tests twice for plugins in the war #528

Closed
jtnord opened this issue Apr 19, 2023 · 1 comment · Fixed by #529
Closed

--local-checkout-dir runs tests twice for plugins in the war #528

jtnord opened this issue Apr 19, 2023 · 1 comment · Fixed by #529
Assignees
Labels

Comments

@jtnord
Copy link
Member

jtnord commented Apr 19, 2023

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

all

Reproduction steps

  • create a war which includes a plugin (e.g. warnings-ng)
  • clone the sources for the plugin to a local directory
  • run the pct and specify the local checkout directory (java -jar target\plugins-compat-tester-cli.jar test-plugins --war mywar.war` --working-dir=C:\workarea\temp\ --include-plugins=warnings-ng --local-checkout-dir=C:\workarea\source\github\jenkinsci\warnings-ng-plugin\

Expected Results

the tests for warnings-ng are only run from the local checkout

Actual Results

tests are run for both the version of warnings-ng in the war and the version in the local clone

Anything else?

I introduced this issue in #510, previously the behaviour was defined if you provided a single plugin id to be included in the command line, but did not work for multi-module checkouts.

I expect using --local-checkout-dir to use that checkout for the list of plugins to test, and ignore anything plugins in the war, as I expect this to be used mainly by developers either
a) trying to validate a fix to an issue is working (or even reproduce a specific issue)
b) test a plugin that is not in the war

@jtnord jtnord added the bug label Apr 19, 2023
@jtnord
Copy link
Member Author

jtnord commented Apr 19, 2023

IIUC neither the OSS BOM automation nor CloudBees' automation relies on testing plugins that are both included in the war and provided as a local checkout at the same time.

So I intend to change the behviour so that if you specify --local-checkout-dir then only plugins that are in the directory specified will be located for testing (ignoring any plugins in the war.

@jtnord jtnord self-assigned this Apr 19, 2023
jtnord added a commit that referenced this issue Apr 19, 2023
if `--local-checkout-dir` is provided then we only check plugins that
are in the directory specified (after filtering any includes/excludes)

Also re-introduces a simplification from Basil where each extractor will
throw MetadataExtractionException if no plugins (after filtering) are
found.

fixes #528
jtnord added a commit that referenced this issue Apr 19, 2023
if `--local-checkout-dir` is provided then we only check plugins that
are in the directory specified (after filtering any includes/excludes)

Also re-introduces a simplification from Basil where each extractor will
throw MetadataExtractionException if no plugins (after filtering) are
found.

fixes #528
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant