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

Remove no longer valid checksum properties #3902

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented May 31, 2024

Currently Tycho/P2 only adds checksums but as some are now disabled for publish this can lead to the case where an existing checksum is kept as-is.

This now performs and additional check if there are old checksums and remove them when recreate the repository.

This should fix

but a testcase is missing.

@laeubi laeubi added the backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change label May 31, 2024
Copy link

github-actions bot commented May 31, 2024

Test Results

  597 files    597 suites   4h 23m 11s ⏱️
  425 tests   418 ✅  7 💤 0 ❌
1 275 runs  1 253 ✅ 22 💤 0 ❌

Results for commit ca4c4a8.

♻️ This comment has been updated with latest results.

@mdaloia
Copy link
Contributor

mdaloia commented Jun 3, 2024

@laeubi Thanks for the fix!

I've made this Integration Test:
laeubi/tycho@fix_2875...mdaloia:tycho:fix_2875-integration-test

Questions:

  1. Are you ok with the test name? Open to hear suggestions
  2. Is is ok the structure? I went for a simple layout as a multi-module was not required.
  3. Is there any guidance about depending on an external Update Site? I saw that some repositories are committed here but I don't know if this is something wanted or not (as even when they are minimal repos they contribute to the total repo weight).
  4. Should I do a PR against your cloned Tycho repository or I do a separated PR agains the upstream Tycho repo directly and then you rebase this PR in order to get the test?

Thanks in advance!

@laeubi
Copy link
Member Author

laeubi commented Jun 3, 2024

  1. File name seems sufficient, in the past I have tried to map plugin-names to test names e.g. https://github.com/eclipse-tycho/tycho/tree/main/tycho-its/projects/tycho-version-plugin and https://github.com/eclipse-tycho/tycho/blob/main/tycho-its/src/test/java/org/eclipse/tycho/test/versionsplugin/TychoVersionsPluginTest.java but it is more something to better find things as a hard rule
  2. as simple as possible to demonstrate the issue is fine
  3. The general rule is: If we can use the "latest eclipse release" the use that but if not any external site is fine as well as long as it is quite reliable / stable
  4. Just open a PR against this repository, then we will see that the test actually shows the problem, I then usually cherry pick the commit to the branch that fixes the problem to prove the fix actually is a fix for the test-case and merge them together.

@mdaloia
Copy link
Contributor

mdaloia commented Jun 3, 2024

Thanks @laeubi !

I've PR #3921 with the Integration Test.

@mdaloia
Copy link
Contributor

mdaloia commented Jun 6, 2024

@laeubi As expected, #3921 failed in the new integration test:
https://ci.eclipse.org/tycho/job/tycho-github/job/PR-3921/2/testReport/

image

Can you review and cherry-pick it into your branch in order to test it pass with your modifications.

Thanks in advance

laeubi and others added 2 commits June 6, 2024 15:52
Currently Tycho/P2 only *adds* checksums but as some are now disabled
for publish this can lead to the case where an existing checksum is kept
as-is.

This now performs and additional check if there are old checksums and
remove them when recreate the repository.

Fix eclipse-tycho#2875
This integration test shows that `download.md5` and
`download.checksum.md5` are present after running the
`fix-artifacts-metadata` goal when they shouldn't.

If these are not removed and the content of the artifact changed then,
after the recalculation done by this goal, new p2 libs will see an
outdated value for these old checksum algorithms and will fail the
installation due to a checksum mismatch.
@laeubi
Copy link
Member Author

laeubi commented Jun 6, 2024

@mdaloia testcase should now be part of this PR!

@mdaloia
Copy link
Contributor

mdaloia commented Jun 7, 2024

@laeubi Well, it seems that it is all green! 👏🏻

@laeubi laeubi merged commit b88a16e into eclipse-tycho:main Jun 7, 2024
11 checks passed
@eclipse-tycho-bot
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

1 similar comment
@eclipse-tycho-bot
Copy link

💚 All backports created successfully

Status Branch Result
tycho-4.0.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@tivervac
Copy link
Contributor

I wonder whether this will also fix #4159. I'll confirm when I have the time to test on our side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-tycho-4.0.x Can be added to a PR to trigger an automatic backport of the change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants