pycontribs / jenkinsapi

A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
http://pypi.python.org/pypi/jenkinsapi
MIT License
858 stars 485 forks source link

Bug Report - Fingerprints can't be checked against filenames when multiple files have the same checksum #800

Open nichogenius opened 4 years ago

nichogenius commented 4 years ago
ISSUE TYPE
Jenkinsapi VERSION

0.3.11

Jenkins VERSION

Jenkins 2.235.5

SUMMARY

The jenkins fingerprint API only returns a single filename that matches any given artifact. If more than a single artifact shares the same checksum, the artifact is deemed broken due to a name mismatch. Disabling strict_validation has no effect.

EXPECTED RESULTS

Setting strict_validation to False allows valid checksums with invalid file names to save.

ACTUAL RESULTS

Any build with more than one artifact with the same checksum will fail to save.

USEFUL INFORMATION

Replication -

  1. Create two artifacts with the exact same content, but with different file names. Verify the checksums are identical.
  2. Attempt to use JenkinsAPI to save both artifacts.
  3. Observe one artifact saves fine because it matches the only filename returned for that checksum
  4. Observe one artifact throws a broken artifact exception because the checksum matches, but the filename does not.