Skip to content

Conversation

@saadmk11
Copy link
Contributor

@saadmk11 saadmk11 commented Jul 25, 2021

This Pull Request moves the test suite to GitHub Actions from travis-ci.

Note:
codecov and travis-ci were not running previously.

@saadmk11
Copy link
Contributor Author

@safwanrahman Would be great to get your review here.

@saadmk11
Copy link
Contributor Author

run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need swap?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is recommended by elastic:

You must also add the Configure sysctl limits step, otherwise Elasticsearch will not be able to boot.

Ref: https://github.com/elastic/elastic-github-actions/tree/master/elasticsearch#usage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@safwanrahman I have removed this and it looks like everything is working as expected, not sure why it was recommended by elastic, maybe there was some edge case before as the README was last updated more than a year ago.

Output: https://github.com/saadmk11/django-elasticsearch-dsl/actions/runs/1119509026

attr1 = "foo"

field = DEDField(attr='attr2')
field = DEDField(attr='attr2', required=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any particular reason to add it to required ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test tries to assert VariableLookupError is raised. but VariableLookupError is not raised if required is not True.
This test also fails locally.

if self._required:
raise VariableLookupError(
"Failed lookup for key [{}] in "
"{!r}".format(attr, instance)
)

@saadmk11 saadmk11 requested a review from safwanrahman August 11, 2021 09:30
@safwanrahman
Copy link
Collaborator

Looks very nice! Thanks @saadmk11

@safwanrahman safwanrahman merged commit b0aa174 into django-es:master Aug 12, 2021
@saadmk11 saadmk11 deleted the move-to-github-actions branch August 12, 2021 08:22
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.

2 participants