Hi team - setting up dagster with dbt for the firs...
# dagster-plus
c
Hi team - setting up dagster with dbt for the first time (hi!), using the cloud template on github for a PoC. After putting our dbt codebase into the folder, and getting the repository working successfully locally, I raised a pull request - with the below result failing on 'build and deploy python executable'.
Copy code
...
  File "/home/runner/.pex/unzipped_pexes/2e536a00a742406eeee720e381d89289fe105add/builder/deploy.py", line 313, in cli
    deploy_main(
  File "/home/runner/.pex/unzipped_pexes/2e536a00a742406eeee720e381d89289fe105add/builder/deploy.py", line 432, in deploy_main
    code_location.create_or_update_branch_deployment_from_github_context(
  File "/home/runner/.pex/unzipped_pexes/2e536a00a742406eeee720e381d89289fe105add/builder/code_location.py", line 94, in create_or_update_branch_deployment_from_github_context
    author_avatar_url=github_event.get_github_avatar_url(),
  File "/home/runner/.pex/unzipped_pexes/2e536a00a742406eeee720e381d89289fe105add/builder/github_context.py", line 70, in get_github_avatar_url
    return commit.author.avatar_url
AttributeError: 'NoneType' object has no attribute 'avatar_url'
Error: Failed to deploy Python Executable. Try disabling fast deploys by setting `ENABLE_FAST_DEPLOYS: 'false'` in your .github/workflows/*yml.
Error: Process completed with exit code 1.
Running without fast deploys fails also, with:
Copy code
...
/usr/bin/docker run --name ghcriodagsteriodagstercloudaction0111_acca7a --label 49859c --workdir /github/workspace --rm -e "DAGSTER_CLOUD_URL" -e "DAGSTER_CLOUD_API_TOKEN" -e "ENABLE_FAST_DEPLOYS" -e "REGISTRY_URL" -e "AWS_ECR_USERNAME" -e "AWS_ECR_PASSWORD" -e "AWS_DEFAULT_REGION" -e "CUSTOM_BASE_IMAGE_ALLOWED" -e "GITHUB_TOKEN" -e "INPUT_ORGANIZATION_ID" -e "INPUT_ACTION" -e "INPUT_PR" -e "INPUT_LOCATION" -e "INPUT_DEPLOYMENT" -e "INPUT_IMAGE_TAG" -e "INPUT_DAGSTER_CLOUD_URL" -e "INPUT_LOCATION_NAME" -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 "GITHUB_ACTION_PATH" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true --entrypoint "/notify.sh" -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/acumen-dagster/acumen-dagster":"/github/workspace" <http://ghcr.io/dagster-io/dagster-cloud-action:0.1.11|ghcr.io/dagster-io/dagster-cloud-action:0.1.11>  "1"
Traceback (most recent call last):
  File "/create_or_update_comment.py", line 81, in <module>
    main()
  File "/create_or_update_comment.py", line 33, in main
    pr = repo.get_pull(pr_id)
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 2819, in get_pull
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "<https://docs.github.com/rest/reference/pulls#get-a-pull-request>"}
Any ideas?
s
Hi Chris - it seems the workflows are not able to access information about the current repository. The workflows use
GITHUB_TOKEN
to read information about the repository and post a comment to the pull request. Can you please check if you have restrictive permissions by default for
GITHUB_TOKEN
as described here?
c
Thanks @Shalabh Chaturvedi - adjusted to allow read/write permissions to repository from organisation level, and on the repo itself. Same 'NoneType' on 'avatar_url' error persists with fast deploy; the docker deployment has worked so can progress! Any ideas on the fast deploy issue?
s
Are your commits from a github user? That code just loads the avatar url and for some reason can't find the github user.
c
Yes they are - the same user that authorized the dagster cloud connection. The repo is in an organisation
s
It appears another user is seeing a similar error. I'm working on rolling out a fix for this today and will let you know when it is ready to test again: https://dagster.slack.com/archives/C02LJ7G0LAZ/p1676638244219109
I posted a tenative fix here: https://dagster.slack.com/archives/C02LJ7G0LAZ/p1676656778367509?thread_ts=1676638244.219109&amp;cid=C02LJ7G0LAZ. If you try it out please let me know if it fixes the error.