Skip to content

Conversation

@dilipmighty245
Copy link
Contributor

Description of the Change

  • This PR ensures that the Application struct in resources/application.go correctly unmarshals the guid field from the Cloud Controller response JSON. Previously, although the GUID field was defined in the struct, it was not being populated in the UnmarshalJSON method.This caused the Application.GUID field to remain empty during deserialization, potentially impacting downstream logic that relies on application GUIDs for identification or operations.

  • The fix adds a.GUID = ccApp.GUID in the custom UnmarshalJSON method to correctly populate the GUID.

Why Is This PR Valuable?

  • Fixes a subtle but critical bug where Application.GUID was always empty when unmarshalled.
  • Enables reliable use of the GUID across CLI commands, plugins, and consumers of cfclient.
  • Supports automation, scripting, and debugging workflows that depend on accessing the GUID field.

Applicable Issues

No linked GitHub issue yet.

How Urgent Is The Change?

Moderately urgent – this fix is important for correct behaviour, especially in automated or programmatic usage of the CF CLI. While not breaking existing commands, it silently fails to expose critical application metadata. One of my test case is failing as I leverage app GUID.

Other Relevant Parties

  • Developers and teams building CF CLI plugins
  • Users scripting against CF CLI or relying on its JSON output
  • Platform operators debugging apps using CLI tooling

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 18, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@dilipmighty245 dilipmighty245 changed the title Fix Missing GUID in CloudController Application Type Fix Missing GUID in CloudController Application Type ( V8) Jul 18, 2025
@neowulf
Copy link

neowulf commented Jul 21, 2025

/easycla

Copy link
Member

@gururajsh gururajsh left a comment

Choose a reason for hiding this comment

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

LGTM

@gururajsh gururajsh merged commit 9664e20 into cloudfoundry:v8 Jul 21, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants