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(flask-caching): support v2.0 #3882

Merged
merged 3 commits into from
Jun 30, 2022

Conversation

Kyle-Verhoog
Copy link
Member

@Kyle-Verhoog Kyle-Verhoog commented Jun 29, 2022

Description

flask-caching released version 2.0 which moves the cache client to a new library
called cachelib.

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

Fix

It was noticed that both _write_client and _read_client use the same connection information
so we don't need to dynamically check for each.

Also _read_clients was moved to _read_client when the logic was moved to cachelib.

Checklist

Reviewer Checklist

  • Title is accurate.
  • Description motivates each change.
  • No unnecessary changes were introduced in this PR.
  • PR cannot be broken up into smaller PRs.
  • Avoid breaking API changes unless absolutely necessary.
  • Tests provided or description of manual testing performed is included in the code or PR.
  • Release note has been added for fixes and features, or else changelog/no-changelog label added.
  • All relevant GitHub issues are correctly linked.
  • Backports are identified and tagged with Mergifyio.
  • Add to milestone.

@Kyle-Verhoog Kyle-Verhoog added the changelog/no-changelog A changelog entry is not required for this PR. label Jun 29, 2022
@Kyle-Verhoog Kyle-Verhoog changed the title chore(flask-caching): pin to <2.0.0 fix(flask-caching): use any redis client for redis tagging Jun 30, 2022
@Kyle-Verhoog Kyle-Verhoog changed the title fix(flask-caching): use any redis client for redis tagging chore(flask-caching): support 2.0 Jun 30, 2022
@Kyle-Verhoog Kyle-Verhoog changed the title chore(flask-caching): support 2.0 chore(flask-caching): support v2.0 Jun 30, 2022
flask-caching released version 2.0 which for some reason results in
different tag data and breaks our tests.

Pin the flask-caching version for now until we can update the tests or
fix the integration.
mabdinur
mabdinur previously approved these changes Jun 30, 2022
Copy link
Contributor

@mabdinur mabdinur left a comment

Choose a reason for hiding this comment

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

should this pr be a fix instead of a chore? If so we should update the PR title and add a release note

@Kyle-Verhoog
Copy link
Member Author

yeah idk. It's a "fix" I suppose since we technically support the latest version of flask_caching... 🤷‍♂️ i'll add a release note and update the title

@Kyle-Verhoog Kyle-Verhoog changed the title chore(flask-caching): support v2.0 fix(flask-caching): support v2.0 Jun 30, 2022
@Kyle-Verhoog Kyle-Verhoog removed the changelog/no-changelog A changelog entry is not required for this PR. label Jun 30, 2022
@Kyle-Verhoog Kyle-Verhoog merged commit 94b0770 into DataDog:1.x Jun 30, 2022
@Kyle-Verhoog Kyle-Verhoog deleted the pin-flask-redsi branch June 30, 2022 20:21
@Kyle-Verhoog
Copy link
Member Author

@Mergifyio backport 1.2 1.1 1.0 0.x

mergify bot pushed a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)
mergify bot pushed a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)
mergify bot pushed a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)
@mergify
Copy link
Contributor

mergify bot commented Jul 1, 2022

backport 1.2 1.1 1.0 0.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)
Kyle-Verhoog added a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)

Co-authored-by: Kyle Verhoog <kyle@verhoog.ca>
Kyle-Verhoog added a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)

Co-authored-by: Kyle Verhoog <kyle@verhoog.ca>
Kyle-Verhoog added a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)

Co-authored-by: Kyle Verhoog <kyle@verhoog.ca>
Kyle-Verhoog added a commit that referenced this pull request Jul 1, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)

Co-authored-by: Kyle Verhoog <kyle@verhoog.ca>
@mabdinur
Copy link
Contributor

mabdinur commented Aug 4, 2022

@Mergifyio backport 0.61

mergify bot pushed a commit that referenced this pull request Aug 4, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)
@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2022

backport 0.61

✅ Backports have been created

Yun-Kim pushed a commit to Yun-Kim/dd-trace-py that referenced this pull request Oct 4, 2022
## Description

flask-caching released version 2.0 which moves the cache client to a new library
called [`cachelib`](https://github.com/pallets-eco/cachelib).

Diff here: pallets-eco/flask-caching@v1.10.0...v2.0.0

This breaks our logic which collects tags for the redis client.

## Fix

It was noticed that both `_write_client` and `_read_client` use the same connection information
so we don't need to dynamically check for each.

Also [`_read_clients`](https://github.com/pallets-eco/flask-caching/blob/ac13e01baa11d65c68dcba64f99ccaafd9b5419c/src/flask_caching/backends/rediscache.py#L62) was moved to [`_read_client`](https://github.com/pallets-eco/cachelib/blob/13c8bf8db156dd06154f5e08e23bdd9e73480a5b/src/cachelib/redis.py#L29) when the logic was moved to `cachelib`.

(cherry picked from commit 94b0770)

Co-authored-by: Kyle Verhoog <kyle@verhoog.ca>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
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

3 participants