GCP-XXXX: Skip Projects And Folders if Display Name Not Provided#86
Merged
tedkahwaji merged 1 commit intoNov 12, 2025
Merged
Conversation
0ee0903 to
ee369d4
Compare
dtru-ddog
approved these changes
Nov 12, 2025
dtru-ddog
left a comment
There was a problem hiding this comment.
thanks for adding check overall makes sense
| parent = f["parent"] | ||
| folder = Folder(name=f["displayName"], id=f["name"].split("/")[1], parent_id="") | ||
| if "displayName" not in f: | ||
| continue |
There was a problem hiding this comment.
probably just log the output as debug and note we're skipping.
Collaborator
Author
There was a problem hiding this comment.
Discussed offline; that logging here would purely occur on the customer environment. We could potentially have print a message here indicating this skip is happening
ee369d4 to
398aa78
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This update resolves a KeyError reported by a customer when attempting to extract the
'name'attribute from thegcloud projects listoutput.It was determined that a display name is not strictly required when creating a project or folder using the gcloud CLI or the Cloud Resource Manager API. However, the Google Cloud Console UI does enforce providing one during creation.
Once a project or folder has been assigned a display name, it cannot be cleared or removed through any method—whether via gcloud, the Resource Manager API, or the UI.
This change addresses this edge case by ensuring that when a folder or project does not have a display name, it is simply excluded from scope collection.