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: Pass origin along the initial state update #4309

Merged
merged 2 commits into from Jun 19, 2023
Merged

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Jun 19, 2023

📝 Summary

  • Resolves: #

This ensures that the initial update that is applied to set the document state is not added as another step.

https://github.com/yjs/y-websocket/blob/master/src/y-websocket.js#L331

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

@cypress
Copy link

cypress bot commented Jun 19, 2023

1 flaky tests on run #10283 ↗︎

0 147 1 0 Flakiness 1

Details:

fix: Pass origin along the initial state update
Project: Text Commit: 475f130eb3
Status: Passed Duration: 03:46 💡
Started: Jun 19, 2023 9:16 PM Ended: Jun 19, 2023 9:20 PM
Flakiness  cypress/e2e/api/UsersApi.spec.js • 1 flaky test

View Output Video

Test Artifacts
The user mention API > fetches users with valid session Output Screenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@juliushaertl juliushaertl added bug Something isn't working 3. to review labels Jun 19, 2023
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

Code changes look sensible to me. Good catch. Is this merely a performance improvement or does it fix a user-facing bug?

@juliushaertl
Copy link
Member Author

Not fully sure yet also if we should backport.

I could imagine this may solve problems where the file is getting version bumps and then random saves without actual file content change. Other than that I can so far not think about a bug scenario.

@mejo-
Copy link
Member

mejo- commented Jun 19, 2023

If there is a chance that this fixes unsolicited file saves (even if just in rare corner cases), then I'd say we should backport it given that people are so unhappy about them 😉

@juliushaertl
Copy link
Member Author

/backport to stable27

@juliushaertl
Copy link
Member Author

/backport to stable26

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliushaertl
Copy link
Member Author

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@juliushaertl juliushaertl merged commit 18caf8e into main Jun 19, 2023
33 checks passed
@juliushaertl juliushaertl deleted the bugfix/sync branch June 19, 2023 21:31
@backportbot-nextcloud
Copy link

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27

# Create the new backport branch
git checkout -b fix/foo-stable27

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@backportbot-nextcloud
Copy link

The backport to stable26 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable26
git pull origin stable26

# Create the new backport branch
git checkout -b fix/foo-stable26

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@mejo-
Copy link
Member

mejo- commented Jun 20, 2023

/backport ac5bc7b to stable27

@mejo-
Copy link
Member

mejo- commented Jun 20, 2023

/backport ac5bc7b to stable26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants