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

Extend/vbase client v2 #1236

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Extend/vbase client v2 #1236

merged 3 commits into from
Oct 24, 2024

Conversation

vitorflg
Copy link
Contributor

What is the purpose of this pull request?

  • Extend the VBase client to have more options to handle conflicts

What problem is this solving?

Slack thread

How should this be manually tested?

  • You can test it yarn linking all dependencies(@vtex/api, this module, and the cli-plugin-workspace), and running with the alias:
    vtex-test promote After that, listing to conflicts should return an empty array.

Screenshots or example usage

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

Comment on lines 49 to 51
const response = await this.getConflicts().then(res => res.data)

return response?.data?.length > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

If I am not wrong, axios throws an error for 4xx responses. If that is the case, I think we are changing the behavior here, since the line 49 will raise the error and will not get to the return statement. Have you checked that? Also, as in the other PR, I would avoid the await / .then combination.

@arturpimentel arturpimentel merged commit 69d5537 into main Oct 24, 2024
4 checks passed
@arturpimentel arturpimentel deleted the extend/vbase-client-v2 branch October 24, 2024 17:41
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.

4 participants