`cml pr` needs more docs and/or diagrams

Open
#390 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Domain
cli, documentation

Research direction

Start with the linked pull-request discussion and the cml pr --merge and cml pr flows described here. Clarify the branch and CI sequence, then document it with diagrams and explain which workaround is intended; the issue does not name a documentation file or test to run.

Written by the indexing model from the issue text.

Description

documentation

Coming from here

From discussion:

cml pr --merge then:

  1. CI runs on the new branch created (let's call it cml-branch-1), generating in turn a new branch cml-branch-2, etc.
  2. once the branch cml-branch-1 is automatically merged into the original branch (typically a feature branch), CI will run again, which will again create a new branch cml-branch-1b. This branch will in turn generate a new look as in 1.

I don't follow (branch names are confusing). Do you mean "2. once cml-branch-2 is automatically merged into cml-branch-1 ..." instead? If so, the flow would be:

flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr --merge| C2(cml-branch-2)
C2 -->|4. CI: auto merge| C1 -->|5. CI: cml pr --merge| C1b(cml-branch-1b) -->|CI: infinite loop| C1

If so, this makes sense. And you ideally would like cml-branch-1b never to be created, right?

cml pr (without the auto-merge), then:

  1. CI will not run on the branch cml-branch-1. So far so good!

I don't follow.

  1. Once I will manually merge cml-branch-1 back in the feature branch, if I don't manually add "[ci skip]" to the commit message, CI will run again on the feature branch, generating cml-branch-1b.
flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr| C2(cml-branch-2)
C2 -->|"4. manual merge, entering [skip ci] into message"| C1

Anyway there are many work-arounds:

  1. deterministic runs [not opening PRs because of] diff being empty.

  2. feature request: make "[skip ci]" [appear in] all commit message of branches/PR created via cml pr

  3. feature request:
flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr --merge --skip-ci| C2("cml-branch-2 with commit containing [skip ci]")
C2 -->|"4. auto merge without any CI tests running"| C1
  1. feature request:
flowchart LR
M(main) -->|1. branch| F(feat) -->|2. branch| C1(cml-branch-1) -->|3. CI: cml pr --merge --skip-ci| C2(cml-branch-2)
C2 -->|"4. auto merge, inserting [skip ci] into the merge commit message"| C1

So basically the problem with this PR currently is "auto merge without any CI tests running" right? Work-around (3) is broken? So we should do work-around (4)?

Dominant language
TypeScript
Stars
13
Forks
22
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from iterative/cml.dev

All issues in iterative/cml.dev

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.