Skip to content

Fix Missing GUID in CloudController Application Type #3549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2025

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

Copy link

linux-foundation-easycla bot commented Jul 18, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@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 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