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

Upgrade to v4 checkout, hide output #15322

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Conversation

AlanCoding
Copy link
Member

SUMMARY

Quality of life change I'm borrowing from a similar patch I did in DAB. A very significant fraction of the output of checks is this:

2024-07-02T16:19:20.9207790Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +671cb4202173df0bce91edb49c817222ee7b7a87:refs/remotes/pull/15320/merge
2024-07-02T16:19:21.1584293Z remote: Enumerating objects: 4884, done.        
2024-07-02T16:19:21.1586027Z remote: Counting objects:   0% (1/4884)        
2024-07-02T16:19:21.1587198Z remote: Counting objects:   1% (49/4884)        
2024-07-02T16:19:21.1588065Z remote: Counting objects:   2% (98/4884)        
2024-07-02T16:19:21.1588719Z remote: Counting objects:   3% (147/4884)        
2024-07-02T16:19:21.1589457Z remote: Counting objects:   4% (196/4884)        
2024-07-02T16:19:21.1590201Z remote: Counting objects:   5% (245/4884)        
2024-07-02T16:19:21.1590905Z remote: Counting objects:   6% (294/4884)        
2024-07-02T16:19:21.1591567Z remote: Counting objects:   7% (342/4884)        
2024-07-02T16:19:21.1592316Z remote: Counting objects:   8% (391/4884)        

There's no value in this. Nobody wants this. I don't think I have ever been debugging the git clone command out of the many things that go wrong in checks. This turns on the output to hide that output, leaving more room for what we want.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

I think api-lint is a good example check:

2024-07-02T18:15:20.3214657Z ##[group]Initializing the repository
2024-07-02T18:15:20.3219557Z [command]/usr/bin/git init /home/runner/work/awx/awx
2024-07-02T18:15:20.3288317Z hint: Using 'master' as the name for the initial branch. This default branch name
2024-07-02T18:15:20.3290616Z hint: is subject to change. To configure the initial branch name to use in all
2024-07-02T18:15:20.3292582Z hint: of your new repositories, which will suppress this warning, call:
2024-07-02T18:15:20.3293930Z hint:
2024-07-02T18:15:20.3295740Z hint: 	git config --global init.defaultBranch <name>
2024-07-02T18:15:20.3297018Z hint:
2024-07-02T18:15:20.3298376Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2024-07-02T18:15:20.3300677Z hint: 'development'. The just-created branch can be renamed via this command:
2024-07-02T18:15:20.3302728Z hint:
2024-07-02T18:15:20.3303613Z hint: 	git branch -m <name>
2024-07-02T18:15:20.3305057Z Initialized empty Git repository in /home/runner/work/awx/awx/.git/
2024-07-02T18:15:20.3308645Z [command]/usr/bin/git remote add origin https://github.com/ansible/awx
2024-07-02T18:15:20.3346387Z ##[endgroup]
2024-07-02T18:15:20.3348103Z ##[group]Disabling automatic garbage collection
2024-07-02T18:15:20.3350683Z [command]/usr/bin/git config --local gc.auto 0
2024-07-02T18:15:20.3384350Z ##[endgroup]
2024-07-02T18:15:20.3386097Z ##[group]Setting up auth
2024-07-02T18:15:20.3392620Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2024-07-02T18:15:20.3428206Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2024-07-02T18:15:20.3764352Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2024-07-02T18:15:20.3814556Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2024-07-02T18:15:20.4065121Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
2024-07-02T18:15:20.4115990Z ##[endgroup]
2024-07-02T18:15:20.4117133Z ##[group]Fetching the repository
2024-07-02T18:15:20.4127857Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +432899bc1f4f11af11aa44190468a3991ee17182:refs/remotes/pull/15322/merge
2024-07-02T18:15:22.0350659Z From https://github.com/ansible/awx
2024-07-02T18:15:22.0352182Z  * [new ref]         432899bc1f4f11af11aa44190468a3991ee17182 -> pull/15322/merge
2024-07-02T18:15:22.0373456Z ##[endgroup]
2024-07-02T18:15:22.0374706Z ##[group]Determining the checkout info
2024-07-02T18:15:22.0376363Z ##[endgroup]
2024-07-02T18:15:22.0382237Z [command]/usr/bin/git sparse-checkout disable
2024-07-02T18:15:22.0471210Z [command]/usr/bin/git config --local --unset-all extensions.worktreeConfig
2024-07-02T18:15:22.0500967Z ##[group]Checking out the ref
2024-07-02T18:15:22.0505542Z [command]/usr/bin/git checkout --progress --force refs/remotes/pull/15322/merge
2024-07-02T18:15:22.7466620Z Note: switching to 'refs/remotes/pull/15322/merge'.
2024-07-02T18:15:22.7467340Z 
2024-07-02T18:15:22.7468193Z You are in 'detached HEAD' state. You can look around, make experimental
2024-07-02T18:15:22.7470089Z changes and commit them, and you can discard any commits you make in this
2024-07-02T18:15:22.7471651Z state without impacting any branches by switching back to a branch.
2024-07-02T18:15:22.7472550Z 
2024-07-02T18:15:22.7473244Z If you want to create a new branch to retain commits you create, you may
2024-07-02T18:15:22.7475263Z do so (now or later) by using -c with the switch command. Example:
2024-07-02T18:15:22.7475987Z 
2024-07-02T18:15:22.7476336Z   git switch -c <new-branch-name>
2024-07-02T18:15:22.7476815Z 
2024-07-02T18:15:22.7477048Z Or undo this operation with:
2024-07-02T18:15:22.7477641Z 
2024-07-02T18:15:22.7477900Z   git switch -
2024-07-02T18:15:22.7478238Z 
2024-07-02T18:15:22.7478774Z Turn off this advice by setting config variable advice.detachedHead to false
2024-07-02T18:15:22.7479590Z 
2024-07-02T18:15:22.7480442Z HEAD is now at 432899b Merge 87cc9ac99d720f1ce3761f207d19df8a469801a4 into 6763badea3a5b3c2bb38cbd4891158072c8d6750
2024-07-02T18:15:22.7502323Z ##[endgroup]
2024-07-02T18:15:22.7543278Z [command]/usr/bin/git log -1 --format='%H'
2024-07-02T18:15:22.7567638Z '432899bc1f4f11af11aa44190468a3991ee17182'
2024-07-02T18:15:22.7951635Z Prepare all required actions
2024-07-02T18:15:22.8013389Z ##[group]Run ./.github/actions/awx_devel_image
2024-07-02T18:15:22.8013800Z with:
2024-07-02T18:15:22.8014864Z   github-token: ***
2024-07-02T18:15:22.8015449Z env:
2024-07-02T18:15:22.8015760Z   LC_ALL: C.UTF-8
2024-07-02T18:15:22.8016337Z   CI_GITHUB_TOKEN: ***
2024-07-02T18:15:22.8016697Z   DEV_DOCKER_OWNER: ansible
2024-07-02T18:15:22.8017115Z   COMPOSE_TAG: devel
2024-07-02T18:15:22.8017516Z ##[endgroup]
2024-07-02T18:15:22.8237883Z ##[group]Run echo py_version=`make PYTHON_VERSION` >> $GITHUB_ENV
2024-07-02T18:15:22.8238756Z �[36;1mecho py_version=`make PYTHON_VERSION` >> $GITHUB_ENV�[0m
2024-07-02T18:15:22.8369576Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2024-07-02T18:15:22.8370100Z env:
2024-07-02T18:15:22.8370383Z   LC_ALL: C.UTF-8
2024-07-02T18:15:22.8371077Z   CI_GITHUB_TOKEN: ***
2024-07-02T18:15:22.8371449Z   DEV_DOCKER_OWNER: ansible
2024-07-02T18:15:22.8371794Z   COMPOSE_TAG: devel
2024-07-02T18:15:22.8372325Z ##[endgroup]
2024-07-02T18:15:23.1678080Z ##[group]Run echo "OWNER_LC=${OWNER,,}" >> $GITHUB_ENV
2024-07-02T18:15:23.1678751Z �[36;1mecho "OWNER_LC=${OWNER,,}" >> $GITHUB_ENV�[0m
2024-07-02T18:15:23.1741302Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2024-07-02T18:15:23.1741976Z env:
2024-07-02T18:15:23.1742290Z   LC_ALL: C.UTF-8
2024-07-02T18:15:23.1742851Z   CI_GITHUB_TOKEN: ***
2024-07-02T18:15:23.1743341Z   DEV_DOCKER_OWNER: ansible
2024-07-02T18:15:23.1743739Z   COMPOSE_TAG: devel
2024-07-02T18:15:23.1744045Z   py_version: 3
2024-07-02T18:15:23.1744468Z   OWNER: ansible
2024-07-02T18:15:23.1744799Z ##[endgroup]
2024-07-02T18:15:23.1855823Z ##[group]Run echo "***" | docker login ghcr.io -u AlanCoding --password-stdin
2024-07-02T18:15:23.1856799Z �[36;1mecho "***" | docker login ghcr.io -u AlanCoding --password-stdin�[0m
2024-07-02T18:15:23.1911633Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2024-07-02T18:15:23.1912302Z env:
2024-07-02T18:15:23.1912620Z   LC_ALL: C.UTF-8
2024-07-02T18:15:23.1913103Z   CI_GITHUB_TOKEN: ***
2024-07-02T18:15:23.1913591Z   DEV_DOCKER_OWNER: ansible
2024-07-02T18:15:23.1913966Z   COMPOSE_TAG: devel
2024-07-02T18:15:23.1914268Z   py_version: 3
2024-07-02T18:15:23.1914708Z   OWNER_LC: ansible
2024-07-02T18:15:23.1915029Z ##[endgroup]
2024-07-02T18:15:23.4409055Z WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json.
2024-07-02T18:15:23.4410827Z Configure a credential helper to remove this warning. See
2024-07-02T18:15:23.4412510Z https://docs.docker.com/engine/reference/commandline/login/#credentials-store
2024-07-02T18:15:23.4413333Z 
2024-07-02T18:15:23.4413543Z Login Succeeded
2024-07-02T18:15:23.4462285Z ##[group]Run docker pull ghcr.io/${OWNER_LC}/awx_devel:devel
2024-07-02T18:15:23.4463000Z �[36;1mdocker pull ghcr.io/${OWNER_LC}/awx_devel:devel�[0m
2024-07-02T18:15:23.4524942Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2024-07-02T18:15:23.4525445Z env:
2024-07-02T18:15:23.4525762Z   LC_ALL: C.UTF-8
2024-07-02T18:15:23.4526534Z   CI_GITHUB_TOKEN: ***
2024-07-02T18:15:23.4526942Z   DEV_DOCKER_OWNER: ansible
2024-07-02T18:15:23.4527287Z   COMPOSE_TAG: devel
2024-07-02T18:15:23.4527739Z   py_version: 3
2024-07-02T18:15:23.4528102Z   OWNER_LC: ansible
2024-07-02T18:15:23.4528394Z ##[endgroup]
2024-07-02T18:15:23.7137876Z devel: Pulling from ansible/awx_devel
2024-07-02T18:15:23.7677673Z 0d9665cbb1e4: Pulling fs layer
2024-07-02T18:15:23.7679211Z 27539475c0a4: Pulling fs layer
2024-07-02T18:15:23.7680320Z 5218e8872ec3: Pulling fs layer
2024-07-02T18:15:23.7681500Z 1b7a59365104: Pulling fs layer
2024-07-02T18:15:23.7682664Z 46a95a4c2d71: Pulling fs layer
2024-07-02T18:15:23.7683556Z 7fa2cc3e1467: Pulling fs layer

The git parts of this seem fairly brief, and yeah, we're in detached head state. These are valid logs to surface. Next, we have docker pull output... #15323

@AlanCoding
Copy link
Member Author

The api-lint check gives good validation of what I'm going for here. I'm ready to merge this.

@AlanCoding AlanCoding merged commit fa670e2 into ansible:devel Jul 19, 2024
21 checks passed
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
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