spotify / XCRemoteCache

Other
825 stars 50 forks source link

postbuild step failed timeout for particular library in the app #231

Open anuragstar opened 7 months ago

anuragstar commented 7 months ago

My integration setup @polac24 I am using CocoaPods cocoapods-xcremotecache plugin, I am running app in producer mode for remote server we are using S3. We are getting postbuild step failed timeout for some random library everytime, any way to increase the timeout, or skip the libraries to upload.

Screenshot 2023-11-22 at 9 21 40 AM

[ ] CocoaPods cocoapods-xcremotecache plugin [ ] Automatic integration using xcprepare integrate ... [ ] Manual integration [ ] Carthage

Expected/desired behavior

Minimal reproduction of the problem with instructions

Producer Logs

 [REPLACE THIS WITH YOUR INFORMATION] 

Consumer Logs

 [REPLACE THIS WITH YOUR INFORMATION] 

Pods/Carthage file

 [REPLACE THIS WITH YOUR INFORMATION] 

Environment

Post build stats

 [REPLACE THIS WITH YOUR INFORMATION] 

Others

polac24 commented 7 months ago

Hi!

  1. Maybe that problem surfaces because of the problem to be fixed in https://github.com/spotify/XCRemoteCache/pull/230?
  2. To skip a given library, you can pass exclude_targets parameter in your Podfile, see
  3. There is one configurable timeout: timeout_response_data_chunks_interval, if you know that the timeout is too strict (I personally doubt)
  4. I recommend capturing logs on you CI log show --predicate 'sender == "xcpostbuild"' --style compact --info --debug -last 5m, right after the errror
anuragstar commented 7 months ago

Hey @polac24 When running on CI on post build merge on development branch, after switching to producer mode, by script at run time in podFile and .rcinfo file, want to understand facing strange issue in - bundle exec pod install

Error


NoMethodError - undefined method `[]' for false:FalseClass
/Users/xxxx/.rvm/gems/ruby-3.0.6/gems/cocoapods-xcremotecache-0.0.18/lib/cocoapods-xcremotecache/command/hooks.rb:464:in `block in <class:XCRemoteCache>'
polac24 commented 7 months ago

The error says that xcprepare --configuration some_configuration --platform some_platform did not succeed. Most likely the command to check output will resolve to (but I just guess a configuration and a platform:

xcprepare --configuration Debug --platform iphonesimulator

after switching to producer mode

you say "by script" but with CocoaPods, you should always configure everything in Podfile. If you provide a demo project with steps required to reproduce it, I could take a look if that is a bug on our side but most likely you mix cocoapods and manual integration modes (which are exclusive to each other).

anuragstar commented 6 months ago

hey @polac24 We have integrated on our CI jobs, where in producer mode we have configured the pipeline to run in producer mode and generate artifact and publish it to S3, but when running in consumer mode for PR checks or on-demand builds from particular branch, where artifact is generated from producer mode, It shows error as - _**XCRemoteCache disabled - no artifacts available**_

We tried running producer and consumer mode on different mac machine, but consumer mode always returns - XCRemoteCache disabled - no artifacts available, even we tried producer and consumer on same CI machine, it results in same error

I checked the configuration in Podfile and the .rcinfo file configuration is correct, can you please help us to unblock this issuse.

anuragstar commented 6 months ago

On my local machine both producer-fast and consumer are working fine, but on CI, consumer mode is failing always with this error - XCRemoteCache disabled - no artifacts available, I have set configuration correctly in Podfile and .rcinfo file

polac24 commented 6 months ago

What does this command print, quickly after the XCRemoteCache disabled - no artifacts available is printed?

log show --predicate 'sender BEGINSWITH "xc"' --style compact --info --debug -last 10m

It should print all HTTP requests and some 404 (except the probe requests, which can fail) should give you some hints. There might be problems like: only a single-branch is checked out, incorrect base_branch or many other.

Also, check FAQ out.

anuragstar commented 6 months ago

@polac24 let me add logs and check it, but on the same branch, I can run from my local, producer, and consumer works fine.

anuragstar commented 6 months ago

@polac24 Is it possible for you to connect on a call and close this issue? please let me know when you will be free for 15 mins call