CONTRIBUTING.md 3.17 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Contributing to Dynamo Deploy

Welcome to the Dynamo Deploy project! This guide will help you get started with contributing to the deployment infrastructure and tooling for the Dynamo distributed inference platform.

## Getting Started

### Prerequisites


### Quick Setup

### Project Structure

The deploy directory contains several key components:

```
deploy/
├── cloud/                    # Cloud deployment platform
│   ├── helm/                # Cloud platform Helm charts
│   └── operator/            # Kubernetes operator (Go)
├── helm/                    # Manual deployment Helm charts
├── metrics/                 # Monitoring and observability
├── sdk/                     # Python scripts
└── inference-gateway/       # Gateway components
```

## Development Environment

### Setting Up Your Environment


### IDE Configuration

**VS Code:**

- Install Go extension
- Install Python extension
- Configure settings for Go formatting and linting
- Add workspace settings for consistent formatting

### Contribution Workflow Caveats

- We do signed commits

```bash
commit -S
```

- Every time you modify `deploy/cloud/helm/crds/templates/*.yaml`, please bump up the version of the CRD helm chart in
    1. deploy/cloud/helm/platform/components/operator/Chart.yaml
    2. deploy/cloud/helm/platform/Chart.yaml
then

```bash
deploy/cloud/helm/platform
helm dependency update
```

#### Commit Message Guidelines

Follow conventional commit format:

- `feat:` new features
- `fix:` bug fixes
- `docs:` documentation changes
- `test:` adding or updating tests
- `refactor:` code refactoring
- `perf:` performance improvements
- `ci:` CI/CD changes

Examples:

```
feat(operator): add support for custom resource limits
fix(sdk): resolve service discovery timeout issue
docs(helm): update deployment guide with new examples
test(e2e): add integration tests for disaggregated serving
```

## Style Guide

### Go Code Style (Operator)

Follow standard Go conventions.


### Python Code Style (SDK)

Follow PEP 8 and use modern Python practices:


### YAML/Helm Templates

```yaml
# Use consistent indentation (2 spaces)
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dynamo.fullname" . }}
  labels:
    {{- include "dynamo.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "dynamo.selectorLabels" . | nindent 6 }}
```

## Testing

Once you have an MR up and standard checks pass trigger the integration tests by adding the comment “/ok to test <COMMIT-ID>


### Unit Tests

**Go Tests (Operator):**

```bash
cd deploy/cloud/operator
go test ./... -v
go test -race ./...
```

### Integration Tests

**End-to-End Deployment Tests:**

```bash
# Run full deployment test suite
pytest tests/serve/test_dynamo_serve.py -v

# Test specific deployment scenarios
pytest tests/serve/test_dynamo_serve.py::test_serve_deployment[agg] -v
```

**Operator Integration Tests:**

```bash
cd deploy/cloud/operator
make test-e2e
```

### Writing Tests

**Example Unit Test:**

**Example Integration Test:**


### Examples Testing

Ensure documentation examples work.


Thank you for contributing to Dynamo Deploy! 🚀