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

added reasons why certain warnings were filtered in 'pytest.ini' #2431

Merged
merged 11 commits into from
Jul 14, 2023

Conversation

rahulsindhu01
Copy link
Contributor

@rahulsindhu01 rahulsindhu01 commented Jun 18, 2023

Fixes

Fixes #1805 by @AetherUnbound

Description

Testing Instructions

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@rahulsindhu01 rahulsindhu01 requested a review from a team as a code owner June 18, 2023 06:52
@openverse-bot openverse-bot added the 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work label Jun 18, 2023
Copy link
Contributor

@stacimc stacimc left a comment

Choose a reason for hiding this comment

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

Thanks @rahulsindhu01!

I think the correct issue this PR is referencing is #1805 -- if that's correct, do you mind updating your PR description?

The filtered warnings in the catalog already had some brief comments explaining them here, above the ones you added -- although I appreciate your added detail. For #1805 we'll want to add these comments to the API and ingestion server pytest.ini files.

@rahulsindhu01
Copy link
Contributor Author

@stacimc
my bad
will do those changes now

@krysal krysal added 🟩 priority: low Low priority and doesn't need to be rushed 📄 aspect: text Concerns the textual material in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🧱 stack: api Related to the Django API 🧱 stack: ingestion server Related to the ingestion/data refresh server and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Jun 20, 2023
@rahulsindhu01 rahulsindhu01 changed the title added reasons why certain warnings were filtered in 'catalog/pytest.ini' added reasons why certain warnings were filtered in 'pytest.ini' Jun 28, 2023
@rahulsindhu01 rahulsindhu01 requested a review from a team as a code owner June 28, 2023 16:52
@rahulsindhu01
Copy link
Contributor Author

@stacimc ive done the changes as you said me to do

Copy link
Contributor Author

@rahulsindhu01 rahulsindhu01 left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

@stacimc stacimc left a comment

Choose a reason for hiding this comment

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

Thanks for the updates @rahulsindhu01!

I left a few nitpicks about formatting/etc, but my blocking concern is that while these notes do a great job of explaining what each filtered warning is, I think they don't quite capture why they're considered safe to ignore (beyond wanting to declutter test logs).

I realize this is probably a difficult ask without having a lot of historical context on the project, so I took a look and left a few comments. @obulat may also have some good insight here!

api/pytest.ini Show resolved Hide resolved
api/pytest.ini Outdated Show resolved Hide resolved
@@ -5,5 +5,21 @@ pythonpath = .

filterwarnings=
ignore:Unverified HTTPS request
# Ignore warnings related to unverified HTTPS requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not actually sure this suppressed warning is still needed, maybe @dhruvkb can comment since it looks like he added it initially? There's also this somewhat related issue.

api/pytest.ini Outdated Show resolved Hide resolved
catalog/pytest.ini Outdated Show resolved Hide resolved
@rahulsindhu01
Copy link
Contributor Author

Ok @stacimc, what should i do now

@stacimc
Copy link
Contributor

stacimc commented Jun 30, 2023

Hello @rahulsindhu01, I think these are the next steps needed for this PR:

  1. Rebase on main, to get the changes from Add tzinfo in factory generated access tokens #2497
  2. Remove the comment about the naive datetime warning, which is no longer suppressed
  3. Remove the changes to catalog/pytest.ini
  4. Update the comments for the remaining warnings to include the reasoning for why they have been suppressed, as described in my comments here and here

Let us know if you have any questions, or if you'd like a maintainer to take over.

@rahulsindhu01
Copy link
Contributor Author

@stacimc ill do it

@rahulsindhu01 rahulsindhu01 requested review from a team as code owners July 4, 2023 04:14
@rahulsindhu01
Copy link
Contributor Author

@stacimc ive rebased the file and made other changes that you requested aswell

@stacimc
Copy link
Contributor

stacimc commented Jul 8, 2023

@rahulsindhu01 Thank you! Your changes look great, but it looks like there's been an issue with the rebase resulting in all of the additional changes. Since you're on a forked repo, did you first rebase main with upstream/main before rebasing your branch?

Since the changeset is so small, if you have any more issues cleaning up the history it might even be easier to just open a new PR with just the final changes. Thanks so much for your patience on this one!

@openverse-bot
Copy link
Collaborator

Based on the low urgency of this PR, the following reviewers are being gently reminded to review this PR:

@obulat
@sarayourfriend
This reminder is being automatically generated due to the urgency configuration.

Excluding weekend1 days, this PR was ready for review 15 day(s) ago. PRs labelled with low urgency are expected to be reviewed within 5 weekday(s)2.

@rahulsindhu01, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings.

Footnotes

  1. Specifically, Saturday and Sunday.

  2. For the purpose of these reminders we treat Monday - Friday as weekdays. Please note that the operation that generates these reminders runs at midnight UTC on Monday - Friday. This means that depending on your timezone, you may be pinged outside of the expected range.

@AetherUnbound
Copy link
Collaborator

@rahulsindhu01 I'm going to draft this PR for the time being so our bot is placated, but please let us know if you need any assistance with Staci's last request 🙂

@AetherUnbound AetherUnbound marked this pull request as draft July 10, 2023 17:10
Copy link
Contributor

@obulat obulat left a comment

Choose a reason for hiding this comment

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

I moved the comments in api/pytest.ini above the errors they refer to, as suggested by @stacimc .

In the future, do not open PRs from the main branch of your fork, @rahulsindhu01 : it would be impossible to create other PRs or update your main branch. Always create a new branch for a new PR.

Thank you for your contribution! 🌟

@obulat obulat marked this pull request as ready for review July 12, 2023 06:23
@@ -4,5 +4,12 @@ DJANGO_SETTINGS_MODULE = conf.settings
pythonpath = .

filterwarnings=
# Ignore warnings related to unverified HTTPS requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

@dhruvkb , could you please take a look at this PR? Do we still need to suppress this warning?

@rahulsindhu01
Copy link
Contributor Author

Ok got it

Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @rahulsindhu01

@sarayourfriend sarayourfriend dismissed stacimc’s stale review July 14, 2023 05:17

Changes are sufficient for the time being and mostly address the feedback request. If additional changes are needed, we can open new issues to explore specific warnings with staff-only labels. It's clear this particular issue requires historical and domain knowledge beyond the scope of what we usually ask for from new contributors.

@sarayourfriend sarayourfriend merged commit f9520f7 into WordPress:main Jul 14, 2023
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 aspect: text Concerns the textual material in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: api Related to the Django API 🧱 stack: ingestion server Related to the ingestion/data refresh server
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add notes for why certain warnings are filtered/ignored in testing
7 participants