Skip to content

Conversation

@ImMin5
Copy link
Member

@ImMin5 ImMin5 commented May 15, 2025

Category

  • New feature
  • Bug fix
  • Improvement
  • Refactor
  • etc

Description

  • feat: update field indices in report adjustment proto files for consistency

Known issue

@ImMin5 ImMin5 requested a review from Copilot May 15, 2025 01:28
@ImMin5 ImMin5 self-assigned this May 15, 2025
@ImMin5 ImMin5 added the enhancement New feature or request label May 15, 2025
@ImMin5 ImMin5 merged commit d376c5a into cloudforet-io:master May 15, 2025
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates proto field tag numbers for report adjustment messages to improve consistency and renames an enum value.

  • Renumbered fields in ReportAdjustmentPolicyInfo and related messages to group filters, domain, config, and timestamps together
  • Updated tag numbers in CreateReportAdjustmentRequest, ReportAdjustmentQuery, and ReportAdjustmentInfo
  • Renamed SUCCESS to ADJUSTING in CostReport enums

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
proto/spaceone/api/cost_analysis/v1/report_adjustment_policy.proto Renumber fields (policy_filter, domain_id, cost_report_config_id, created_at, updated_at)
proto/spaceone/api/cost_analysis/v1/report_adjustment.proto Renumber fields (report_adjustment_policy_id, workspace_id, project_id, cost_report_config_id, created_at, updated_at)
proto/spaceone/api/cost_analysis/v1/cost_report.proto Rename enum variant SUCCESS → ADJUSTING
Comments suppressed due to low confidence (5)

proto/spaceone/api/cost_analysis/v1/report_adjustment_policy.proto:121

  • Renumbering an existing proto field (policy_filter) at tag 8 reuses a previous tag and breaks backward compatibility. Instead, assign a new, unused tag number and reserve the old tag to maintain compatibility.
  AdjustmentPolicyFilter policy_filter = 8;

proto/spaceone/api/cost_analysis/v1/report_adjustment_policy.proto:122

  • Moving domain_id from tag 23 to 21 reassigns a previously used tag, which will break existing clients. Consider choosing a fresh tag and reserving the old one.
  string domain_id = 21;

proto/spaceone/api/cost_analysis/v1/report_adjustment.proto:78

  • Reassigning report_adjustment_policy_id from tag 10 to 21 breaks compatibility. Use a new tag number and add a 'reserved 10;' entry instead of renumbering.
  string report_adjustment_policy_id = 21;

proto/spaceone/api/cost_analysis/v1/report_adjustment.proto:112

  • Changing workspace_id from tag 4 to 21 will break existing serialized messages. Reserve the old tag and allocate a new one for compatibility.
  string workspace_id = 21;

proto/spaceone/api/cost_analysis/v1/cost_report.proto:66

  • Renaming enum variant SUCCESS to ADJUSTING while keeping the numeric value will break clients relying on SUCCESS. Introduce ADJUSTING as a new value (e.g., =4) and mark SUCCESS as deprecated.
    ADJUSTING = 2;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pass/signedoff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant