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

fix: ensure number of project keys possible for testing is not exceeded #9501

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

corban-beaird
Copy link
Contributor

@corban-beaird corban-beaird commented Jun 11, 2024

Ticket

Description

This reduces the number of requests being made by the TestConcurrentProjectKeyGenerationAttempts test to ensure we do not exceed the number of possible project keys given the project name, which was resulting in this test flaking.

Test Plan

  • Ensure TestConcurrentProjectKeyGenerationAttempts passes

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

@corban-beaird corban-beaird requested a review from a team as a code owner June 11, 2024 19:14
@cla-bot cla-bot bot added the cla-signed label Jun 11, 2024
Copy link

netlify bot commented Jun 11, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 36a0b17
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6668a1fc8976ff00087b6334

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.99%. Comparing base (de03909) to head (36a0b17).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9501   +/-   ##
=======================================
  Coverage   48.99%   48.99%           
=======================================
  Files        1235     1235           
  Lines      160191   160191           
  Branches     2780     2780           
=======================================
+ Hits        78482    78483    +1     
+ Misses      81534    81533    -1     
  Partials      175      175           
Flag Coverage Δ
backend 43.82% <ø> (+<0.01%) ⬆️
harness 63.96% <ø> (ø)
web 44.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

Copy link
Contributor

@eecsliu eecsliu left a comment

Choose a reason for hiding this comment

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

looks good! Just one minor question

return err
numRequests := 5
errgrp := errgroupx.WithContext(ctx)
for i := 0; i < numRequests; i++ {
Copy link
Contributor

Choose a reason for hiding this comment

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

400 vs 5 is a huge difference...I doubt there will be so many concurrent keygens at once, but was there a requirement to handle any specific number of concurrent keygen attempts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally, I had wrote this to be a stress test to ensure that we could handle the case when we start to exhaust the set of project keys for a given project name pattern, but realistically I don't imagine we'll have folks creating 20 projects concurrently 20 times. It being able to support the creation of 5 project synchronously without issue is sufficient for the cadence we expect projects to be created.

@corban-beaird corban-beaird merged commit 2ca7733 into main Jun 12, 2024
88 of 101 checks passed
@corban-beaird corban-beaird deleted the corban-fix-project-key-flaky-test branch June 12, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants