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

test: monkeypatch some env vars in Predefined Pipelines tests #7321

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Mar 6, 2024

Related Issues

Some tests in a PR by an external contributor are failing: https://github.com/deepset-ai/haystack/actions/runs/8175759835/job/22354455607

They (apparently) would need the OpenAI API key to pass, but in external PRs we don't pass the API key.

(Strangely, tests are only failing on Windows.
I can get the same failures locally on Ubuntu if I unset the environment variable. So maybe in Windows, the env var is set but has 0 length)

Proposed Changes:

These specific tests just need the env var to be set, but they don't need to call OpenAI,
so I am monkeypatching the env var.

How did you test it?

Local tests, CI

Checklist

@anakin87 anakin87 requested a review from a team as a code owner March 6, 2024 18:14
@anakin87 anakin87 requested review from masci and removed request for a team March 6, 2024 18:14
@anakin87 anakin87 added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Mar 6, 2024
@github-actions github-actions bot added topic:tests 2.x Related to Haystack v2.0 labels Mar 6, 2024
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 8176786282

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.043%

Totals Coverage Status
Change from base Build 8175680402: 0.0%
Covered Lines: 5290
Relevant Lines: 5875

💛 - Coveralls

@anakin87 anakin87 merged commit 3dbde84 into main Mar 7, 2024
21 checks passed
@anakin87 anakin87 deleted the skip-predefined-pipelines-tests-if-not-api-key branch March 7, 2024 07:52
@silvanocerza silvanocerza added this to the 2.0.1 milestone Apr 8, 2024
silvanocerza pushed a commit that referenced this pull request Apr 8, 2024
* ci: skip some tests if the OPENAI API key is not set

* better idea: monkeypatch the env var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants