Skip to content
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

fix(sync-mode): showing undefined when sync status is not-deployed #5522

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

mkhq
Copy link
Contributor

@mkhq mkhq commented Dec 6, 2023

What this PR does / why we need it:

The sync status command would show strings with undefined when the status was 'not-deployed'.

The api Deploy action has 1 sync configured:
  → Sync from .../api to /app/api undefined not deployed
  → Mode: one-way-replica

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@mkhq mkhq requested review from vvagaytsev and a team and removed request for vvagaytsev December 6, 2023 09:58
vvagaytsev
vvagaytsev previously approved these changes Dec 6, 2023
@vvagaytsev
Copy link
Collaborator

vvagaytsev commented Dec 6, 2023

Looks good, thank you! 👍

Currently, the verbMap does not cover all the possible values of the SyncState type. Do you think we should fix that in this PR as well?

We can declare it with an explicit type like

const verbMap: { [key in SyncState]: string } = {
        "active": "is",
        "failed": "has",
        "not-active": "is",
      }

and implement the missing mappings.

Also, we can move that constant outside the function, so the object won't get re-created on each function call.

Copy link
Collaborator

@vvagaytsev vvagaytsev left a comment

Choose a reason for hiding this comment

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

🚀

@vvagaytsev vvagaytsev changed the title fix: showing undefined when sync status is not-deployed fix(sync-mode): showing undefined when sync status is not-deployed Dec 6, 2023
@mkhq mkhq enabled auto-merge December 6, 2023 10:27
@mkhq mkhq added this pull request to the merge queue Dec 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 6, 2023
@vvagaytsev vvagaytsev added this pull request to the merge queue Dec 6, 2023
Merged via the queue into main with commit 9f96768 Dec 6, 2023
45 checks passed
@vvagaytsev vvagaytsev deleted the fix-sync-status-undefined branch December 6, 2023 11:38
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.

2 participants