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

Adding info about Dependency Caching to docs #13265

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

IaroslavTitov
Copy link
Contributor

Proposed changes

  • Adding infromation about Dependency Caching

Unreleased product version (optional)

Related issues (optional)

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@IaroslavTitov IaroslavTitov marked this pull request as ready for review November 7, 2024 16:39
@IaroslavTitov IaroslavTitov requested a review from a team as a code owner November 7, 2024 16:39
Copy link
Contributor

@seanyeh seanyeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just nitpicking on grammar mostly :)

@@ -380,6 +381,24 @@ The GitHub block describes settings for Pulumi Deployments' GitHub integration.
}
```

### CacheOptions

Cache Options block defines settings related to dependency caching during Deployments. Reading dependencies from cache makes deployments significantly faster. Learn more about dependency caching on the [FAQ page](/docs/pulumi-cloud/deployments/faq/#dependencycaching).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor wording things:
The Cache Options block defines settings related to dependency caching during Deployments. Using dependencies from the cache makes deployments significantly faster.

also the url is missing a hyphen: #dependency-caching


When using Pulumi-managed deployment agents, you have the option to speed up deployments using Dependency Caching.

Caching method is simple: during the first deployment, deployment agent will automatically detect downloaded dependencies using lock files, zip them up and store the archive in blob storage. During all consequent deployments, agents will pull such an archive down and unpack it, saving time it would take to redownload those dependencies. When your dependencies change, deployment agents will automatically invalidate an old cache and create a new one.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The Caching method"
"the deployment agent"
I think you mean "subsequent" in "During all subsequent deployments"?
"saving time it would normally take..."

"invalidate the old cache" (there should only be one old cache)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Articles kill me every time! The biggest flaw of the English language.
Thank you!


Caching method is simple: during the first deployment, deployment agent will automatically detect downloaded dependencies using lock files, zip them up and store the archive in blob storage. During all consequent deployments, agents will pull such an archive down and unpack it, saving time it would take to redownload those dependencies. When your dependencies change, deployment agents will automatically invalidate an old cache and create a new one.

Caches are shared on project level, so all stacks within a project can share the same cache. However, caches are fully isolated and never shared between customers.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the project level"

- `.NET`
- `Python` - ensure that you have `requirements.txt` file in the root of your source code.
- `Go` - ensure that you have `go.mod` and `go.sum` files in the root of your source code.
- `NodeJS` - ensure that you have `packageManager` field specified in `package.json` file. For now, only `npm` and `yarn` are supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure that you have the packageManager field specified in package.json

Dependency Caching is supported for the following runtimes:

- `.NET`
- `Python` - ensure that you have `requirements.txt` file in the root of your source code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have requirements.txt file

- `Python` - ensure that you have `requirements.txt` file in the root of your source code.
- `Go` - ensure that you have `go.mod` and `go.sum` files in the root of your source code.
- `NodeJS` - ensure that you have `packageManager` field specified in `package.json` file. For now, only `npm` and `yarn` are supported.
- For `npm`, ensure that you have `package-lock.json` file in the root of your source code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, you don't need "file"

- `Go` - ensure that you have `go.mod` and `go.sum` files in the root of your source code.
- `NodeJS` - ensure that you have `packageManager` field specified in `package.json` file. For now, only `npm` and `yarn` are supported.
- For `npm`, ensure that you have `package-lock.json` file in the root of your source code.
- For `yarn`, ensure that you have `yarn.lock` file in the root of your source code.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

- For `npm`, ensure that you have `package-lock.json` file in the root of your source code.
- For `yarn`, ensure that you have `yarn.lock` file in the root of your source code.

To confirm Dependency Caching is working and/or to troubleshoot, check out logs of your deployments, specifically `Restore Cache` and `Save Cache` steps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically the

@pulumi-bot
Copy link
Collaborator

@IaroslavTitov
Copy link
Contributor Author

Updated according to comments

@pulumi-bot
Copy link
Collaborator


This option is only available for Pulumi-managed deployment agents.

* **enable** (boolean): Whether to use Dependency Caching.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's currently enabled but I can change it to enable. Do we have a preference? (ref)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should match the API, which is enable

Copy link
Contributor

@thoward thoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding to the docs! Looks good except for notes about casing style. I would also add, at minimum, some explanation to the .NET bullet point. Even if it just says ".NET - no special configuration required"


Dependency Caching is supported for the following runtimes:

- `.NET`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have some description, like the other bullet points?


This option is only available for Pulumi-managed deployment agents.

* **enable** (boolean): Whether to use Dependency Caching.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the new section in FAQ doc.

@@ -380,6 +381,24 @@ The GitHub block describes settings for Pulumi Deployments' GitHub integration.
}
```

### CacheOptions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have inconsistent casing and spacing on various terms here. "CacheOptions" vs "Cache Options" vs cacheOptions vs "cache options"...

For the H3 use sentence casing: "Cache options"
In the paragraph text, don't capitalize (it's not a proper noun): "cache options" or use the specific symbol cacheOptions, depending on wether you're referring to the concept of cache options or the JSON syntax for it.

In paragraph text "during Deployments" should be "during deployments" (we're talking about the action of deploying, not the product name). Usage of "Dependency Caching" here should also be lower case.

@@ -21,6 +21,25 @@ aliases:

Deployments run on single-use virtual machines and compute and storage are never shared across runs. We designed our architecture to maximize isolation. In addition, security features like OIDC allow you to fine tune credential scope, lifetime, and expiration policies at a per-deployment level. It is also possible to use [self-hosted runners](/docs/pulumi-cloud/deployments/customer-managed-agents/) if you require additional isolation.

## Dependency Caching
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title case-> "Dependency Ccaching"

@@ -21,6 +21,25 @@ aliases:

Deployments run on single-use virtual machines and compute and storage are never shared across runs. We designed our architecture to maximize isolation. In addition, security features like OIDC allow you to fine tune credential scope, lifetime, and expiration policies at a per-deployment level. It is also possible to use [self-hosted runners](/docs/pulumi-cloud/deployments/customer-managed-agents/) if you require additional isolation.

## Dependency Caching

When using Pulumi-managed deployment agents, you have the option to speed up deployments using Dependency Caching.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

casing/emphasis: "Dependency Caching"->"dependency caching"

Instead of capitalizing the concept of "Dependency Caching" in the text, use it in lower case. However, the first time you introduce a new concept like this, you can use italics to indicate it is a special concept to understand (instead of proper noun casing).


Caches are shared on the project level, so all stacks within a project can share the same cache. However, caches are fully isolated and never shared between customers.

Dependency Caching is supported for the following runtimes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

casing->"Dependency Ccaching"

@IaroslavTitov
Copy link
Contributor Author

Updated according to comments, thank you for detailed feedback!

@pulumi-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants