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

Wrong commit selection #139

Open
MaximeLaurenty opened this issue Apr 7, 2023 · 4 comments
Open

Wrong commit selection #139

MaximeLaurenty opened this issue Apr 7, 2023 · 4 comments

Comments

@MaximeLaurenty
Copy link

MaximeLaurenty commented Apr 7, 2023

Github Sentry Action Release Bug Report

Environment

How do you use this action?
Standard Github runners, container built on top of archlinux:base

Which version of the action?
getsentry/[email protected]

Steps to Reproduce

  1. Setup action in our CI, triggered on every commit to master
- name: Create Sentry release
  uses: getsentry/[email protected]
  env:
    SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
    SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
  with:
    environment: prod
    projects: frontend
    sourcemaps: frontend
    version: ${{ github.sha }}
    dist: ${{ github.sha }}
    url_prefix: "~"
  1. Make multiples commits to master
  2. Check info about releases into Sentry

Expected Result

Have only 1 commit in every release.

Actual Result

Most of the time, commits are properly set within releases (just 1), but sometimes a discrepancy happens and a release contains multiple commits (for which releases already exist):
see here commits in the latest release (including previous fe51918):
Screenshot 2023-04-07 at 15 36 02 - sentry commit list
see here the release just before (which includes fe51918):
Screenshot 2023-04-07 at 15 40 31 sentry release list
links to sentry if you have access: erroneous release, right release before that & list of our releases
There is no relevant info in the logs of the action.

@mmospanenko
Copy link

mmospanenko commented May 12, 2023

maybe it requires more commits in current session?

      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

@MaximeLaurenty
Copy link
Author

How would adding more commits to the available history in github action lead to less commits on sentry releases?
Fyi all our releases already have at least one commit.
(and in our case: each release should have exactly one commit given we create a release and deploy after every commit)

@szokeasaurusrex
Copy link
Member

@MaximeLaurenty It would be very helpful if you could provide logs for the GitHub action (when it adds multiple commits to the release).

@MaximeLaurenty
Copy link
Author

@szokeasaurusrex below are the requested logs.
I've obfuscated RUNS_ON related information + removed most of the frontend files.
I've compared this to the run for the previous commit (which created a release with just one commit 30min before) : I've seen no difference besides the sentry projects being handled in a different order and your docker image being different (it was ghcriogetsentryactionreleaseimagelatest_eada24 and is now eb5449)
If we need to change the settings to have more verbose logs tell me how and I can do it.

Run getsentry/action-release@e769183448303de84c5a06aaaddf9da7be26d6c7
  with:
    environment: prod
    projects: spindjango js-angular php-symfony
    sourcemaps: web
    version: 1a25758e5705bb16d10d8a2942682d90f2193a37
    dist: 1a25758e5705bb16d10d8a2942682d90f2193a37
    url_prefix: ~
    finalize: true
  env:
    RUNS_ON_AGENT_ARCH: x64
    RUNS_ON_RUNNER_NAME: *obfuscated*
    RUNS_ON_AGENT_USER: runner
    RUNS_ON_S3_BUCKET_CACHE: *obfuscated*
    RUNS_ON_AWS_REGION: eu-central-1
    RUNS_ON_WORKFLOW_JOB_ID: 35063126803
    ACTIONS_RUNNER_HOOK_JOB_STARTED: /opt/runs-on/pre.sh
    AWS_DEFAULT_REGION: eu-central-1
    AWS_REGION: eu-central-1
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***
    SENTRY_AUTH_TOKEN: ***
    SENTRY_ORG: spinergie
/usr/bin/docker run --name ghcriogetsentryactionreleaseimagelatest_eb5449 --label 40060e --workdir /github/workspace --rm -e "RUNS_ON_AGENT_ARCH" -e "RUNS_ON_RUNNER_NAME" -e "RUNS_ON_AGENT_USER" -e "RUNS_ON_S3_BUCKET_CACHE" -e "RUNS_ON_AWS_REGION" -e "RUNS_ON_WORKFLOW_JOB_ID" -e "ACTIONS_RUNNER_HOOK_JOB_STARTED" -e "AWS_DEFAULT_REGION" -e "AWS_REGION" -e "AWS_ACCESS_KEY_ID" -e "AWS_SECRET_ACCESS_KEY" -e "AWS_SESSION_TOKEN" -e "SENTRY_AUTH_TOKEN" -e "SENTRY_ORG" -e "INPUT_ENVIRONMENT" -e "INPUT_PROJECTS" -e "INPUT_SOURCEMAPS" -e "INPUT_VERSION" -e "INPUT_DIST" -e "INPUT_URL_PREFIX" -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_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_EVENT_PATH" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "GITHUB_ACTION" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -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/spinapp/spinapp":"/github/workspace" ghcr.io/getsentry/action-release-image:latest
> Found 297 files
> Found 297 files
> Analyzing 297 sources
> Found 297 files
> Analyzing 297 sources
> Analyzing 297 sources
> Rewriting sources
> Rewriting sources
> Rewriting sources
> Adding source map references
> Adding source map references
> Adding source map references
> Bundled 297 files for upload
> Bundle ID: 83c79ed3-e60e-566f-8ea2-6eb07c6fd19d
> Bundled 297 files for upload
> Bundle ID: 83c79ed3-e60e-566f-8ea2-6eb07c6fd19d
> Bundled 297 files for upload
> Bundle ID: 83c79ed3-e60e-566f-8ea2-6eb07c6fd19d
> Uploaded files to Sentry
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: spinergie
> Project: js-angular
> Release: 1a25758e5705bb16d10d8a2942682d90f2193a37
> Dist: 1a25758e5705bb16d10d8a2942682d90f2193a37
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/ngsw-worker.js
    ~/safety-worker.js
  Minified Scripts
    ~/assets/angular/ajs-destination-SXJSEU7P.js (sourcemap at ajs-destination-SXJSEU7P.js.map)
(...)
    ~/assets/angular/wind-farm-simulation-XY2EICZS.js (sourcemap at wind-farm-simulation-XY2EICZS.js.map)
    ~/worker-basic.min.js (no sourcemap ref)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/worker-basic.min.js)
  Source Maps
    ~/assets/angular/activity-bar-BB4WWBCL.css.map
    ~/assets/angular/activity-tab.component-LOMZPAX4.css.map
    ~/assets/angular/advanced-filtering-model-5VUC6SQ7.css.map
    ~/assets/angular/ajs-destination-SXJSEU7P.js.map
(...)
    ~/assets/angular/wind-farm-simulation-EHGT6TVO.css.map
    ~/assets/angular/wind-farm-simulation-XY2EICZS.js.map
> File upload complete (processing pending on server)
> Organization: spinergie
> Project: spindjango
> Release: 1a25758e5705bb16d10d8a2942682d90f2193a37
> Dist: 1a25758e5705bb16d10d8a2942682d90f2193a37
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/ngsw-worker.js
    ~/safety-worker.js
  Minified Scripts
    ~/assets/angular/ajs-destination-SXJSEU7P.js (sourcemap at ajs-destination-SXJSEU7P.js.map)
(...)
    ~/assets/angular/wind-farm-simulation-XY2EICZS.js (sourcemap at wind-farm-simulation-XY2EICZS.js.map)
    ~/worker-basic.min.js (no sourcemap ref)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/worker-basic.min.js)
  Source Maps
    ~/assets/angular/activity-bar-BB4WWBCL.css.map
    ~/assets/angular/activity-tab.component-LOMZPAX4.css.map
    ~/assets/angular/advanced-filtering-model-5VUC6SQ7.css.map
    ~/assets/angular/ajs-destination-SXJSEU7P.js.map
(...)
    ~/assets/angular/wind-farm-simulation-EHGT6TVO.css.map
    ~/assets/angular/wind-farm-simulation-XY2EICZS.js.map
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: spinergie
> Project: php-symfony
> Release: 1a25758e5705bb16d10d8a2942682d90f2193a37
> Dist: 1a25758e5705bb16d10d8a2942682d90f2193a37
> Upload type: artifact bundle

Source Map Upload Report
  Scripts
    ~/ngsw-worker.js
    ~/safety-worker.js
  Minified Scripts
    ~/assets/angular/ajs-destination-SXJSEU7P.js (sourcemap at ajs-destination-SXJSEU7P.js.map)
(...)
    ~/assets/angular/wind-farm-simulation-XY2EICZS.js (sourcemap at wind-farm-simulation-XY2EICZS.js.map)
    ~/worker-basic.min.js (no sourcemap ref)
      - warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for ~/worker-basic.min.js)
  Source Maps
    ~/assets/angular/activity-bar-BB4WWBCL.css.map
    ~/assets/angular/activity-tab.component-LOMZPAX4.css.map
    ~/assets/angular/advanced-filtering-model-5VUC6SQ7.css.map
    ~/assets/angular/ajs-destination-SXJSEU7P.js.map
(...)
    ~/assets/angular/wind-farm-simulation-EHGT6TVO.css.map
    ~/assets/angular/wind-farm-simulation-XY2EICZS.js.map

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

No branches or pull requests

3 participants