Skip to content

[#10478] feat(release): add gravitino-release skill and fix state-dir path bug#10479

Open
jerryshao wants to merge 4 commits intoapache:mainfrom
jerryshao:issue-10478
Open

[#10478] feat(release): add gravitino-release skill and fix state-dir path bug#10479
jerryshao wants to merge 4 commits intoapache:mainfrom
jerryshao:issue-10478

Conversation

@jerryshao
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • Adds dev/release/gravitino-release/SKILL.md: a Claude Code skill that acts as an interactive release manager, guiding through all 7 stages (tag, build, docs, publish, docker, finalize, release-note) with state tracking, mock mode, dry-run support, preflight checks, and credential collection.
  • Adds dev/release/mock/do-release.sh and dev/release/mock/publish-docker.sh: mock scripts that simulate all stages without real operations, for safe end-to-end testing of the skill.
  • Fixes STATE_DIR path bug in do-release.sh, mock/do-release.sh, and publish-docker.sh: the default .release-state was a relative path, causing state files to be written to the caller's working directory instead of alongside the scripts. Fixed to use $SELF/.release-state.
  • Fixes log file path bug in mock/do-release.sh: log files also used a relative path; fixed to use $SELF/${STEP}.log.

Why are the changes needed?

Fix: #10478

The release process is complex and multi-staged. Without structured tooling, a release manager must remember which stages have run, which credentials are needed, and how to recover from failures. The skill automates this orchestration. The state-dir bug caused state files to be scattered in unpredictable locations depending on where scripts were invoked from, breaking resume-after-failure behavior.

Does this PR introduce any user-facing change?

No API or property key changes. The skill and mock scripts are new developer tooling only.

How was this patch tested?

Tested end-to-end using mock mode (dev/release/mock/do-release.sh) with all 7 stages, including failure simulation via MOCK_FAIL_STAGE, dry-run mode, and resume-from-partial-state scenarios.

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.

Is the content of this file identical to that of dev/release/gravitino-release/SKILL.md? Can we use a symbolic link?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The one in the .claude is used for my test. My plan is to only maintain the skill in dev/release, users can manually install them in anywhere. WDYT?

@diqiu50
Copy link
Copy Markdown
Contributor

diqiu50 commented Mar 20, 2026

Overall, the workflow looks generally fine. One area for improvement would be to split this skill into multiple smaller skills to reduce context contamination.

You could use one skill to orchestrate the overall process, for example release-workflow, and then split the concrete execution steps into separate functional skills, such as:
• release-tag
• release-build (including build, docs, and license checks)
• publish-release
• finalize-release
• release-note
• ...

The release-workflow skill could then invoke these functional skills and handle them through sub-agents.

@jerryshao
Copy link
Copy Markdown
Contributor Author

Overall, the workflow looks generally fine. One area for improvement would be to split this skill into multiple smaller skills to reduce context contamination.

You could use one skill to orchestrate the overall process, for example release-workflow, and then split the concrete execution steps into separate functional skills, such as: • release-tag • release-build (including build, docs, and license checks) • publish-release • finalize-release • release-note • ...

The release-workflow skill could then invoke these functional skills and handle them through sub-agents.

My feeling is that using subagent is not so useful. Because the step has a sequence, it cannot be executed in parallel. And since I controlled the workflow, so currently there's no chance to skip the stages. The one concern is that this skill file is too big, but I've met any context window issue for now.

Yes, there's some advanced tricks to improve the skill file, I need to investigate more.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 20, 2026

Code Coverage Report

Overall Project 65.01% 🟢
Files changed No Java source files changed -

Module Coverage
aliyun 1.73% 🔴
api 47.14% 🟢
authorization-common 85.96% 🟢
aws 1.1% 🔴
azure 2.6% 🔴
catalog-common 10.0% 🔴
catalog-fileset 80.02% 🟢
catalog-hive 80.98% 🟢
catalog-jdbc-clickhouse 79.06% 🟢
catalog-jdbc-common 42.89% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.05% 🟢
catalog-jdbc-starrocks 78.27% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 45.07% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 87.25% 🟢
catalog-lakehouse-paimon 77.71% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.83% 🟢
common 49.42% 🟢
core 81.13% 🟢
filesystem-hadoop3 76.97% 🟢
flink 38.86% 🔴
flink-runtime 0.0% 🔴
gcp 14.2% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 45.82% 🟢
iceberg-common 50.0% 🟢
iceberg-rest-server 66.56% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 23.88% 🔴
lance-rest-server 57.84% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.62% 🟢
server-common 70.14% 🟢
spark 32.79% 🔴
spark-common 39.09% 🔴
trino-connector 31.62% 🔴

@jerryshao jerryshao marked this pull request as ready for review March 23, 2026 08:36
@jerryshao jerryshao self-assigned this Mar 23, 2026
@jerryshao jerryshao requested review from mchades and yuqi1129 March 23, 2026 08:47
Comment thread agent-skills/gravitino-release/SKILL.md
jerryshao and others added 4 commits March 31, 2026 14:17
…te-dir path bug

- Add dev/release/gravitino-release/SKILL.md: a Claude Code skill that
  guides the release manager through all 7 stages (tag, build, docs,
  publish, docker, finalize, release-note) with state tracking, mock
  mode, dry-run support, preflight checks, and credential collection.
- Add dev/release/mock/do-release.sh and mock/publish-docker.sh: mock
  scripts that simulate all stages without real operations, used for
  testing the skill end-to-end.
- Fix do-release.sh and mock/do-release.sh: STATE_DIR defaulted to a
  relative path (.release-state), causing state files to be written to
  the caller's working directory. Fixed to use $SELF/.release-state.
- Fix mock/do-release.sh: log files also used a relative path; fixed
  to use $SELF/${STEP}.log.
- Fix publish-docker.sh: same relative STATE_DIR bug; add SELF and
  anchor DOCKER_STATE_DIR to $SELF/.release-state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…kills and add README

- Move gravitino-release/ from dev/release/ to agent-skills/
- Update installation paths in SKILL.md to reflect new location
- Add README.md with usage instructions, prerequisites, and mock mode guide

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jerryshao
Copy link
Copy Markdown
Contributor Author

@mchades please help to review.

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 this pull request may close these issues.

[Improvement] Add gravitino-release Claude Code skill for automated release management

3 participants