panda-re / panda

Platform for Architecture-Neutral Dynamic Analysis
https://panda.re
Other
2.5k stars 480 forks source link

CI fails to publish PyPANDA #1486

Closed AndrewFasano closed 7 months ago

AndrewFasano commented 8 months ago

The CI job to publish pypanda to PyPi fails as it doesn't increment the version. We have auto-versioning in our github actions so I suspect there's a straightforward way to add that version to the packages (perhaps pulling from an environment variable, or adding a step into the workflow that uses the variable to set the package version in some way?).

Perhaps it would be more efficient to only push to pypi if there's a chance within the pypanda source tree, instead of on every panda change? Not sure how that would work with the auto-versioning though.

Example CI failure: https://github.com/panda-re/panda/actions/runs/8510581386/job/23309444668 with relevant details:

Run pypa/gh-action-pypi-publish@release/v1
/usr/bin/docker run --name b9cfc92eb8f6a4de54ae2920edfc8a666f7ad_4e94ef --label 1b9cfc --workdir /github/workspace --rm -e "PANDA_CONTAINER_UBUNTU_VERSION" -e "INPUT_VERBOSE" -e "INPUT_USER" -e "INPUT_PASSWORD" -e "INPUT_REPOSITORY-URL" -e "INPUT_REPOSITORY_URL" -e "INPUT_PACKAGES-DIR" -e "INPUT_PACKAGES_DIR" -e "INPUT_VERIFY-METADATA" -e "INPUT_VERIFY_METADATA" -e "INPUT_SKIP-EXISTING" -e "INPUT_SKIP_EXISTING" -e "INPUT_PRINT-HASH" -e "INPUT_PRINT_HASH" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_ID_TOKEN_REQUEST_URL" -e "ACTIONS_ID_TOKEN_REQUEST_TOKEN" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/panda/panda":"/github/workspace" 1b9cfc:92eb8f6a4de54ae2920edfc8a666f7ad  "__token__" "" "" "" "" "" "true" ""
Checking dist/pandare-0.1.2.0-py3-none-any.whl: PASSED
Showing hash values of files to be uploaded:
/github/workspace/dist/pandare-0.1.2.0-py3-none-any.whl

SHA256: 6e70de[15](https://github.com/panda-re/panda/actions/runs/8510581386/job/23309444668#step:4:16)7c8922798850286c78c47e92c930f2666cfdea88020d22ad1adf29eb
MD5: 5cea24c8f7b023c830c719b51553a066
BLAKE2-256: 6efb[16](https://github.com/panda-re/panda/actions/runs/8510581386/job/23309444668#step:4:17)bf941bd2dc36a67ced4d5109c801edcc4ec2bb48c5f6a9f9901f3b7cf1

Uploading distributions to https://upload.pypi.org/legacy/
INFO     dist/pandare-0.1.2.0-py3-none-any.whl (676.2 KB)                       
INFO     password set by command options                                        
INFO     username: __token__                                                    
INFO     password: <hidden>                                                     
Uploading pandare-0.1.2.0-py3-none-any.whl
25l
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/696.9 kB • --:-- • ?
  0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/696.9 kB • --:-- • ?
 54% ━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━ 376.8/696.9 kB • 00:01 • 5.5 MB/s
 78% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━ 540.7/696.9 kB • 00:01 • 3.3 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 696.9/696.9 kB • 00:00 • 3.1 MB/s
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 696.9/696.9 kB • 00:00 • 3.1 MB/s
25hINFO     Response from https://upload.pypi.org/legacy/:                         
         400 File already exists. See https://pypi.org/help/#file-name-reuse for
         more information.                                                      
INFO     <html>                                                                 
          <head>                                                                
           <title>400 File already exists. See                                  
         https://pypi.org/help/#file-name-reuse for more information.</title>   
          </head>                                                               
          <body>                                                                
           <h1>400 File already exists. See                                     
         https://pypi.org/help/#file-name-reuse for more information.</h1>      
           The server could not comply with the request since it is either      
         malformed or otherwise incorrect.<br/><br/>                            
         File already exists. See https://pypi.org/help/#file-name-reuse for    
         more information.                                                      

          </body>                                                               
         </html>                                                                
ERROR    HTTPError: [40](https://github.com/panda-re/panda/actions/runs/8510581386/job/23309444668#step:4:41)0 Bad Request from https://upload.pypi.org/legacy/        
         File already exists. See https://pypi.org/help/#file-name-reuse for    
         more information.

@AndrewQuijano

lacraig2 commented 8 months ago

@AndrewQuijano and I had chatted about this issue.

It seems like the most straightforward path would be to just keep the PyPANDA version in line with the PANDA version.

AndrewQuijano commented 7 months ago

Seems like we can now close this as the pushing to pypi seems to work now