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

Update handling of 'remote' folder designation as 'root' items (Issue #323, #324, #331) #328

Merged
merged 19 commits into from
Jan 6, 2019

Conversation

abraunegg
Copy link
Owner

Issue #323 extreme debugging

* Add --force-http-1.1 flag to downgrade any HTTP/2 curl operations to HTTP 1.1 protocol
* Explicitly set all bool items to false at initialisation
* Update --display-config to display sync_list if configured
* Add debug handling to display when sync_list is loaded
* Add debug handling to output the handling of OneDrive changes
* update extra debugging
* Fix introduced core.exception.AssertError@src/itemdb.d(341): Assertion failure
* Add further debugging to print out changes reported by OneDrive
* add debugging as to how and where 'unwanted' is being set
…mote' shared items

* Add more debugging output
* Update to handle where OneDrive does not provide correct change objects for 'remote' shared items
* Fix missing declaration
* Update error messaging
* Update debug messaging
* Update debugging output
@abraunegg abraunegg mentioned this pull request Jan 5, 2019
3 tasks
* Update debugging
* Update handling of the 'remote' but 'local' database entry as prior logic appears to have been changed by OneDrive
@abraunegg abraunegg changed the title Issue #323 extreme debugging Update handling of 'remote' folder designation as 'root' items (Issue #323, #324) Jan 5, 2019
@abraunegg
Copy link
Owner Author

abraunegg commented Jan 5, 2019

Prior to (potentially this is a OneDrive API change being rolled out), a 'change' record for the 'remote' folder consisted only of the following:

        "id": "BC7D88EC1F539DCF!107",
        "name": "3A",
        "parentReference": {
		"driveId": "bc7d88ec1f539dcf",
		"driveType": "personal"
	},

Note: Only 'driveId' & 'driveType' present.

In issues #323 & #324 however, all of these same reference items contained an 'id':

	"id": "7EF2789E900D35F3!105",
	"name": "DESIGN _ BRASIL",
	"parentReference": {
		"driveId": "7ef2789e900d35f3",
		"driveType": "personal",
		"id": "7EF2789E900D35F3!101"
	},

As such, because of the presence of 'id', the 'change' was being flagged as an actual item to sync. rather than being the database 'glue' to tie the local OneDrive entry to the remotely shared item.

The real fix for this is 37b3c76 however this PR incoporates all of the work in #327 as well, plus adding in a whole lot of extra debugging that helped get to the bottom of this

This reverts commit 388cc1d
@norbusan
Copy link
Collaborator

norbusan commented Jan 5, 2019

Hi @abraunegg
can we please go step by step ... this PR is based on top of extra-debugging-and-http-downgrade with some changes. I think the code is fine, but I would like to go one by one, if you don't mind...

@abraunegg
Copy link
Owner Author

@norbusan
Agree - this PR needs cleanup which I will be doing shortly

* Update from master
* Remove added db search for remote id as this is no longer required & effectivly would never get used / reached if remote 'item' is handled correctly & inserted properly
* remove printing of sql query & response as no longer required
* add what the item id is to verbose debug output
@norbusan
Copy link
Collaborator

norbusan commented Jan 5, 2019

Hi @abraunegg
so for now I wait with review and testing ...

@abraunegg
Copy link
Owner Author

@norbusan
Cleanup of code / changes all done - testing & review should be OK to proceed with this PR

@abraunegg abraunegg changed the title Update handling of 'remote' folder designation as 'root' items (Issue #323, #324) Update handling of 'remote' folder designation as 'root' items (Issue #323, #324, #331) Jan 6, 2019
Copy link
Collaborator

@norbusan norbusan left a comment

Choose a reason for hiding this comment

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

Build and run tested, the changes look reasonable, as well as the debug output when files are added/removed.

@abraunegg abraunegg merged commit b751632 into master Jan 6, 2019
@abraunegg abraunegg deleted the Issue-#323-Extreme-Debugging branch January 6, 2019 16:02
@abraunegg abraunegg added this to the 2.2.5 milestone Jan 6, 2019
@lock
Copy link

lock bot commented Jan 13, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants