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

Misc check to Github Actions #862

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Ao-senXiong
Copy link
Member

No description provided.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@Ao-senXiong Ao-senXiong marked this pull request as ready for review August 21, 2024 05:01
@Ao-senXiong
Copy link
Member Author

Ao-senXiong commented Aug 21, 2024

Looks like the place it go wrong is here:

2024-08-21T17:43:16.6615040Z Re-execution of diff command:
2024-08-21T17:43:16.6615806Z git --no-pager diff --exit-code master...misc-github-actions
2024-08-21T17:43:16.6618085Z fatal: ambiguous argument 'master...misc-github-actions': unknown revision or path not in the working tree.
2024-08-21T17:43:16.6619399Z Use '--' to separate paths from revisions, like this:
2024-08-21T17:43:16.6620234Z 'git <command> [<revision>...] -- [<file>...]'
2024-08-21T17:43:16.6620696Z 
2024-08-21T17:43:16.6621000Z Second re-execution of diff command:
2024-08-21T17:43:16.6622077Z git --no-pager diff --exit-code master...misc-github-actions > /tmp/tmp.tmp && cat /tmp/tmp.tmp
2024-08-21T17:43:16.6633123Z fatal: ambiguous argument 'master...misc-github-actions': unknown revision or path not in the working tree.
2024-08-21T17:43:16.6634510Z Use '--' to separate paths from revisions, like this:
2024-08-21T17:43:16.6635368Z 'git <command> [<revision>...] -- [<file>...]'
2024-08-21T17:43:16.6635834Z 
2024-08-21T17:43:16.6636304Z Endpoints of commit range (master and misc-github-actions):
2024-08-21T17:43:16.6648239Z fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
2024-08-21T17:43:16.6649375Z Use '--' to separate paths from revisions, like this:
2024-08-21T17:43:16.6650207Z 'git <command> [<revision>...] -- [<file>...]'
2024-08-21T17:43:16.6663564Z fatal: ambiguous argument 'misc-github-actions': unknown revision or path not in the working tree.
2024-08-21T17:43:16.6664817Z Use '--' to separate paths from revisions, like this:
2024-08-21T17:43:16.6665710Z 'git <command> [<revision>...] -- [<file>...]'

@wmdietl
Copy link
Member

wmdietl commented Aug 21, 2024

Looks like the place it go wrong is here:

I had hoped that setting the fetch-depth to 0 would fix that problem...

ci-info sets these environment variables:

echo CI=true
echo CI_BRANCH=misc-github-actions
echo CI_BRANCH_NAME=misc-github-actions
echo CI_COMMIT_RANGE=master...misc-github-actions
echo CI_COMMIT_RANGE_END=misc-github-actions
echo CI_COMMIT_RANGE_START=master

However, the list of branches doesn't contain misc-github-actions:

echo * (HEAD detached at pull/862/merge)
...
echo   remotes/origin/master
...
echo   remotes/origin/origin/master
...
echo   remotes/pull/862/merge

It's a bit odd why it also doesn't find master.

The doc for [ci-info](https://github.com/eisop-plume-lib/plume-scripts/blob/master/ci-info) and [ci-lint-diff](https://github.com/eisop-plume-lib/plume-scripts/blob/master/ci-lint-diff) both say that it works with GitHub Actions, but maybe that is not well tested.

actions/checkout says that fetch-depth: 0 should 0 indicates all history for all branches and tags..

So it would seem that there is a problem with ci-info not determining the same branch names that git actually knows.
This doesn't make sense to me for master, but I see the mismatch between misc-github-actions and remotes/pull/862/merge.

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.

2 participants