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

[BUG]: faraday-multipart warning always printed #1701

Closed
1 task done
dentarg opened this issue Jun 15, 2024 · 2 comments · Fixed by #1712
Closed
1 task done

[BUG]: faraday-multipart warning always printed #1701

dentarg opened this issue Jun 15, 2024 · 2 comments · Fixed by #1712
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@dentarg
Copy link

dentarg commented Jun 15, 2024

What happened?

Since #1688 (cff7c55) octokit.rb always prints a warning if it can't load faraday-multipart. From the warning, it sounds like I don't need faraday-multipart unless I upload licenses. It would be great if the warning was only printed if I tried to do that; or that I could silence the warning somehow.

Versions

octokit.rb v9.0.0 and up

Relevant log output

$ bundle exec ruby -roctokit -e 'p Octokit::VERSION'
To use multipart middleware with Faraday v2.0+, install `faraday-multipart` gem; note: this is used by the ManageGHES client for uploading licenses
"9.1.0"

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dentarg dentarg added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jun 15, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@kfcampbell kfcampbell added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Jun 17, 2024
@willnet
Copy link

willnet commented Jul 5, 2024

It would be ideal if we could delay the warning until it becomes necessary. However, if you just want to suppress the warning for now, it seems you can use ENV['OCTOKIT_SILENT'].

warn message unless ENV['OCTOKIT_SILENT']

Edouard-chin added a commit to Edouard-chin/octokit.rb that referenced this issue Sep 3, 2024
- In 7bc6dd5, a warning message was
  added to let users know that faraday-multipart is required when
  using Faraday 2.0.

  This warning is not very helpful, and may lead to projects adding
  the gem to their dependencies even if they don't need it, as the
  faraday-multipart middleware is only used for uploading license for
  GitHub entrepise.

  This patch will avoid printing the warning unnecessarily but also
  display a better error message when ultimately
  the call to `conn.request :multipart` fails.

  Fix octokit#1701
Edouard-chin added a commit to Edouard-chin/octokit.rb that referenced this issue Sep 3, 2024
- In 7bc6dd5, a warning message was
  added to let users know that faraday-multipart is required when
  using Faraday 2.0.

  This warning is not very helpful, and may lead to projects adding
  the gem to their dependencies even if they don't need it, as the
  faraday-multipart middleware is only used for uploading license for
  GitHub entrepise.

  This patch will avoid printing the warning unnecessarily but also
  display a better error message when ultimately
  the call to `conn.request :multipart` fails.

  Fix octokit#1701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
Archived in project
3 participants