fix: breaking GetRecipeVersions when an invalid recipe versions exist #750
Merged
decentral1se
merged 3 commits from 2026-02-13 21:51:48 +00:00
fixBrokenRecipeCheckout into main
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
bug
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Abra v0.13
Done
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#750
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.
Currently, for example on the zammad recipe, we have a problem when using
abra app newandabra app deploywhere an old version, in zammads case1.0.0+6.3.1-95is selected and deployed.This is due to invalid compose files in the tags 1.0.1+6.3.1-95, 1.0.2+6.3.1-95 and 1.0.3+6.3.1-95 which break GetRecipeVersions() to early, which prevents the detection of newer releases.
This change changes the behavior from erroring silently to warning the user about it and still iterating over the newer versions.
This results in this case for example in an output like this:
This also changes abra app deploy from directly using
app.Recipe.Tags()toapp.Recipe.GetRecipeVersions()so it is utilizing the same logic here.This should be reviewed carefully, because i might not undestand all implications here.
git fetch && git checkout fixBrokenRecipeCheckout && make build.abra app new zammadhas expected outputAmazing work @Apfelwurm, Can I nudge you to add some unit tests though?
gone back to WIP, to implement tests :)
Great stuff @Apfelwurm @ammaratef45 🔥
Some times it's a pain to unit test stuff that are in these huge main blocks. In that case, I would just make a simple integration test which does
abra app new zammadand checks for the warning output.I would generally hope that running all
app_deploy*.batsintegration tests (see here) would help make you feel better about whether this works or not 🙃It might seem like a lot but you can run the entire suite locally thanks to the work of @p4u1. We did our best with the docs: https://docs.coopcloud.tech/abra/hack/#running-them-locally more eyeballs and people diving in is extremely welcome!
I find it helpful to extract some of the code from the huge main block into a function to unit test, I don't know what is the norm for go developers though (this is the only project written in Go that I ever worked on lol)
This is basically also my first go project 😆 dog bless us all
@Apfelwurm any updates on this?
tried it this evening, but had problems with even running both the unit as well as the integration tests in a consistent manner locally, so i gave up for the day after like 1,5h :D
I think with another try and maybe some help (@p4u1 ? <3 :D ) i will get through it. Gonna need some time though, cause currently a lot is going on :)
Cool! no rush, let me know if I can help too
a51a3b57f6to58b789121958b7891219toc08314e1ccOh dear, let us know how we can help!
Everything seems to be passing atm... https://build.coopcloud.tech/toolshed/abra/3538
thank you @Apfelwurm for pointing me to this issue, I will keep an eye on it and once it's resolved and I will try and push the updates for zammad on abra.
ah, just seeing this message here :D
you can either do that, or just quickly clone the abra repo, check out the fixBrokenRecipeCheckout branch and run
make build && make installto use it. The changes are working and should not break anything else, the only thing missing are the tests as of right now :)c08314e1cctod155333e20finnaly looked into the integration tests together with @p4u1 and we wrote this simple one based on the zammad recipe.
We tried to custom build a broken test recipe for the case, but somehow we could not reproduce the initial problemetic behaviour there, which is quiet strange, but i think this is a result of some cascading bugs which i don't understand yet :'D
Non the less, this PR does what its supposed to and fixes zammad deployment :)
PS: For unit tests the time is currently sadly to sparse
🥇
@Apfelwurm the test seems to be failing on the nightly CI
Oh no :/ cant reproduce this locally, is this maybe a timeout issue in the recipe? we could theoretically remove the assert_success, since it is not 100% required to make sure that the fix does its job, since the used version is what we care about, but that feels kind of ugly :D Is there any easy way to get the logs? maybe we should also consider to implement some mechanism, that automatically prints the abra logs contents when executed in the ci?
Ah fuck it, let's just do
7c3364f87a🤸♀️huh, what does
--no-converge-checksdo?