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

Unable to create a release #167

Open
kean-fetchpet opened this issue Oct 17, 2023 · 5 comments
Open

Unable to create a release #167

kean-fetchpet opened this issue Oct 17, 2023 · 5 comments

Comments

@kean-fetchpet
Copy link

kean-fetchpet commented Oct 17, 2023

Github Sentry Action Release Bug Report

Environment

dev

How do you use this action?
ubuntu-latest

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

Steps to Reproduce

Below is my github action.

name: deployment

runs-on: ubuntu-latest

defaults:
  run:
    working-directory: web_quote

permissions:
  contents: 'read'
  id-token: 'write'

steps:
  - name: Checkout source code
    uses: 'actions/checkout@v3'
    with:
      sparse-checkout: |
        .github
        web_quote
        components
        quote

  - name: Setup Flutter SDK
    uses: subosito/flutter-action@v2
    with:
      flutter-version: ${{ vars.FLUTTER_VERSION }}
      channel: ${{ vars.FLUTTER_CHANNEL }}

  - name: Install Flutter Dependencies
    run: flutter clean && flutter pub get

  - name: 'build flutter'
    run: flutter build web --web-renderer html --source-maps --release --no-tree-shake-icons

  - name: Create Sentry release
    uses: getsentry/[email protected]
    env:
      SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
      SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
      SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
      SENTRY_LOG_LEVEL: dev
    with:
      environment: dev
      version: ${{ github.sha }}

Expected Result

Able to release successfully.

Actual Result

Got unsupported extension name extensions.worktreeconfig; class=Repository (6)

/usr/bin/docker run --name ghcriogetsentryactionreleaseimagelatest_fc95e8 --label a77ade --workdir /github/workspace --rm -e "FLUTTER_ROOT" -e "PUB_CACHE" -e "CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE" -e "GOOGLE_APPLICATION_CREDENTIALS" -e "GOOGLE_GHA_CREDS_PATH" -e "CLOUDSDK_CORE_PROJECT" -e "CLOUDSDK_PROJECT" -e "GCLOUD_PROJECT" -e "GCP_PROJECT" -e "GOOGLE_CLOUD_PROJECT" -e "CLOUDSDK_METRICS_ENVIRONMENT" -e "CLOUDSDK_METRICS_ENVIRONMENT_VERSION" -e "SENTRY_AUTH_TOKEN" -e "SENTRY_ORG" -e "SENTRY_PROJECT" -e "SENTRY_LOG_LEVEL" -e "INPUT_ENVIRONMENT" -e "INPUT_VERSION" -e "INPUT_SOURCEMAPS" -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_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 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/fetch_flutter/fetch_flutter":"/github/workspace" ghcr.io/getsentry/action-release-image:latest
Error: Command failed: /action-release/dist/sentry-cli releases set-commits 0b60074adcfdec3bcf8b920d934253b661b5309b --auto
DEBUG 2023-10-17 10:00:48.012425860 +00:00 sentry-cli version: 1.67.2, platform: "linux", architecture: "x86_64"
INFO 2023-10-17 10:00:48.012693459 +00:00 sentry-cli was invoked with the following command line: "/action-release/dist/sentry-cli" "releases" "set-commits" "0b60074adcfdec3bcf8b920d934253b661b5309b" "--auto"
DEBUG 2023-10-17 10:00:48.013131557 +00:00 request GET https://sentry.io/api/0/organizations/***/repos/?cursor=
DEBUG 2023-10-17 10:00:48.013154857 +00:00 pipeline: github-action-release/1.4.1
DEBUG 2023-10-17 10:00:48.013165057 +00:00 using token authentication
DEBUG 2023-10-17 10:00:48.013175257 +00:00 retry number 0, max retries: 0
DEBUG 2023-10-17 10:00:48.098444896 +00:00 > GET /api/0/organizations/***/repos/?cursor= HTTP/1.1
DEBUG 2023-10-17 10:00:48.098482196 +00:00 > Host: sentry.io
DEBUG 2023-10-17 10:00:48.098490896 +00:00 > Accept: /
DEBUG 2023-10-17 10:00:48.098498696 +00:00 > Connection: TE
DEBUG 2023-10-17 10:00:48.098505796 +00:00 > TE: gzip
DEBUG 2023-10-17 10:00:48.098512996 +00:00 > User-Agent: sentry-cli/1.67.2 github-action-release/1.4.1
DEBUG 2023-10-17 10:00:48.098945694 +00:00 > Authorization: ***
DEBUG 2023-10-17 10:00:48.184431732 +00:00 < HTTP/1.1 200 OK
DEBUG 2023-10-17 10:00:48.184479132 +00:00 < server: nginx
DEBUG 2023-10-17 10:00:48.184490232 +00:00 < date: Tue, 17 Oct 2023 10:00:48 GMT
DEBUG 2023-10-17 10:00:48.184500432 +00:00 < content-type: application/json
DEBUG 2023-10-17 10:00:48.184509632 +00:00 < Content-Length: 219
DEBUG 2023-10-17 10:00:48.184518632 +00:00 < link: https://sentry.io/api/0/organizations/***/repos/?&cursor=100:-1:1; rel="previous"; results="false"; cursor="100:-1:1", https://sentry.io/api/0/organizations/***/repos/?&cursor=100:1:0; rel="next"; results="false"; cursor="100:1:0"
DEBUG 2023-10-17 10:00:48.184527732 +00:00 < allow: GET, POST, HEAD, OPTIONS
DEBUG 2023-10-17 10:00:48.184535832 +00:00 < access-control-allow-methods: GET, POST, HEAD, OPTIONS
DEBUG 2023-10-17 10:00:48.184552732 +00:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken
DEBUG 2023-10-17 10:00:48.184561832 +00:00 < access-control-expose-headers: X-Sentry-Error, X-Sentry-Direct-Hit, X-Hits, X-Max-Hits, Endpoint, Retry-After, Link
DEBUG 2023-10-17 10:00:48.184569532 +00:00 < access-control-allow-origin: *
DEBUG 2023-10-17 10:00:48.184577332 +00:00 < x-sentry-rate-limit-remaining: 199
DEBUG 2023-10-17 10:00:48.184585432 +00:00 < x-sentry-rate-limit-limit: 200
DEBUG 2023-10-17 10:00:48.184593331 +00:00 < x-sentry-rate-limit-reset: 1697536849
DEBUG 2023-10-17 10:00:48.184601231 +00:00 < x-sentry-rate-limit-concurrentremaining: 199
DEBUG 2023-10-17 10:00:48.184608731 +00:00 < x-sentry-rate-limit-concurrentlimit: 200
DEBUG 2023-10-17 10:00:48.184617431 +00:00 < vary: Accept-Language, Cookie
DEBUG 2023-10-17 10:00:48.184628131 +00:00 < content-language: en
DEBUG 2023-10-17 10:00:48.184636031 +00:00 < x-frame-options: deny
DEBUG 2023-10-17 10:00:48.184643831 +00:00 < x-content-type-options: nosniff
DEBUG 2023-10-17 10:00:48.184651531 +00:00 < x-xss-protection: 1; mode=block
DEBUG 2023-10-17 10:00:48.184660131 +00:00 < content-security-policy: font-src * data:; object-src 'self'; frame-ancestors 'self' *.sentry.io; style-src * 'unsafe-inline'; connect-src *; script-src 'self' 'unsafe-inline' 'report-sample' 'unsafe-eval' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com ssl.google-analytics.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; base-uri 'none'; default-src *; img-src * blob: d

@facundofarias
Copy link

Having the same issue:

Error: Command failed: /action-release/dist/sentry-cli releases set-commits d3951eea0fc8286cb56fe887a04b12ba1d91405a --auto error: could not find repository from '.'; class=Repository (6); code=NotFound (-3)

Any news? Using the API does work.

@scefali
Copy link
Contributor

scefali commented Nov 14, 2023

@facundofarias @kean-fetchpet Is it possible there is no git repo at that path? What happens if you run git status in your action.

@facundofarias
Copy link

@scefali It seems that by doing checkout it's working, thanks

@sujanbasnet1
Copy link

Seeing the same issue. I'm using actions/checkout@v4.

Error: Command failed: /action-release/node_modules/@sentry/cli-linux-x64/bin/sentry-cli releases propose-version
  DEBUG   2024-02-23 08:30:30.788385436 +00:00 sentry-cli version: 2.24.1, platform: "linux", architecture: "x86_64"
  INFO    2024-02-23 08:30:30.7884651[42](https://github.com/Cabinet-Health-Inc/Cabinet/actions/runs/8016569522/job/21898737885?pr=1476#step:7:43) +00:00 sentry-cli was invoked with the following command line: "/action-release/node_modules/@sentry/cli-linux-x64/bin/sentry-cli" "releases" "propose-version"
error: Could not automatically determine release name:
	 unsupported extension name extensions.worktreeconfig; class=Repository (6) 

Please ensure your version control system is configured correctly, or provide a release name manually.
  DEBUG   2024-02-23 08:30:30.788885292 +00:00 skipping update nagger because session is not attended

Output of git status

HEAD detached at pull/1476/merge
nothing to commit, working tree clean

@nitriques
Copy link

I ran into the same problem. Turns out, you just need to run git config --unset extensions.worktreeConfig before the sentry action and it works.
Somehow, action/checkout uses it for sparse checkout, but the lib sentry uses to access git data does not: Ref libgit2/libgit2#6044 ?

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

5 participants