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

feat(onAuth, onAuthFailure): remove OAuth2 variant, support raw HTTP headers, endless retry, canceling #1054

Merged
merged 8 commits into from
Feb 19, 2020

Conversation

billiegoose
Copy link
Member

@billiegoose billiegoose commented Feb 18, 2020

BREAKING CHANGE: The token and oauth2format properties have been removed from the GitAuth interface, which makes it much simpler and and eliminates a dozen GitErrors handling specific edge cases.

A headers property has been added to the GitAuth interface. This makes onAuth much more powerful because you can inject whatever HTTP headers you want.

The onAuthFailed callback now lets you return a GitAuth object. This means you can keep retrying to authenticate as many times as you like.

A cancel property has been added to the GitAuth interface. This means you gracefully give up authenticating and the function will throw an E.UserCancelledError instead of an E.HTTPError.

@karma-pr-reporter
Copy link

Test Results for 2bf01bb:

Browser Pass Skip Fail Time Disconnect?
Chrome 79.0.3945 (Windows 10 0.0.0) 360 0 0 3m:7s false
Chrome Mobile 78.0.3904 (Android 0.0.0) 360 0 0 2m:5s false
Firefox 72.0.0 (Ubuntu 0.0.0) 360 0 0 0m:52s false
HeadlessChrome 0.0.0 (Linux 0.0.0) 360 0 0 0m:41s false
Mobile Safari 13.0.0 (iOS 13.0.0) 360 0 0 2m:50s false
Safari 13.0.3 (Mac OS X 10.15.1) 360 0 0 3m:23s false

Longest running tests

  • 10.515 secs - clone clone with noTags - Chrome
  • 9.739 secs - clone clone with noTags - Mobile Safari
  • 9.05 secs - clone clone with noTags - Safari
  • 8.378 secs - fetch fetch --prune-tags from git-http-mock-server - Chrome
  • 7.799 secs - clone clone with noTags - Firefox
  • 7.569 secs - fetch fetch --prune from git-http-mock-server - Safari
  • 6.334 secs - statusMatrix statusMatrix with filepaths - Safari
  • 5.981 secs - statusMatrix statusMatrix with filepaths - Chrome
  • 5.696 secs - Hosting Providers AWS CodeCommit push - Chrome
  • 5.547 secs - fetch fetch --prune from git-http-mock-server - Mobile Safari
  • 5.389 secs - clone clone with noTags - Chrome Mobile

@billiegoose billiegoose changed the title chore: improve and simplify onAuth functionality chore: improve and simplify 'onAuth' callback Feb 19, 2020
@karma-pr-reporter
Copy link

Test Results for 4209b9c:

Browser Pass Skip Fail Time Disconnect?
Chrome 79.0.3945 (Windows 10 0.0.0) 363 0 0 2m:16s false
Chrome Mobile 78.0.3904 (Android 0.0.0) 363 0 0 1m:44s false
Firefox 72.0.0 (Ubuntu 0.0.0) 363 0 0 0m:50s false
HeadlessChrome 0.0.0 (Linux 0.0.0) 363 0 0 0m:39s false
Mobile Safari 13.0.0 (iOS 13.0.0) 363 0 0 2m:39s false
Safari 13.0.3 (Mac OS X 10.15.1) 363 0 0 3m:18s false

Longest running tests

  • 9.905 secs - clone clone with noTags - Chrome
  • 8.503 secs - fetch fetch --prune-tags from git-http-mock-server - Safari
  • 8.307 secs - clone clone with noTags - Mobile Safari
  • 7.587 secs - clone clone with noTags - Safari
  • 7.476 secs - clone clone with noTags - Firefox
  • 6.434 secs - statusMatrix statusMatrix with filepaths - Safari
  • 6.118 secs - clone clone with noTags - Chrome Mobile
  • 5.401 secs - Hosting Providers GitHub push - Safari
  • 5.142 secs - walk can populate type, mode, oid, and content - Safari
  • 5.122 secs - clone clone with noTags - HeadlessChrome
  • 4.903 secs - fetch fetch --prune from git-http-mock-server - Mobile Safari

@billiegoose billiegoose marked this pull request as ready for review February 19, 2020 03:10
@billiegoose billiegoose changed the title chore: improve and simplify 'onAuth' callback feat(onAuth, onAuthFailure): remove OAuth2 variant, support raw HTTP headers, endless retry, canceling Feb 19, 2020
@karma-pr-reporter
Copy link

Test Results for 1f69ec8:

Browser Pass Skip Fail Time Disconnect?
Chrome 79.0.3945 (Windows 10 0.0.0) 363 0 0 2m:33s false
Chrome Mobile 78.0.3904 (Android 0.0.0) 363 0 0 1m:39s false
Firefox 72.0.0 (Ubuntu 0.0.0) 363 0 0 1m:7s false
HeadlessChrome 0.0.0 (Linux 0.0.0) 363 0 0 0m:51s false
Mobile Safari 13.0.0 (iOS 13.0.0) 363 0 0 1m:38s false
Safari 13.0.3 (Mac OS X 10.15.1) 363 0 0 2m:2s false

Longest running tests

  • 14.427 secs - merge merge oldest into master - Safari
  • 13.021 secs - clone clone with noTags - Chrome
  • 10.162 secs - clone clone with noTags - Safari
  • 9.909 secs - clone clone with noTags - Mobile Safari
  • 9.073 secs - clone clone with noTags - Firefox
  • 6.757 secs - fetch fetch --prune-tags from git-http-mock-server - Safari
  • 6.303 secs - clone clone with noTags - HeadlessChrome
  • 5.787 secs - clone clone with noTags - Chrome Mobile
  • 5.102 secs - fetch shallow fetch (from Github) - Safari
  • 4.705 secs - fetch shallow fetch (from Github) - Chrome
  • 4.601 secs - Hosting Providers GitHub push - Chrome

@billiegoose billiegoose merged commit f51e489 into beta Feb 19, 2020
@billiegoose billiegoose deleted the chore/beta-auth-headers-directly branch February 19, 2020 03:26
@isomorphic-git-bot
Copy link
Member

🎉 This PR is included in version 1.0.0-beta.31 🎉

The release is available on:

Your semantic-release bot 📦🚀

@isomorphic-git-bot
Copy link
Member

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

modesty pushed a commit to modesty/isomorphic-git that referenced this pull request Apr 9, 2024
…s retry, canceling (isomorphic-git#1054)

BREAKING CHANGE: The `token` and `oauth2format` properties have been removed from the GitAuth interface, which makes it much simpler and and eliminates a dozen GitErrors handling specific edge cases.

A `headers` property has been added to the GitAuth interface. This makes `onAuth` much more powerful because you can inject whatever HTTP headers you want.

The `onAuthFailed` callback now lets you return a GitAuth object. This means you can keep retrying to authenticate as many times as you like.

A `cancel` property has been added to the GitAuth interface. This means you gracefully give up authenticating and the function will throw an E.UserCancelledError instead of an E.HTTPError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants