akuity / kargo

Application lifecycle orchestration
https://kargo.akuity.io/
Apache License 2.0
1.59k stars 137 forks source link

Extract information from git subscriptions as Freight metadata #836

Open jessesuen opened 1 year ago

jessesuen commented 1 year ago

Spawned from https://github.com/akuity/kargo/issues/832

A user who is only using git subscriptions, doesn't have much visibility into what is being promoted. Today they can only see the title of the git commit, and are forced to click around links in github to understand the details of the payload.

We could make this easier for them. For example, we should provide a way to surface image tags out of the YAML in git, and then present those image tags to the UI.

But why stop there? We could also provide users with customized ways to extra other information (e.g. jq query). All of this would be surfaced to the UI so that very easily, users could see exactly what is being promoted.

jaimin001 commented 1 year ago

Hello @jessesuen, I was trying to work on this issue and was breaking a problem into smaller steps:

  1. So we need to modify the buildValuesFilesChanges function to extract image tags from the YAML and include them in the changesByFile map. (for this we'll have to implement a function to extract image tag from YAML)
  2. Then we can update the UI to display the extracted tags with the git commit title.

Is this correct? (Correct me if I have misunderstood ; I am new to this 😅)

jessesuen commented 10 months ago

Another use case is to extract umbrella chart versions from git (https://github.com/akuity/kargo/issues/1256)

krancour commented 10 months ago

@jaimin001 sorry... I just noticed your comment from quite some time ago.

So we need to modify the buildValuesFilesChanges function to extract image tags from the YAML and include them in the changesByFile map. (for this we'll have to implement a function to extract image tag from YAML)

You are talking about the promotion process. i.e. Making commits to a git repo, while @jessesuen is talking about subscriptions. Extracting information from a commit in a git repo to which a Warehouse is subscribed. Those commits it reads won't usually have been written by Kargo. So, fundamentally, these are two unrelated concerns.