Skip to content

Conversation

fuskovic
Copy link
Member

@fuskovic fuskovic commented Aug 27, 2025

Closes: #4899

@fuskovic fuskovic requested a review from a team as a code owner August 27, 2025 12:22
Copy link

netlify bot commented Aug 27, 2025

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit ce2d201
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/68af2e34d541b80008a41c7b
😎 Deploy Preview https://deploy-preview-4945.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.62%. Comparing base (ec211d2) to head (ce2d201).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/webhook/external/artifactory.go 60.00% 10 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4945   +/-   ##
=======================================
  Coverage   54.61%   54.62%           
=======================================
  Files         401      401           
  Lines       34813    34818    +5     
=======================================
+ Hits        19014    19018    +4     
  Misses      14842    14842           
- Partials      957      958    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: fuskovic <[email protected]>
@fuskovic fuskovic marked this pull request as ready for review August 27, 2025 16:10
@fuskovic fuskovic requested a review from a team as a code owner August 27, 2025 16:10
Signed-off-by: fuskovic <[email protected]>
Comment on lines +146 to +152
:::info
The value of `X-Kargo-Repo-URLs` can either be a single repository URL
or a comma-separated list of repository URLs. If set, any warehouses
with subscriptions to the designated repository URL(s) will be
refreshed. This can be useful for repositories with unconventional
naming schemes or self-hosted instances.
:::
Copy link
Member

@krancour krancour Aug 27, 2025

Choose a reason for hiding this comment

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

A few things I would worry about:

If you register one webhook for many repos, you may have a lot of different repos to list here as part of the header value. Apart from being onerous, my worry is that it leads to unnecessary refresh of many Warehouses.

If wishing to avoid the problem above, it would compel a user to register many webhooks for one repo apiece, with just one repo URL in the header. This also seems onerous.

I'd initially been thinking we were only going to provide a way to relay the information that may be missing from the request's jpd_origin field. i.e. A way to say, "here's the base domain name for this entire registry" and leave it at that.

But before we get to far into what the implementation options are here, I think we should wait for a response to this comment, because if an empty jdp_origin field is the result of misconfiguration (or if not mis-configuration, still a problem that can be resolved via configuration) then we may not need a new header. We may be able to get by with simply adding a note to the docs about the need for jdp_origin to not be empty and how to configure that correctly.

We may still need to do something with a new header, but let's table it until we have an answer to that comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

We had a user that had the repo key prepended as the subdomain. The one that was building a middleware service to intercept and modify the request before proxying to Kargo. The jdp_origin field was set in his situation but that still doesn't solve his problem. Or other users in a similar situation for that matter. I think it's still a viable option for these kind of situations since they have no alternative.

Copy link
Member

Choose a reason for hiding this comment

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

We spoke offline, but to summarize here for anyone following along, I agree that what you've PR'ed here solves for tricky cases that my original idea doesn't. So I'm not completely closed off to the idea. But I do want us to get more information about configuration (or mis-configuration, as the case may be) of self-hosted Artifactory and, ideally, get hands-on experience with it too before we commit to moving in any specific direction here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

artifactory webhook receiver: honor an optional, custom http header containing registry base url info
2 participants