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

Support Locust >=1 #71

Merged
merged 6 commits into from
Jun 19, 2020
Merged

Support Locust >=1 #71

merged 6 commits into from
Jun 19, 2020

Conversation

thilp
Copy link
Member

@thilp thilp commented Jun 5, 2020

Adds support for the new major version of Locust (locust=~1) in generated locustfiles.

Related to #69.

Description

In generated locustfiles, detect the major version of the corresponding locust package; if that version is 1:

  1. Import the new Locust classes instead of the old ones, and create aliases so that most of the rest of the locustfile can stay unchanged.
  2. In the definition of our subclass of HttpUser, create a tasks field instead of the task_set field (that triggers a deprecation warning in 1.0).

Types of Changes

What types of changes does your code introduce? Keep the ones that apply:

  • Bug fix (non-breaking change which fixes an issue)

TODO

List of tasks you will do to complete the PR:

  • Create an alpha release with these changes.
  • Get feedback on the alpha release from users.
  • When the feedback is positive, bump the version to 1.3.0 and merge this PR to create a new release.

Review

Reviewers' checklist:

  • If this PR implements new flows or changes existing ones, are there
    good tests for these flows?
    If this PR rather removes flows, are the obsolete tests removed as well?
  • Is the documentation still up-to-date and exhaustive? This covers both
    technical (in source files) and functional (under docs/) documentation.
  • Is the changelog updated?
  • Does the new version number correspond to the actual changes from this PR?
    In doubt, refer to https://semver.org.

@zincr
Copy link

zincr bot commented Jun 5, 2020

🤖 zincr found 0 problems , 1 warning

ℹ️ Large Commits
✅ Approvals
✅ Specification
✅ Dependency Licensing

Details on how to resolve are provided below


Large Commits

Checks all commits for large additions to a single file. Large commits should be reviewed more carefully for potential copyright and licensing issues

This file contains a substantial change, please review to determine if the change comes from an external source and if there are any copyright or licensing issues to be aware of

  • ℹ️ poetry.lock had +100 lines of code changed in a single commit
    Please review this file to determine the source of this change
     

@thilp thilp marked this pull request as ready for review June 18, 2020 08:13
@thilp thilp requested a review from tortila as a code owner June 18, 2020 08:13
Copy link
Contributor

@tortila tortila left a comment

Choose a reason for hiding this comment

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

Interesting approach with the aliases. I like how little code needs to be changed because of it!

@thilp
Copy link
Member Author

thilp commented Jun 19, 2020

Thank you 😊

@thilp thilp merged commit d31e34e into master Jun 19, 2020
@thilp thilp deleted the support-locust-1.0 branch June 19, 2020 07:49
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