danger / swift

⚠️ Stop saying "you forgot to …" in code review
https://danger.systems/swift/
MIT License
1.04k stars 136 forks source link

Danger Swift fails on some PRs #481

Open arpitdunzo opened 2 years ago

arpitdunzo commented 2 years ago

Failures on CircleCI:

One:

!/bin/bash --login -o pipefail

swift run danger-swift ci [45/45] Build complete!swiftKwiftt.swiftProvider.swiftt Too long with no output (exceeded 30m0s): context deadline exceeded

!/bin/bash --login -o pipefail

Two: swift run danger-swift ci [1/1] Planning build [2/9] Compiling Logger Logger.swiftwift [5/24] Merging module DangerShellExecutor [22/26] Compiling RunnerLib String+Path.swiftwiftift [23/26] Merging module RunnerLib [25/26] Merging module RunnerLib [28/38] Compiling DangerDependenciesResolver FileCreator.swift2K [33/38] Compiling DangerDependenciesResolver Script.swiftwift2K [38/43] Merging module DangerDependenciesResolverataProvider.swiftt [41/44] Compiling Runner Edit.swiftManager.swift [44/45] Merging module Runnerwiftt [45/45] Build complete!swift

Three:

!/bin/bash --login -o pipefail

swift run danger-swift ci [45/45] Build complete!swiftKwiftt.swiftMaker.swift[2Kt Too long with no output (exceeded 30m0s): context deadline exceeded

f-meloni commented 2 years ago

are you caching the .build? I saw that happening on Circle, when the cache is used it sometimes just stops.

arpitdunzo commented 2 years ago

yes @f-meloni we are caching the .build but we can avoid that if it fixes the problem. Just curious to know how caching could result in above timeout scenarios since it's happening rarely only for a few PRs. Please explain.

theScud commented 2 years ago

To add some more details to this. The issues occurs repeatedly on a particular PR/commit. Since the .build folder is caches across all PR (JOBs) . i don't think its something to do with .build cache else we would have either

  1. All CI test jobs should get stuck
  2. Totally random occurrences across PRs/ Commits and Jobs

There is something in the particular PR changes which is causing the problem. Also this is not something related to Danger Set up as when i was debugging this. there where no changes to Danger on the PR/Commit.

i am thinking File read operation might have something to do with it

patrvvvk commented 6 months ago

We have very similar issue - danger 3.18.0. It hangs on public func diff(forFile file: String, sourceBranch: String) -> Result<FileDiff, Error>