-
Notifications
You must be signed in to change notification settings - Fork 482
Description
Issue summary
This project has seen better days. So did ShopifyApp gem.
1. Docs site markdown is broken
https://shopify.github.io/shopify-api-ruby/usage/oauth.html
2. Docs are outdated
There's one week old PR about updating docs that still hasn't been merged:
#1172
Does it really take a week to get this merged?
BTW this has been reported more than a month ago:
#1163
Does it take 40 days (and counting) for a documentation fix?
2 commits, 4 documentation files changed, 19 lines of docs added and 81 lines of docs removed.
This takes 40+ days.
Shopify has truly abandoned their Ruby developers community.
In v13 of this gem there's no ShopifyAPI::Auth::SessionStorage.
This is being referenced in several places in documentation, even in README:
- https://github.com/Shopify/shopify-api-ruby/blob/main/README.md#breaking-change-notice-for-version-1000
- https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/session_storage.md
- https://github.com/Shopify/shopify-api-ruby/blob/94591589ff57d8dcb3f37a97f70620766bb92ad6/docs/issues.md#notes-on-session-handling
There are also several issues about this opened.
3. Authentication documentation
I'm trying to figure out a simple thing of authenticating/starting an offline session in my Rails app.
It was done like this before:
session = ShopifyAPI::Session.new(domain: shop.shopify_domain, token: shop.shopify_token, api_version: api_version)
ShopifyAPI::Base.activate_session(session)This no longer works.
I went to the documentation website:
https://shopify.github.io/shopify-api-ruby/getting_started.html
...and found nothing.
I found some info here on how to do online session:
https://github.com/Shopify/shopify-api-ruby/blob/main/docs/usage/rest.md
I found this piece of code here:
https://shopify.dev/docs/api/admin-rest
session = ShopifyAPI::Utils::SessionUtils.load_current_session(
auth_header: auth_header,
cookies: cookies,
is_online: is_online
)
client = ShopifyAPI::Clients::Rest::Admin.new(
session: session
)
response = client.get(path: 'shop')I don't know how I can convert this for offline use?
I finally figured out how to achieve this by reading ShopifyApp and Shopify API gems source code:
session = ShopifyAPI::Auth::Session.new(shop: shop.shopify_domain, access_token: shop.shopify_token)
ShopifyAPI::Context.activate_session(session)Seems like with all the unnecessary breaking changes, you also managed to rename domain: keyword argument to shop:, which is first unclear, but also wrong, because in many Rails apps shop represents an instance of a Shop ActiveRecord model.
4. Docs don't mention ShopifyApp gem
It's sad to see that on this page there's no reference to ShopifyApp gem, only to Shopify API gem:
https://shopify.dev/docs/api/admin-rest
I understand I'm on a part of documentation about REST API, but I could barely find any reference to ShopifyApp gem anywhere on the shopify.dev:
https://shopify.dev/docs/apps/auth/oauth/update/ruby#step-1-update-the-shopify_app-gem
Is this the best way for a new developer to find out that there's a ShopifyApp gem?
Here's another good candidate where you could mention ShopifyApp:
https://shopify.dev/docs/apps/tools/api-libraries
5. There are hundreds of issues never answered and automatically closed by a bot
This is inhuman and a slap in the face to anyone who took their time to report an issue and/or create a PR. If you cannot keep track of open issues, at least disable the stale bot.
https://github.com/Shopify/shopify-api-ruby/issues?q=is%3Aissue+is%3Aclosed
This tragedy has turned into a comedy:
Why Shopify is not actively taking more care of these issues? #986
People are fighting with stale bot. It is sad and hilarious at the same time.
Yeah, tell me about it. In the end my business partner and I ended just writing our own ecommerce platform.
6. There are bugs being reported that seem quite critical to Ruby/Rails fundamental functionality
This seems rather critical:
ShopifyAPI::Rest::Base responds_to everything #1171
ShopifyAPI::Order.new.present? raises an error.
Or how about this one:
Updating assets is broken in v13.0.0 #1164
7. Newer versions are more concerned about rewrites than keeping the existing functionality, newer versions have less functionality than older versions
GraphQL Support? #1168
Updating assets is broken in v13.0.0 #1164
@nelsonwittwer Can you elaborate a bit more on how session storage is used for a pure api client? If session storage is removed from Context.setup, how would it get defined without shopify_app? What role does it play in this scenario?
Breaking change notice for version 10.0.0 GREATLY underrepresented #1103
8. New Sorbet type system makes error messages useless
ShopifyAPI::Webhooks::Registry.add_registration occurred TypeError in fields parameter #1147
REST API Shop resource definitions TypeError #1145
Upgrading from 9.5.1 to 10+ adds a sorbet dependency that affects unit tests unrelated to Shopify #1109 - this issue talks about how upgrading Shopify API gem breaks unrelated tests. This is the worst kind of behavior that can happen for a new version of gem that you're being forced to upgrade to. And the suggested fix is to install more tooling. Which is not a fix.
Accessing the taxes_included property on a ShopifyAPI::Shop object returns a Sorbet TypeError #1170
Accessing the arguments property on a ShopifyAPI::Event object returns a Sorbet TypeError #1152
There are two pages of issues if you search for typeerror:
https://github.com/Shopify/shopify-api-ruby/issues?q=typeerror
9. Shopify forces developers to constantly upgrade to their latest buggy, undocumented, and with-many-breaking-changes gem/libraries versions
Remember the App Bridge upgrading fiasco? Oh, I 'member: [Docs] Documentation still refers to app bridge v1.x #71
We were asked to upgrade to App Bridge 2.x because our apps will be delisted, but the documentation on how to upgrade/switch a Rails app to App Bridge was non-existent.
Shopify API gem v10 introduced many breaking changes and we're constantly forced to keep upgrading to the latest gem versions or our apps will be delisted from the App Store because we're missing the functionality X.
It would be great to release breaking changes as a major version bump, instead of minor Shopify/shopify_app#875
FWIW, we've decided to just use HTTParty directly to the REST API rather than migrate to v10+ of this gem.
What can be done?
Please help me on this one, I'd love to hear more opinions/suggestions how we can make this better.
Here are some of my suggestions:
-
Dedicate more resources internally to Ruby gems
-
Don't make so many breaking changes in: a) Shopify REST/GraphQL APIs, authentication/session management, etc. and b) in ShopifyApp and Shopify API gems. Don't do things like removing session storage from this gem. Just leave it. There are tons of other functionalities you could add instead.
-
Announce a cash bounty and pay developers willing to work on Shopify's open source projects
-
This goes well with the previous point: make a frequent contributor a maintainer - a lot of open-source code and reliance on such code is based on trust. You could show some trust to active developers by making them maintainers. If it makes you feel better, you could ask them to sign some document so you could have some more confidence that they won't do anything malicious.
-
Support your community - promote unofficial libraries on your site. Here's how Airtable does it: https://airtable.com/developers/web/api/introduction
Here are some Ruby projects that could be good candidates for adding to your website:
- https://github.com/baoagency/polaris_view_components
- https://github.com/travishaynes/shopify-mock/tree/httpmock
- https://github.com/kirillplatonov/shopify-hotwire-sample
- https://github.com/forsbergplustwo/partner-metrics-for-shopify
- https://github.com/davefreiman/shopify-sample-data
- https://github.com/kevinhughes27/shopify-tax-receipts
- https://github.com/kirillplatonov/shopify_graphql
- https://github.com/igrigorik/shopify-core-web-vitals
- https://github.com/ScreenStaring/recharge-api
- https://github.com/ScreenStaring/shopify_api_retry
- https://github.com/lucidnz/lib-ruby-lucid-shopify
- https://github.com/colinsoleim/shopify-metafieldsync
- https://github.com/bravetheskies/polaris-html
- https://github.com/ripenecommerce/shopify-ruby-sha256
- https://github.com/remy727/rails-shopify-app-starter-kit
- https://github.com/pcantarelli/app-ruby
- https://github.com/jhnwr/shopify-scripts -
Fix your release/changes workflow - a lot has been done in this area, but there's a lot to be desired. Where's the UPGRADING guide? Can you please add: "Do not release any breaking changes without upgrade steps" to your release workflow? Related issue from 4 years ago: Would be good to have MIGRATION_GUIDE.md or similar Would be good to have
MIGRATION_GUIDE.mdor similar shopify_app#774 -
Ask for requests for features - instead of guessing what your users (us, developers) need/want to see as new functionality, you could...just ask.
EDIT: 8. Remove stale bot.
Apologies if it sounds like I'm a bit frustrated, that's because I am. I've got several Shopify projects that I handle by myself and it's a pain to keep all of the projects up to date. Not to mention that every time I start a new Shopify-related project, the workflow and generated project file structure is completely different.
Adding in CC people whose issues I've mentioned. I'd love to get more input what can be done on getting ShopifyApp and Shopify API projects the much needed love they deserve.
@nelsonwittwer @matthewlein @guillelopezgines @Fladdermuz @jacksonSingleton @benichu @acflint @fmichaut-diff @ClaytonPassmore @garethson @nickmealey @flavio-b @jagthedrummer @marclennox @panckreous @srgoldman @LovroM @raymondweidner @raphaelfeitoza @amoughnie @andyw8
I keep seeing on this and other Shopify projects (Dawn theme, theme-check, CLI, etc.) the lack of good leadership and oversight. Seems like Shopify employees add features the way they want and no one is looking at the big picture. Stuff breaks, no one is talking to community, but the KPIs are met, because the tool X is now unified with CLI v3 or the gem now supports session auth, but we forgot the docs, sorry.
Please can someone from Shopify reply what are your plans with these projects? Do you have a roadmap? How many developer resources are dedicated to these projects? What is the plan on addressing these above-mentioned issues?
Don't leave me at "seen", I put more than 1 hour creating this issue. /bracing for stale bot 😄