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

python3Packages.locust: init at 2.31.2 #334644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jokatzke
Copy link
Contributor

Description of changes

Add https://locust.io/, making #199746 redundant

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
    • Using --sandbox flag of nix build
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@jokatzke jokatzke requested a review from natsukium as a code owner August 14, 2024 15:26
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Aug 14, 2024
buildPythonPackage rec {
pname = "locust";
version = "2.31.2";
format = "pyproject";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
format = "pyproject";
pyproject = true;

nativeBuildInputs = [
poetry-dynamic-versioning
pythonRelaxDepsHook
];
Copy link
Member

Choose a reason for hiding this comment

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

pythonRelaxDepsHook is no longer needed. I suggest to move poetry-dynamic-versioning to build-system.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good to know. Thanks :)


meta = {
description = "Developer-friendly load testing framework";
homepage = "https://pypi.org/project/locust/";
Copy link
Member

Choose a reason for hiding this comment

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

Opinionated change.

Suggested change
homepage = "https://pypi.org/project/locust/";
homepage = "https://docs.locust.io";

@ghost
Copy link

ghost commented Sep 5, 2024

The tests still fail for me:

locust/test/test_wait_time.py ..F                                        [100%]

=================================== FAILURES ===================================
_____________________ TestWaitTime.test_default_wait_time ______________________

self = <locust.test.test_wait_time.TestWaitTime testMethod=test_default_wait_time>

    def test_default_wait_time(self):
        class MyUser(User):
            pass  # default is wait_time = constant(0)
    
        class TaskSet1(TaskSet):
            pass
    
        self.assertEqual(0, MyUser(self.environment).wait_time())
        self.assertEqual(0, TaskSet1(MyUser(self.environment)).wait_time())
        taskset = TaskSet1(MyUser(self.environment))
        start_time = time.perf_counter()
        taskset.wait()
>       self.assertLess(time.perf_counter() - start_time, 0.002)
E       AssertionError: 0.003107277094386518 not less than 0.002

locust/test/test_wait_time.py:58: AssertionError

@jokatzke
Copy link
Contributor Author

The tests still fail for me: [...]

Right, I'll fix that and maybe have another look through the tests to identify those that will be potentially flaky, due to a dependence on timings. However, my suspicion is that this will include almost all tests (and potentially also most future ones), at which point one has to wonder whether it would be a better idea to simply disable all tests for this package.

@FliegendeWurst
Copy link
Member

Test StandaloneIntegrationTests.test_autostart_w_run_time and others fail due to attempted network access.

@FliegendeWurst FliegendeWurst added the awaiting_changes (old Marvin label, do not use) label Nov 10, 2024
@jokatzke
Copy link
Contributor Author

@FliegendeWurst Huh, that's weird -- the test you are referring to should be disabled, as it is in disabledTests. I'm not quite sure how to proceed here, other than disabling the tests all together. :/ How are you building the package?

@FliegendeWurst
Copy link
Member

I merge this PR onto master and run nix-shell -p python3Packages.locust.

@jokatzke
Copy link
Contributor Author

I have now disabled the test suite all together, since it caused so many problems.

@FliegendeWurst FliegendeWurst removed the awaiting_changes (old Marvin label, do not use) label Nov 19, 2024
@FliegendeWurst
Copy link
Member

@ofborg build python312Packages.locust

@FliegendeWurst
Copy link
Member

Darwin fails

       > Running phase: configurePhase
       > no configure script, doing nothing
       > Executing yarnConfigHook
       > yarn config v1.22.22
       > warning Skipping preferred cache folder "/tmp/home/Library/Caches/Yarn" because it is not writable.
       > warning Selected the next writable cache folder in the list, will be "/private/tmp/nix-build-locust-ui-2.31.2.drv-0/.yarn-cache-351".
       > error Error: EACCES: permission denied, open '/tmp/home/.yarnrc'
       > info Visit https://yarnpkg.com/en/docs/cli/config for documentation about this command.

@jokatzke
Copy link
Contributor Author

The build error on Darwin is most likely due to #367586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants