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

Improve warning message with no digest found #493

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Mar 28, 2024

Currently the message only mentions the artifact to download but not where it originates from, this makes it very hard to analyze and fix the issue (actually one needs to to run a debugger).

This enhances the message a tiny little bit to mention the artifact descriptors repository URL.

Currently the message only mentions the artifact to download but not
where it originates from, this makes it very hard to analyze and fix the
issue (actually one needs to to run a debugger).

This enhances the message a tiny little bit to mention the artifact
descriptors repository URL.
@laeubi laeubi requested a review from merks March 28, 2024 11:34
Copy link
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

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

This looks fine.

We should consider if we can improve this to not log for local transfers, but this additional information should help make it clear when this is happening.

@@ -491,7 +491,8 @@ private OutputStream addPreSteps(ProcessingStepHandler handler, IArtifactDescrip
addChecksumVerifiers(descriptor, downloadChecksumSteps, skipChecksums, IArtifactDescriptor.DOWNLOAD_CHECKSUM);
if (downloadChecksumSteps.isEmpty() && !isLocal()) {
LogHelper.log(new Status(IStatus.WARNING, Activator.ID,
NLS.bind(Messages.noDigestAlgorithmToVerifyDownload, descriptor.getArtifactKey())));
Copy link
Contributor

Choose a reason for hiding this comment

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

Notice that this call is guarded by `!isLocal()" because of course if the repository is local, this is not a download.

@@ -94,7 +94,8 @@ protected IStatus getArtifact(IArtifactDescriptor artifactDescriptor, OutputStre
IArtifactDescriptor.DOWNLOAD_CHECKSUM, Collections.emptySet());
if (steps.isEmpty()) {
LogHelper.log(new Status(IStatus.WARNING, Activator.ID,
NLS.bind(Messages.noDigestAlgorithmToVerifyDownload, artifactDescriptor.getArtifactKey())));
NLS.bind(Messages.noDigestAlgorithmToVerifyDownload, artifactDescriptor.getArtifactKey(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I was hoping that we could avoid calling this if the artifact is local. See comment below...

@laeubi
Copy link
Member Author

laeubi commented Mar 28, 2024

I think the reason is because RawMirrorRequest is always against a remote, at least while debugging it really tries to download from a remote.

Copy link

Test Results

    9 files  +    6      9 suites  +6   31m 13s ⏱️ + 31m 13s
2 184 tests +2 158  2 180 ✅ +2 154   4 💤 + 4  0 ❌ ±0 
6 642 runs  +6 564  6 631 ✅ +6 553  11 💤 +11  0 ❌ ±0 

Results for commit ca09e6e. ± Comparison against base commit 9380637.

@laeubi laeubi merged commit 8afb86d into eclipse-equinox:master Mar 28, 2024
11 checks passed
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.

2 participants