Skip to content

fix!: Remove fields that can no longer be updated from EnterpriseUpdateBudget - #4699

Merged
gmlewis merged 2 commits into
google:masterfrom
JamBalaya56562:fix/4698-enterprise-update-budget-fields
Nov 10, 2026
Merged

gmlewis merged 2 commits into
google:masterfrom
JamBalaya56562:fix/4698-enterprise-update-budget-fields

Conversation

@JamBalaya56562

Copy link
Copy Markdown
Contributor

Fixes #4698.

BREAKING CHANGE: EnterpriseUpdateBudget.BudgetScope, EnterpriseUpdateBudget.BudgetEntityName, EnterpriseUpdateBudget.BudgetType, and EnterpriseUpdateBudget.BudgetProductSKU are removed because the "Update a budget" request schema no longer has them.

The request body schema of PATCH /enterprises/{enterprise}/settings/billing/budgets/{budget_id} now has only budget_alerting, budget_amount, expires_at, and prevent_further_usage (OpenAPI description 066b825d, picked up by #4693).

Two commits:

  1. fix! - Remove the four fields from EnterpriseUpdateBudget. This clears the four script/check-schema-fields.sh warnings that master reports since chore: Update openapi_operations.yaml #4693.
  2. feat - Add the missing expires_at (ExpiresAt) to EnterpriseCreateBudget and EnterpriseUpdateBudget, and user (User) to EnterpriseCreateBudget. Both are optional *string. ExpiresAt is a YYYY-MM-DD date, as in the schema. The update schema also accepts null or 0 to remove an expiration date, which a *string with omitempty cannot send; this PR does not add a way to do that.

Verified locally: go build ./..., go vet -tags integration ./test/integration/, example module build, go test ./github/, generated files idempotent, custom-gcl 0 issues, and script/check-schema-fields.sh reports 11 findings, all grandfathered (the 4 EnterpriseUpdateBudget warnings are gone).

@Not-Dhananjay-Mishra

Copy link
Copy Markdown
Contributor

As far as I know, we prefer not to remove fields that GitHub has recently deprecated or removed, especially fields for enterprise endpoints.
#3894 (comment)

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (1306473) to head (c83b5e1).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4699   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files         203      203           
  Lines       19027    19027           
=======================================
  Hits        18769    18769           
  Misses        258      258           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JamBalaya56562

Copy link
Copy Markdown
Contributor Author

Thanks! These budget endpoints are only in the GHEC description; none of the GHES descriptions have them, so on-prem users cannot call them. Since they are cloud-only, I think removing fields the cloud API no longer accepts is fine here. I'm happy to keep them with a Deprecated: comment instead if you prefer.

@Not-Dhananjay-Mishra

Copy link
Copy Markdown
Contributor

Thanks! These budget endpoints are only in the GHEC description; none of the GHES descriptions have them, so on-prem users cannot call them. Since they are cloud-only, I think removing fields the cloud API no longer accepts is fine here. I'm happy to keep them with a Deprecated: comment instead if you prefer.

Thanks for the clarification.
I'm fine with removing the unsupported fields.

@JamBalaya56562

Copy link
Copy Markdown
Contributor Author

Thanks @Not-Dhananjay-Mishra!

@gmlewis Since we agreed on removing the unsupported fields and CI is green, I think this is ready for review/merge. PTAL when you have a chance.

@gmlewis gmlewis added the Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). label Nov 10, 2026

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @JamBalaya56562 and @Not-Dhananjay-Mishra!
LGTM.
Merging.

@gmlewis
gmlewis merged commit ccd0eea into google:master Nov 10, 2026
15 checks passed
@JamBalaya56562
JamBalaya56562 deleted the fix/4698-enterprise-update-budget-fields branch November 10, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EnterpriseUpdateBudget has fields that are no longer in the "Update a budget" request schema

3 participants