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

Load Testing Doesn't Like Spaces #1701

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Load Testing Doesn't Like Spaces #1701

merged 2 commits into from
Jan 14, 2025

Conversation

halprin
Copy link
Member

@halprin halprin commented Jan 14, 2025

Description

The test-run-id argument when running the load tests could sometimes have spaces before the hour if the hour was less than 10. This extra space made the az CLI command think there was an extra argument that it didn't know what to do with, so it failed.

The test-run-id will now always have an underscore between the date and time and no spaces as padding if the hour is less than 10.

Issue

#1122.

Checklist

  • Tested that this works with an underscore.

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1122 - Partially compliant

Fully compliant requirements:

  • Sign Flexion and CDC up for the Locust preview program.
  • Implement load test in internal including authentication against the token endpoint and testing other endpoints.
  • Set up a GitHub Action to run tests on a schedule.
  • Update existing ADR and/or create new one.
  • Update readme with how to run and modify load tests in deployed environments.
  • Configure test criteria (failure thresholds) in Azure.
  • Add some additional comments to app context and places where .getImplementation is used.
  • Figure out why metadata endpoint is failing in load test.
  • Look into why failing to link metadata results in 5XXs.
  • Set up mock RS endpoints for load testing.
  • Rename internal load testing to be better than jeff-load-test.

Not compliant requirements:

  • Figure out why load testing failed to start in an automated way.
  • Move to future ticket: Look at why load tests cause 499s again.
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Possible issue
Correct the command substitution syntax to ensure it executes properly within the YAML workflow

Ensure that the command substitution for date in the --test-run-id parameter is
correctly formatted and executed within the YAML file. The current syntax might not
be interpreted as expected when embedded in a YAML string. Consider using a
preceding step to store the date in an environment variable or directly using GitHub
Actions expressions if applicable.

.github/workflows/azure-load-tests.yml [45]

---test-run-id "run_"`date +"%Y%m%d_%H%M%S"` \
+--test-run-id "run_${{ steps.date.outputs.value }}" \
Suggestion importance[1-10]: 7

Why: The suggestion correctly identifies a potential issue with the command substitution syntax in a YAML context, which could lead to execution errors. Modifying it to use GitHub Actions expressions or environment variables would ensure more reliable execution.

7

@halprin halprin merged commit 920b2a6 into main Jan 14, 2025
18 checks passed
@halprin halprin deleted the fix-azure-load-test branch January 14, 2025 19:42
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