Skip to content

Better checksum control#1784

Merged
cstamas merged 4 commits intoapache:masterfrom
cstamas:issue-1782
Feb 4, 2026
Merged

Better checksum control#1784
cstamas merged 4 commits intoapache:masterfrom
cstamas:issue-1782

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Feb 2, 2026

Ability to explicitly configure checksums for download (used to validate during donwloads) and for uploads (generated during uploads).

Fixes #1782

Ability to explicitly configure checksums for download
(used to validate during donwloads) and for uploads
(generated during uploads).

Fixes apache#1782
@cstamas cstamas added this to the 2.0.15 milestone Feb 2, 2026
@cstamas cstamas self-assigned this Feb 2, 2026
@cstamas cstamas added the enhancement New feature or request label Feb 2, 2026
@cstamas cstamas marked this pull request as ready for review February 2, 2026 17:44
CONFIG_PROPS_PREFIX + "uploadChecksumAlgorithms";

/**
* Comma-separated list of checksum algorithms with which checksums are validated (downloaded) with this layout.
Copy link
Member

Choose a reason for hiding this comment

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

Please mention which one takes precedence if both CONFIG_PROP_CHECKSUMS_ALGORITHMS and this is set.

// explicit property for download (will be empty if not configured)
List<String> downloadChecksumsAlgorithmNames = ConfigUtils.parseCommaSeparatedUniqueNames(ConfigUtils.getString(
session,
null,
Copy link
Member

Choose a reason for hiding this comment

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

why not passing checksumsAlgorithmNames as default.

// explicit property for upload (will be empty if not configured)
List<String> uploadChecksumsAlgorithmNames = ConfigUtils.parseCommaSeparatedUniqueNames(ConfigUtils.getString(
session,
null,
Copy link
Member

Choose a reason for hiding this comment

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

same here

CONFIG_PROP_UPLOAD_CHECKSUMS_ALGORITHMS));

return new Maven2RepositoryLayout(
checksumAlgorithmFactorySelector.selectList(
Copy link
Member

Choose a reason for hiding this comment

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

instead of implementing the fallback here I would rather do it above.

* Returns immutable list of {@link ChecksumAlgorithmFactory} this instance of layout uses for download or upload,
* never {@code null}. The order also represents the order how remote external checksums are retrieved and
* validated (if for download).
*
Copy link
Member

Choose a reason for hiding this comment

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

There is a missing @param here.

@cstamas
Copy link
Member Author

cstamas commented Feb 3, 2026

@kwin applied PR comments

Copy link
Member

@kwin kwin left a comment

Choose a reason for hiding this comment

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

Thanks, looks good now.

@cstamas
Copy link
Member Author

cstamas commented Feb 3, 2026

The reason I did fallback as I did, is that I wanted to detect what is set (now we do not) and maybe log something, but IMO that would be superfluous.... so am happy with it like this.

@cstamas cstamas merged commit 70696c0 into apache:master Feb 4, 2026
13 of 14 checks passed
@cstamas cstamas deleted the issue-1782 branch February 4, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better checksum control

2 participants