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

[MAINTENANCE] Add retries to requests in usage stats integration tests #4600

Merged

Conversation

cdkini
Copy link
Member

@cdkini cdkini commented Mar 31, 2022

Please annotate your PR title to describe what the PR does, then give a brief bulleted description of your PR below. PR titles should begin with [BUGFIX], [FEATURE], [DOCS], or [MAINTENANCE]. If a new feature introduces breaking changes for the Great Expectations API or configuration files, please also add [BREAKING]. You can read about the tags in our contributor checklist.

Changes proposed in this pull request:

  • Add fixture to automatically retry requests if they fail - this should alleviate issues with flaky usage stats tests.

Definition of Done

Please delete options that are not relevant.

  • My code follows the Great Expectations style guide
  • I have performed a self-review of my own code
  • I have run any local integration tests and made sure that nothing is broken.

Thank you for submitting!

@netlify
Copy link

netlify bot commented Mar 31, 2022

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit 3c74317
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/6245b44743231b0008aa1213
😎 Deploy Preview https://deploy-preview-4600--niobium-lead-7998.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cdkini cdkini self-assigned this Mar 31, 2022
Copy link
Member

@anthonyburdi anthonyburdi left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@NathanFarmer NathanFarmer left a comment

Choose a reason for hiding this comment

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

LGTM!

def requests_session_with_retries() -> requests.Session:
# https://stackoverflow.com/a/35636367
session = requests.Session()
retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504])
Copy link
Contributor

Choose a reason for hiding this comment

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

I like how the backoff_factor works! We should keep an eye on how often we are using this though for performance reasons.

@cdkini cdkini merged commit 85f77fd into develop Mar 31, 2022
@cdkini cdkini deleted the maintenance/set-retries-on-usage-stats-integration-tests branch March 31, 2022 14:36
Shinnnyshinshin pushed a commit that referenced this pull request Mar 31, 2022
…thub.com/great-expectations/great_expectations into bugfix/GREAT-725/fix-regex-param-builder

* 'bugfix/GREAT-725/fix-regex-param-builder' of https://github.com/great-expectations/great_expectations:
  [FEATURE] Implement Multi-Column Domain Builder for Rule-Based Profiler (#4604)
  [MAINTENANCE] Add retries to `requests` in usage stats integration tests (#4600)
fjork3 pushed a commit that referenced this pull request Mar 31, 2022
…sts (#4600)

* feat: add retry fixture

* chore: add type hinting
Shinnnyshinshin pushed a commit that referenced this pull request Apr 1, 2022
* develop:
  docs: fix snippet ref (#4609)
  [BUGFIX] Adjust output of `regex` ParameterBuilder to match Expectation (#4594)
  [FEATURE] Rule-Based Profiler: ColumnPairDomainBuilder (#4608)
  chore : update example notebook for RBP to include multicolumn domain builder (#4606)
  Pass random seed to bootstrap estimator (#4605)
  [MAINTENANCE] Miscellaneous test cleanup (#4602)
  [FEATURE] Implement Multi-Column Domain Builder for Rule-Based Profiler (#4604)
  [MAINTENANCE] Add retries to `requests` in usage stats integration tests (#4600)
  [MAINTENANCE] Standardize DomainBuilder Constructor Arguments Ordering (#4599)
  [MAINTENANCE] Instrument package dependencies (#4583)
  [BUGFIX] Adjust output of datetime `ParameterBuilder` to match Expectation (#4590)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants