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

ENG-5593: Allow users to push non-logical changes #278

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

wdberkeley
Copy link
Contributor

The CLI disallowed pushing if there were no logical changes unless --force was set, but it's perfectly reasonable to push formatting and comment changes only. Now this will be allowed.

I tested this manually. Here're samples of the workflow:

$ fauna schema push --dir=$HOME/fsl
Proposed diff:

foo.fsl add collection Bar
foo.fsl add collection Foo
Accept and push changes? [no]: yes

$ fauna schema push --dir=$HOME/fsl # Added a comment to Bar.
No logical changes to push
Push anyway? [no]: yes

$ fauna schema push --dir=$HOME/fsl
No logical changes to push
Push anyway? [no]: no
Push cancelled

this.log(`Proposed diff:\n`);
this.log(json.diff);
} else {
this.log("No logical changes to push");
Copy link
Contributor

Choose a reason for hiding this comment

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

Idk if "logical" will resonate with users. Perhaps "No schema changes to push" or "No logical schema changes to push"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔 I think this is a word in common developer usage that people will understand, either immediately or with a moment's thought. Maybe I'll change it to "No logical changes. Push new file contents anyway?". Does that sound better?

Copy link
Contributor

Choose a reason for hiding this comment

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

No logical changes. Push new file contents anyway?

My minor suggestion on that is to drop the word "new" as we'll be pushing the whole file instead of just the "new bits". Other that that, it looks pretty good to me.

The CLI disallowed pushing if there were no logical changes unless
--force was set, but it's perfectly reasonable to push formatting
and comment changes only. Now this will be allowed.

I tested this manually. Here're samples of the workflow:

$ fauna schema push --dir=$HOME/fsl
Proposed diff:

foo.fsl add collection Bar
foo.fsl add collection Foo
Accept and push changes? [no]: yes

$ fauna schema push --dir=$HOME/fsl # Added a comment to Bar.
No logical changes.
Push file contents anyway? [no]: yes

$ fauna schema push --dir=$HOME/fsl
No logical changes.
Push file contents anyway? [no]: no
Push cancelled
Copy link
Contributor

@erickpintor erickpintor left a comment

Choose a reason for hiding this comment

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

LGTM

@wdberkeley wdberkeley merged commit c8d33ca into main Oct 10, 2023
@wdberkeley wdberkeley deleted the eng-5593 branch October 10, 2023 17:18
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