Skip to content

feat: add replay API types and test data#231

Open
JasonXuDeveloper wants to merge 2 commits intoAzure:unstable-replayfrom
JasonXuDeveloper:replay/pr2
Open

feat: add replay API types and test data#231
JasonXuDeveloper wants to merge 2 commits intoAzure:unstable-replayfrom
JasonXuDeveloper:replay/pr2

Conversation

@JasonXuDeveloper
Copy link
Contributor

Summary

  • Add ReplayRequest, ReplayProfile, ReplayProfileSpec types with validation
  • Add IsReplayMode() method on RunnerGroupSpec for detecting replay configs
  • Add ReplayProfileSpec field in RunnerGroupSpec for distributed mode
  • Add sample replay profile and runner group config test data

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./api/types/... passes (includes replay validation tests)

Part 2 of 6 in the replay feature PR stack. Depends on PR #230.

- Fix "traget" → "target" typo in LoadProfileSpec comment
- Fix "letencies" → "latencies" typo in runner CLI flag description
- Add empty specs validation in loadConfig to prevent index-out-of-range
  panic when config file has no specs
- Preserve nodeAffinity from runnergroup spec when CLI --affinity flag
  is not provided

Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
Add foundation types for the timeseries replay system:
- ReplayRequest, ReplayProfile, ReplayProfileSpec types with validation
- IsReplayMode() method on RunnerGroupSpec for detecting replay configs
- ReplayProfileSpec field in RunnerGroupSpec for distributed mode
- Sample replay profile and runner group config test data

Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
Comment on lines +65 to +66
func (r ReplayRequest) ObjectKey() string {
if r.Namespace == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like if r.Namespace=="", fmt.Sprintf("%s/%s/%s", r.Namespace, r.ResourceKind, r.Name) can still valid?

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