Skip to content

Fix NoMethodError when diffing manifest for new apps with features#4941

Merged
philippthun merged 1 commit intocloudfoundry:mainfrom
sap-contributions:fix-space-diff-manifest-nil-slice
Mar 20, 2026
Merged

Fix NoMethodError when diffing manifest for new apps with features#4941
philippthun merged 1 commit intocloudfoundry:mainfrom
sap-contributions:fix-space-diff-manifest-nil-slice

Conversation

@philippthun
Copy link
Member

The remove_unspecified_app_features method was called without checking if existing_value was present, causing a NoMethodError when applying a manifest with features for a new (non-existing) app:

  undefined method `slice!' for nil:NilClass
  .../space_diff_manifest.rb:220:in `remove_unspecified_app_features'
  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

The remove_unspecified_app_features method was called without checking
if existing_value was present, causing a NoMethodError when applying
a manifest with features for a new (non-existing) app:

  undefined method `slice!' for nil:NilClass
  .../space_diff_manifest.rb:220:in `remove_unspecified_app_features'
Copy link
Contributor

@johha johha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philippthun philippthun merged commit ff9ac83 into cloudfoundry:main Mar 20, 2026
11 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Mar 20, 2026
Changes in cloud_controller_ng:

- Fix NoMethodError when diffing manifest for new apps with features
    PR: cloudfoundry/cloud_controller_ng#4941
    Author: Philipp Thun <philipp.thun@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants