Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Changelog bot is broken #759

Closed
sappelhoff opened this issue Mar 16, 2021 · 3 comments · Fixed by #764
Closed

MAINT: Changelog bot is broken #759

sappelhoff opened this issue Mar 16, 2021 · 3 comments · Fixed by #764

Comments

@sappelhoff
Copy link
Member

The circleci changelog job is broken:

# Push built changelog to repo
Changelog-bot:
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
steps:
- setup_remote_docker:
version: 17.11.0-ce
- checkout
- attach_workspace:
at: ~/build
- deploy:
name: Changelog deployment
working_directory: ~/build
command: |
if (git log -1 --pretty=%s | grep Merge*) && (! git log -1 --pretty=%b | grep REL:) ; then
mv ~/build/tmp/CHANGES.md ~/build/src/CHANGES.md
merge_message=$(git log -1 | grep Merge | grep "pull")
PR_number=$(echo $merge_message | cut -d ' ' -f 4)
git config credential.helper 'cache --timeout=120'
git config user.email "bids.maintenance@gmail.com"
git config user.name "bids-maintenance"
git add ~/build/src/CHANGES.md
git commit -m "[DOC] Auto-generate changelog entry for PR ${PR_number}"
git push https://${CHANGE_TOKEN}@github.com/bids-standard/bids-specification.git master
else
echo "Commit or Release, do nothing"
fi

see the report: https://app.circleci.com/pipelines/github/bids-standard/bids-specification/2590/workflows/88816545-a3b1-4338-9dc9-76b09d1ea83b/jobs/6836

I don't know what the problem is right now. Most likely I screwed something up in #745 and #755.

If a fresh pair of eyes can find the problem, I'd be very grateful.

@sappelhoff
Copy link
Member Author

I started debugging this now on my fork: sappelhoff#14

@sappelhoff
Copy link
Member Author

sappelhoff commented Mar 25, 2021

One issue is that our linkcheck docker image yarikoptic/linkchecker:9.4.0.anchorfix1-1 does not have git, and never had git apparently.

This was somehow swallowed all this time, see some examples:

search for /bin/bash: git: command not found ... that one is always there, irrespective of the job succeeding or failing.

Somehow that doesn't show up as an error when wrapped into bash if-else, as we do:

if (! git log -1 --pretty=%b | grep REL:) ; then

Is it possible to simply add git to the image? @yarikoptic posted the build file here:

#!/bin/bash
# A script to build docker image with desired patched linkchecker
# using neurodocker
# TODOs:
# - minimize image (currently >500MB) using reprozip
# see https://github.com/kaczmarj/neurodocker/#minimize-existing-docker-image
# for instructions
# tag for patched linkchecker -- will also serve our image version
version="9.4.0.anchorfix1"
# docker image build
build=1
neurodocker generate docker \
--base neurodebian:nd100 \
--pkg-manager apt \
--install python-pip python-requests python-dnspython python-setuptools python-wheel \
--run "sed -e 's,^deb ,deb-src ,g' /etc/apt/sources.list > /etc/apt/sources.list.d/deb-sources.list \
&& apt-get update \
&& apt-get build-dep -y linkchecker \
&& pip install pyxdg https://github.com/yarikoptic/linkchecker/archive/$version.zip \
&& mkdir ~/.linkchecker && echo '[AnchorCheck]' > ~/.linkchecker/linkcheckerrc \
" \
--entrypoint /usr/local/bin/linkchecker \
| docker build -t yarikoptic/linkchecker:$version-$build -

@sappelhoff
Copy link
Member Author

sappelhoff commented Mar 25, 2021

I also find several issues in the "build pdf" step regarding images and characters not being available in a font. Worth investigating later.

These warnings look legitimate, especially in reference to the image files:

[WARNING] Duplicate link reference '[deprecated]' at line 2394 column 1
[WARNING] Duplicate link reference '[string]' at line 2396 column 1
[WARNING] Duplicate link reference '[strings]' at line 2398 column 1
[WARNING] Duplicate link reference '[uri]' at line 2414 column 1
[WARNING] Duplicate link reference '[strings]' at line 4302 column 1
[WARNING] Duplicate link reference '[string]' at line 4461 column 1
[WARNING] Duplicate link reference '[derived-dataset-description]' at line 4552 column 1
[WARNING] Could not fetch resource '../04-modality-specific-files/images/asl_pcasl_sequence.png': replacing image with description
[WARNING] Could not fetch resource '../04-modality-specific-files/images/asl_pcasl_labeling_pulses.png': replacing image with description
[WARNING] Could not fetch resource '../04-modality-specific-files/images/asl_pasl_boluscutoff_false.png': replacing image with description
[WARNING] Could not fetch resource '../04-modality-specific-files/images/asl_pasl_boluscutoff_true_quipssII.png': replacing image with description
[WARNING] Could not fetch resource '../04-modality-specific-files/images/asl_pasl_boluscutoff_true_q2tips.png': replacing image with description
[WARNING] Could not fetch resource '../04-modality-specific-files/images/asl_flowchart.png': replacing image with description
[WARNING] Missing character: There is no └ (U+2514) in font [lmmono10-regular]:!
[WARNING] Missing character: There is no ─ (U+2500) in font [lmmono10-regular]:!
[WARNING] Missing character: There is no ─ (U+2500) in font [lmmono10-regular]:!
[WARNING] Missing character: There is no └ (U+2514) in font [lmmono10-regular]:!
[WARNING] Missing character: There is no ─ (U+2500) in font [lmmono10-regular]:!
[WARNING] Missing character: There is no ─ (U+2500) in font [lmmono10-regular]:!
[WARNING] Missing character: There is no ├ (U+251C) in font [lmmono10-regular]:!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant