Skip to content

Fix Missing GUID in CloudController Application Type#3549

Merged
gururajsh merged 2 commits intocloudfoundry:mainfrom
dilipmighty245:main
Jul 21, 2025
Merged

Fix Missing GUID in CloudController Application Type#3549
gururajsh merged 2 commits intocloudfoundry:mainfrom
dilipmighty245:main

Conversation

@dilipmighty245
Copy link
Copy Markdown
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
Copy Markdown

linux-foundation-easycla bot commented Jul 18, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Signed-off-by: Dilip Tadepalli <tadepalli.dilip@gmail.com>
@neowulf
Copy link
Copy Markdown

neowulf commented Jul 21, 2025

/easycla

Copy link
Copy Markdown
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 8fe9aa4 into cloudfoundry:main Jul 21, 2025
17 of 18 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