chainlink-testing-framework icon indicating copy to clipboard operation
chainlink-testing-framework copied to clipboard

POC WIP detectaffectedgopackages

Open tateexon opened this issue 1 year ago • 1 comments


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes introduce a new tool named detectaffectedgopackages to the project. This tool is designed to identify Go packages affected by code changes by analyzing the git diff output. It enhances the development process by automating the detection of affected packages, which is crucial for optimizing build times and ensuring targeted testing. The addition of this tool to the workflow and test configurations ensures that it integrates seamlessly with the existing CI/CD pipeline, facilitating its usage during development and review processes.

What

  • .github/workflows/release-tools.yaml
    • Added tools/detectaffectedgopackages to the tool matrix for release automation.
  • .github/workflows/test.yaml
    • Included tools/detectaffectedgopackages in the matrix.project to ensure it undergoes testing along with other project components.
  • tools/detectaffectedgopackages/Makefile
    • New file to define build and test instructions for the detectaffectedgopackages tool.
  • tools/detectaffectedgopackages/go.mod and tools/detectaffectedgopackages/go.sum
    • New Go module definition and checksums for managing dependencies specific to the new tool.
  • tools/detectaffectedgopackages/main.go
    • Main application code for detectaffectedgopackages, handling git diffs to detect changes in Go packages.
  • tools/detectaffectedgopackages/main_test.go
    • Test suite for the detectaffectedgopackages tool to ensure correct functionality.
  • tools/detectaffectedgopackages/package.json
    • Metadata file describing the detectaffectedgopackages tool, marking its version and description.
  • tools/detectaffectedgopackages/testdata/gitdiff.txt, tools/detectaffectedgopackages/testdata/gitdiffmod.txt, and tools/detectaffectedgopackages/testdata/golist.txt
    • Test data files used in the test suite for simulating various git and go list command outputs.

tateexon avatar Jun 27 '24 14:06 tateexon

Quality Gate failed Quality Gate failed

Failed conditions
7.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube

closing as @lukaszcl will create his own tool to detect blast radius

Tofel avatar Oct 22 '24 11:10 Tofel