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

warning raised for version eol #685

Merged
merged 4 commits into from
Feb 20, 2020
Merged

warning raised for version eol #685

merged 4 commits into from
Feb 20, 2020

Conversation

toneymathews
Copy link
Contributor

@toneymathews toneymathews commented Feb 18, 2020

Closes https://github.com/Shopify/shopify/issues/233879

TL;DR This pull request is raised to add a warning message case of API Version being used to make a call is expired or will expire within 30 days

Background:

Currently, a warning header is added to the responses of all admin and storefront APIs that are using a version that expires within 30 days or is expired already. This was done through https://github.com/Shopify/shopify/pull/232580

Now, we want to raise warning messages through the Shopify API gem as well if API calls are made using expired or EOL versions.

Solution

The response headers of the API responses are checked for the presence of the version EOL warning header. If present, a warning message is raised.

@chrisbutcher
Copy link
Contributor

cc: @Shopify/api-patterns-team

@toneymathews toneymathews self-assigned this Feb 18, 2020
Copy link
Contributor

@swalkinshaw swalkinshaw left a comment

Choose a reason for hiding this comment

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

Code looks good. We just need to be more consistent with our terminology.

lib/active_resource/detailed_log_subscriber.rb Outdated Show resolved Hide resolved
lib/active_resource/detailed_log_subscriber.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@grcooper grcooper left a comment

Choose a reason for hiding this comment

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

I agree with Scott's comments, but otherwise the code LGTM (with one very small nit)

lib/active_resource/detailed_log_subscriber.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@katiedavis katiedavis left a comment

Choose a reason for hiding this comment

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

LGTM it seems like others have reviewed terminology etc.

@toneymathews toneymathews merged commit 8a9a284 into master Feb 20, 2020
@toneymathews toneymathews deleted the warn-on-warning-header branch February 21, 2020 19:50
@toneymathews toneymathews temporarily deployed to rubygems February 24, 2020 21:24 Inactive
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.

None yet

5 participants