Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Oct 25, 2024

Description

The stress project has a bunch of APIs for causing certain behavior. For example, /log-message logs a message with a bunch of unusual content. This PR adds commands to call the APIs from the dashboard.

@DamianEdwards Some issues I encountered using WithHttpCommand:

  • Order matters. If commands are added before endpoints then it errors. A fix could be to resolve the endpoint inside the command callback.
  • Command name is based on the method. If there are lots of "GET" commands then they're reduced to one. Need a better automatic name (I modified the method to include the URL in the name)
  • Needs HttpClientFactory registered. It's not registered in app host by default. Bug or not? An improvement could be to detect if it is registered or not and throw a more friendly error message.

Screenshot:

image

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • Link to aspire-docs issue:
    • No
Microsoft Reviewers: Open in CodeFlow

@JamesNK JamesNK force-pushed the jamesnk/stress-commands branch from 4c55c1d to 480288d Compare October 29, 2024 06:12
@JamesNK JamesNK enabled auto-merge (squash) October 29, 2024 06:13
@JamesNK
Copy link
Member Author

JamesNK commented Oct 29, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JamesNK JamesNK merged commit 6758a8d into main Oct 29, 2024
9 checks passed
@JamesNK JamesNK deleted the jamesnk/stress-commands branch October 29, 2024 13:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants