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 #113 | Handle more api errors | More robust credentials handling | Misc #117

Merged
merged 4 commits into from
Oct 29, 2020

Conversation

Akianonymus
Copy link
Collaborator

@Akianonymus Akianonymus commented Oct 19, 2020

No description provided.

labbots
labbots previously approved these changes Oct 20, 2020
@Akianonymus
Copy link
Collaborator Author

@labbots Approve

labbots
labbots previously approved these changes Oct 23, 2020
Copy link
Owner

@labbots labbots left a comment

Choose a reason for hiding this comment

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

@Akianonymus Do not add more commits to this PR. If you make any further changes then create a new PR.

Thank you

@Akianonymus
Copy link
Collaborator Author

Yeah, i should actually seperate these into different prs.

@Akianonymus
Copy link
Collaborator Author

Akianonymus commented Oct 24, 2020

I have removed commits which was separable, pr here ( #119 ).

This pr should be merged after #113 is resolved and the above pr is also merged.

labbots
labbots previously approved these changes Oct 25, 2020
@Akianonymus
Copy link
Collaborator Author

Akianonymus commented Oct 26, 2020

Moved more commits to different pr, including the fix for #115. After that pr is merged, will sync to master and force push the commits again in this pr.

#120

@Akianonymus Akianonymus changed the title Fix [ #113 | #115 ] | Misc Fix [ #113 ] | Misc Oct 26, 2020
labbots
labbots previously approved these changes Oct 27, 2020
@Akianonymus Akianonymus changed the title Fix [ #113 ] | Misc Fix #113 Oct 28, 2020
@Akianonymus Akianonymus changed the title Fix #113 Fix #113 | Handle more api errors Oct 28, 2020
launch a background service to check access token and update it

checks ACCESS_TOKEN_EXPIRY, try to update before 5 mins of expiry, a fresh token gets 60 mins ( 3600 seconds )

process will be killed when script exits

dont update config in bg service, update at script exit

create a temp file where updated access token will be stored by the bg service

every function that uses access token will source it on every call

make a new function named _api_request for all oauth network calls

decrease a network request ( to fetch expiry of access token, just calculate it locally using remaining time given in json as expires_in )

google-oauth2.[bash|sh]: Apply new changes
@Akianonymus
Copy link
Collaborator Author

@labbots approve, this can be merged now.

@Akianonymus Akianonymus changed the title Fix #113 | Handle more api errors Fix #113 | Handle more api errors | More robust credentials handling | Misc Oct 29, 2020
Handle edgecase when curl http code is 000 in case of resumeable uploads

proper handle other problems like rate limits, or any other api side problem

follow # rclone/rclone#3857 (comment)

never retry if upload limit is reached ( upload qouta )
use regex pattern to verify ( to some extent )
@labbots
Copy link
Owner

labbots commented Oct 29, 2020

@Akianonymus I keep reviewing this massive PR over and over again. Kindly merge this PR and then create a new PR for any additional changes.

@Akianonymus Akianonymus merged commit 5b0fe9e into labbots:master Oct 29, 2020
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