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

Action shows running after all tasks finished #26559

Closed
Nathanwoodburn opened this issue Aug 17, 2023 · 10 comments · Fixed by #26563
Closed

Action shows running after all tasks finished #26559

Nathanwoodburn opened this issue Aug 17, 2023 · 10 comments · Fixed by #26563
Labels
topic/gitea-actions related to the actions of Gitea type/bug

Comments

@Nathanwoodburn
Copy link

Nathanwoodburn commented Aug 17, 2023

Description

A few actions are showing running even though all the steps have finished.
I haven't seen anything in any of the logs (server or runners). I restarted my runners and my server. I updated the server (from 1.20.1 -> 1.20.2) and that didn't fix it.

Gitea Version

1.20.1, 1.20.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/Nathanwoodburn/197bed532c07604739061efab3cf55b6

Screenshots

image
image

Git Version

2.34.1 (OS), 2.40.1 (Gitea Docker)

Operating System

Ubuntu 22.04.2 LTS (aarch64)

How are you running Gitea?

Running in a docker compose

version: "3.7"
services:
  mariadb:
    hostname: mariadb
    image: linuxserver/mariadb:latest
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_DATABASE: ${DATABASE_NAME}
      MYSQL_USER: ${DATABASE_USER}
      MYSQL_PASSWORD: ${DATABASE_PASSWORD}
      PUID: ${USER_UID}
      PGID: ${USER_GID}
      TZ: ${TZ}
    networks:
      - nginx
    restart: unless-stopped
    volumes:
      - mariadb:/config

  gitea:
    container_name: gitea
    hostname: gitea
    image: gitea/gitea:latest
    environment:
      USER_UID: ${USER_UID}
      USER_GID: ${USER_GID}
      TZ: ${TZ}
      GITEA__database__HOST: 'mariadb'
      GITEA__database__USER: ${DATABASE_USER}
      GITEA__database__PASSWD: ${DATABASE_PASSWORD}
      GITEA__database__NAME: ${DATABASE_NAME}
      GITEA__database__DB_TYPE: mysql
    networks:
      - nginx
    ports:
      - 8124:3000      
      - 2222:22      
    restart: unless-stopped
    volumes:
      - gitdata:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /home/git/.ssh:/data/git/.ssh
    depends_on:
      - mariadb

volumes:
  mariadb:
  gitdata:
  
networks:
    nginx:
        name: nginx
        external: true

Database

mariadb

@CaiCandong
Copy link
Member

CaiCandong commented Aug 17, 2023

You can turn off the action runner and visit this page to see the log messages

Can you show me the json file
image

@wolfogre
Copy link
Member

Could you show us your workflow file and the logs of steps (especially “Complate job”)?

@wolfogre wolfogre added the topic/gitea-actions related to the actions of Gitea label Aug 17, 2023
@Nathanwoodburn
Copy link
Author

Sure. For the workflow logs:

setupEnv => map[ACT:true ACTIONS_CACHE_URL:http://172.27.0.2:40337/ ACTIONS_RUNTIME_TOKEN:*** ACTIONS_RUNTIME_URL:https://git.woodburn.au/api/actions_pipeline/ A_TEST_ENV_NAME_1:a_test_env_value_1 A_TEST_ENV_NAME_2:a_test_env_value_2 CI:true GITEA_ACTIONS:true GITEA_ACTIONS_RUNNER_VERSION:v0.2.3 GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF:v2 GITHUB_ACTION_REPOSITORY:actions/checkout GITHUB_ACTOR:nathanwoodburn GITHUB_API_URL:https://git.woodburn.au/api/v1 GITHUB_BASE_REF: GITHUB_ENV:/var/run/act/workflow/envs.txt GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL: GITHUB_HEAD_REF: GITHUB_JOB:Build Master GITHUB_OUTPUT:/var/run/act/workflow/outputcmd.txt GITHUB_PATH:/var/run/act/workflow/pathcmd.txt GITHUB_REF:refs/heads/main GITHUB_REF_NAME:main GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:nathanwoodburn/hnshosting-wp GITHUB_REPOSITORY_OWNER:nathanwoodburn GITHUB_RETENTION_DAYS: GITHUB_RUN_ID:103 GITHUB_RUN_NUMBER:14 GITHUB_SERVER_URL:https://git.woodburn.au GITHUB_SHA:aa99339d4f9add0fd065f1b1e912a8019be650a9 GITHUB_STATE:/var/run/act/workflow/statecmd.txt GITHUB_STEP_SUMMARY:/var/run/act/workflow/SUMMARY.md GITHUB_TOKEN:*** GITHUB_WORKFLOW:Build Docker GITHUB_WORKSPACE:/root/.cache/act/nathanwoodburn/hnshosting-wp INPUT_CLEAN:true INPUT_FETCH-DEPTH:1 INPUT_LFS:false INPUT_PATH: INPUT_PERSIST-CREDENTIALS:true INPUT_REF: INPUT_REPOSITORY:nathanwoodburn/hnshosting-wp INPUT_SET-SAFE-DIRECTORY:true INPUT_SSH-KEY: INPUT_SSH-KNOWN-HOSTS: INPUT_SSH-STRICT:true INPUT_SUBMODULES:false INPUT_TOKEN:*** ImageOS:ubuntu20 JOB_CONTAINER_NAME:GITEA-ACTIONS-TASK-144_WORKFLOW-Build-Docker_JOB-Build-Master RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID:]
evaluating expression 'always()'
expression 'always()' evaluated to 'true'
⭐ Run Post Checkout
Writing entry to tarball workflow/outputcmd.txt len:0
Writing entry to tarball workflow/statecmd.txt len:0
Writing entry to tarball workflow/pathcmd.txt len:0
Writing entry to tarball workflow/envs.txt len:0
Writing entry to tarball workflow/SUMMARY.md len:0
Extracting content to '/var/run/act'
run post step for 'Checkout'
executing remote job container: [node /var/run/act/actions/actions-checkout@v2/dist/index.js]
  🐳  docker exec cmd=[node /var/run/act/actions/actions-checkout@v2/dist/index.js] user= workdir=
Exec command '[node /var/run/act/actions/actions-checkout@v2/dist/index.js]'
Working directory '/root/.cache/act/nathanwoodburn/hnshosting-wp'
  💬  ::debug::Getting git version
[command]/usr/bin/git version
git version 2.30.2
  💬  ::debug::Set git useragent to: git/2.30.2 (github-actions-checkout)
  ⚙  ***
Temporarily overriding HOME='/tmp/d987f8e1-32aa-4786-ac6c-3f8f5dde54fa' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /root/.cache/act/nathanwoodburn/hnshosting-wp
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/git\.woodburn\.au\/\.extraheader
http.https://git.woodburn.au/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://git.woodburn.au/.extraheader
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/git\.woodburn\.au\/\.extraheader' && git config --local --unset-all 'http.https://git.woodburn.au/.extraheader' || :
  💬  ::debug::Unsetting HOME override
  ✅  Success - Post Checkout
Cleaning up services for job Build Master
Cleaning up container for job Build Master
Removed container: a6f36a640a72ba5fe1d5ac8340f82c96538677035bb9de0775c379ca5d4db364
  🐳  docker volume rm GITEA-ACTIONS-TASK-144_WORKFLOW-Build-Docker_JOB-Build-Master
  🐳  docker volume rm GITEA-ACTIONS-TASK-144_WORKFLOW-Build-Docker_JOB-Build-Master-env
Cleaning up network for job Build Master, and network name is: GITEA-ACTIONS-TASK-144_WORKFLOW-Build-Docker_JOB-Build-Master-network
🏁  Job succeeded

@Nathanwoodburn
Copy link
Author

The network tab shows this while the runner is running

{
    "state": {
        "run": {
            "link": "/nathanwoodburn/hnshosting-wp/actions/runs/14",
            "title": "worker: Fixed list",
            "status": "running",
            "canCancel": true,
            "canApprove": false,
            "canRerun": false,
            "done": false,
            "jobs": [
                {
                    "id": 136,
                    "name": "Build Master",
                    "status": "success",
                    "canRerun": true,
                    "duration": "25s"
                },
                {
                    "id": 137,
                    "name": "Build Bot",
                    "status": "success",
                    "canRerun": true,
                    "duration": "23s"
                }
            ],
            "commit": {
                "localeCommit": "Commit",
                "localePushedBy": "pushed by",
                "shortSHA": "aa99339d4f",
                "link": "/nathanwoodburn/hnshosting-wp/commit/aa99339d4f9add0fd065f1b1e912a8019be650a9",
                "pusher": {
                    "displayName": "nathanwoodburn",
                    "link": "/nathanwoodburn"
                },
                "branch": {
                    "name": "main",
                    "link": "/nathanwoodburn/hnshosting-wp/src/branch/main"
                }
            }
        },
        "currentJob": {
            "title": "Build Master",
            "detail": "Success",
            "steps": [
                {
                    "summary": "Set up job",
                    "duration": "2s",
                    "status": "success"
                },
                {
                    "summary": "Checkout",
                    "duration": "2s",
                    "status": "success"
                },
                {
                    "summary": "Install Docker",
                    "duration": "7s",
                    "status": "success"
                },
                {
                    "summary": "Build Docker image",
                    "duration": "5s",
                    "status": "success"
                },
                {
                    "summary": "Complete job",
                    "duration": "8s",
                    "status": "success"
                }
            ]
        }
    },
    "logs": {
        "stepsLog": [
            {
                "step": 4,
                "cursor": 38,
                "lines": [],
                "started": 1692244434
            }
        ]
    }
}

@Nathanwoodburn
Copy link
Author

And when I shut the runner off the only difference is

{
   {...
   },
    "logs": {
        "stepsLog": []
    }
}

wxiaoguang pushed a commit that referenced this issue Aug 21, 2023
Should fix #26559.

How xorm works: https://xorm.io/docs/chapter-06/1.lock/

---------

Co-authored-by: Giteabot <teabot@gitea.io>
@Nathanwoodburn
Copy link
Author

Hmm its gotten worse. No clue why though
image

@CaiCandong CaiCandong reopened this Aug 24, 2023
@Nathanwoodburn
Copy link
Author

Hmm its gotten worse. No clue why though
image

Actually just had a look. I don't think the patch was in the new release 1.20.3.

@CaiCandong
Copy link
Member

#26563 This change involves a database migration, and this patch will be released in 1.21.0.

@Nathanwoodburn
Copy link
Author

Ok. Will the database migration require any manual changes or will it do it automatically when I update to 21

@CaiCandong
Copy link
Member

Ok. Will the database migration require any manual changes or will it do it automatically when I update to 21

Automatically

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants