epics-containers / edge-containers-cli

command line shortcuts for epics containers developers
Apache License 2.0
3 stars 1 forks source link

Tagged update to ioc-instances not captured as service update #127

Closed marcelldls closed 2 months ago

marcelldls commented 2 months ago

After an update to the beamline-template, the latest tag is not available for ec deploy. The reason for this appears that the underlying git command does not follow symbolic links.

[esq51579@pc0146 bl01c]$ git diff --name-only HEAD HEAD^1
.copier-answers.yml
helm/shared/Chart.yaml
helm/shared/values.yaml
include/iocs/Chart.yaml

The expectation is that each service that points to include/iocs/Chart.yaml should also be flagged

marcelldls commented 2 months ago

If we are to continue supporting symlinks, we could :

[esq51579@pc0146 bl01c]$ git ls-tree HEAD~1 -r
100644 blob 536a21ff912856cea1111a7fcf88353e5558592d    .copier-answers.yml
100644 blob a37600f53c01039ddc520a752b02867418593b7c    .gitignore
100644 blob 180cdfe5daf56c8c6b5ae90f2d907ae3f546c9d7    .gitlab-ci.yml
100755 blob fabc26aae83c5cc4c7672abcdbf8016bce99d077    .gitlab/ci_verify.sh
100644 blob 506438f9fd583dda63fd21e366a7b56f59822639    LICENSE
100644 blob 6507d0d2d3b0d2d0c038277323d0052f10d334df    README.md
100755 blob 094a35a8fcf9116a51208a0236d1b45d011ae814    environment.sh
100644 blob 07db43f6f8271a1a4510db9626d92f2b35f7d6e9    helm/configmap/Chart.yaml
120000 blob 50ea7b23722ba00b07fe1c9f60d6adb7556dd05f    helm/configmap/services
100644 blob 51474e2af09393cb042dc742e345e7871b0b96cc    helm/configmap/templates/configmap.yaml
100644 blob b9eb0e95aed45d919fe9731bd15158400587aa64    helm/shared/Chart.yaml
100644 blob a842cd016c8c50d0058f2fc5c0d0739651daaa4b    helm/shared/README.md
100644 blob ff52b04937201658b4764ae740686bdc853ba03c    helm/shared/values.yaml
100644 blob fd9a14760f0e0730dd1ce40c0e64579b87d5838d    include/iocs/Chart.yaml
100644 blob 176b8fcdf9cc3c22180769f9add33152f7e4906c    include/iocs/templates/configmap.yaml
120000 blob a7be5a82efa06877a44294865f42d20ba4c031b1    services/bl01c-di-dcam-01/Chart.yaml
100644 blob 82efc5c294ea413034117ff211b98039d999ddcc    services/bl01c-di-dcam-01/config/ioc.yaml
120000 blob bea310f9534c43d28da9245c49dcc98018f6d0cc    services/bl01c-di-dcam-01/templates
...

Where 120000 indicates a symlink mode file. For each of these we can resolve the symlink and then check for changes to the target:

[esq51579@pc0146 bl01c]$ git cat-file -p a7be5a82efa06877a44294865f42d20ba4c031b1 
../../include/iocs/Chart.yaml
gilesknap commented 2 months ago

I'm aware that we have this issue.

If we document that all shared symlinks should go in helm and include then we can just monitor those folders. But your idea is more general if its not too much work.