Skip to content

Commit da39b2c

Browse files
docs(MAINTAINER): Revise maintainer guide for clarity and conciseness
1 parent a02e173 commit da39b2c

File tree

1 file changed

+54
-261
lines changed

1 file changed

+54
-261
lines changed

MAINTAINER.md

Lines changed: 54 additions & 261 deletions
Original file line numberDiff line numberDiff line change
@@ -1,296 +1,89 @@
11
# Maintainer Guide
22

3-
This guide is for maintainers of the Coder Registry repository. It covers processes and tools that are specific to maintaining the repository, validating contributions, and managing releases.
3+
Quick reference for maintaining the Coder Registry repository.
44

5-
## Prerequisites
5+
## Setup
66

7-
### Required Tools
7+
Install Go for README validation:
88

9-
- **Go** - For README validation
10-
- **Bun** - For running tests
11-
- **Git** - For repository management
9+
```bash
10+
# macOS
11+
brew install go
1212

13-
### Installing Go
14-
15-
[Navigate to the official Go Installation page](https://go.dev/doc/install), and install the correct version for your operating system.
16-
17-
Once Go has been installed, verify the installation via:
18-
19-
```shell
20-
go version
13+
# Linux
14+
sudo apt install golang-go
2115
```
2216

23-
## README Validation
17+
## Daily Tasks
2418

25-
The repository uses Go to validate all README files to ensure they meet the requirements for the Registry website.
19+
### Review PRs
2620

27-
### Running README Validation
21+
Check that PRs have:
2822

29-
To validate all README files throughout the entire repo:
30-
31-
```shell
32-
go build ./cmd/readmevalidation && ./readmevalidation
33-
```
23+
- [ ] All required files (`main.tf`, `main.test.ts`, `README.md`)
24+
- [ ] Proper frontmatter in README
25+
- [ ] Working tests (`bun test`)
26+
- [ ] Formatted code (`bun run fmt`)
3427

35-
The resulting binary is already part of the `.gitignore` file, but you can remove it with:
28+
### Validate READMEs
3629

37-
```shell
38-
rm ./readmevalidation
30+
```bash
31+
go build ./cmd/readmevalidation && ./readmevalidation
3932
```
4033

41-
### README Validation Criteria
42-
43-
The validation exists for two reasons:
44-
45-
1. Content accessibility
46-
2. Having content designed in a way that's easy for the Registry site build step to use
47-
48-
#### General README Requirements
49-
50-
- There must be a frontmatter section
51-
- There must be exactly one h1 header, and it must be at the very top, directly below the frontmatter
52-
- The README body (if it exists) must start with an h1 header. No other content (including GitHub-Flavored Markdown alerts) is allowed to be placed above it
53-
- When increasing the level of a header, the header's level must be incremented by one each time
54-
- Any `.hcl` code snippets must be labeled as `.tf` snippets instead
55-
56-
```txt
57-
\`\`\`tf
58-
Content
59-
\`\`\`
60-
```
61-
62-
#### Namespace (Contributor Profile) Criteria
63-
64-
In addition to the general criteria, all namespace README files must have:
65-
66-
- Frontmatter metadata with support for the following fields:
67-
68-
- `display_name` (required string) – The name to use when displaying the user profile in the Coder Registry site
69-
- `bio` (optional string) – A short description of who they are
70-
- `github` (optional string) – Their GitHub handle
71-
- `avatar_url` (optional string) – A relative/absolute URL pointing to their avatar for the Registry site
72-
- `linkedin` (optional string) – A URL pointing to their LinkedIn page
73-
- `support_email` (optional string) – An email for users to reach them at if they need help with a published module
74-
- `status` (string union) – If defined, this must be one of `"community"`, `"partner"`, or `"official"`. `"community"` should be used for the majority of external contributions. `"partner"` is for companies who have a formal business partnership with Coder. `"official"` should be used only by Coder employees
75-
76-
- The README body (the content that goes directly below the frontmatter) is allowed to be empty, but if it isn't, it must follow all the rules above
77-
78-
#### Module Criteria
79-
80-
In addition to the general criteria, all module README files must have:
34+
## Releases
8135

82-
- Frontmatter that describes metadata for the module:
36+
### Create Release Tags
8337

84-
- `display_name` (required string) – This is the name displayed on the Coder Registry website
85-
- `description` (required string) – A short description of the module, which is displayed on the Registry website
86-
- `icon` (required string) – A relative/absolute URL pointing to the icon to display for the module in the Coder Registry website
87-
- `verified` (optional boolean) – Indicates whether the module has been officially verified by Coder. Please do not set this without approval from a Coder employee
88-
- `tags` (required string array) – A list of metadata tags to describe the module. Used in the Registry site for search and navigation functionality
89-
- `maintainer_github` (deprecated string) – The name of the creator of the module. This field exists for backwards compatibility with previous versions of the Registry, but going forward, the value will be inferred from the namespace directory
90-
- `partner_github` (deprecated string) - The name of any additional creators for a module. This field exists for backwards compatibility with previous versions of the Registry, but should not ever be used going forward
38+
After merging a PR:
9139

92-
- The following content directly under the h1 header (without another header between them):
93-
94-
- A description of what the module does
95-
- A Terraform snippet for letting other users import the functionality
96-
97-
```tf
98-
module "cursor" {
99-
count = data.coder_workspace.me.start_count
100-
source = "registry.coder.com/coder/cursor/coder"
101-
version = "1.0.19"
102-
agent_id = coder_agent.example.id
103-
}
104-
```
105-
106-
## Release Process
107-
108-
The release process involves the following steps:
109-
110-
### 1. Review and Merge PRs
111-
112-
- Review contributor PRs for code quality, tests, and documentation
113-
- Ensure all automated tests pass
114-
- Verify README validation passes
115-
- Merge approved PRs into the `main` branch
116-
117-
### 2. Prepare Release
118-
119-
After merging to `main`, prepare the release:
120-
121-
- Check out the merge commit:
122-
123-
```shell
124-
git checkout MERGE_COMMIT_ID
125-
```
126-
127-
- Create annotated tags for each module that was changed:
128-
129-
```shell
130-
git tag -a "release/$namespace/$module/v$version" -m "Release $namespace/$module v$version"
131-
```
132-
133-
- Push the tags to origin:
134-
135-
```shell
136-
git push origin release/$namespace/$module/v$version
137-
```
138-
139-
For example, to release version 1.0.14 of the coder/aider module:
140-
141-
```shell
142-
git tag -a "release/coder/aider/v1.0.14" -m "Release coder/aider v1.0.14"
143-
git push origin release/coder/aider/v1.0.14
40+
```bash
41+
git checkout MERGE_COMMIT_ID
42+
git tag -a "release/$namespace/$module/v$version" -m "Release $namespace/$module v$version"
43+
git push origin release/$namespace/$module/v$version
14444
```
14545

14646
### Version Numbers
14747

148-
Version numbers should follow semantic versioning:
149-
150-
- **Patch version** (1.2.3 → 1.2.4): Bug fixes
151-
- **Minor version** (1.2.3 → 1.3.0): New features, adding inputs, deprecating inputs
152-
- **Major version** (1.2.3 → 2.0.0): Breaking changes (removing inputs, changing input types)
153-
154-
### 3. Publishing to Coder Registry
155-
156-
After tags are pushed, the changes will be published to [registry.coder.com](https://registry.coder.com).
48+
- **Patch** (1.2.3 → 1.2.4): Bug fixes
49+
- **Minor** (1.2.3 → 1.3.0): New features, adding inputs
50+
- **Major** (1.2.3 → 2.0.0): Breaking changes
15751

158-
> [!NOTE]
159-
> Some data in registry.coder.com is fetched on demand from this repository's `main` branch. This data should update almost immediately after a release, while other changes will take some time to propagate.
52+
## README Requirements
16053

161-
## Testing Infrastructure
54+
### Module Frontmatter (Required)
16255

163-
### Running All Tests
164-
165-
From the repository root:
166-
167-
```shell
168-
bun test
56+
```yaml
57+
display_name: "Tool Name"
58+
description: "What it does"
59+
icon: "path/to/icon.svg"
60+
maintainer_github: "username"
61+
verified: false # true for verified modules
62+
tags: ["tag1", "tag2"]
16963
```
17064
171-
### Running Specific Tests
172-
173-
To run tests for specific modules or patterns:
65+
### Namespace Frontmatter (Required)
17466
175-
```shell
176-
bun test -t '<regex_pattern>'
67+
```yaml
68+
display_name: "Your Name"
69+
bio: "Brief description"
70+
github: "username"
71+
status: "community" # or "partner", "official"
17772
```
17873
179-
### Test Requirements
180-
181-
- All modules must have a `main.test.ts` file
182-
- Tests must use the test utilities from `~test` import
183-
- Tests must validate required variables and successful Terraform apply
184-
- The testing suite requires Docker with `--network=host` capabilities
185-
186-
## Repository Structure Management
187-
188-
### Namespaces
189-
190-
- All modules must be placed within a namespace under `/registry/[namespace]/modules/`
191-
- Each namespace should have a README.md file with contributor profile information
192-
- Namespace names must be unique and lowercase
193-
194-
### Images and Assets
195-
196-
Images can be placed in two locations:
197-
198-
1. In the namespace directory: `/registry/[namespace]/images/`
199-
2. For icons used by multiple modules: `/.icons/`
200-
201-
### Module Structure
202-
203-
Each module must contain:
204-
205-
- `main.tf` - Core Terraform functionality
206-
- `main.test.ts` - Test file for validation
207-
- `README.md` - Documentation with required frontmatter
208-
209-
## Validation Checklist for PRs
210-
211-
When reviewing PRs, ensure:
212-
213-
- [ ] Module follows proper directory structure
214-
- [ ] All required files are present (`main.tf`, `main.test.ts`, `README.md`)
215-
- [ ] README has proper frontmatter with all required fields
216-
- [ ] Tests are implemented and pass
217-
- [ ] Code is properly formatted (`bun run fmt`)
218-
- [ ] README validation passes
219-
- [ ] Module follows Terraform best practices
220-
- [ ] No hardcoded values that should be variables
221-
- [ ] Proper variable descriptions and types
222-
223-
## Common Issues and Solutions
224-
225-
### README Validation Failures
226-
227-
- Check frontmatter syntax (YAML format)
228-
- Ensure h1 header is directly below frontmatter
229-
- Verify all required frontmatter fields are present
230-
- Check that code blocks use `tf` instead of `hcl`
74+
## Common Issues
23175
232-
### Test Failures
76+
- **README validation fails**: Check YAML syntax, ensure h1 header after frontmatter
77+
- **Tests fail**: Ensure Docker with `--network=host`, check Terraform syntax
78+
- **Wrong file structure**: Use `./scripts/new_module.sh` for new modules
23379

234-
- Ensure Docker is available with `--network=host` support
235-
- Check that all required variables are defined in tests
236-
- Verify Terraform syntax is valid
237-
- Ensure test imports use `~test` alias correctly
80+
## Emergency
23881

239-
### Module Structure Issues
82+
### Revert Release
24083

241-
- Use the `./scripts/new_module.sh` script for consistent structure
242-
- Ensure namespace directory exists
243-
- Check that all file paths are correct
244-
245-
## Maintenance Tasks
246-
247-
### Regular Maintenance
248-
249-
- Monitor for security vulnerabilities in dependencies
250-
- Update test infrastructure as needed
251-
- Review and update documentation
252-
- Monitor Registry website for issues
253-
254-
### Dependency Updates
255-
256-
- Keep Bun dependencies up to date
257-
- Monitor Terraform provider updates
258-
- Update test utilities as needed
259-
260-
### Documentation Updates
261-
262-
- Keep README validation criteria current
263-
- Update examples as the platform evolves
264-
- Maintain contributor guidelines
265-
266-
## Emergency Procedures
267-
268-
### Reverting a Release
269-
270-
If a release needs to be reverted:
271-
272-
1. Delete the problematic tag:
273-
274-
```shell
275-
git tag -d release/$namespace/$module/v$version
276-
git push origin :refs/tags/release/$namespace/$module/v$version
277-
```
278-
279-
2. Create a new patch release with the fix
280-
281-
### Handling Security Issues
282-
283-
1. Immediately remove or disable problematic modules
284-
2. Notify affected users through appropriate channels
285-
3. Work with contributors to address security concerns
286-
4. Document the issue and resolution
287-
288-
## Contact and Escalation
289-
290-
For maintainer-specific questions or issues:
291-
292-
- Internal Coder team channels
293-
- Repository issues for public discussion
294-
- Security email for sensitive issues
84+
```bash
85+
git tag -d release/$namespace/$module/v$version
86+
git push origin :refs/tags/release/$namespace/$module/v$version
87+
```
29588

296-
Remember: As a maintainer, you're responsible for maintaining the quality and security of the Registry. When in doubt, err on the side of caution and seek additional review.
89+
That's it. Keep it simple.

0 commit comments

Comments
 (0)