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

feat(turbine): Warn about uncommitted changes #275

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

janelletavares
Copy link
Contributor

@janelletavares janelletavares commented Mar 10, 2022

Description of change

Fixes https://github.com/meroxa/turbine-project/issues/70

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

How was this tested?

  • Unit Tests
  • Tested manually locally
  • Tested in staging

Demo

Screenshot from 2022-03-10 11-27-56
Screenshot from 2022-03-10 11-28-10

Additional references

Documentation updated

@janelletavares
Copy link
Contributor Author

I commented out most of the deploy command to test this

@janelletavares janelletavares requested review from a team, owenthereal and ericcheatham and removed request for a team March 10, 2022 19:31
@raulb raulb self-requested a review March 14, 2022 13:34
Copy link
Member

@raulb raulb left a comment

Choose a reason for hiding this comment

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

There are a couple of required changes so we stop the execution of the deployment once we have untracked changes.

Aside, I'd like to make the suggestion of simplifying this a bit. What I think could be simpler is:

  1. Run cmd := exec.Command("git", "status", "--porcelain=v2")
  2. If there are untracked changes, then run git status and show the output to the user including a custom message indicating that need to commit first.
  3. If everything is tracked continue.

What do you think? @janelletavares

cmd/meroxa/root/apps/deploy.go Show resolved Hide resolved
cmd/meroxa/root/apps/deploy.go Outdated Show resolved Hide resolved
cmd/meroxa/root/apps/deploy.go Outdated Show resolved Hide resolved
@janelletavares
Copy link
Contributor Author

janelletavares commented Mar 14, 2022

There are a couple of required changes so we stop the execution of the deployment once we have untracked changes.

Aside, I'd like to make the suggestion of simplifying this a bit. What I think could be simpler is:

  1. Run cmd := exec.Command("git", "status", "--porcelain=v2")
  2. If there are untracked changes, then run git status and show the output to the user including a custom message indicating that need to commit first.
  3. If everything is tracked continue.

What do you think? @janelletavares

I'm made another pass based on these comments. Are we checking branch somewhere else? I forget. Or should we open another ticket for that check? It would be easy to add it to this PR if it's relevant enough.

jk... it's started here https://github.com/meroxa/cli/pull/276/files#diff-9660bb3708bfbd2d8adc60d0b68dfd003cbf13421ea4212747439a8c11fc54b5R140

Base automatically changed from apps_git_sha to master March 14, 2022 17:48
Copy link
Member

@raulb raulb left a comment

Choose a reason for hiding this comment

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

👌

@janelletavares janelletavares merged commit 74ca6ce into master Mar 15, 2022
@janelletavares janelletavares deleted the uncommitted_git_changes branch March 15, 2022 14:59
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