Skip to content

Commit

Permalink
doc: Update outdated hyperlinks in website (#103)
Browse files Browse the repository at this point in the history
* Update outdated links

* Remove references to deleted tools (phaino, migratestatus)

* Update links for 'k/t-i' to 'k-s/prow'

* docs: Remove Phaino-related paragraph

* docs: Reflect code file path changes by #101

* docs: Reflect code file path changes by #101 (part2)

* docs: Reflect code file path changes by #101 (part3; ghProxy)

* Update checkconfig testcode to suppress error

* Fix errors and nits
  • Loading branch information
jihoon-seo committed May 3, 2024
1 parent 28485f4 commit c5e374d
Show file tree
Hide file tree
Showing 50 changed files with 172 additions and 185 deletions.
4 changes: 2 additions & 2 deletions cmd/checkconfig/main.go
Expand Up @@ -517,7 +517,7 @@ func strictBranchesConfig(c config.ProwConfig) (*orgRepoConfig, error) {
}

func validateStrictBranches(c config.ProwConfig) error {
const explanation = "See #5: https://github.com/kubernetes/test-infra/blob/master/prow/cmd/tide/maintainers.md#best-practices Also note that this validation is imperfect, see the check-config code for details"
const explanation = "See #5: https://docs.prow.k8s.io/docs/components/core/tide/maintainers/#best-practices Also note that this validation is imperfect, see the check-config code for details"
if len(c.Tide.Queries) == 0 {
// Short circuit here so that we can allow global level branchprotector
// 'strict: true' if Tide is not enabled.
Expand Down Expand Up @@ -977,7 +977,7 @@ func validateNeedsOkToTestLabel(cfg *config.Config) error {
"the tide query at position %d"+
"forbids the %q label and requires the %q label, "+
"which is not recommended; "+
"see https://github.com/kubernetes/test-infra/blob/master/prow/cmd/tide/maintainers.md#best-practices "+
"see https://docs.prow.k8s.io/docs/components/core/tide/maintainers/#best-practices "+
"for more information",
i, labels.NeedsOkToTest, lgtm.LGTMLabel),
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/checkconfig/main_test.go
Expand Up @@ -932,7 +932,7 @@ func TestValidateStrictBranches(t *testing.T) {
},
},
errItems: []string{"kubernetes"},
okItems: []string{"k8s"},
okItems: []string{},
},
{
name: "conflict: repo level",
Expand Down
2 changes: 1 addition & 1 deletion cmd/deck/main.go
Expand Up @@ -485,7 +485,7 @@ func main() {
}

// if we allow direct reruns, we must protect against CSRF in all post requests using the cookie secret as a token
// for more information about CSRF, see https://github.com/kubernetes/test-infra/blob/master/prow/cmd/deck/csrf.md
// for more information about CSRF, see https://docs.prow.k8s.io/docs/components/core/deck/csrf/
empty := prowapi.ProwJobSpec{}
if o.rerunCreatesJob && csrfToken == nil && !authCfgGetter(&empty).IsAllowAnyone() {
logrus.Fatal("Rerun creates job cannot be enabled without CSRF protection, which requires --cookie-secret to be exactly 32 bytes")
Expand Down
2 changes: 1 addition & 1 deletion cmd/deck/static/common/rerun.ts
Expand Up @@ -4,7 +4,7 @@ import {relativeURL} from "./urls";
export function createRerunProwJobIcon(modal: HTMLElement, parentEl: Element, prowjob: string, showRerunButton: boolean, csrfToken: string): HTMLElement {
const LATEST_JOB = 'latest';
const ORIGINAL_JOB = 'original';
const inrepoconfigURL = 'https://github.com/kubernetes/test-infra/blob/master/prow/inrepoconfig.md';
const inrepoconfigURL = 'https://docs.prow.k8s.io/docs/inrepoconfig/';
const i = icon.create("refresh", "Show instructions for rerunning this job");

const closeModal = (): void => {
Expand Down
2 changes: 1 addition & 1 deletion pkg/flagutil/github.go
Expand Up @@ -219,7 +219,7 @@ func (o *GitHubOptions) Validate(bool) error {
}

if o.TokenPath != "" && len(endpoints) == 1 && endpoints[0] == github.DefaultAPIEndpoint && !o.AllowDirectAccess {
logrus.Warn("It doesn't look like you are using ghproxy to cache API calls to GitHub! This has become a required component of Prow and other components will soon be allowed to add features that may rapidly consume API ratelimit without caching. Starting May 1, 2020 use Prow components without ghproxy at your own risk! https://github.com/kubernetes/test-infra/tree/master/ghproxy#ghproxy")
logrus.Warn("It doesn't look like you are using ghproxy to cache API calls to GitHub! This has become a required component of Prow and other components will soon be allowed to add features that may rapidly consume API ratelimit without caching. Starting May 1, 2020 use Prow components without ghproxy at your own risk! https://docs.prow.k8s.io/docs/ghproxy/")
}

if o.graphqlEndpoint == "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/flagutil/storage.go
Expand Up @@ -41,7 +41,7 @@ type StorageClientOptions struct {
// AddFlags injects status client options into the given FlagSet.
func (o *StorageClientOptions) AddFlags(fs *flag.FlagSet) {
fs.StringVar(&o.GCSCredentialsFile, "gcs-credentials-file", "", "File where GCS credentials are stored")
fs.StringVar(&o.S3CredentialsFile, "s3-credentials-file", "", "File where s3 credentials are stored. For the exact format see https://github.com/kubernetes/test-infra/blob/master/prow/io/providers/providers.go")
fs.StringVar(&o.S3CredentialsFile, "s3-credentials-file", "", "File where s3 credentials are stored. For the exact format see https://github.com/kubernetes-sigs/prow/blob/main/pkg/io/providers/providers.go")
}

func (o *StorageClientOptions) HasGCSCredentials() bool {
Expand Down
2 changes: 1 addition & 1 deletion pkg/genfiles/genfiles_test.go
Expand Up @@ -35,7 +35,7 @@ func TestGroupLoad(t *testing.T) {
src: `# Files that should be ignored by tools which do not want to consider generated
# code.
#
# eg: https://git.sigs.k8s.io/prow/pkg/plugins/size/size.go
# eg: https://github.com/kubernetes-sigs/prow/blob/main/pkg/plugins/size/size.go
#
# This file is a series of lines, each of the form:
# <type> <name>
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/approve/approve.go
Expand Up @@ -133,7 +133,7 @@ func helpProvider(config *plugins.Configuration, enabledRepos []config.OrgRepo)
Description: `The approve plugin implements a pull request approval process that manages the '` + labels.Approved + `' label and an approval notification comment. Approval is achieved when the set of users that have approved the PR is capable of approving every file changed by the PR. A user is able to approve a file if their username or an alias they belong to is listed in the 'approvers' section of an OWNERS file in the directory of the file or higher in the directory tree.
<br>
<br>Per-repo configuration may be used to require that PRs link to an associated issue before approval is granted. It may also be used to specify that the PR authors implicitly approve their own PRs.
<br>For more information see <a href="https://git.sigs.k8s.io/prow/pkg/plugins/approve/approvers/README.md">here</a>.`,
<br>For more information see <a href="https://docs.prow.k8s.io/docs/components/plugins/approve/approvers/">here</a>.`,
Config: approveConfig,
Snippet: yamlSnippet,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/config.go
Expand Up @@ -54,7 +54,7 @@ type Configuration struct {
// If it is defined on both organization and repository levels, the list of enabled
// plugin names for the repository is the merging list of the two levels.
// You can find a comprehensive list of the default available plugins here
// https://github.com/kubernetes/test-infra/tree/master/prow/plugins
// https://github.com/kubernetes-sigs/prow/tree/main/pkg/plugins
// note that you're also able to add external plugins.
Plugins Plugins `json:"plugins,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion pkg/plugins/plugin-config-documented.yaml
Expand Up @@ -486,7 +486,7 @@ owners:
# If it is defined on both organization and repository levels, the list of enabled
# plugin names for the repository is the merging list of the two levels.
# You can find a comprehensive list of the default available plugins here
# https://github.com/kubernetes/test-infra/tree/master/prow/plugins
# https://github.com/kubernetes-sigs/prow/tree/main/pkg/plugins
# note that you're also able to add external plugins.
plugins:
"":
Expand Down
2 changes: 1 addition & 1 deletion site/content/en/_index.html
Expand Up @@ -8,7 +8,7 @@
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
Learn more <i class="fas fa-arrow-alt-circle-right ml-2"></i>
</a>
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="https://github.com/kubernetes/test-infra/tree/master/prow">
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="https://github.com/kubernetes-sigs/prow/tree/main/prow">
Get the code <i class="fab fa-github ml-2 "></i>
</a>
<br />
Expand Down
12 changes: 6 additions & 6 deletions site/content/en/docs/announcements.md
Expand Up @@ -105,7 +105,7 @@ New features added to each component:
- *June 23rd, 2020* An [hmac](/docs/components/optional/hmac/) tool was added to automatically reconcile webhooks and hmac
tokens for the orgs and repos integrated with your prow instance.
- *June 8th, 2020* A new informer-based Plank implementation was added. It can be used by deploying
the new [prow-controller-manager](https://github.com/kubernetes/test-infra/tree/master/config/prow/experimental/controller_manager.yaml) binary.
the new [prow-controller-manager](https://github.com/kubernetes/test-infra/blob/master/config/prow/experimental/controller_manager.yaml) binary.
We plan to gradually move all our controllers into that binary, see <https://github.com/kubernetes/test-infra/issues/17024>
- *May 31, 2020* '--gcs-no-auth' in Deck is deprecated and not used anymore. We always
fall back to an anonymous GCS client now, if all other options fail. This flag will
Expand Down Expand Up @@ -243,12 +243,12 @@ used when updating deployments.
- *February 22nd, 2022* Since prow version `v20220222-acb5731b85`, static files
in `deck` image will be stored under `/var/run/ko/` directory.
- *October 27th, 2021* The checkconfig flag `--prow-yaml-repo-path` no longer defaults to `/home/prow/go/src/github.com/<< prow-yaml-repo-name >>/.prow.yaml` when `--prow-yaml-repo-name` is set. The defaulting has instead been replaced with the assumption that the Prow YAML file/directory can be found in the current working directory if `--prow-yaml-repo-path` is not specified. If you are running checkconfig from a decorated ProwJobs as is typical, then this is already the case.
- *September 16th, 2021* The ProwJob [CRD manifest](https://github.com/kubernetes/test-infra/tree/master/config/prow/cluster/prowjob-crd/prowjob_customresourcedefinition.yaml)
- *September 16th, 2021* The ProwJob [CRD manifest](https://github.com/kubernetes-sigs/prow/blob/main/config/prow/cluster/prowjob-crd/prowjob_customresourcedefinition.yaml)
has been extended to specify a schema. Unfortunately, this results in a huge manifest which
in turn makes the standard `kubectl apply` fail, as the last-applied annotation it generates
exceeds the maximum annotation size. If you are using Kubernetes 1.18 or newer, you can add
the `--server-side=true` argument to work around this. If not, you can use a [schemaless manifest](https://github.com/kubernetes/test-infra/tree/master/config/prow/cluster/prowjob-crd/legacy/prowjob-schemaless_customresourcedefinition.yaml)
- *September 15th, 2021* `autobump` removed, please use `generic-autobumper` instead, see [example config](https://github.com/kubernetes/test-infra/tree/master/config/prow/autobump-config/prow-component-autobump-config.yaml)
the `--server-side=true` argument to work around this. If not, you can use a [schemaless manifest](https://github.com/kubernetes/test-infra/blob/master/config/prow/cluster/prowjob-crd/legacy/prowjob-schemaless_customresourcedefinition.yaml)
- *September 15th, 2021* `autobump` removed, please use `generic-autobumper` instead, see [example config](https://github.com/kubernetes/test-infra/blob/master/config/prow/autobump-config/prow-component-autobump-config.yaml)
- *April 16th, 2021* Flagutil remove default value for `--github-token-path`.
- *April 15th, 2021* Sinker requires --dry-run=false (default is true) to function correctly in production.
- *April 14th, 2021* Deck remove default value for `--cookie-secret-file`.
Expand All @@ -269,8 +269,8 @@ used when updating deployments.
for more details.
- *November, 2020* The `blacklist` flag in status reconciler has been deprecated in favor of `denylist`. The support of `blacklist` will be stopped in February 2021.
- *October, 2020* The `plank` binary has been deprecated in favor of the more modern implementation in the prow-controller-manager that provides the same functionality. Check out
its [README](/docs/components/core/prow-controller-manager/) or check out its [deployment](https://github.com/kubernetes/test-infra/tree/master/config/prow/cluster/prow_controller_manager_deployment.yaml) and
[rbac](https://github.com/kubernetes/test-infra/tree/master/config/prow/cluster/prow_controller_manager_rbac.yaml) manifest. The plank binary will be removed in February, 2021.
its [README](/docs/components/core/prow-controller-manager/) or check out its [deployment](https://github.com/kubernetes/test-infra/blob/master/config/prow/cluster/prow_controller_manager_deployment.yaml) and
[rbac](https://github.com/kubernetes/test-infra/blob/master/config/prow/cluster/prow_controller_manager_rbac.yaml) manifest. The plank binary will be removed in February, 2021.
- *September 14th, 2020* Sinker now requires `LIST` and `WATCH` permissions for pods
- *September 2, 2020* The already deprecated `namespace` and `additional_namespaces` settings in the config updater will be removed in October, 2020
- *August 28, 2020* `tide` now ignores archived repositories in queries.
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/build-clusters.md
Expand Up @@ -34,7 +34,7 @@ Service Account** and **GSA** means **GCP (IAM) Service Account**.
## Running the build cluster setup script

The Prow source repo comes with a default
[create-build-cluster.sh](https://github.com/kubernetes/test-infra/blob/master/prow/create-build-cluster.sh)
[create-build-cluster.sh](https://github.com/kubernetes-sigs/prow/blob/main/pkg/create-build-cluster.sh)
script which allows you to create a new GKE cluster with the intent of giving
the [Kubernetes Prow instance](https://prow.k8s.io) access to it. Because there
are different Prow instances and each instance has its own default settings
Expand All @@ -54,7 +54,7 @@ There are two requirements:

1. Prow must be able to schedule jobs into your build cluster.
2. The jobs themselves must be able to upload artifacts to the GCS bucket used
by [Deck](../components/deck), in order to report job status (e.g., "passing" or
by [Deck](../components/core/deck/), in order to report job status (e.g., "passing" or
"failing").

We look at both requirements below.
Expand Down
17 changes: 3 additions & 14 deletions site/content/en/docs/build-test-update.md
Expand Up @@ -33,7 +33,7 @@ go build ./cmd/hook
go test ./pkg/plugins/lgtm
```
(Note: `deck` depends on non-go static files, these were tested by integration
tests, and for e2e test use [`runlocal`](https://github.com/kubernetes/test-infra/tree/master/prow/cmd/deck/runlocal) if desired.)
tests, and for e2e test use [`runlocal`](https://github.com/kubernetes-sigs/prow/blob/main/cmd/deck/runlocal) if desired.)

### How to test a plugin

Expand Down Expand Up @@ -115,7 +115,7 @@ The ProwJob must use `agent: kubernetes` (the default, runs ProwJobs as Pods).
Each Prow instance can supply a preconfigured variant of pj-on-kind.sh that properly
defaults the config file locations. [Example](https://github.com/istio/test-infra/blob/01167b0dc9cb19bee40aa8dff958f526cfeeb570/prow/pj-on-kind.sh)
for [prow.istio.io](https://prow.istio.io).
To test ProwJobs for the [prow.k8s.io] instance use [`config/pj-on-kind.sh`](https://github.com/kubernetes/test-infra/tree/master/config/pj-on-kind.sh).
To test ProwJobs for the [prow.k8s.io] instance use [`config/pj-on-kind.sh`](https://github.com/kubernetes/test-infra/blob/master/config/pj-on-kind.sh).

##### Example
This command runs the ProwJob [`pull-test-infra-yamllint`](https://github.com/kubernetes/test-infra/blob/170921984a34ca40f2763f9e71d6ce6e033dec03/config/jobs/kubernetes/test-infra/test-infra-presubmits.yaml#L94-L107) locally on Kind.
Expand All @@ -142,17 +142,6 @@ export KUBECONFIG='/<path to user dir>/.kube/kind-config-mkpod'
```
After pointing to the correct master you will be able to drop into the container using `kubectl exec -it <pod name> <bash/sh/etc>`. **This pod will only last the lifecycle of the job, if you need more time to debug you might add a `sleep` within the job execution.

#### Using Phaino
[Phaino](/docs/components/cli-tools/phaino/) lets you interactively mock and run the job locally on
your workstation in a docker container. Detailed instructions can be found in
Phaino's [Readme](/docs/components/cli-tools/phaino/).

Note: Test containers designed for decorated jobs (configured with `decorate: true`)
may behave incorrectly or fail entirely without the environment the pod utilities
provide. Similarly jobs that mount volumes or use `extra_refs` likely won't work
properly.
These jobs are best run locally as decorated pods inside a [Kind] cluster [Using pj-on-kind.sh](#using-pj-on-kindsh).

### How to manually run a given job on Prow

If the normal job triggering mechanisms (`/test foo` comments, PR changes, PR
Expand Down Expand Up @@ -187,4 +176,4 @@ to generate ProwJob YAML.
[Kind]: https://sigs.k8s.io/kind
[mkpj]: /docs/components/cli-tools/mkpj/
[mkpod]: /docs/components/cli-tools/mkpod/
[pj-on-kind.sh]: https://github.com/kubernetes/test-infra/tree/master/prow/pj-on-kind.sh
[pj-on-kind.sh]: https://github.com/kubernetes-sigs/prow/blob/main/pkg/pj-on-kind.sh

0 comments on commit c5e374d

Please sign in to comment.