Skip to content

Managing dependencies

Updating dependencies

Dependabot is a GitHub-integrated tool that automates dependency management by regularly checking for updates and creating pull requests (PRs) to keep your project's dependencies current. In the diracx-web repository, Dependabot is configured to run weekly, generating PRs for any outdated or vulnerable dependencies.

  1. Review Dependabot PRs:
  2. Access PRs: Navigate to the repository's "Pull Requests" section to view Dependabot's submissions.
  3. Examine Changes: Assess the proposed updates, paying close attention to any major version changes that might introduce breaking changes.

  4. Verify Test Results:

  5. Automated Tests: Ensure that all continuous integration (CI) checks and automated tests pass successfully for each Dependabot PR.
  6. Handle Failures: If tests fail, investigate the cause by reviewing the dependency's changelog or release notes to identify any breaking changes or incompatibilities.

  7. Adapt Code if Necessary:

  8. Local Checkout: Check out the PR branch locally.
  9. Implement Fixes: Modify the codebase to address any issues introduced by the dependency update.
  10. Test Changes: Run the test suite locally to confirm that your changes resolve the issues.
  11. Push Updates: After making the necessary adjustments, commit and push your changes to the Dependabot branch.

  12. Merge PRs:

  13. Final Review: Once tests pass and the codebase is stable, proceed to merge the PR into the main branch.
  14. Post-Merge Actions: Monitor the application post-deployment to ensure that the update does not introduce any unforeseen issues.

Managing Security Vulnerabilities

Dependabot also helps in identifying and addressing security vulnerabilities in your project's dependencies. When a vulnerability is detected, Dependabot generates alerts and can automatically create PRs to update the affected dependencies.

Navigate to the repository's "Security" tab and select "Dependabot alerts" to view any security vulnerabilities identified in the dependencies.