Skip to content

Conversation

@yuda110
Copy link
Member

@yuda110 yuda110 commented May 22, 2025

Skip Review (optional)

  • Minor changes that don't affect the functionality (e.g. style, chore, ci, test, docs)
  • Previously reviewed in feature branch, further review is not mandatory
  • Self-merge allowed for solo developers or urgent changes

Description (optional)

Things to Talk About (optional)

yuda110 added 3 commits May 22, 2025 14:14
Signed-off-by: yuda <yuda@megazone.com>
Signed-off-by: yuda <yuda@megazone.com>
Signed-off-by: yuda <yuda@megazone.com>
@vercel
Copy link

vercel bot commented May 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cost-report ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2025 5:35am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
console ⬜️ Ignored (Inspect) Visit Preview May 22, 2025 5:35am
web-storybook ⬜️ Ignored (Inspect) Visit Preview May 22, 2025 5:35am

@vercel
Copy link

vercel bot commented May 22, 2025

@yuda110 is attempting to deploy a commit to the cloudforet Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

🎉 @seungyeoneeee has been randomly selected as the reviewer! Please review. 🙏

@github-actions github-actions bot requested a review from seungyeoneeee May 22, 2025 05:32
@yuda110 yuda110 requested a review from Copilot May 22, 2025 05:32
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 fixes a promise bug when saving adjustments by updating API sort parameters and refining update logic.

  • Changed sort order from "created_at" (ascending) to "order" (descending) in the adjustment policy query.
  • Enhanced update functions in the AdvancedSettings overlay by checking for differences before updating and using Promise.all for concurrency.
  • Updated the adjustment iteration logic and success messaging to leverage internationalized text and a helper function.

Reviewed Changes

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

File Description
apps/web/src/services/cost-explorer/composables/queries/use-report-adjustment-policy-query.ts Updates the API helper sort field and direction to sort by "order" descending
apps/web/src/services/cost-explorer/components/AdvancedSettingsSetAdjustmentsOverlay.vue Refactors update methods with pre-checks for difference, replaces forEach with Promise.all for concurrent operations, and revises the adjustment iteration logic
Comments suppressed due to low confidence (1)

apps/web/src/services/cost-explorer/components/AdvancedSettingsSetAdjustmentsOverlay.vue:227

  • Mapping over formPolicies to process adjustments may inadvertently omit adjustments that do not have a corresponding policy. Consider iterating directly over formAdjustments or ensuring that all adjustments are captured.
await Promise.all(formPolicies.value.map(async (policy) => {

Copy link
Member

@piggggggggy piggggggggy left a comment

Choose a reason for hiding this comment

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

lgtm!

@yuda110 yuda110 merged commit 12c1a68 into cloudforet-io:feature-cost-report May 22, 2025
8 checks passed
@yuda110 yuda110 deleted the feature/fixfix branch May 22, 2025 06:23
yuda110 added a commit that referenced this pull request May 23, 2025
* fix: fix promise bug when save adjustments

Signed-off-by: yuda <yuda@megazone.com>

* chore: sort with order

Signed-off-by: yuda <yuda@megazone.com>

* chore: do not raise api when there's no change

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 26, 2025
* fix: fix promise bug when save adjustments

Signed-off-by: yuda <yuda@megazone.com>

* chore: sort with order

Signed-off-by: yuda <yuda@megazone.com>

* chore: do not raise api when there's no change

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
yuda110 added a commit that referenced this pull request May 29, 2025
* fix: fix promise bug when save adjustments

Signed-off-by: yuda <yuda@megazone.com>

* chore: sort with order

Signed-off-by: yuda <yuda@megazone.com>

* chore: do not raise api when there's no change

Signed-off-by: yuda <yuda@megazone.com>

---------

Signed-off-by: yuda <yuda@megazone.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants