getsentry / action-release

GitHub Action for creating a release on Sentry
Apache License 2.0
446 stars 53 forks source link

Double release #189

Closed r34son closed 6 months ago

r34son commented 6 months ago

Github Sentry Action Release Bug Report

I am using @sentry/nextjs that uses @sentry/webpack-plugin. It also creates release under the hood. I build app inside docker and there is no git repo inside. Thats why i used github action to create sentry release. I quess i need somehow pass created release to @sentry/nextjs inside docker? But there is no docs for action outputs, how i can get created release and pass it down?

Also there is no commits associated with release created by action. Docs say that "auto" is default value of set-commits option. But there is no debug logs for action. Maybe it's related that workflow triggered on release:

on:
  release:
    types: [released]

Environment

How do you use this action? Standard Github runners or self-hosted runners (which OS and arch?)

Which version of the action? e.g: v1

Steps to Reproduce

https://github.com/r34son/profile/actions/runs/8681014336/job/23802875082 https://productionresultssa15.blob.core.windows.net/actions-results/ef553490-7f8c-4c2f-85c3-84048420ec9d/workflow-job-run-96feb431-36e0-5048-c31d-09e6e8cb71cf/logs/job/job-logs.txt?rsct=text%2Fplain&se=2024-04-14T21%3A01%3A13Z&sig=X4shIcRjd7ZUEu8wgPG9Qk1A%2F8d9iwYcI0TAqjJHmS8%3D&sp=r&spr=https&sr=b&st=2024-04-14T20%3A51%3A08Z&sv=2021-12-02

Expected Result

One release with commits associated

Actual Result

2 releases created with no commits attached

r34son commented 6 months ago
2024-04-15T15:25:06.6814698Z ##[debug]Evaluating: secrets.SENTRY_AUTH_TOKEN
2024-04-15T15:25:06.6815485Z ##[debug]Evaluating Index:
2024-04-15T15:25:06.6815938Z ##[debug]..Evaluating secrets:
2024-04-15T15:25:06.6816406Z ##[debug]..=> Object
2024-04-15T15:25:06.6816899Z ##[debug]..Evaluating String:
2024-04-15T15:25:06.6817362Z ##[debug]..=> 'SENTRY_AUTH_TOKEN'
2024-04-15T15:25:06.6819310Z ##[debug]=> '***'
2024-04-15T15:25:06.6820722Z ##[debug]Result: '***'
2024-04-15T15:25:06.6821494Z ##[debug]Evaluating: secrets.SENTRY_ORG
2024-04-15T15:25:06.6822108Z ##[debug]Evaluating Index:
2024-04-15T15:25:06.6822584Z ##[debug]..Evaluating secrets:
2024-04-15T15:25:06.6823084Z ##[debug]..=> Object
2024-04-15T15:25:06.6823501Z ##[debug]..Evaluating String:
2024-04-15T15:25:06.6823921Z ##[debug]..=> 'SENTRY_ORG'
2024-04-15T15:25:06.6824512Z ##[debug]=> '***'
2024-04-15T15:25:06.6824904Z ##[debug]Result: '***'
2024-04-15T15:25:06.6825674Z ##[debug]Evaluating: secrets.SENTRY_PROJECT
2024-04-15T15:25:06.6826284Z ##[debug]Evaluating Index:
2024-04-15T15:25:06.6826796Z ##[debug]..Evaluating secrets:
2024-04-15T15:25:06.6827221Z ##[debug]..=> Object
2024-04-15T15:25:06.6827697Z ##[debug]..Evaluating String:
2024-04-15T15:25:06.6828139Z ##[debug]..=> 'SENTRY_PROJECT'
2024-04-15T15:25:06.6828623Z ##[debug]=> '***'
2024-04-15T15:25:06.6829107Z ##[debug]Result: '***'
2024-04-15T15:25:06.6830358Z ##[debug]Evaluating condition for step: 'Create Sentry release'
2024-04-15T15:25:06.6831886Z ##[debug]Evaluating: success()
2024-04-15T15:25:06.6832632Z ##[debug]Evaluating success:
2024-04-15T15:25:06.6833314Z ##[debug]=> true
2024-04-15T15:25:06.6836286Z ##[debug]Result: true
2024-04-15T15:25:06.6837092Z ##[debug]Starting: Create Sentry release
2024-04-15T15:25:06.6867787Z ##[debug]Loading inputs
2024-04-15T15:25:06.6869096Z ##[debug]Evaluating: inputs.environment
2024-04-15T15:25:06.6869859Z ##[debug]Evaluating Index:
2024-04-15T15:25:06.6870416Z ##[debug]..Evaluating inputs:
2024-04-15T15:25:06.6870865Z ##[debug]..=> Object
2024-04-15T15:25:06.6871349Z ##[debug]..Evaluating String:
2024-04-15T15:25:06.6871778Z ##[debug]..=> 'environment'
2024-04-15T15:25:06.6872243Z ##[debug]=> 'production'
2024-04-15T15:25:06.6872765Z ##[debug]Result: 'production'
2024-04-15T15:25:06.6873611Z ##[debug]Evaluating: github.ref
2024-04-15T15:25:06.6874238Z ##[debug]Evaluating Index:
2024-04-15T15:25:06.6874680Z ##[debug]..Evaluating github:
2024-04-15T15:25:06.6875146Z ##[debug]..=> Object
2024-04-15T15:25:06.6875614Z ##[debug]..Evaluating String:
2024-04-15T15:25:06.6876043Z ##[debug]..=> 'ref'
2024-04-15T15:25:06.6876562Z ##[debug]=> 'refs/tags/v1.2.2'
2024-04-15T15:25:06.6877023Z ##[debug]Result: 'refs/tags/v1.2.2'
2024-04-15T15:25:06.6883636Z ##[debug]Loading env
2024-04-15T15:25:06.6893617Z ##[group]Run getsentry/action-release@e769183448303de84c5a06aaaddf9da7be26d6c7
2024-04-15T15:25:06.6894430Z with:
2024-04-15T15:25:06.6894857Z   environment: production
2024-04-15T15:25:06.6895364Z   version: refs/tags/v1.2.2
2024-04-15T15:25:06.6895961Z   finalize: true
2024-04-15T15:25:06.6896414Z env:
2024-04-15T15:25:06.6896902Z   S3_PATH: production
2024-04-15T15:25:06.6898324Z   SENTRY_AUTH_TOKEN: ***
2024-04-15T15:25:06.6898812Z   SENTRY_ORG: ***
2024-04-15T15:25:06.6899385Z   SENTRY_PROJECT: ***
2024-04-15T15:25:06.6899853Z ##[endgroup]
2024-04-15T15:25:06.7110810Z ##[command]/usr/bin/docker run --name ghcriogetsentryactionreleaseimagelatest_10841e --label 47deac --workdir /github/workspace --rm -e "S3_PATH" -e "SENTRY_AUTH_TOKEN" -e "SENTRY_ORG" -e "SENTRY_PROJECT" -e "INPUT_ENVIRONMENT" -e "INPUT_VERSION" -e "INPUT_SOURCEMAPS" -e "INPUT_DIST" -e "INPUT_FINALIZE" -e "INPUT_IGNORE_MISSING" -e "INPUT_IGNORE_EMPTY" -e "INPUT_STARTED_AT" -e "INPUT_VERSION_PREFIX" -e "INPUT_SET_COMMITS" -e "INPUT_PROJECTS" -e "INPUT_URL_PREFIX" -e "INPUT_STRIP_COMMON_PREFIX" -e "INPUT_WORKING_DIRECTORY" -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_DEBUG" -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_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/***/***":"/github/workspace" ghcr.io/getsentry/action-release-image:latest
2024-04-15T15:25:07.1003661Z ##[debug]Version is v1.2.2
2024-04-15T15:25:07.6470733Z ##[debug]Setting commits with option 'auto'
2024-04-15T15:25:08.6603813Z ##[debug]Adding deploy to release
2024-04-15T15:25:08.8503896Z ##[debug]Finalizing the release
2024-04-15T15:25:09.2087554Z ##[debug]Done
2024-04-15T15:25:09.3717803Z ##[debug]Docker Action run completed with exit code 0
2024-04-15T15:25:09.3722213Z ##[debug]Set output version = v1.2.2
2024-04-15T15:25:09.3723285Z ##[debug]Finishing: Create Sentry release

Debug logs, nothing interesting

r34son commented 6 months ago

Oh, found version output https://github.com/getsentry/action-release/blob/master/src/main.ts#L83 Good to see it in docs without digging inside action implementation

r34son commented 6 months ago

@szokeasaurusrex Hi! Could you help, please? I realized that action just calls cli.setCommits(version, { auto: true, ignoreMissing: false, ignoreEmpty: false});. There is no associated commits with release, but cli doesn't fail. Maybe it's related that repo is checkouted on specific tag.

szokeasaurusrex commented 6 months ago

@r34son I noticed you closed this issue shortly after your previous comment. Did you solve your problem yourself, or do you still need help?

r34son commented 6 months ago

It would be good to have mentioned in docs that action outputs created release version. I will try to create pr for it