Add images & configs to deploy overview #657
Merged
3wordchant
merged 28 commits from 2025-09-09 17:22:06 +00:00
feature/3wc/550-deploy-overview into main
Dismiss Review
Are you sure you want to dismiss this review?
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#657
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #550
I can't remember why I didn't try and implement showing secret version diffs, but at this point I'd suggest opening a new ticket if we want that also.
Testing is a bit minimal so far; open to extending it.
Also, full disclosure (maybe we should have a policy about this), I used an LLM to get some inspiration for d775bcd76fabd5d48754e0cd264447a7f3b1263f . Most of the LLM-generated code has been completely rewritten by the time of this PR, it's all at least been human-reviewed.
@@ -200,3 +215,4 @@toDeployVersion,"",deployWarnMessages,strings.Join(secretInfo, "\n"),I would move the strings.Join to the deployOverview function
fa3e764fa6to428ffdfb88428ffdfb88to34934cf62d@@ -38,2 +39,4 @@return nil}func GetConfigNameAndVersion(fullName string, stackName string) (string, string, error) {A comment that describes how it works would be nice. Maybe with a small example
Amazing work! My comments are just a bunch of optional / minor stuff and mostly
i18n.Gbusy work to polish off? Merge away when you're happy with it. Thanks! It might be nice to squash all the commits into afeat: ...commit also for the changelog labours, if you fancy it.@@ -197,0 +208,4 @@}// Show deploy overviewRogue newline?
@@ -40,0 +43,4 @@name := strings.TrimPrefix(fullName, stackName+"_")if lastUnderscore := strings.LastIndex(name, "_"); lastUnderscore != -1 {return name[0:lastUnderscore], name[lastUnderscore+1:], nil} else {Can drop the
elseand justreturn ....@@ -0,0 +72,4 @@} else {// Just make sure the versions are the same..if existingConfigVersion != configVersion {log.Warnf("different versions for config '%s', '%s' and %s'", configBaseName, existingConfigVersion, configVersion)log.Warn(i18n.G("..."))@@ -0,0 +119,4 @@} else {// Just make sure the versions are the same..if existingImageVersion != imageTag {log.Warnf("different versions for image '%s', '%s' and %s'", imageBaseName, existingImageVersion, imageTag)log.Warn(i18n.G("..."))@@ -0,0 +129,4 @@}func GatherSecretsForDeploy(cl *dockerClient.Client, app appPkg.App) ([]string, error) {Rogue newline?
@@ -0,0 +154,4 @@return nil, err}log.Debugf("Deployed config names: %v", currentConfigs)log.Debug(i18n.G("..."))(lowercase)@@ -0,0 +161,4 @@var configInfo []stringfor configName := range newConfigs {log.Debugf("Searching abra.sh for version for %s", configName)log.Debug(i18n.G("..."))(lowercase)@@ -0,0 +165,4 @@versionKey := strings.ToUpper(configName) + "_VERSION"newVersion, exists := abraShEnv[versionKey]if !exists {log.Warnf("No version found for config %s", configName)log.Warn(i18n.G("..."))(lowercase)@@ -0,0 +166,4 @@newVersion, exists := abraShEnv[versionKey]if !exists {log.Warnf("No version found for config %s", configName)configInfo = append(configInfo, fmt.Sprintf("%s: ? (missing version)", configName))i18n.G("...")@@ -0,0 +173,4 @@if currentVersion, exists := currentConfigs[configName]; exists {if currentVersion == newVersion {if showUnchanged {configInfo = append(configInfo, fmt.Sprintf("%s: %s (unchanged)", configName, newVersion))i18n.G("...")@@ -0,0 +179,4 @@configInfo = append(configInfo, fmt.Sprintf("%s: %s → %s", configName, currentVersion, newVersion))}} else {configInfo = append(configInfo, fmt.Sprintf("%s: %s (new)", configName, newVersion))i18n.G("...")@@ -0,0 +187,4 @@}func GatherImagesForDeploy(cl *dockerClient.Client, app appPkg.App, compose *composetypes.Config, showUnchanged bool) ([]string, error) {Rogue newline?
@@ -0,0 +194,4 @@return nil, err}log.Debugf("Deployed images: %v", currentImages)log.Debug(i18n.G("..."))(lowercase)@@ -0,0 +215,4 @@} else {// Just make sure the versions are the same..if existingImageVersion != imageTag {log.Warnf("different versions for image '%s', '%s' and %s'", imageBaseName, existingImageVersion, imageTag)log.Warn(i18n.G("..."))@@ -0,0 +219,4 @@}}}log.Debugf("Proposed images: %v", newImages)log.Debug(i18n.G("..."))(lowercase)@@ -0,0 +226,4 @@if currentVersion, exists := currentImages[newImageName]; exists {if currentVersion == newImageVersion {if showUnchanged {imageInfo = append(imageInfo, fmt.Sprintf("%s: %s (unchanged)", formatter.StripTagMeta(newImageName), newImageVersion))i18n.G("...")@@ -0,0 +232,4 @@imageInfo = append(imageInfo, fmt.Sprintf("%s: %s → %s", formatter.StripTagMeta(newImageName), currentVersion, newImageVersion))}} else {imageInfo = append(imageInfo, fmt.Sprintf("%s: %s (new)", formatter.StripTagMeta(newImageName), newImageVersion))i18n.G("...")Awesome, thanks both, merging!
Add images, configs, secrets to deploy overviewto Add images & configs to deploy overview