You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Return frozen empty stand-in from #lifecycle_data on missing row (#5263)
The buildpack_lifecycle_data / cnb_lifecycle_data row can be destroyed
independently of the owning app, build, or droplet. When that happens,
calling #lifecycle_data returns nil and callers not guarding further
method invocations hit NoMethodError (e.g. build_presenter.rb on
lifecycle_data.to_hash), resulting in an HTTP 500 response.
Fall back to a frozen empty BuildpackLifecycleDataModel /
CNBLifecycleDataModel instance so callers see a well-shaped object
whose to_hash returns '{ buildpacks: [], stack: nil }'. The freeze
prevents any accidental attempt to persist the stand-in.
Also freeze the docker-branch stand-in for the same reason and
consistency.
Document the possibility of an empty data payload in the buildpack
and cnb sections of the v3 lifecycle doc.
Copy file name to clipboardExpand all lines: docs/v3/source/includes/concepts/_lifecycles.md.erb
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,9 @@ Name | Type | Description
42
42
**data.buildpacks** | _list of strings_ | A list of the names of buildpacks, URLs from which they may be downloaded, or `null` to auto-detect a suitable buildpack during staging
43
43
**data.stack** | _string_ | The root filesystem to use with the buildpack, for example `cflinuxfs4`
44
44
45
+
For records whose historical lifecycle data is no longer available,
46
+
**data.buildpacks** may be an empty list and **data.stack** may be `null`.
0 commit comments