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

Pass --no-changelog to auto shipit if changelog already has entry #5952

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Sep 2, 2021

Closes #5782.

@jwodder jwodder added the semver-internal Changes only affect the internal API label Sep 2, 2021
@jwodder jwodder changed the base branch from master to maint September 2, 2021 18:36
@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #5952 (74d99c7) into maint (dfdd352) will decrease coverage by 6.57%.
The diff coverage is 76.66%.

❗ Current head 74d99c7 differs from pull request most recent head a81e8b5. Consider uploading reports for the commit a81e8b5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##            maint    #5952      +/-   ##
==========================================
- Coverage   90.28%   83.71%   -6.58%     
==========================================
  Files         300      297       -3     
  Lines       42516    41375    -1141     
==========================================
- Hits        38387    34638    -3749     
- Misses       4129     6737    +2608     
Impacted Files Coverage Δ
datalad/consts.py 96.96% <ø> (-3.04%) ⬇️
datalad/customremotes/archives.py 63.37% <0.00%> (-0.22%) ⬇️
datalad/customremotes/datalad.py 40.32% <ø> (ø)
datalad/distribution/create_test_dataset.py 85.22% <ø> (-0.17%) ⬇️
datalad/distribution/install.py 97.75% <ø> (-1.13%) ⬇️
datalad/distribution/tests/test_get.py 80.30% <ø> (-19.70%) ⬇️
datalad/distribution/tests/test_uninstall.py 84.53% <ø> (-15.47%) ⬇️
datalad/dochelpers.py 87.76% <ø> (ø)
datalad/downloaders/http.py 78.52% <ø> (-0.78%) ⬇️
datalad/downloaders/tests/test_http.py 86.20% <ø> (-2.97%) ⬇️
... and 346 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfdd352...a81e8b5. Read the comment docs.

then echo "[ERROR] Could not compare new version '$new_version' to changelog version '$changelog_version'"
exit 1
fi
~/auto shipit $opts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elaborate but looks kosher... I was fearing that the empty $opts would freak out auto but my shell foo was weak -- should be ok unless it is "$opts":

lena:/tmp
$> opts=                   

$> ./printargs.sh 1 2 $opts
> 1
> 2

$> ./printargs.sh 1 2 "$opts"
> 1
> 2
> 

$> cat printargs.sh 
#!/bin/bash
for a in "$@"; do
    echo "> $a"
done

Copy link
Member

@yarikoptic yarikoptic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mih et al - please have a look too. With this custom-changelog-makers will not be ignored! ;)

@yarikoptic
Copy link
Member

ah -- it was rebased against maint, that is why probably linters complain!

@mih
Copy link
Member

mih commented Sep 3, 2021

So the approach will be to commit a changelog (or define its version) just before a release? Sounds good to me. Thx!

@yarikoptic
Copy link
Member

So the approach will be to commit a changelog (or define its version) just before a release? Sounds good to me. Thx!

yes. Can as well work if that CHANGELOG adding PR is the one which triggers the release (has release label) but note that IIRC it should be against maint branch. So pretty much it could be the PR which proposes to merge master into maint and has such a custom CHANGELOG entry and release label. IMHO kinda neat ;)

elif ! dpkg --compare-versions "$new_version" gt "$changelog_version"
then echo "[ERROR] Could not compare new version '$new_version' to changelog version '$changelog_version'"
exit 1
fi
Copy link
Member

@yarikoptic yarikoptic Sep 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an idea! @jwodder -- would it be possible to move this checking into a separate step(I guess not needed as a separate step, just don't ship it if in a PR), make this workflow run also on PRs which have release label, but without actually doing ~/auto shipit?
Then we could be certain that release PR is a kosher one.
Workflow should react on change to labels (like the other one).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarikoptic No, if the workflow is running on an open release PR, auto won't consider the project eligible for a release (as the PR isn't merged yet), and so auto shipit --dry-run --quiet will output nothing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn, it was a good idea! ;) just to make sure -- it wouldn't work even if we adjust "baseBranch": "maint" to point to current to PR merge branch (I guess there is none on github) in .autorc, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yarikoptic I think that wouldn't work, as then auto wouldn't pick up the PRs that had already been merged into maint, and so the version bump level would be potentially inaccurate.

@yarikoptic
Copy link
Member

ok, let's proceed on this in preparation for 0.15 . Should be glorious! ;)

@yarikoptic yarikoptic merged commit 5cd90e3 into datalad:maint Sep 7, 2021
@jwodder jwodder deleted the gh-5782 branch October 12, 2021 02:49
@jwodder jwodder added the release automation Automatic release and changelog generation label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release automation Automatic release and changelog generation semver-internal Changes only affect the internal API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance auto CHANGELOG generation
3 participants