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/available-offline-policy-cleanup] Fix cleanup of Available Offline policies targeting unavailable spaces #1343

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

felix-schwarz
Copy link
Contributor

Description

Fix an issue arising from Available Offline policies targeting unavailable/detached drives and removes the respective policies.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

…targeting unavailable/detached drives and removes the respective policies

- adapt app code to SDK API changes
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@felix-schwarz felix-schwarz changed the title [fix/available-offline-policy-cleanup] [fix/available-offline-policy-cleanup] Fix cleanup of Available Offline policies targeting unavailable spaces Apr 11, 2024
@felix-schwarz felix-schwarz self-assigned this Apr 11, 2024
@jesmrec
Copy link
Contributor

jesmrec commented Apr 12, 2024

Any way to reproduce the initial problem?

@felix-schwarz
Copy link
Contributor Author

@jesmrec What should work:

  1. Build and run a prior version (milestone/12.2 should do)
  2. Add an ocis account with a space
  3. Cut the internet connection (or stop the server) so the app no longer has a connection to the server
  4. In the app mark a file in the space as "available offline"
  5. On the server, delete the space
  6. Bring the app or server back online

The app will then try to download the file, but keep re-scheduling the download even if the download failed or you cancelled it.

Switching to fix/available-offline-policy-cleanup then will fix that issue and the download will not be re-scheduled after it failed or has been cancelled.

@jesmrec
Copy link
Contributor

jesmrec commented Apr 15, 2024

thanks @felix-schwarz!

i've tried more cases in which a file is removed without connection at the time is downloaded/av. offline. This is not an easy one to reproduce because some randomness probably plays a role, so i noticed the error in a few executions over the milestone branch as i tried to reproduce, and no reproducible in fix branch.

Let's move forward if the CR passes and wait for valuable feedback.

# Conflicts:
#	ownCloud.xcodeproj/xcshareddata/xcschemes/ownCloud.xcscheme
@felix-schwarz felix-schwarz merged commit 9964556 into milestone/12.2 Apr 24, 2024
3 of 4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix/available-offline-policy-cleanup branch April 24, 2024 10:11
hosy pushed a commit that referenced this pull request May 8, 2024
…targeting unavailable/detached drives and removes the respective policies (#1343)

- adapt app code to SDK API changes
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.

None yet

4 participants