Indicate latest revision fetched by any source
See original GitHub issueAs a user, I want to know what revision is currently fetched for any one of my sources.
There are three types of sources: HelmRepositories, GitRepositories and Buckets. Each of these sources will have fetched a specific version (aka. revision) of the source’s content. This will always be shown in the form of a SHA (see status.artifact.revision in the HelmRepository sample below). Display the first 7 characters of the revision together with the source, following VS Code Extension best practices - only requests are, should be constantly visible (avoid mouseover tips) but I have no issue with it being nested below the source’s node for example.
kubectl get helmrepository podinfo -o yaml
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"source.toolkit.fluxcd.io/v1beta1","kind":"HelmRepository","metadata":{"annotations":{},"name":"podinfo","namespace":"default"},"spec":{"interval":"5m","url":"https://stefanprodan.github.io/podinfo"}}
creationTimestamp: "2021-08-31T16:47:30Z"
finalizers:
- finalizers.fluxcd.io
generation: 2
name: podinfo
namespace: default
resourceVersion: "1257490"
uid: 258576df-4bfd-4dbb-9684-2928b06066bd
spec:
interval: 5m0s
timeout: 1m0s
url: https://stefanprodan.github.io/podinfo
status:
artifact:
checksum: 8411f23d07d3701f0e96e7d9e503b7936d7e1d56
lastUpdateTime: "2021-08-31T16:47:30Z"
path: helmrepository/default/podinfo/index-8411f23d07d3701f0e96e7d9e503b7936d7e1d56.yaml
revision: 8411f23d07d3701f0e96e7d9e503b7936d7e1d56
url: http://source-controller.flux-system.svc.cluster.local./helmrepository/default/podinfo/index-8411f23d07d3701f0e96e7d9e503b7936d7e1d56.yaml
conditions:
- lastTransitionTime: "2021-08-31T16:47:30Z"
message: 'Fetched revision: 8411f23d07d3701f0e96e7d9e503b7936d7e1d56'
reason: IndexationSucceed
status: "True"
type: Ready
observedGeneration: 2
url: http://source-controller.flux-system.svc.cluster.local./helmrepository/default/podinfo/index.yaml
The command to execute to get the data for a source as shown above is:
kubectl get <GitRepository or HelmRepository or Bucket> <source name> -o yaml -n {namespace}
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
How to use git to get just the latest revision of a project?
Use git clone with the --depth option set to 1 to create a shallow clone with a history truncated to the latest commit....
Read more >git-fetch Documentation - Git
Fetch branches and/or tags (collectively, "refs") from one or more other repositories, along with the objects necessary to complete their histories.
Read more >Sync with a remote Git repository (fetch, pull, update) - JetBrains
Fetch changes Fetched changes are stored as a remote branch, which gives you a chance to review them before you merge them with...
Read more >Git Fetch | Atlassian Git Tutorial
The git fetch command downloads commits, files, and refs from a remote repository into a local repo. Learn about additional uses and see...
Read more >Pull changes to your local Git repo - Azure - Microsoft Learn
Git fetch downloads any new commits that others uploaded to the remote repo. · Git merge integrates commits from one or more source...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Used
descriptionproperty on tree item to display revision.Git revision includes branch name:
main/593cf7b.@murillodigital looks like buckets don’t have a revision:
Please open another ticket with a link to this request if you want to use some other property from the json output above for the Bucket source type in our Sources tree view node description.