Skip to content

Rework FieldMask to use a SortedSet of FieldPaths #1405

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

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

rsgowman
Copy link
Member

Rather than an array.

Port of firebase/firebase-android-sdk#137

@rsgowman
Copy link
Member Author

One slight difference: For the ts port, I used FieldMask.fromArray rather than .fromSet, due to the difficulty in creating a SortedSet out of a list of values. Alternatively, we could add another ctor to SortedSet that takes an initializer list (similar to es6's Set).

Copy link
Contributor

@mikelehen mikelehen left a comment

Choose a reason for hiding this comment

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

LGTM except unrelated change showing up.... Thanks!

// efficiency is less important than responsiveness.
'grpc.initial_reconnect_backoff_ms': 100,
'grpc.max_reconnect_backoff_ms': 100
}
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this showing up here?

cc/ @ryanpbrewster who made this change elsewhere and @Feiyang1 who had it show up in his PR too....

Copy link
Contributor

Choose a reason for hiding this comment

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

This was merged as part of #1403, not sure why it's showing up here...

Copy link
Member

Choose a reason for hiding this comment

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

I think I know what's going on. I rebased the master yesterday after the release and the PRs are submitted before the rebase. Rebasing the PR should solve the problem.

Copy link
Member

Choose a reason for hiding this comment

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

It's an unfortunate side effect with the release branch - master branch needs to rebase on the release branch for the version bump/release tag to show up in the right order.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hrm. Rebasing master sounds problematic. Can't we just do a normal merge of the release branch into master?

Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't rebase master. Everyone who has the repo checked out will have to perform a fix. For long-lived branches like master and our release branches, the only thing we can do is merge (and resolve conflicts).

Copy link
Member

@Feiyang1 Feiyang1 Nov 30, 2018

Choose a reason for hiding this comment

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

The problem with normal merge is that the version bump/release tag will appear at the HEAD, and it would be misleading to see commits that are not released appear before the release tag.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed it's not ideal and potentially dangerous. I'm open to change the process if we found better solution.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think just doing a normal (non-squash) merge would result in a sensible history.

Else, a squash merge with a clear description ("Merge release branch changes and version bump back into master.") would probably be sufficient.

Ultimately, we should be using the release branch and/or git tags to figure out what was actually in a given release.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right--the release branch should reflect the state of the release. The master branch reflects ongoing development that may have happened while that branch was coming about. If we merge the release branch back to master it will naturally show the history of when things happened.

Master is preparing for the next release.

@mikelehen mikelehen assigned rsgowman and unassigned mikelehen Nov 30, 2018
@rsgowman rsgowman force-pushed the rsgowman/field_mask_set branch from cc364a1 to f3ec700 Compare November 30, 2018 19:09
@rsgowman rsgowman merged commit b3a5242 into master Nov 30, 2018
@rsgowman rsgowman deleted the rsgowman/field_mask_set branch November 30, 2018 20:09
@firebase firebase locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants