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

Run API and Ingestion Server tests with all relevant ES versions #2832

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

sarayourfriend
Copy link
Collaborator

Fixes

Based on #2777 and related to the comment here: #2777 (review)

Description

Because production is currently stuck on ES 7 until we've figured out why ES 8 caused the queries to take so long, we need to test all our code against both ES versions. Until we've fully transitioned to ES 8 we need to support both versions.

Testing Instructions

Check the new CI tasks and confirm they've run as expected. Locally, run OPENVERSE_ES_VER=7 just api/test locally to test as an example that the environment variable works as expected.

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).
  • [N/A] I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • [N/A] 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.

@sarayourfriend sarayourfriend added 🟥 priority: critical Must be addressed ASAP 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository 🧱 stack: infra Related to the Terraform config and other infrastructure labels Aug 15, 2023
@sarayourfriend sarayourfriend requested review from a team as code owners August 15, 2023 00:37
@sarayourfriend sarayourfriend requested review from fcoveram, dhruvkb and stacimc and removed request for a team August 15, 2023 00:37
@github-actions github-actions bot added 🧱 stack: api Related to the Django API 🧱 stack: catalog Related to the catalog and Airflow DAGs 🧱 stack: ingestion server Related to the ingestion/data refresh server 🧱 stack: mgmt Related to repo management and automations labels Aug 15, 2023
@sarayourfriend sarayourfriend requested review from obulat and removed request for fcoveram August 15, 2023 00:41
@sarayourfriend
Copy link
Collaborator Author

This will also need the required checks changed in the infra repo with the new names. I'll push a commit with changes to ingestion and api so that those steps actually run.

@sarayourfriend
Copy link
Collaborator Author

The most recent CI run confirms that this runs (and that the changes in #2777 should be okay (I think):

https://github.com/WordPress/openverse/actions/runs/5862236561/job/15893876650?pr=2832#step:5:19

Notice that it pulls ES version 7. And here it pulls version 8:

https://github.com/WordPress/openverse/actions/runs/5862236561/job/15893876557?pr=2832#step:5:19

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.

The CI runs prove that this is working.
I've asked inline, too, but do we really need changes to the steps that just "imitate" a CI step, both for the ingestion and the API (the ones that just echo something and don't do anything)?


steps:
- name: Pass
run: echo 'Ingestion server tests are skipped because ingestion server is unchanged.'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to update this step since it's not really doing anything? It's just the "Pass" step.

@obulat obulat merged commit bd4fcff into fix_es8_deprecation Aug 15, 2023
50 checks passed
@obulat obulat deleted the add/run-es-7-tests branch August 15, 2023 04:01
obulat pushed a commit that referenced this pull request Aug 15, 2023
* Run API and Ingestion Server tests with all relevant ES versions

* Use better names and add bypass jobs

* Force CI to run for API and ingestion
obulat added a commit that referenced this pull request Aug 15, 2023
* Remove `body` from the index requests

* Run API and Ingestion Server tests with all relevant ES versions (#2832)

* Run API and Ingestion Server tests with all relevant ES versions

* Use better names and add bypass jobs

* Force CI to run for API and ingestion

---------

Co-authored-by: sarayourfriend <[email protected]>
@obulat obulat mentioned this pull request Aug 24, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟥 priority: critical Must be addressed ASAP 🧱 stack: api Related to the Django API 🧱 stack: catalog Related to the catalog and Airflow DAGs 🧱 stack: infra Related to the Terraform config and other infrastructure 🧱 stack: ingestion server Related to the ingestion/data refresh server 🧱 stack: mgmt Related to repo management and automations
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants