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: overwrite params with environment variables even if there are no params in the pipeline definition; make mypy ignore REST API tests #3930

Merged
merged 13 commits into from
Jan 26, 2023

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Jan 24, 2023

Related Issues

Proposed Changes:

Before

component_definition["params"][param_name] = value

I check whether the key params exists. If not, I create it.

How did you test it?

Added a new test in the REST API tests.
I manually verified that it also works in Docker.

Notes for the reviewer

Mypy failed because it checked the REST API tests.
These files should be ignored, as done in #3894 for main tests.
So I also fixed this aspect.

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added tests that demonstrate the correct behavior of the change
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test:.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@anakin87 anakin87 requested a review from a team as a code owner January 24, 2023 22:22
@anakin87 anakin87 requested review from masci and removed request for a team January 24, 2023 22:22
@anakin87 anakin87 changed the title fix: overwrite params with environment variables even if there are no params in the pipeline YAML definition fix: overwrite params with environment variables even if there are no params in the pipeline definition; make mypy ignore REST API tests Jan 24, 2023
@anakin87 anakin87 marked this pull request as draft January 24, 2023 23:30
@anakin87 anakin87 marked this pull request as ready for review January 24, 2023 23:30
@anakin87 anakin87 marked this pull request as draft January 25, 2023 06:49
@anakin87 anakin87 marked this pull request as ready for review January 25, 2023 06:49
@anakin87
Copy link
Member Author

@ZanSara @masci
tests failures seem not related to this PR. 🤔

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@anakin87
Copy link
Member Author

Adapted this PR after the merge of #3956.

I also made some little fixes to the action:

  • search for changed python files also in non-root directories
  • use the right id to recover the output (files instead of python-files)
  • use steps.files.outputs.all_changed_files instead of steps.files.outputs.changed_files to get the changed files

Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

This looks great, thanks!

run: |
mkdir .mypy_cache/
mypy --install-types --non-interactive ${{ steps.python-files.outputs.changed_files }} --exclude=rest_api/build/ --exclude=rest_api/test/
mypy --install-types --non-interactive ${{ steps.files.outputs.all_changed_files }} --exclude=rest_api/build/ --exclude=rest_api/test/
Copy link
Contributor

Choose a reason for hiding this comment

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

Arf, good catch!

@masci masci merged commit 2bbe11b into deepset-ai:main Jan 26, 2023
@anakin87 anakin87 deleted the fix_pipeline_no_params branch January 26, 2023 15:15
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.

KeyError thrown with Docker Compose if no params for DocumentStore is defined
2 participants