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

tycho-p2-extras-plugin::compare-version-with-baselines Bug in Tycho 2.2.0 .. 2.6.0 for features with root files #562

Closed
beyerjsb opened this issue Jan 24, 2022 · 6 comments · Fixed by #571
Milestone

Comments

@beyerjsb
Copy link

beyerjsb commented Jan 24, 2022

We are seeing compare-version-with-baselines failing for features with root files. It works fine for features without root files. It's happening in Tycho 2.2.0 to Tycho 2.6.0 and also in Tycho 2.7.0-SNAPSHOT. It is not happening in Tycho 2.1.0.

Error message is:

[ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:2.5.0:compare-version-with-baselines (default) on project feature: Baseline and reactor have same fully qualified version, but with different content
[ERROR] different
[ERROR]    <files from feature IU>: not present in baseline
[ERROR]    <files from root IU>: present in baseline only

It seems it tries to compare the local main feature IU jar with the root files IU jar from the baseline.

See attached sample repo.

Run
mvn install
It will produce a repo to compare against (required step).
Since you don’t change anything, a compare with itself should result in no issues.

Run
mvn install -Pdo-baseline
It will fail with

[ERROR] Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:2.5.0:compare-version-with-baselines (default) on project feature: Baseline and reactor have same fully qualified version, but with different content
[ERROR] different
[ERROR]    META-INF/MANIFEST.MF: not present in baseline
[ERROR]    example.txt: present in baseline only
[ERROR]    feature.xml: not present in baseline

Run
mvn install -Pdo-baseline -Dtycho-version=2.1.0
It will run successfully and compare without issues – it does not happen in Tycho 2.1.0

Run
mvn install -Pdo-baseline -Dtycho-version=2.6.0
It will fail with same error message – it’s not fixed in Tycho 2.6.0
tychobug.zip

@mlehmannm
Copy link
Contributor

After debugging, it seems to me that tycho compares the main artifact and the attached artifact that contains the root files.
The attachment adds two lines to fix at least the provided example. I did not provide a pull request, because i don't know if this fixes all case. Please review the attached patch
tycho-562.patch.txt
.

@mickaelistria
Copy link
Contributor

I think it's worth a PR, and even better if you can add some integration test that showcases the bug and validates the fix.

@laeubi
Copy link
Member

laeubi commented Jan 26, 2022

@mlehmannm pleas still provide a PR:

  1. we cannot accept contributions from outside contributors without a valid ECA
  2. The build performs several unit- and integrationtest so we can see if it passes or not.

because of the second, please consider adding an integration test that shows this case fails.

@laeubi laeubi linked a pull request Jan 27, 2022 that will close this issue
@laeubi
Copy link
Member

laeubi commented Jan 27, 2022

Thanks for the fix, is there anything left for now or can we close this?

@beyerjsb
Copy link
Author

Can confirm that the latest 2.7.0-SNAPSHOT fixes the issue. It also works (just checked it) with features and root folders that are not coincidentally named root (e.g. build.properties says root=ex instead of root=root).

Thanks!

@laeubi laeubi closed this as completed Jan 27, 2022
@laeubi
Copy link
Member

laeubi commented Jan 27, 2022

@beyerjsb thanks for verification

@laeubi laeubi added this to the 2.7 milestone Jan 27, 2022
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 a pull request may close this issue.

4 participants