-
Notifications
You must be signed in to change notification settings - Fork 2.8k
add AGENTS.md to test-infra repo #35820
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
Open
kannon92
wants to merge
2
commits into
kubernetes:master
Choose a base branch
from
kannon92:add-agents
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to AI assistants when working with code in this repository. | ||
|
|
||
| ## Repository Overview | ||
|
|
||
| This is kubernetes/test-infra, which contains tools and configuration files for testing and automation needs of the Kubernetes project. The main components are: | ||
|
|
||
| - **Prow Jobs**: CI/CD job configurations at prow.k8s.io (config/jobs/) | ||
| - **TestGrid**: Test result visualization at testgrid.k8s.io (testgrid/) | ||
| - **Kettle**: Extracts test results from GCS to BigQuery (kettle/) | ||
| - **Label Sync**: Manages GitHub labels across repos (label_sync/) | ||
| - **Gopherage**: Go coverage file manipulation (gopherage/) | ||
| - **Experiment**: One-off tools and scripts (experiment/) | ||
|
|
||
| ## Agents Rules | ||
|
|
||
| - Do not remove configurations in config/jobs without explicit instruction from user | ||
|
|
||
| - If promoted to commit changes, commit messages should not acknowledge use of agent via <Co-Authored By> or <Generated By>. | ||
|
|
||
| ## Building and Testing | ||
|
|
||
| @CONTRIBUTING.md | ||
|
|
||
| ## Dependency Management | ||
|
|
||
| @docs/deps.md | ||
|
|
||
| ## Working with Prow Jobs | ||
|
|
||
| @config/jobs/README.md | ||
|
|
||
| ### Generated Jobs | ||
|
|
||
| Some jobs are auto-generated and should NOT be edited directly: | ||
|
|
||
| - **Image validation jobs**: Edit releng/test_config.yaml then run `./hack/update-generated-tests.sh` | ||
| - **Release branch jobs**: Use releng/config-forker to fork master jobs for new release branches | ||
|
|
||
| Always run `make verify-generated-jobs` before submitting PRs. | ||
|
|
||
| ## TestGrid Configuration | ||
|
|
||
| @testgrid/README.md | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| Key directories: | ||
|
|
||
| - **config/**: Prow configuration and job definitions | ||
| - **config/jobs/**: All prow job configs (org/repo structure) | ||
| - **config/prow/**: Prow cluster configuration | ||
| - **config/testgrids/**: TestGrid dashboard configs | ||
| - **hack/**: Build and test scripts | ||
| - **hack/make-rules/**: Make targets for testing/verification | ||
| - **hack/tools/**: Tool dependencies (gotestsum, etc.) | ||
| - **releng/**: Release engineering tools | ||
| - **releng/config-forker**: Fork jobs for new release branches | ||
| - **releng/test_config.yaml**: Image validation job config | ||
| - **pkg/**: Shared Go packages (minimal, most moved to prow repo) | ||
| - **testgrid/**: TestGrid-specific configs and docs | ||
| - **kettle/**: BigQuery data pipeline | ||
| - **label_sync/**: GitHub label management | ||
| - **experiment/**: Ad-hoc scripts and tools | ||
|
|
||
| ## Architecture Notes | ||
|
|
||
| - Prow jobs run in Kubernetes pods on the prow.k8s.io cluster | ||
| - Test results stored in GCS buckets (kubernetes-ci-logs) | ||
| - Kettle extracts GCS results → BigQuery for metrics/analysis | ||
| - TestGrid reads from GCS to display historical results | ||
| - GitHub webhooks trigger presubmit jobs on PRs | ||
| - Jobs use presets (defined in config/prow/config.yaml) for common credentials/config | ||
|
|
||
| ## Common Workflows | ||
|
|
||
| ### Updating Job Configs | ||
|
|
||
| 1. Edit YAML in config/jobs/org/repo/ | ||
| 2. Run `make verify` to check for issues | ||
| 3. Commit and open PR | ||
| 4. Changes auto-deploy on merge | ||
|
|
||
| ### Adding New Release Branch Jobs | ||
|
|
||
| ```bash | ||
| go run ./releng/config-forker \ | ||
| --job-config $(pwd)/config/jobs \ | ||
| --version 1.27 \ | ||
| --go-version 1.20.2 \ | ||
| --output $(pwd)/config/jobs/kubernetes/sig-release/release-branch-jobs/1.27.yaml | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.