fix(docker): restore the patches/ directory the builder copies#2640
Merged
Conversation
The only patch file (patches/baileys+7.0.0-rc.6.patch) was dropped in dd552c7 when Baileys moved to rc13, which left the directory untracked. The builder still runs COPY ./patches ./patches before npm ci, so every image build since has failed with: failed to compute cache key: "/patches": not found. Keep the directory tracked (patch-package is still wired into postinstall) so the COPY resolves and a future patch works by just dropping in a .patch file.
Contributor
There was a problem hiding this comment.
Sorry @gomessguii, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A imagem Docker da
developnão builda desde 15/06 — todo push falha no passoBuild and push:Exemplo: run 29290412854.
Causa
dd552c77(PR #2575, chore(deps): atualização agressiva — Baileys rc13…) subiu o Baileys para7.0.0-rc13e removeu o patch que já não se aplicava (patches/baileys+7.0.0-rc.6.patch). Era o único arquivo do diretório, entãopatches/deixou de existir no repositório — mas oDockerfile:15continua comCOPY ./patches ./patchesantes donpm ci, e o buildkit não resolve um path que não existe no contexto.O workflow
publish_docker_image_homolog.ymlteve o último verde em 10/06 e falha em todos os pushes desde o merge do #2575. (Não é regressão do #2636; a quebra denpm run builddo mesmo commit foi tratada em EVO-2097 — o build da imagem ficou de fora.)Correção
Volta a versionar
patches/(via um README que explica a dependência).patch-packagecontinua ligado nopostinstalle na devDep, então:COPYresolve e a imagem volta a buildar;.patchno diretório.A alternativa — apagar o
COPYdo Dockerfile — deixaria uma armadilha: quem adicionasse um patch depois teria a imagem ignorando ele em silêncio.Validação
COPYdo Dockerfile (incluindo./patches) resolve contra o contexto real de build (reproduzida em build isolado). Antes:"/patches": not found.npx patch-packagecom o diretório sem nenhum.patchsai0(No patch files found) — opostinstalle oRUN npx patch-packagedo builder seguem no-op, sem quebrar onpm ci.