zarfld / AVB-Windows

A repository for enabling AVB functionality on Windows 10 using Intel i210
0 stars 0 forks source link

Feature: Enhanced Build Process with Automated Error Detection and Issue Creation #23

Open zarfld opened 1 day ago

zarfld commented 1 day ago

Feature Description: Enhanced Build Process with Automated Error Detection and Issue Creation

Objective: Improve the build process by implementing a system that checks for build errors from previous build iterations. If no logs or errors are available, the system should skip the error-checking step. When build errors occur, the system should automatically create issues in the repository to facilitate prompt resolution.


1. Overview

The proposed feature aims to enhance the existing Continuous Integration (CI) pipeline by:


2. Functional Requirements

2.1. Build Error Checking
2.2. Automated Issue Creation

3. Implementation Details

3.1. Integration with CI Pipeline
3.2. Error Detection Mechanism
3.3. Conditional Execution
3.4. Issue Creation Process

4. Steps to Implement

4.1. Modify CI Workflow
4.2. Implement Conditional Logic
4.3. Automate Issue Creation
4.4. Testing

6. Benefits


7. Considerations


8. Future Enhancements


9. Conclusion

Implementing this feature enhances the robustness of the build process by ensuring that build errors are promptly detected and addressed. Automating the creation of issues streamlines the workflow, reduces manual effort, and contributes to overall code quality and project stability.


Note: The specific implementation details may vary based on the CI tool and repository hosting service used. Adjust the scripts and configurations accordingly to fit your project's environment.

zarfld commented 1 day ago

see https://github.com/zarfld/AVB-Windows/issues/36

the issue get comments like

**Build Failure Details:**
- **Commit SHA**: <commit-sha>
- **Error Message**: []
- **Total Lines**: 0
- **Error Count**: 0
- **Build Logs**: <link-to-logs>
- **Timestamp**: <timestamp>

seems still like a template - no information about the errorrs occured nor a link to build logs

zarfld commented 1 day ago

errors occured but no logs found to upload?

:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(789,40): error C2065: 'Filter': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(789,60): error C2065: 'SourceList': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(790,9): error C2065: 'WSASetLastError': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(794,12): error C2065: 'IP_MSFILTER': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(794,12): fatal error C1003: error count exceeds 100; stopping compilation [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] 96 Warning(s) 417 Error(s) Time Elapsed 00:00:22.22 Error: Process completed with exit code 1. 0s 0s 0s 0s 0s 0s 0s 0s 0s 0s 0s 0s 0s Run actions/upload-artifact@v3 Warning: No files were found with the provided path: build.log. No artifacts will be uploaded. 2s Run python scripts/issue_creation.py

Issue created: https://github.com/zarfld/AVB-Windows/issues/36

zarfld commented 1 day ago

errors but no build log found: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(790,9): error C2065: 'WSASetLastError': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(794,12): error C2065: 'IP_MSFILTER': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(794,12): fatal error C1003: error count exceeds 100; stopping compilation [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] 96 Warning(s) 417 Error(s) Time Elapsed 00:00:22.71 Error: Process completed with exit code 1.

[debug]Finishing: Build solution

0s

[debug]Evaluating condition for step: 'Run Unit Tests'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

0s

[debug]Evaluating condition for step: 'Run PVS-Studio Analysis'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

0s

[debug]Evaluating condition for step: 'Check Code Formatting'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

0s 0s 0s 0s 0s 0s 0s 0s 0s 1s 2s

[debug]Evaluating: secrets.GITHUB_TOKEN

[debug]Evaluating Index:

[debug]..Evaluating secrets:

[debug]..=> Object

[debug]..Evaluating String:

[debug]..=> 'GITHUB_TOKEN'

[debug]=> '***'

[debug]Result: '***'

[debug]Evaluating: github.sha

[debug]Evaluating Index:

[debug]..Evaluating github:

[debug]..=> Object

[debug]..Evaluating String:

[debug]..=> 'sha'

[debug]=> '12829a46c8e3676666fd6f6983c181dbe96c742c'

[debug]Result: '12829a46c8e3676666fd6f6983c181dbe96c742c'

[debug]Evaluating: steps.upload_build_logs.outputs.url

[debug]Evaluating Index:

[debug]..Evaluating Index:

[debug]....Evaluating Index:

[debug]......Evaluating steps:

[debug]......=> Object

[debug]......Evaluating String:

[debug]......=> 'upload_build_logs'

[debug]....=> null

[debug]..=> null

[debug]=> null

[debug]Result: null

[debug]Evaluating condition for step: 'Run Issue Creation'

[debug]Evaluating: failure()

[debug]Evaluating failure:

[debug]=> true

[debug]Result: true

[debug]Starting: Run Issue Creation

[debug]Loading inputs

[debug]Loading env

Run python scripts/issue_creation.py

[debug]C:\Program Files\PowerShell\7\pwsh.EXE -command ". 'D:\a_temp\66965fa0-be24-428a-b8c2-2a7e642783d6.ps1'"

Issue created: https://github.com/zarfld/AVB-Windows/issues/36

[debug]Finishing: Run Issue Creation

zarfld commented 23 hours ago
  1. the links to build build.log missing. it is not attached either
  2. message states "error count exceeds 100; stopping compilation" but these logs are for these vcxproj are also required

    Build Failure Details:

    • Commit SHA: 754ddc3de6a4e966c8d4741e876866df429ea69f
    • Error Message: Line 1: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(790,9): error C2065: 'WSASetLastError': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] Line 2: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(794,12): error C2065: 'IP_MSFILTER': undeclared identifier [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj] Line 3: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\ws2tcpip.h(794,12): fatal error C1003: error count exceeds 100; stopping compilation [D:\a\AVB-Windows\AVB-Windows\GUI\AVBTool.vcxproj]
    • Total Lines: 3
    • Error Count: 3
    • Build Logs:
    • Timestamp:
zarfld commented 23 hours ago

[debug]Evaluating condition for step: 'Upload Build Logs'

[debug]Evaluating: failure()

[debug]Evaluating failure:

[debug]=> true

[debug]Result: true

[debug]Starting: Upload Build Logs

[debug]Loading inputs

[debug]Loading env

Run actions/upload-artifact@v3

[debug]followSymbolicLinks 'true'

[debug]implicitDescendants 'true'

[debug]omitBrokenSymbolicLinks 'true'

[debug]excludeHiddenFiles 'true'

[debug]followSymbolicLinks 'true'

[debug]implicitDescendants 'true'

[debug]matchDirectories 'true'

[debug]omitBrokenSymbolicLinks 'true'

[debug]excludeHiddenFiles 'true'

[debug]Search path 'D:\a\AVB-Windows\AVB-Windows\build.log'

[debug]File:D:\a\AVB-Windows\AVB-Windows\build.log was found using the provided searchPath

With the provided path, there will be 1 file uploaded

[debug]Root artifact directory is D:\a\AVB-Windows\AVB-Windows

Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging Artifact name is valid!

[debug]Artifact Url: https://pipelinesghubeus[2](https://github.com/zarfld/AVB-Windows/actions/runs/11118774757/job/30893602109#step:21:2)4.actions.githubusercontent.com/xm21dknC2ONvT1PiSc8e1MZeM55xwb21kRZaRz[3](https://github.com/zarfld/AVB-Windows/actions/runs/11118774757/job/30893602109#step:21:3)Me6tz24uoSi/_apis/pipelines/workflows/1111877[4](https://github.com/zarfld/AVB-Windows/actions/runs/11118774757/job/30893602109#step:21:4)757/artifacts?api-version=6.0-preview

[debug]Upload Resource URL: https://pipelinesghubeus24.actions.githubusercontent.com/xm21dknC2ONvT1PiSc8e1MZeM[5](https://github.com/zarfld/AVB-Windows/actions/runs/11118774757/job/30893602109#step:21:5)5xwb21kRZaRz3Me6tz24uoSi/_apis/resources/Containers/31454999

Container for artifact "build-logs" successfully created. Starting upload of file(s)

[debug]File Concurrency: 2, and Chunk Size: 8388608

[debug]D:\a\AVB-Windows\AVB-Windows\build.log is greater than 64k in size. Creating a gzip file on-disk C:\Users\RUNNER~1\AppData\Local\Temp\tmp-1992-rUb7aPhKZVM3 to potentially reduce the upload size

[debug]The gzip file created for D:\a\AVB-Windows\AVB-Windows\build.log is smaller than the original file. The file will be uploaded using gzip.

[debug]deleting temporary gzip file C:\Users\RUNNER~1\AppData\Local\Temp\tmp-1992-rUb7aPhKZVM3

[debug]File: 1/1. D:\a\AVB-Windows\AVB-Windows\build.log took 261.306 milliseconds to finish upload

Total size of all the files uploaded is 15306 bytes File upload process has finished. Finalizing the artifact upload

[debug]Artifact Url: https://pipelinesghubeus24.actions.githubusercontent.com/xm21dknC2ONvT1PiSc[8](https://github.com/zarfld/AVB-Windows/actions/runs/11118774757/job/30893602109#step:21:8)e1MZeM55xwb21kRZaRz3Me6tz24uoSi/_apis/pipelines/workflows/11118774757/artifacts?api-version=6.0-preview

[debug]URL is https://pipelinesghubeus24.actions.githubusercontent.com/xm21dknC2ONvT1PiSc8e1MZeM55xwb21kRZaRz3Me6tz24uoSi/_apis/pipelines/workflows/11118774757/artifacts?api-version=6.0-preview&artifactName=build-logs

[debug]Artifact build-logs has been successfully uploaded, total size in bytes: 259948

Artifact has been finalized. All files have been successfully uploaded! The raw size of all the files that were specified for upload is 259948 bytes The size of all the files that were uploaded is 15306 bytes. This takes into account any gzip compression used to reduce the upload size, time and storage Note: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads 0s 2s

[debug]Evaluating: secrets.GITHUB_TOKEN

[debug]Evaluating Index:

[debug]..Evaluating secrets:

[debug]..=> Object

[debug]..Evaluating String:

[debug]..=> 'GITHUB_TOKEN'

[debug]=> '***'

[debug]Result: '***'

[debug]Evaluating: github.sha

[debug]Evaluating Index:

[debug]..Evaluating github:

[debug]..=> Object

[debug]..Evaluating String:

[debug]..=> 'sha'

[debug]=> '639350f512c05c78aa4c5b249b73841d784a23b4'

[debug]Result: '639350f512c05c78aa4c5b249b73841d784a23b4'

[debug]Evaluating: steps.upload_build_logs.outputs.url

[debug]Evaluating Index:

[debug]..Evaluating Index:

[debug]....Evaluating Index:

[debug]......Evaluating steps:

[debug]......=> Object

[debug]......Evaluating String:

[debug]......=> 'upload_build_logs'

[debug]....=> null

[debug]..=> null

[debug]=> null

[debug]Result: null

[debug]Evaluating condition for step: 'Run Issue Creation'

[debug]Evaluating: failure()

[debug]Evaluating failure:

[debug]=> true

[debug]Result: true

[debug]Starting: Run Issue Creation

[debug]Loading inputs

[debug]Loading env

Run python scripts/issue_creation.py

[debug]C:\Program Files\PowerShell\7\pwsh.EXE -command ". 'D:\a_temp\49ce2a3c-fabe-43d2-af63-0d316626178c.ps1'"

Issue created: https://github.com/zarfld/AVB-Windows/issues/36

[debug]Finishing: Run Issue Creation

zarfld commented 23 hours ago

created issue says "No Logs Available" iven if upload tasks says "upload successfully" and errors during buils occured:

[debug]Evaluating condition for step: 'Build solution'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> true

[debug]Result: true

[debug]Starting: Build solution

[debug]Loading inputs

[debug]Loading env

Run msbuild AVB_Windows.sln /p:Configuration=Release > build.log 2>&1

[debug]C:\Program Files\PowerShell\7\pwsh.EXE -command ". 'D:\a_temp\198ed541-486f-46be-8f53-26890de2481e.ps1'"

Error: Process completed with exit code 1.

[debug]Finishing: Build solution

0s

[debug]Evaluating condition for step: 'Ensure log file exists'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

....

....

[debug]Evaluating condition for step: 'Update README'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

0s

[debug]Evaluating condition for step: 'Run Error Detection'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

0s

[debug]Evaluating condition for step: 'Save Errors and Metadata'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

0s

[debug]Evaluating condition for step: 'Install PyGithub'

[debug]Evaluating: success()

[debug]Evaluating success:

[debug]=> false

[debug]Result: false

1s 0s 2s

[debug]Evaluating: secrets.GITHUB_TOKEN

[debug]Evaluating Index:

[debug]..Evaluating secrets:

[debug]..=> Object

[debug]..Evaluating String:

[debug]..=> 'GITHUB_TOKEN'

[debug]=> '***'

[debug]Result: '***'

[debug]Evaluating: github.sha

[debug]Evaluating Index:

[debug]..Evaluating github:

[debug]..=> Object

[debug]..Evaluating String:

[debug]..=> 'sha'

[debug]=> '9acb90765357ca47b27384f3163ced4d62635a56'

[debug]Result: '9acb90765357ca47b27384f3163ced4d62635a56'

[debug]Evaluating: steps.upload_build_logs.outputs.url

[debug]Evaluating Index:

[debug]..Evaluating Index:

[debug]....Evaluating Index:

[debug]......Evaluating steps:

[debug]......=> Object

[debug]......Evaluating String:

[debug]......=> 'upload_build_logs'

[debug]....=> null

[debug]..=> null

[debug]=> null

[debug]Result: null

[debug]Evaluating condition for step: 'Run Issue Creation'

[debug]Evaluating: failure()

[debug]Evaluating failure:

[debug]=> true

[debug]Result: true

[debug]Starting: Run Issue Creation

[debug]Loading inputs

[debug]Loading env

Run python scripts/issue_creation.py

[debug]C:\Program Files\PowerShell\7\pwsh.EXE -command ". 'D:\a_temp[1](https://github.com/zarfld/AVB-Windows/actions/runs/11119082454/job/30893795986#step:18:1)8724271-0a39-4ec2-b8bf-33b21dae08d8.ps1'"

Issue created: https://github.com/zarfld/AVB-Windows/issues/[3](https://github.com/zarfld/AVB-Windows/actions/runs/11119082454/job/30893795986#step:18:3)6

[debug]Finishing: Run Issue Creation