Skip to content

GH-51098: [Release] Update CHANGELOG.md as a post release task - #51117

Open
kou wants to merge 3 commits into
apache:mainfrom
kou:release-changelog
Open

GH-51098: [Release] Update CHANGELOG.md as a post release task#51117
kou wants to merge 3 commits into
apache:mainfrom
kou:release-changelog

Conversation

@kou

@kou kou commented Sep 1, 2026

Copy link
Copy Markdown
Member

Rationale for this change

In the current release workflow, we update CHANGELOG.md only in the maintenance branches. So CHANGELOG.md in main misses entries.

We can update CHANGELOG.md in our release workflow.

What changes are included in this PR?

  • Run archery release changelog add in post-10-bump-versions.sh
  • Add missing entries to CHANGELOG.md

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

Copilot AI lite review requested due to automatic review settings September 1, 2026 02:18
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #51098 has been automatically assigned in GitHub to PR creator.

Comment on lines +75 to +77
if f'# Apache Arrow {version} (' in current_content:
raise ValueError(
f'CHANGELOG.md already contains the changelog of {version}!')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We may not need this check.

Comment on lines +74 to +79
if [ ${BUMP_CHANGELOG} -gt 0 ]; then
echo "Updating CHANGELOG.md for ${version}"
archery release changelog add ${version}
git add "${SOURCE_DIR}/../../CHANGELOG.md"
git commit -m "MINOR: [Release] Update CHANGELOG.md for ${version}"
fi

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@raulcd @amoeba Should we rename bump-versions file name? Updating changelog may not be "bump versions"...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't feel too strongly about needing to rename the file.

Comment thread CHANGELOG.md

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copied existing entries from CHANGELOG.md in existing tags.

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Arrow’s release automation so CHANGELOG.md on the default branch stays current by generating and committing changelog entries as part of the post-release version bump workflow, and adds supporting test/archery changes to make that workflow testable and idempotent.

Changes:

  • Add a post-release step in post-10-bump-versions.sh to run archery release changelog add and commit CHANGELOG.md.
  • Add/extend Ruby release-script tests to validate the changelog update behavior with deterministic output.
  • Add an environment-controlled limit on processed GitHub issues in Archery release tooling to speed up tests, and adjust changelog add to prevent duplicate insertion by checking file content.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
dev/release/post-10-bump-versions.sh Adds an optional post-release changelog update + commit step.
dev/release/post-10-bump-versions-test.rb Adds a new changelog test and time normalization helper for stable assertions.
dev/archery/archery/release/core.py Adds a test-oriented env var to limit fetched issues for changelog generation.
dev/archery/archery/release/cli.py Makes changelog add reject duplicates based on existing CHANGELOG.md content.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +141 to 144
max_issues = os.environ.get("ARCHERY_MAX_PROJECT_ISSUES")
if max_issues is not None:
issues = issues[:int(max_issues)]
return list(map(Issue.from_github, issues))
Comment on lines +490 to +494
def normalize_time(string)
string.gsub(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}/) do
normalized_time
end
end
Copilot AI review requested due to automatic review settings September 1, 2026 02:22
@kou
kou force-pushed the release-changelog branch from 4221612 to ff70bc5 Compare September 1, 2026 02:22
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

dev/archery/archery/release/core.py:143

  • ARCHERY_MAX_PROJECT_ISSUES is parsed with int(max_issues) without validation. If the env var is set to a non-integer (or a negative value), this will raise an unhelpful exception and break release tooling unexpectedly. Validate and raise a clearer error (or ignore the env var) before slicing.
        # This is only for testing. We can limit the number of issues
        # to be processed for faster testing.
        max_issues = os.environ.get("ARCHERY_MAX_PROJECT_ISSUES")
        if max_issues is not None:
            issues = issues[:int(max_issues)]

Comment thread dev/release/post-10-bump-versions.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 1, 2026 02:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (1)

dev/archery/archery/release/core.py:143

  • ARCHERY_MAX_PROJECT_ISSUES is parsed with int() without validation. If the environment variable is set to a non-integer (or a negative value), this will raise (or behave unexpectedly) in normal CLI usage, even though the knob is intended only for tests. Consider validating/handling parse errors and negative values to avoid surprising crashes.
        # This is only for testing. We can limit the number of issues
        # to be processed for faster testing.
        max_issues = os.environ.get("ARCHERY_MAX_PROJECT_ISSUES")
        if max_issues is not None:
            issues = issues[:int(max_issues)]

Copilot AI review requested due to automatic review settings September 2, 2026 01:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

A few changes introduce avoidable operational brittleness (credentials handling) and unvalidated env parsing that should be tightened before relying on this in the release workflow.

Review details

Suppressed comments (3)

Previously missed (2) — in code that hasn't changed since the last review.

dev/release/post-10-bump-versions.sh:79

  • archery release ... changelog add relies on GitHub API access, but this script doesn't ensure GH_TOKEN is available (unlike other release scripts that source utils-env.sh). This can make the post-release step flaky due to unauthenticated rate limits or missing credentials.
    dev/release/post-10-bump-versions-test.rb:24
  • @env is derived from the current working directory via File.expand_path(...), which makes the test sensitive to where it is invoked from. You already compute top_dir from __dir__; derive the .env path from that for stability.

dev/archery/archery/release/core.py:143

  • ARCHERY_MAX_PROJECT_ISSUES is converted with int(...) without validation; a non-integer (or negative) value will raise an unhelpful exception from deep inside the release tooling. Since this is an env knob, it’s worth validating and failing with a clear message.
        # This is only for testing. We can limit the number of issues
        # to be processed for faster testing.
        max_issues = os.environ.get("ARCHERY_MAX_PROJECT_ISSUES")
        if max_issues is not None:
            issues = issues[:int(max_issues)]
  • Files reviewed: 6/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Comment thread dev/archery/MANIFEST.in
include ../../NOTICE.txt

include archery/reports/*
include archery/templates/*

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

3830f05 introduced MANIFEST.in but it used templates/ not reports/.

@github-actions github-actions Bot removed the awaiting change review Awaiting change review label Sep 2, 2026
@github-actions github-actions Bot added the awaiting changes Awaiting changes label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants