lizhimins opened a new issue, #4379:
URL: https://github.com/apache/rocketmq-dashboard/issues/4379
### Summary
RocketMQ Studio has been the active development line of this repository, but
it lived on the
`rocketmq-studio` branch while `master` still carried the legacy
rocketmq-dashboard code.
**That is now reversed: `master` is RocketMQ Studio.**
- `master` now points at the former `rocketmq-studio` head (`e5ac52440`) —
**the same code and
the same commit history**, on the repository default branch. All 661
Studio commits are
reachable from `master`.
- The legacy dashboard code that used to be on `master` is preserved on
**`master_archive`**
(`770822bbc`). Every old commit SHA still resolves.
- The `rocketmq-studio` branch has been deleted.
- The pull requests that were based on `rocketmq-studio` **are still open**,
but their base
branch no longer exists, so GitHub marks them as not mergeable. See
"Action required" below —
changing the base to `master` is enough, no rebase needed.
- `CONTRIBUTING.md`, the issue templates and the pull request template are
on their way to
`master` via the follow-up pull requests linked at the bottom.
### Why
1. **The default branch should be the branch people contribute to.** GitHub
pre-selects the
default branch as the base for new pull requests. With Studio on a side
branch, a large
share of incoming pull requests were opened against the wrong base and
had to be retargeted
or closed — before the switch, 982 open pull requests were based on
`rocketmq-studio` and 25
on the old `master`.
2. **GitHub only reads some configuration from the default branch.** Issue
templates, the pull
request template and scheduled workflows (`on.schedule`) are resolved
from the default
branch, and ASF infrastructure reads `.asf.yaml` from it too. Keeping the
Studio trunk on
`master` makes all of them work without touching repository settings we
do not control.
3. **Nothing is lost.** The legacy dashboard history is on `master_archive`,
and Studio's own
history is untouched — `master` is exactly the commit graph that
`rocketmq-studio` was.
### Action required
**1. New work — branch from `master`**
```bash
git remote add upstream https://github.com/apache/rocketmq-dashboard.git
git fetch upstream master
git checkout -b <your-topic> upstream/master
```
Open the pull request against `master` (the default, so normally there is
nothing to change).
**2. Your local `master` still has the old dashboard history — reset it**
`master` was replaced, not fast-forwarded, so a plain `git pull` will not
work:
```bash
git fetch upstream
git checkout -B master upstream/master
```
If you had local work on the old `master`, save it first (`git branch
my-old-work master`
before the reset). That line of code is archived on `master_archive` and no
longer developed.
**3. Your pull request was based on `rocketmq-studio` — change its base to
`master`**
Deleting a base branch does not close pull requests, so yours is still open;
it just cannot be
merged while its base is missing. Point it at `master`:
- on the pull request page: `Edit` next to the title → change `base` to
`master`, or
- from the CLI: `gh pr edit <N> --repo apache/rocketmq-dashboard --base
master`
`master` points at the very commit your pull request was based on, so the
diff and the whole
review history stay intact and **no rebase is needed**. If you cannot change
the base yourself,
comment on the pull request and a maintainer will do it.
**4. Pull requests against the old dashboard `master`**
The 25 pull requests that targeted the legacy dashboard code were closed
automatically by
GitHub when `master` was replaced — a pull request whose base history no
longer contains its
head commits cannot stay open. Nothing was merged and nothing was deleted:
that code is
archived on `master_archive` and your fork branch still exists. If the
change is relevant for
RocketMQ Studio, please rework it against the current `master` and open a
new pull request.
**5. Everything else is unchanged**
- Java package root `org.apache.rocketmq.studio`
- Squash merge only, commit subject without a `[Studio]` prefix and with the
`(#N)` suffix
- Contribution flow: open an issue first, discuss non-trivial designs there,
then send the
pull request — see `CONTRIBUTING.md`
- Note the **stale bot**: issues and pull requests with no activity for 7
days are closed
automatically (`.github/workflows/stale.yml`); comment to reset the timer
or ask for the
`pinned` label
### Maintainer follow-up
- [x] Create `master_archive` at the old `master` SHA `770822bbc` before
replacing `master`
- [x] Point `master` at the Studio trunk (`e5ac52440`) and delete
`rocketmq-studio`
- [ ] Merge the repository configuration pull request: `.asf.yaml` (copied
verbatim from the
previous `master`, so squash-only merging and the
`[email protected]`
notification routing are unchanged), the stale workflow, and the CI
triggers moving from
`rocketmq-studio` to `master`
- [ ] Merge the contributor documentation pull request: `CONTRIBUTING.md`,
the four issue
templates, the pull request template and the branch note in both
READMEs. The issue
templates only appear in the "New issue" chooser once they are on the
default branch
- [ ] Retarget the pull requests that were based on `rocketmq-studio` to
`master` on request
- [ ] Comment on the 25 pull requests that GitHub closed, so none of them is
a silent closure
- [ ] Decide what happens to the legacy 2021 `develop` branch (`21c2c3a2e`,
unrelated history)
- [ ] Fix CI: every workflow run in this repository currently ends in
`startup_failure`,
including the run triggered by the new `master`, so there is no
automated gate at all
(pre-existing, not caused by this switch)
### FAQ
**Is the old rocketmq-dashboard code lost?**
No. It is on `master_archive`, and every commit SHA from the old `master`
still resolves.
**Do I need to rebase my pull request?**
No. `master` is the same commit graph that `rocketmq-studio` was, so after
changing the base
the diff is identical. Rebase only if your change conflicts with commits
merged after the
switch.
**Why were the 25 old-dashboard pull requests closed?**
Their base branch history was replaced, which leaves the head commits
unreachable from the
base; GitHub closes such pull requests. They targeted the archived dashboard
code, which is no
longer developed.
**Why not simply make `develop` the trunk?**
Changing the repository default branch needs admin rights, and for ASF
repositories it goes
through GitBox ("Change Default Branch", PMC members only) with a link to a
mailing list
thread where the change was agreed. Keeping the trunk on `master` needs no
settings change and
makes the default-branch-scoped features work immediately.
---
### 中文说明
RocketMQ Studio 一直是本仓库的活跃开发线,但它在 `rocketmq-studio` 分支上,而 `master` 还是旧的
rocketmq-dashboard 代码。**现在反过来了:`master` 就是 RocketMQ Studio。**
- `master` 现在指向原 `rocketmq-studio` 的 head(`e5ac52440`),**代码与提交历史完全一致**,
Studio 的 661 个提交全部可从 `master` 到达。
- 原 `master` 上的旧 dashboard 代码整体保留在 **`master_archive`**(`770822bbc`),旧提交 SHA
全部仍可访问。
- `rocketmq-studio` 分支已删除。
- 以 `rocketmq-studio` 为 base 的 PR **仍然是 open 状态**,只是 base 分支已不存在,GitHub 会标记为
不可合并。处理方式见下面「需要做什么」第 3 条——把 base 改成 `master` 即可,**不需要 rebase**。
- `CONTRIBUTING.md`、issue 模板与 PR 模板正在通过文末链接的后续 PR 合入 `master`。
**为什么这么改**
1. **默认分支就应该是大家贡献的分支**:GitHub 新建 PR 默认选默认分支为 base。Studio 在旁支时大量
PR 开错 base(切换前 `base:rocketmq-studio` 有 982 件、旧 `master` 有 25 件),维护者要反复改
base 或关闭。
2. **有些配置 GitHub 只从默认分支读**:issue 模板、PR 模板、`on.schedule` 定时任务,以及 ASF infra
读取的 `.asf.yaml`。Studio 留在 `master`,这些能力全部直接生效,不依赖我们没有权限的仓库设置。
3. **没有任何东西丢失**:旧 dashboard 历史在 `master_archive`;Studio 自身历史一字未动。
**需要做什么**
1. **新开发**:从 `upstream/master` 切分支,PR 以 `master` 为 base(默认就是,通常不用改)。
2. **本地 `master` 还是旧 dashboard 历史的同学**:master 是被替换而不是快进,`git pull` 不管用,
执行 `git fetch upstream && git checkout -B master upstream/master`;若本地旧
master 上有自己的
改动,先 `git branch my-old-work master` 存一份(那条线已归档到 `master_archive`,不再开发)。
3. **base 是 `rocketmq-studio` 的 PR**:删 base 分支**不会**关闭 PR,所以你的 PR 还开着,只是 base
缺失导致无法合并。把 base 改成 `master` 即可:PR 页面标题旁 `Edit` → base 选 `master`,或
`gh pr edit <N> --repo apache/rocketmq-dashboard --base master`。`master`
正是你 PR 原本基于的那个
提交,diff 与全部评审记录都不变,**不需要 rebase**。如果自己改不了,在 PR 下留言,维护者代为处理。
4. **原来对着旧 dashboard `master` 提的 25 个 PR**:在 `master` 被替换时由 GitHub **自动关闭**——
base 历史里已找不到 head 的提交,PR 无法继续保持 open。没有合并、也没有删除任何东西:代码归档在
`master_archive`,fork 上的分支也还在。若改动对 RocketMQ Studio 仍有价值,请对当前 `master`
重做后新开 PR。
5. **其余规范不变**:包路径 `org.apache.rocketmq.studio`;只允许 squash merge,commit
subject 不带
`[Studio]` 前缀、带 `(#N)`;先开 issue 讨论设计再提 PR(见 `CONTRIBUTING.md`);注意 **stale
bot
7 天无活动自动关闭**,需要保留就留言重置计时或申请 `pinned` 标签。
**维护者待办**
- [x] 先在旧 `master` SHA `770822bbc` 上建 `master_archive`,再替换 `master`
- [x] `master` 指向 Studio 主干(`e5ac52440`)并删除 `rocketmq-studio`
- [ ] 合入仓库配置 PR:`.asf.yaml`(从旧 `master` 原样复制,squash-only 与
`[email protected]` 通知路由不变)、stale workflow、CI 触发分支由
`rocketmq-studio` 改为 `master`
- [ ] 合入贡献者文档 PR:`CONTRIBUTING.md`、4 个 issue 模板、PR 模板、两份 README 的分支说明。
**issue 模板只有落到默认分支后才会出现在「New issue」选择器里**
- [ ] 按需代为把原 `rocketmq-studio` 的 PR 改 base 到 `master`
- [ ] 给被自动关闭的 25 个 PR 逐个补留言,避免无理由裸关闭
- [ ] 决定 2021 年遗留 `develop` 分支(`21c2c3a2e`,与当前树无共同祖先)的去留
- [ ] 修 CI:全仓 workflow run 目前一律 `startup_failure`(新 `master` 触发的那次也是),等于没有
任何自动化门禁——切换前就存在,非本次引入
**常见问题**
- **旧 dashboard 代码丢了吗?** 没有,在 `master_archive`,旧 `master` 的每个提交 SHA 仍可访问。
- **我的 PR 需要 rebase 吗?** 不需要。`master` 与原 `rocketmq-studio` 是同一套提交图,改完 base
diff 完全一致;只有与切换之后新合入的提交冲突时才需要 rebase。
- **那 25 个旧 dashboard PR 为什么被关?** 它们的 base 历史被替换,head 的提交在 base 上已不可达,
GitHub 会关闭这类 PR。它们针对的是已归档、不再开发的 dashboard 代码。
- **为什么不干脆用 `develop` 当主干?** 改默认分支需要 admin 权限,ASF 仓库还要走 GitBox 的
「Change Default Branch」(仅 PMC 成员,且要附邮件列表达成一致的链接)。留在 `master` 不用改任何
仓库设置,且只认默认分支的那些能力立即生效。
cc 各位 Studio 贡献者,欢迎在下方留言反馈。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]