Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix/handle missing digger config gracefully#2517

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
joshuamkite-nfb wants to merge4 commits intodiggerhq:develop
base:develop
Choose a base branch
Loading
fromcheckatrade-dev:fix/handle-missing-digger-config-gracefully

Conversation

@joshuamkite-nfb
Copy link
Contributor

@joshuamkite-nfbjoshuamkite-nfb commentedDec 16, 2025
edited
Loading

Problem

Digger wassporadically showing git cloning errors in repositories that don't have Digger configured:

  • "Error loading digger config: error loading digger.yml: error cloning and loading config: git command failed: exit status 128"
  • "gnutls_handshake() failed: The TLS connection was non-properly terminated"

Root Cause

These issue appear to occur when the background projects refresh service and GitHub Actions process repositories without digger.yml files:

  1. Background projects refresh service clones repositories from the organization
  2. Repositories without digger.yml files get processed withgenerateProjects=true
  3. Empty configuration triggers terragrunt parsing if terragrunt files exist in those repositories
  4. Terragrunt parsing attempts to clone remote repositories referenced in terragrunt configurations
  5. Network/TLS issues cause git cloning failures

ThegenerateProjects=true parameter is hardcoded in multiple places, e.g.:

Solution

ModifiedLoadDiggerConfigYaml function to handle missing configuration files gracefully by returning an empty configuration instead of an error when no config file is found.

Changes

  • libs/digger_config/digger_config.go: Changed error handling to return empty configuration when no config file exists
  • libs/digger_config/converters.go: Added nil check incopyWorkflowConfiguration to prevent panic when workflow config is nil
  • libs/ci/github/github.go: Added nil pointer safety checks for GitHub payload processing with helper functionsgetStringValue andgetWorkflowCommands
  • libs/digger_config/digger_config_test.go: Updated existing test and added new test to verify graceful handling
  • cli/pkg/integration/integration_test.go: Fixed test JSON to include required sender and repository fields

Testing

  • All existing tests continue to pass (verified with full test suite:go test -v)
  • New tests verify that missing config files are handled gracefully both with and without project generation
  • Existing test coverage ensures repositories with Digger configuration continue to work as expected

Impact

  • Repositories without Digger configuration no longer show git cloning errors
  • Maintains full backward compatibility for configured repositories
  • Improves reliability of background projects refresh service and GitHub Actions
  • Reduces noise in logs and error reporting

🧠AI Usage Details:

Used Claude (Anthropic's AI assistant) for:

  • Code analysis and debugging asssitance to identify the root cause
  • Root cause investigation and tracing through multiple components
  • Implementation of the fix and test updates
  • Code review and ensuring consistency with project style
  • All code was reviewed and verified manually

- Added nil checks in GitHub payload processing to prevent panics- Added helper functions getStringValue and getWorkflowCommands for safe access- Updated integration test JSON to include missing sender and repository fields
@joshuamkite-nfb
Copy link
ContributorAuthor

Looks likesecrets.DEPOT_TOKEN is expired/invalid for the Docker based tests 🤷🏻‍♂️

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@joshuamkite-nfb

[8]ページ先頭

©2009-2025 Movatter.jp