Skip to content

Commit e81096a

Browse files
author
Sivaram Mothiki
committed
Merge pull request #237 from smothiki/slugbug
fix(storagepoll): dont poll s3 for slugfile if app type is dockerfile
2 parents 4875b97 + c22980b commit e81096a

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

pkg/gitreceive/build.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,16 @@ func build(conf *Config, s3Client *storage.Client, kubeClient *client.Client, fs
226226
slugBuilderInfo.AbsoluteSlugObjectKey(),
227227
)
228228
// poll the s3 server to ensure the slug exists
229-
if err := storage.WaitForObject(
230-
s3Client,
231-
conf.Bucket,
232-
slugBuilderInfo.AbsoluteSlugObjectKey(),
233-
conf.ObjectStorageTickDuration(),
234-
conf.ObjectStorageWaitDuration(),
235-
); err != nil {
236-
return fmt.Errorf("Timed out waiting for object in storage, aborting build (%s)", err)
229+
if !usingDockerfile {
230+
if err := storage.WaitForObject(
231+
s3Client,
232+
conf.Bucket,
233+
slugBuilderInfo.AbsoluteSlugObjectKey(),
234+
conf.ObjectStorageTickDuration(),
235+
conf.ObjectStorageWaitDuration(),
236+
); err != nil {
237+
return fmt.Errorf("Timed out waiting for object in storage, aborting build (%s)", err)
238+
}
237239
}
238240
log.Info("Build complete.")
239241
log.Info("Launching app.")

0 commit comments

Comments
 (0)