Skip to content

Added conversion for str for git timestamps #216

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

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

markovamaria
Copy link
Collaborator

Added conversion to avoid error during testing triggering:

$ redis-benchmarks-spec-cli --use-branch --from-date 2023-02-11  --redis_port 12010 --redis_host *** --redis_pass *** --redis_user default
Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/redis-benchmarks-spec-cli", line 8, in <module>
    sys.exit(main())
  File "/home/ubuntu/.local/lib/python3.8/site-packages/redis_benchmarks_specification/__cli__/cli.py", line 53, in main
    trigger_tests_cli_command_logic(args, project_name, project_version)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/redis_benchmarks_specification/__cli__/cli.py", line 259, in trigger_tests_cli_command_logic
    ) = request_build_from_commit_info(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/redis_benchmarks_specification/__common__/builder_schema.py", line 151, in request_build_from_commit_info
    raise Exception(
Exception: Type of field commit_datetime is not bytes, string, int or float. Type (<class 'datetime.datetime'>). Value=2023-02-21 18:58:55+02:00

@markovamaria
Copy link
Collaborator Author

@filipecosta90, could you please look at change? it was required to remove variable which never used in stats.py to make tests in CI passing. If this should be fixed in another way, please let me know.

@@ -338,9 +338,6 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
logging.warn("Unable to detect group in {}".format(cmd))

priority_list = sorted(((priority[cmd], cmd) for cmd in priority), reverse=True)
priority_list_usecs = sorted(
Copy link
Contributor

Choose a reason for hiding this comment

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

@markovamaria why was this removed?

Copy link
Collaborator Author

@markovamaria markovamaria Feb 23, 2023

Choose a reason for hiding this comment

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

@markovamaria why was this removed?

It is assigned, but never used. This line causing fail in .tox tools.

Fail in actions in here: https://github.com/redis/redis-benchmarks-specification/actions/runs/4246038262
image

Manual repro:

$ .tox/integration-tests/bin/flake8 redis_benchmarks_specification 
redis_benchmarks_specification/__cli__/stats.py:341:9: F841 local variable 'priority_list_usecs' is assigned to but never used 

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@markovamaria why was this removed?
I agree that it is separate issue. :) But it blocked CI for this commit

@markovamaria
Copy link
Collaborator Author

markovamaria commented Feb 24, 2023

@filipecosta90, so what do you think, may I keep removing of unused var in this PR or should do separate one? Alternatively need to use this variable somehow..

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