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

path template may not match all of an artifact name when similar artifact is present #516

Open
dlinsley opened this issue Jan 7, 2025 · 0 comments
Labels

Comments

@dlinsley
Copy link
Contributor

dlinsley commented Jan 7, 2025

Describe the bug

Using an artifactory source

Files that do not fully match the path template can be recommended if they sufficiently match the {{.Name}} and {{.Version}} fields.

I do not know if this is artifactory release source specific yet,

Reproduction steps

Using Kiln 0.99.0

  1. have a Kiln file reference an artifactory release source where the path template expects compiled bosh releases
    ex: bosh-releases/compiled/{{.Name}}-{{.Version}}-{{.StemcellOS}}-{{.StemcellVersion}}.tgz
  2. have release source (bosh-releases/compiled) have following files where StemcellOS: smoothie, StemcellVersion: 9.9:
  • mango-2.3.4-notices.zip
  • mango-2.3.4-smoothie-9.9.tgz
  1. kiln find-release-version -r mango would return 2.3.4
  2. kiln update-release -n mango --version 2.3.4 updates the Kilnfile.lock

Expected behavior

Kilnfile.lock should reference mango-2.3.4-smoothie-9.9.tgz but instead references: mango-2.3.4-notices.zip

Expected all of the path template to be evaluated / match. But it looks like it just matched {{.Name}} and {{.Version}}, and ignored the stemcell parameters and suffix .tgz

Additional context

Updated tests that exhibit the behavior available on branch : artifactory-path-template-tests

@dlinsley dlinsley added the bug label Jan 7, 2025
@dlinsley dlinsley changed the title path template may not match all of a artifact name when similar artifact is present path template may not match all of an artifact name when similar artifact is present Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant