Skip to content
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

Revert tooling fixes #14164

Merged
merged 5 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,5 @@ destroy-dev-stack:

.PHONY: generate-compliance-pages
generate-compliance-pages:
node scripts/aws-compliance-scraper/scrape.cjs
node scripts/aws-compliance-scraper/scrape.js
./scripts/content/generate-compliance-pages.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ search:

In this case, the optional `search.keywords` field is included to cover the terms `data warehouse`, as those terms don't exist in the page's title or description. If it weren't, queries for `data warehouse` would fail to match this particular page.

Certain fields also rank higher than others in terms of their overall relevance. (Titles and keywords, for example, are considered more relevant than descriptions.) For a full list of these rankings, along with all of the rules we apply to the search index, see the [search app in pulumi/docs](https://github.com/pulumi/docs/blob/master/scripts/search/settings.cjs).
Certain fields also rank higher than others in terms of their overall relevance. (Titles and keywords, for example, are considered more relevant than descriptions.) For a full list of these rankings, along with all of the rules we apply to the search index, see the [search app in pulumi/docs](https://github.com/pulumi/docs/blob/master/scripts/search/settings.js).

### Keeping pages out of search results

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ look at how they look in action:

Let's still walk through it to see what's happening. It can be a little
subtle because we are mixing *deployment-time* code -- code that
declares infrastructure as code resources -- and *runtimecode --
declares infrastructure as code resources -- and *runtime *code --
application code that runs as a function.

First, we're just defining two simple resources: 1) an `s3.Bucket`,
Expand Down
2 changes: 1 addition & 1 deletion content/blog/meet-the-pulumi-team-at-aws-reinvent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Heading to AWS re:Invent? Concerned about how you'll manage to get
on bag? Or maybe you just like purple.

Whatever the reason, the Pulumi team will be there all week at **Booth
316, Startup Central, Aria Quad,** and we'd love to chat with you about
316, Startup Central, Aria Quad, **and we'd love to chat with you about
[AWS and Pulumi](/crosswalk/aws/).

Catch up with us on serverless functions, [containers](/containers/) and
Expand Down
2 changes: 0 additions & 2 deletions content/blog/rabbitMQ-azure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ We will start by defining a few constants, the constructor, an empty method call
Now that we have our initial class, we can start writing methods for the resources we will be creating:

- Resource groups:

<br>
{{< gist ItayPodhajcer 4c57e537f0d9cc15b801035d556c2504 >}}
<br>

- Private DNS zone:

{{< gist ItayPodhajcer 52af6ba0a8f1a92d5352c3218505eefa >}}
Expand Down
4 changes: 2 additions & 2 deletions content/blog/snowflake-provider-launch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ Pulumi is bringing management of your Snowflake resources into the same place as
- Create a service user and push the key into the secrets manager of your choice
- Rotate keys

You can check out the details in the official [Snowflake Provider documentation](/registry/packages/snowflake/api-docs/provider/), with
references for Python, Go, TypeScript, and C#!
You can check out the details in the official [Snowflake Provider documentation
](/registry/packages/snowflake/api-docs/provider/), with references for Python, Go, TypeScript, and C#!
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Specifically, we:
If you have the Azure command line, try [running the example](https://github.com/pulumi/examples/tree/master/classic-azure-ts-aks-mean)
with `pulumi up`!

```javascript
{{< highlight javascript >}}
import * as k8s from "@pulumi/kubernetes";
import * as azure from "@pulumi/azure";
import * as mongoHelpers from "./mongoHelpers";
Expand Down Expand Up @@ -90,7 +90,7 @@ const node = new k8s.helm.v2.Chart(
},
{ providers: { kubernetes: k8sProvider }, dependsOn: mongoConnStrings }
);
```
{{< /highlight >}}

Pulumi supports deploying resources to all the major cloud vendors, as
well as Kubernetes. Using the Pulumi programming model, it is possible
Expand Down
8 changes: 4 additions & 4 deletions content/docs/esc/environments/rotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ values:
state:
previous:
accessKeyId: AKIA...
secretAccessKey:
fn::secret:
secretAccessKey:
fn::secret:
ciphertext: ...
current:
accessKeyId: AKIA...
secretAccessKey:
fn::secret:
secretAccessKey:
fn::secret:
ciphertext: ...
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ $ kubectl delete --namespace=`pulumi stack output appsNamespaceName` pod/nginx s

For a complete example of this in action, see [Simplifying Kubernetes
RBAC in Amazon EKS][simplify-rbac].
[simplify-rbac]: /blog/simplify-kubernetes-rbac-in-amazon-eks-with-open-source-pulumi-packages/

{{% /choosable %}}

See the [official Kubernetes RBAC docs][k8s-rbac-docs] for more details.

<!-- markdownlint-disable url -->
[simplify-rbac]: /blog/simplify-kubernetes-rbac-in-amazon-eks-with-open-source-pulumi-packages/
[crosswalk-identity]: /docs/clouds/kubernetes/guides/identity/
[k8s-rbac-docs]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/
[crosswalk-configure-defaults]: /docs/clouds/kubernetes/guides/configure-defaults/
Expand Down
12 changes: 6 additions & 6 deletions content/docs/iac/get-started/kubernetes/deploy-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ $ pulumi stack output ip

> **If using Minikube:** Minikube does not support type `LoadBalancer`. Instead, forward the nginx service:
>
> ```bash
> $ kubectl get service
> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
> kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 44h
> nginx-9e5d5cd4 ClusterIP 10.103.199.118 <none> 80/TCP 6m47s
> ```
> ```bash
> $ kubectl get service
> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
> kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 44h
> nginx-9e5d5cd4 ClusterIP 10.103.199.118 <none> 80/TCP 6m47s
> ```
>
> Note: The assigned name for this particular nginx service is `nginx-9e5d5cd4`; yours will be different. In a new terminal window, run:
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Pulumi offers three types of access tokens:

1. Personal tokens, which map to the permissions of an individual user. Personal tokens are available to all Pulumi Cloud users.
1. Organization tokens, which map to the permissions of either a regular organization member or an organization admin, depending on the scope of the token. Organization tokens are only available to Enterprise and Business Critical customers.
1. Team tokens, which map to the permissions of a team within an organization. For more information on using teams within your Pulumi Cloud organization, see [Teams & Role-based access control (RBAC)](/docs/pulumi-cloud/access-management/teams/). Team tokens are only available to Enterprise and Business Critical customers.
1. Team tokens, which map to the permissions of a team within an organization. For more information on using teams within your Pulumi Cloud organization, see [Teams & Role-based access control (RBAC)
](/docs/pulumi-cloud/access-management/teams/). Team tokens are only available to Enterprise and Business Critical customers.

When using tokens, be mindful of the following security best practices:

Expand Down
1 change: 0 additions & 1 deletion content/templates/container-service/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ weight: 1
[Containers](/containers/) are lightweight virtualized operating system environments in which developers can package and run an application and its dependencies as isolated runtime environments. The benefits of containers include better scalability, portability, and fault isolation. Docker is most commonly used to create container images. Containers are great for scenarios such as microservices, batch jobs, and migrating a legacy application. In the cloud, containers are typically run using container services that manage the container orchestration, cluster management, and compute for you.

**On AWS,** these are the main ways to run containers:

| | |
|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| Amazon Elastic Container Service (ECS) | Fully managed container orchestration service created by AWS. Deploy containers to EC2 instances you manage or serverless instances from AWS Fargate. |
Expand Down
7 changes: 0 additions & 7 deletions cypress.config.cjs

This file was deleted.

12 changes: 12 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require("./cypress/plugins/index.js")(on, config);
},
baseUrl: "http://localhost:1313",
},
});
21 changes: 21 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
19 changes: 6 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@
"private": true,
"license": "Apache-2.0",
"scripts": {
"minify-css": "node scripts/minify-css.cjs",
"lint-markdown": "tsx ./scripts/lint/lint-markdown.ts",
"build-search-index": "tsx ./scripts/search/main.ts",
"check-urls": "tsx ./scripts/search/check-urls.ts",
"update-search-index": "tsx ./scripts/search/update-search-index.ts",
"minify-css": "node scripts/minify-css.js",
"prepare": "husky"
},
"type": "module",
"dependencies": {
"@aws-sdk/client-s3": "^3.427.0",
"@fullhuman/postcss-purgecss": "^4.0.3",
Expand All @@ -20,7 +15,6 @@
"@octokit/graphql": "^4.6.2",
"@octokit/rest": "^18.5.3",
"@slack/web-api": "^5.12.0",
"@types/node": "^22.13.1",
"algoliasearch": "^4.17.0",
"axios": "^1.7.4",
"axios-retry": "^3.5.1",
Expand All @@ -34,19 +28,18 @@
"http-server": "^0.12.1",
"js-yaml": "^4.1.0",
"jsdom": "^22.0.0",
"markdownlint": "^0.17.2",
"parse-diff": "^0.8.1",
"postcss": "^8.3.7",
"postcss-cli": "^8.3.1",
"sitemapper": "^3.2.2",
"turndown": "^7.2.0",
"typedoc": "^0.27.0",
"typedoc-plugin-script-inject": "^1.0.0"
"typedoc": "^0.25.11",
"typedoc-plugin-script-inject": "^1.0.0",
"typescript": "^4.9.5"
},
"devDependencies": {
"husky": "^9.0.11",
"markdownlint": "^0.37.4",
"prettier": "^2.6.2",
"tsx": "^4.19.2",
"typescript": "^5.7.0"
"prettier": "^2.6.2"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ else
fi

# Generate docs JSON.
node scripts/content/generate-docs-content.cjs
node scripts/content/generate-docs-content.js

# Purge unused CSS.
yarn run minify-css
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source ./scripts/ci-login.sh

./scripts/generate-search-index.sh

node ./scripts/await-in-progress.cjs
node ./scripts/await-in-progress.js

./scripts/run-pulumi.sh update
./scripts/make-s3-redirects.sh
2 changes: 1 addition & 1 deletion scripts/ci-update-search-index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# This script downloads the search indexes for registry and docs from pulumi.com then combines
# the two indexes and pushes them to Algolia.
yarn run update-search-index "$1"
node ./scripts/search/update-search-index.js "$1"
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/detect-new-404s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ s3_website_url="http://${destination_bucket}.s3-website.$(aws_region).amazonaws.

echo "Checking ${s3_website_url} for new 404s..."
# For now we don't want this to fail the build due to lots of flakiness, so always exit successfully.
node scripts/detect-new-404s.cjs "https://pulumi.com" "${s3_website_url}" || true
node scripts/detect-new-404s.js "https://pulumi.com" "${s3_website_url}" || true
2 changes: 1 addition & 1 deletion scripts/generate-search-index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o errexit -o pipefail

source ./scripts/common.sh

yarn run build-search-index
node ./scripts/search/main.js

# Fetch the name of the bucket from the metadata file.
destination_bucket="$(cat "$(origin_bucket_metadata_filepath)" | jq -r ".bucket")"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/link-checker/check-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ source ./scripts/common.sh
echo "Checking links..."

base_url="$1"
node "./scripts/link-checker/check-links.cjs" "$base_url" 2
node "./scripts/link-checker/check-links.js" "$base_url" 2
4 changes: 1 addition & 3 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@

set -o errexit -o pipefail

yarn run lint-markdown
node ./scripts/lint/lint-markdown.js
yarn prettier --check .
# shellcheck disable=SC2046 # Intended splitting of file names
yarn tsc --project tsconfig.scripts.json --noEmit
39 changes: 12 additions & 27 deletions scripts/lint/lint-markdown.ts → scripts/lint/lint-markdown.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import * as fs from "fs";
import * as yaml from "js-yaml";
import * as markdownlint from "markdownlint/sync";
import * as path from "path";
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const fs = require("fs");
const yaml = require("js-yaml");
const markdownlint = require("markdownlint");
const path = require("path");

/**
* REGEX for grabbing the front matter of a Hugo markdown file. Example:
Expand Down Expand Up @@ -257,9 +254,7 @@ const filesToLint = getMarkdownFiles(`../../content`);
*
* See: https://github.com/DavidAnson/markdownlint
*/

// Lint the markdown files.
const result = markdownlint.lint({
const opts = {
// The array of markdown files to lint.
files: filesToLint.files,
config: {
Expand All @@ -279,6 +274,8 @@ const result = markdownlint.lint({
// Allow all code block styles in a file. Code block styles
// are created equal and we shall not discriminate.
MD046: false,
// Allow indents on unordered lists to be 4 spaces instead of 2.
MD007: { indent: 4 },
// Allow duplicate headings.
MD024: false,
// Allow headings to be indendented.
Expand All @@ -291,29 +288,14 @@ const result = markdownlint.lint({
MD034: false,
// Allow bold/italicized paragraphs
MD036: false,
// Images should have alternate text (alt text)
MD045: false,
// Emphasis style
MD049: false,
// Strong style
MD050: false,
// Link fragments should be valid
MD051: false,
// Link and image reference definitions should be needed
MD053: false,
// Table pipe style
MD055: false,
// Table column count
MD056: false,
},
customRules: [
{
parser: "markdownit",
names: ["relref"],
description: "Hugo relrefs are no longer supported. Use standard [Markdown](/links) instead",
tags: ["hugo-relref"],
function: (params, onError) => {
params.parsers.markdownit.tokens
params.tokens
.filter(token => {
return token.type === "inline";
})
Expand All @@ -328,7 +310,10 @@ const result = markdownlint.lint({
},
},
],
});
};

// Lint the markdown files.
const result = markdownlint.sync(opts);

// Group the lint errors by file.
const errors = groupLintErrorOutput(result);
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/make-s3-redirects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ redirects_file="./redirects.txt"
aws s3 cp "s3://${destination_bucket}/redirects.txt" "$redirects_file" --region "$(aws_region)"

echo "Processing S3 redirects for ${destination_bucket}..."
node scripts/make-s3-redirects.cjs "${destination_bucket}" "${build_dir}/redirects.txt" "$(aws_region)"
node scripts/make-s3-redirects.js "${destination_bucket}" "${build_dir}/redirects.txt" "$(aws_region)"

echo "Processing custom redirects in scripts/redirects..."
ls -l "./scripts/redirects/" | tail -n +2 | awk '{print $9}' | while read line; do
redirect_file="./scripts/redirects/$line"
node scripts/make-s3-redirects.cjs "${destination_bucket}" "${redirect_file}" "$(aws_region)"
node scripts/make-s3-redirects.js "${destination_bucket}" "${redirect_file}" "$(aws_region)"
done
File renamed without changes.
10 changes: 5 additions & 5 deletions scripts/search/check-urls.ts → scripts/search/check-urls.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as fs from "fs";
import { default as axios } from "axios";
import retry from 'axios-retry';
const fs = require("fs");
const axios = require("axios").default;
const retry = require("axios-retry");

async function checkSearchURLs(baseURL) {

Expand Down Expand Up @@ -76,6 +76,6 @@ checkSearchURLs(process.argv[2] || "https://www.pulumi.com")
});

// Exit non-zero when something goes wrong in the promise chain.
process.on("unhandledRejection", (err: string) => {
throw new Error(err);
process.on("unhandledRejection", error => {
throw new Error(error);
});
Loading
Loading