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 deprecation warning since Faraday 1.7.1 #1359

Merged
merged 8 commits into from
Jan 11, 2022
Merged

Fix deprecation warning since Faraday 1.7.1 #1359

merged 8 commits into from
Jan 11, 2022

Conversation

ybiquitous
Copy link
Contributor

Close #1357

@ybiquitous ybiquitous marked this pull request as ready for review August 31, 2021 04:36
Copy link

@sambostock sambostock left a comment

Choose a reason for hiding this comment

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

It looks like set_authorization_header was also removed upstream in lostisland/faraday#1308

Based on the deprecation message and diff in that PR, and adjusting for consistency, I think we want:

-http.basic_auth                       "username", "password"
+http.request :authorization, "Basic", "username", "password"
-http.authorization           "token", "access-token"
+http.request :authorization, "token", "access-token"
-http.authorization           "Bearer", "bearer-token"
+http.request :authorization, "Bearer", "bearer-token"

@sambostock
Copy link

Actually, it looks like

http.request :authorization, "Basic", "username", "password"

isn't backwards compatible with Faraday versions prior to that PR. It blows up because of the extra password argument.

One forward and backward compatible way of handling it would be to encode the header ourselves

require "base64"
http.request :authorization, "Basic", Base64.strict_encode64("#{username}:#{password}")

@ybiquitous
Copy link
Contributor Author

@sambostock Thanks for the feedback. Yes, this PR is not backward compatible with Faraday v2.

The PR aims to suppress the annoying warnings, and I think we may need additional code changes for Faraday v2.

Copy link
Contributor

@etiennebarrie etiennebarrie left a comment

Choose a reason for hiding this comment

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

Faraday::Connection#set_authorization_header has been removed from main, so it's not a long-term fix.

@olleolleolle
Copy link
Contributor

olleolleolle commented Sep 21, 2021

Would it be fruitful to try with Faraday 1.8.0, which came in the meantime?

Perhaps not? lostisland/faraday@v1.7.1...v1.8.0

(Re-reading, I note that, yes http.request :authorization [...] is 2.0 way of expressing it.)

@ybiquitous
Copy link
Contributor Author

@olleolleolle Thanks for sharing the new version. This PR seems still valid with Faraday 1.8.0.

@olleolleolle
Copy link
Contributor

@ybiquitous Yeah, this PR 👍 excellent stuff. 1.0 + 2.0 compat may take another PR, and some trickery.

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

Hi all, just a quick nudge to let you know that we've added a "how to do this in Faraday 1.x" section in the documentation.
This should help solving the warning messages, which I understand is the objective of this PR.

Regarding cross-supporting both Faraday 1.x and 2.x, I'm afraid at the moment there's no suggested way of doing it.
The solution proposed here should work, or alternatively you could always test the Faraday version and use the correct middleware based on that.

I'm open to feedback/suggestions if you have any, but I agree this should be tackled on a separate PR

@ybiquitous
Copy link
Contributor Author

ybiquitous commented Sep 22, 2021

@iMacTia Thank you. I've followed your advice and push the change c34a880, but the tests have failed:

Faraday::RackBuilder::StackLocked:
  can't modify middleware stack after making a request

https://github.com/octokit/octokit.rb/pull/1359/checks?check_run_id=3673807356#step:7:3522

Any advice?


EDIT: When using with Sawyer::Agent, it does not seem to work... 🤔

@agent ||= Sawyer::Agent.new(endpoint, sawyer_options) do |http|
http.headers[:accept] = default_media_type
http.headers[:content_type] = "application/json"
http.headers[:user_agent] = user_agent
if basic_authenticated?
http.request :basic_auth, @login, @password
elsif token_authenticated?
http.request :token_auth, @access_token
elsif bearer_authenticated?
http.request :authorization, 'Bearer', @bearer_token
elsif application_authenticated?
http.request :basic_auth, @client_id, @client_secret
end
end

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

@ybiquitous I was having a look myself and I'm finding it quite hard to understand what's going on.
The error is due to the fact that once the first request is fired on a connection, the underlying builder is locked, so that calling http.request is not allowed anymore.

However, looking at the code pointed by the stacktrace I can see that a new connection is being initialised, with no request being fired until the end of the process. So I don't really understand how that can be possible.

So far, the only thing I can think about is that this line is somehow injecting an already locked builder, but I'm having some really hard time following the code (and in particular usages of @middleware given the magic/hidden way these variables are injected 🤔

@ybiquitous
Copy link
Contributor Author

@iMacTia Thanks for the investigation. Maybe, the MIDDLEWARE constant seems to be a failure cause.

# Default Faraday middleware stack
MIDDLEWARE = RACK_BUILDER_CLASS.new do |builder|
builder.use Faraday::Request::Retry, exceptions: [Octokit::ServerError]
builder.use Octokit::Middleware::FollowRedirects
builder.use Octokit::Response::RaiseError
builder.use Octokit::Response::FeedParser
builder.adapter Faraday.default_adapter
end

The following change can reduce 556 failures to 46 failures on my localhost:

--- a/lib/octokit/default.rb
+++ b/lib/octokit/default.rb
@@ -115,7 +115,7 @@ module Octokit
       # from {MIDDLEWARE}
       # @return [Faraday::RackBuilder or Faraday::Builder]
       def middleware
-        MIDDLEWARE
+        MIDDLEWARE.dup
       end
 
       # Default GitHub password for Basic Auth from ENV

(Note: this change is not an essential solution)

Faraday::RackBuilder::StackLocked still occurs...

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

Nice catch @ybiquitous 👏 ! It looks like a step in the right direction though. Somehow that same connection is being reused, causing new agents to fail after the first request gets processed 👍
Can you push the change that for works locally so we can check the remaining failing tests?

@ybiquitous
Copy link
Contributor Author

Sure. I've pushed 1680bad.

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

Thanks @ybiquitous, that was indeed useful, I think I found the underlying issue:

Octokit::Configurable.keys.each do |key|
value = options.key?(key) ? options[key] : Octokit.instance_variable_get(:"@#{key}")
instance_variable_set(:"@#{key}", value)
end

The Client initialiser sets instance variables based on the main Octokit module variables. This is quite convoluted, but middleware is one of those. Your last commit only fixes the case where @middleware is accessed through the getter method, but in this case each instance variables is accessed directly

@ybiquitous
Copy link
Contributor Author

ybiquitous commented Sep 22, 2021

@iMacTia Thank you so much! I've added @middleware.dup (9fadd8b) also to Octokit::Connection like Octokit::Client:

conn_opts[:builder] = @middleware.dup if @middleware


EDIT: VCR::Errors::UnhandledHTTPRequestError errors now occur, instead of Faraday::RackBuilder::StackLocked. 🤔
https://github.com/octokit/octokit.rb/pull/1359/checks?check_run_id=3676528649#step:7:51

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

Only 4 failures left 🎉!
We need to get more information from VCR, you should be able to do so using the debug-logger

@ybiquitous
Copy link
Contributor Author

ybiquitous commented Sep 22, 2021

@iMacTia Thank you. When I turned on the Faraday's logging as below,

--- a/lib/octokit/connection.rb
+++ b/lib/octokit/connection.rb
@@ -106,6 +106,7 @@ module Octokit
         http.headers[:accept] = default_media_type
         http.headers[:content_type] = "application/json"
         http.headers[:user_agent] = user_agent
+        http.response :logger
         if basic_authenticated?
           http.request :basic_auth, @login, @password
         elsif token_authenticated?

I got the following result. When using http.request :token_auth, the Authorization header is not set.
Is there something wrong with the usage of http.request?


Using http.authorization 'token', @access_token (before):

I, [2021-09-23T00:25:08.854295 #4998]  INFO -- request: GET https://api.github.com/
I, [2021-09-23T00:25:08.854330 #4998]  INFO -- request: Accept: "application/vnd.github.v3+json"
User-Agent: "Octokit Ruby Gem 4.21.0"
Content-Type: "application/json"
Authorization: "token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
I, [2021-09-23T00:25:08.859670 #4998]  INFO -- response: Status 200

Using http.request :token_auth, @access_token (after):

I, [2021-09-23T00:25:27.288127 #5129]  INFO -- request: GET https://api.github.com/
I, [2021-09-23T00:25:27.288161 #5129]  INFO -- request: Accept: "application/vnd.github.v3+json"
User-Agent: "Octokit Ruby Gem 4.21.0"
Content-Type: "application/json"
I, [2021-09-23T00:25:27.295578 #5129]  INFO -- response: Status 401

EDIT: The result above was produced by the bundle exec rspec ./spec/octokit/client_spec.rb:266 command.

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

@ybiquitous it's an issue with middleware order. When you use the deprecated http.authorization, you're effectively setting a default header on the connection, so when the request hits the :logger middleware, the header is already there.
OTOH, when you use the recommended http.request :token_auth, you're injecting a middleware that will add the header on each request.
In order to see that header in your logs though, the :logger middleware needs to be inserted AFTER the :token_auth middleware.

I hope this makes sense, we're definitely getting close!

@ybiquitous
Copy link
Contributor Author

@iMacTia Thanks! I understand it. 👍🏼

When I moved http.response :logger as below,

--- a/lib/octokit/connection.rb
+++ b/lib/octokit/connection.rb
@@ -115,6 +115,7 @@ module Octokit
         elsif application_authenticated?
           http.request :basic_auth, @client_id, @client_secret
         end
+        http.response :logger
       end
     end
 

I got the following output.

I, [2021-09-23T01:08:18.198989 #10907]  INFO -- request: GET https://api.github.com/
I, [2021-09-23T01:08:18.199023 #10907]  INFO -- request: Accept: "application/vnd.github.v3+json"
User-Agent: "Octokit Ruby Gem 4.21.0"
Content-Type: "application/json"
Authorization: "Token token=\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\""
I, [2021-09-23T01:08:18.206699 #10907]  INFO -- response: Status 401

The reason of the test failures seems to be a diff in the value of Authorization:

-Authorization: "token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+Authorization: "Token token=\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\""

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

Aha! Yes that's exactly how the token_auth works. I was surprised as well while refactoring that part the other day and I suspect this is coming from some super-old pre-Oauth implementation of auth tokens 😂
If Authorization: "token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" is what you want, then you can use the plain authorisation middleware instead, like you do for Bearer tokens:

http.request :authorization, 'token', @access_token

I know, this is super-confusing. And exactly the reason why I decided to remove it in Faraday 2.x 🤦‍♂️

@ybiquitous
Copy link
Contributor Author

ybiquitous commented Sep 22, 2021

Thanks! I've pushed c7b5fa2 to fix the token failure. 😄


EDIT: Finally, we have only 1 failure:
https://github.com/octokit/octokit.rb/pull/1359/checks?check_run_id=3677676381#step:7:144

@ybiquitous
Copy link
Contributor Author

#1359 (comment)

When following redirects, the Authorization header is not deleted... 🤔

env[:request_headers].delete("Authorization")

@iMacTia
Copy link

iMacTia commented Sep 22, 2021

@ybiquitous so close! Checking the error it seems like this might also be a middleware order issue.

Octokit::Client redirect handling drops authentication info when redirecting to a different host

The expectation is that following a redirect, the Authorization header should not be present, but that's not the case and the test fails.
Now, I believe this might be due to the fact that the follow_redirect middleware is inserted before the authorisation one(s).
More precisely, it's added here.

So the stack looks like this:

...
follow_redirects
authorisation (or basic_auth)
...

When a 3xx response is received, the follow_redirects middleware strips the Authorisation header before following, but the authorisation middleware after that will put it back!

If the two middleware were swapped, then this wouldn't happen anymore.

The reason this worked with the old implementation was that the header was previously added during the connection initialisation, rather than by a middleware during the request lifecycle

@ybiquitous
Copy link
Contributor Author

@iMacTia Thanks. As you thought, the authorization middleware inserts the Authorization header after the follow_redirects middleware deletes the header.

Is there a way to exclude the authorization middleware in the follow_redirects middleware?

@iMacTia
Copy link

iMacTia commented Sep 23, 2021

@ybiquitous the recommended way would be for the middleware to be in the right order, BUT there's another workaround.
The authentication middleware(s) will not touch the request if the Authorisation header is already set (see this line).

That means that instead of removing the authorisation header completely, you could set it to some placeholder value.
Appreciate this is far from ideal, but there's no other way to leave the middleware where it is and just skip through it right now

@ybiquitous
Copy link
Contributor Author

@iMacTia Thank you very much for your kind advice! 😄
I've added such a workaround via 23b4a5e.

@iMacTia
Copy link

iMacTia commented Sep 23, 2021

My pleasure! I'm glad I could help ❤️
Feel free to mention me in future if you have any issue 🙌 !

@indigok
Copy link

indigok commented Jan 11, 2022

Thanks to everyone for your work and patience on this 💖

@indigok indigok merged commit 0e29f8c into octokit:4-stable Jan 11, 2022
@ybiquitous ybiquitous deleted the issue-1357 branch January 11, 2022 04:37
ErikSchierboom added a commit to exercism/website that referenced this pull request Jan 14, 2022
ErikSchierboom pushed a commit to exercism/website that referenced this pull request Feb 1, 2022
Run rails app:update

Start process of porting CSS to Tailwind 3

Use propshaft instead of sprockets

WIP Use esbuild not webpack

Fix trailing whitespace lint error

Update Dockerfile to Rails 3.0.3

Fix init.sql for mysql 8

Fix connecting to database

Normalize quotes

Enable yarn build in background

Disable js watch

Work

Missing files

Get icons working

Allow importing manifest

Use asset url helper

Remove dynamic require

Remove webpack-specific files

Temporarily use local exercism config

Temporarily use local exercism config

Copy config items

Update manifest

Win

Refactor code

Remove unused define

Update

Change vendor prefix

Update

Enable watch mode for js

Minify JS in production

Minify CSS in production

Remove unused code

Remove webpack bin scripts

Move listen gem out of development group

Update manifest in background

Ignore javascript config files

Upgrade config to  0.81.0

Use .config dir

Apply review comments

Upgrade to Ruby 3.1.0

Update bundler version

Fixes rubygems/rubygems#5234

Rename monitor_manifest to monitor-manifest

Upgrade to Rails 7.0.1

Remove webpack references

Exclude file

Fix anycable

Fix anycable

Fix css name

Remove webpacker helper references

Fix passing of params to I18N

Fix asset paths

Fix i18n call

Fix more tests

Add .keep file for .config dir

Add .keep file

Fix esbuild

Some tweaks (#2329)

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>

Fix timestamp test

Fix old image_pack_url

Fix path

Use git version for mysql gem

Remove image

Update Setup Ruby workflow

Add missing package

Don't run tests serially

Fix manifest import

Don't use esbuild-jest

Remove svg plugin

Upate lockfile

Add TODO

Fix rails tests

Build for browserslist

Fix failing tests

Fix failing tests

Fix duplicate key exception in seeds.rb

See https://blog.saeloun.com/2021/03/08/rails-6-1-adds-excluding-to-active-record-relation.html for the .excluding method

Fix websockets

Fix icon call

Fix icons in notifications (#2333)

* Fix icons in notifications

* Fix more stuff

Fix image url for blog post

Sync blog and main docs in seeding

Update octokit

This fixes a warning: octokit/octokit.rb#1359

Fix deprecation warning

Build test.js file

Fix uri encode test

Remove unused import

Use test:prepare instead of assets:precompile

Add empty string to tag.div

Fix omniauth

Write manifest JSON files in test helper

Fix modal argument

Enable esbuild splitting (#2342)

* Enable esbuild splitting

* Add comment

Update migrations to 7.0

Fix CSS classes not inheriting correctly

Add precision to datetime columns

Fix invalid error icon

Remove unused import

Fix non-unique key

Fix JS bug

Moves highlighters CSS to postcss

Remove socket configuration (#2341)

* Member badge shouldn't use estimate for percentage awardees (#2330)

* Remove socket configuration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Member badge shouldn't use estimate for percentage awardees (#2330)

Don't consider wip prerequisites (#2344)

* Don't consider wip prerequisites

* Rename to learnable_concept_slugs

Add timeouts to CI builds (#2331)

* Add timeouts to CI builds

Right now the builds are all stuck for some reason, clogging up the queues. They normal appear to be taking ~2-3 minutes, so a timeout of 30 minutes should be more than enough to prevent this issue in the future.

* Add system tests & rubocup

[skip ci]

Set num_loc correctly when publishing a solution (#2260)

* Set num_loc correctly when publishing a solution

* DRY up publishing and publishing iteration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Fix typo in bug report modal (#2339)

Add first draft of fundraising job role (#2337)

* Add first draft of fundraising job role

* Spelling

* Improve

* Tweaks from DJ

* More tweaks

* Add more

* Tweaks

* Tweaks

* Final tweak

Update setup-ruby action

DRY up code around tooling files (#2257)

* DRY up logic slightly

* Add tests to verify editor files

* Use proper directory

* Fix representation file paths

* DRY further (#2348)

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Allow sorting user solutions by most starred (#2238)

* Allow sorting user solutions by num stars

* Allow sorting user published solutions by most stars

* Update system test

* Fix sorting in test

* Improve default of sorting

* Fix many tests

rails 7 rubocop (#2349)

* Update rubocop gems

* Format using rubocop

* Add num_stars

* Fix rubocop warning
ErikSchierboom pushed a commit to exercism/website that referenced this pull request Feb 1, 2022
Run rails app:update

Start process of porting CSS to Tailwind 3

Use propshaft instead of sprockets

WIP Use esbuild not webpack

Fix trailing whitespace lint error

Update Dockerfile to Rails 3.0.3

Fix init.sql for mysql 8

Fix connecting to database

Normalize quotes

Enable yarn build in background

Disable js watch

Work

Missing files

Get icons working

Allow importing manifest

Use asset url helper

Remove dynamic require

Remove webpack-specific files

Temporarily use local exercism config

Temporarily use local exercism config

Copy config items

Update manifest

Win

Refactor code

Remove unused define

Update

Change vendor prefix

Update

Enable watch mode for js

Minify JS in production

Minify CSS in production

Remove unused code

Remove webpack bin scripts

Move listen gem out of development group

Update manifest in background

Ignore javascript config files

Upgrade config to  0.81.0

Use .config dir

Apply review comments

Upgrade to Ruby 3.1.0

Update bundler version

Fixes rubygems/rubygems#5234

Rename monitor_manifest to monitor-manifest

Upgrade to Rails 7.0.1

Remove webpack references

Exclude file

Fix anycable

Fix anycable

Fix css name

Remove webpacker helper references

Fix passing of params to I18N

Fix asset paths

Fix i18n call

Fix more tests

Add .keep file for .config dir

Add .keep file

Fix esbuild

Some tweaks (#2329)

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>

Fix timestamp test

Fix old image_pack_url

Fix path

Use git version for mysql gem

Remove image

Update Setup Ruby workflow

Add missing package

Don't run tests serially

Fix manifest import

Don't use esbuild-jest

Remove svg plugin

Upate lockfile

Add TODO

Fix rails tests

Build for browserslist

Fix failing tests

Fix failing tests

Fix duplicate key exception in seeds.rb

See https://blog.saeloun.com/2021/03/08/rails-6-1-adds-excluding-to-active-record-relation.html for the .excluding method

Fix websockets

Fix icon call

Fix icons in notifications (#2333)

* Fix icons in notifications

* Fix more stuff

Fix image url for blog post

Sync blog and main docs in seeding

Update octokit

This fixes a warning: octokit/octokit.rb#1359

Fix deprecation warning

Build test.js file

Fix uri encode test

Remove unused import

Use test:prepare instead of assets:precompile

Add empty string to tag.div

Fix omniauth

Write manifest JSON files in test helper

Fix modal argument

Enable esbuild splitting (#2342)

* Enable esbuild splitting

* Add comment

Update migrations to 7.0

Fix CSS classes not inheriting correctly

Add precision to datetime columns

Fix invalid error icon

Remove unused import

Fix non-unique key

Fix JS bug

Moves highlighters CSS to postcss

Remove socket configuration (#2341)

* Member badge shouldn't use estimate for percentage awardees (#2330)

* Remove socket configuration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Member badge shouldn't use estimate for percentage awardees (#2330)

Don't consider wip prerequisites (#2344)

* Don't consider wip prerequisites

* Rename to learnable_concept_slugs

Add timeouts to CI builds (#2331)

* Add timeouts to CI builds

Right now the builds are all stuck for some reason, clogging up the queues. They normal appear to be taking ~2-3 minutes, so a timeout of 30 minutes should be more than enough to prevent this issue in the future.

* Add system tests & rubocup

[skip ci]

Set num_loc correctly when publishing a solution (#2260)

* Set num_loc correctly when publishing a solution

* DRY up publishing and publishing iteration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Fix typo in bug report modal (#2339)

Add first draft of fundraising job role (#2337)

* Add first draft of fundraising job role

* Spelling

* Improve

* Tweaks from DJ

* More tweaks

* Add more

* Tweaks

* Tweaks

* Final tweak

Update setup-ruby action

DRY up code around tooling files (#2257)

* DRY up logic slightly

* Add tests to verify editor files

* Use proper directory

* Fix representation file paths

* DRY further (#2348)

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Allow sorting user solutions by most starred (#2238)

* Allow sorting user solutions by num stars

* Allow sorting user published solutions by most stars

* Update system test

* Fix sorting in test

* Improve default of sorting

* Fix many tests

rails 7 rubocop (#2349)

* Update rubocop gems

* Format using rubocop

* Add num_stars

* Fix rubocop warning
iHiD added a commit to exercism/website that referenced this pull request Feb 3, 2022
* Bump Gem to Rails 7, and switch to Ruby 3.0.3

Run rails app:update

Start process of porting CSS to Tailwind 3

Use propshaft instead of sprockets

WIP Use esbuild not webpack

Fix trailing whitespace lint error

Update Dockerfile to Rails 3.0.3

Fix init.sql for mysql 8

Fix connecting to database

Normalize quotes

Enable yarn build in background

Disable js watch

Work

Missing files

Get icons working

Allow importing manifest

Use asset url helper

Remove dynamic require

Remove webpack-specific files

Temporarily use local exercism config

Temporarily use local exercism config

Copy config items

Update manifest

Win

Refactor code

Remove unused define

Update

Change vendor prefix

Update

Enable watch mode for js

Minify JS in production

Minify CSS in production

Remove unused code

Remove webpack bin scripts

Move listen gem out of development group

Update manifest in background

Ignore javascript config files

Upgrade config to  0.81.0

Use .config dir

Apply review comments

Upgrade to Ruby 3.1.0

Update bundler version

Fixes rubygems/rubygems#5234

Rename monitor_manifest to monitor-manifest

Upgrade to Rails 7.0.1

Remove webpack references

Exclude file

Fix anycable

Fix anycable

Fix css name

Remove webpacker helper references

Fix passing of params to I18N

Fix asset paths

Fix i18n call

Fix more tests

Add .keep file for .config dir

Add .keep file

Fix esbuild

Some tweaks (#2329)

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>

Fix timestamp test

Fix old image_pack_url

Fix path

Use git version for mysql gem

Remove image

Update Setup Ruby workflow

Add missing package

Don't run tests serially

Fix manifest import

Don't use esbuild-jest

Remove svg plugin

Upate lockfile

Add TODO

Fix rails tests

Build for browserslist

Fix failing tests

Fix failing tests

Fix duplicate key exception in seeds.rb

See https://blog.saeloun.com/2021/03/08/rails-6-1-adds-excluding-to-active-record-relation.html for the .excluding method

Fix websockets

Fix icon call

Fix icons in notifications (#2333)

* Fix icons in notifications

* Fix more stuff

Fix image url for blog post

Sync blog and main docs in seeding

Update octokit

This fixes a warning: octokit/octokit.rb#1359

Fix deprecation warning

Build test.js file

Fix uri encode test

Remove unused import

Use test:prepare instead of assets:precompile

Add empty string to tag.div

Fix omniauth

Write manifest JSON files in test helper

Fix modal argument

Enable esbuild splitting (#2342)

* Enable esbuild splitting

* Add comment

Update migrations to 7.0

Fix CSS classes not inheriting correctly

Add precision to datetime columns

Fix invalid error icon

Remove unused import

Fix non-unique key

Fix JS bug

Moves highlighters CSS to postcss

Remove socket configuration (#2341)

* Member badge shouldn't use estimate for percentage awardees (#2330)

* Remove socket configuration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Member badge shouldn't use estimate for percentage awardees (#2330)

Don't consider wip prerequisites (#2344)

* Don't consider wip prerequisites

* Rename to learnable_concept_slugs

Add timeouts to CI builds (#2331)

* Add timeouts to CI builds

Right now the builds are all stuck for some reason, clogging up the queues. They normal appear to be taking ~2-3 minutes, so a timeout of 30 minutes should be more than enough to prevent this issue in the future.

* Add system tests & rubocup

[skip ci]

Set num_loc correctly when publishing a solution (#2260)

* Set num_loc correctly when publishing a solution

* DRY up publishing and publishing iteration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Fix typo in bug report modal (#2339)

Add first draft of fundraising job role (#2337)

* Add first draft of fundraising job role

* Spelling

* Improve

* Tweaks from DJ

* More tweaks

* Add more

* Tweaks

* Tweaks

* Final tweak

Update setup-ruby action

DRY up code around tooling files (#2257)

* DRY up logic slightly

* Add tests to verify editor files

* Use proper directory

* Fix representation file paths

* DRY further (#2348)

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>

Allow sorting user solutions by most starred (#2238)

* Allow sorting user solutions by num stars

* Allow sorting user published solutions by most stars

* Update system test

* Fix sorting in test

* Improve default of sorting

* Fix many tests

rails 7 rubocop (#2349)

* Update rubocop gems

* Format using rubocop

* Add num_stars

* Fix rubocop warning

* Remove active storage migrations

* Rename .manifest.json.d.ts to manifest.json.d.ts

* Make monitor manifest a 1-time opp in CI

* Fix bug in test helper

* Call super

* Fix tests

* Seperate generate js config into its own file

* Fix production nodejs build

* Fix production rails dockerfile

* Fix production rails dockerfile

* Fix assets sync

* Fix production docker build

* Workaround for NODE_ENV=production yarn install not installing devDependencies

* Use RAILS_ENV=production

* Fix failing test

* Only deploy website to website-staging

Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
balvig added a commit to cookpad/cp8_cli that referenced this pull request Mar 9, 2022
## What

Bumps Octokit version to 4.21

## Why

This should remove warnings issued by recent versions of Faraday:

```
WARNING: `Faraday::Connection#authorization` is deprecated; it will be removed in version 2.0.        
While initializing your connection, use `#request(:authorization, ...)` instead.                      
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.
```

See octokit/octokit.rb#1359

## How

Simple gemspec bump.

Note that there are [some murmurings about compatibility with GitHub Enterprise](octokit/octokit.rb#1391) with `v 4.22`, so for now have pointed it to `4.21`.
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.

Deprecation warning since Faraday 1.7.1
6 participants