Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Charlotte Emms <[email protected]>
  • Loading branch information
Jakeii and cemms1 authored Jan 13, 2025
1 parent 36202e6 commit 133ee8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This package contains the code for the commercial bundle that is loaded on all p

There are 2 main parts to this repo:
- The commercial bundle itself, which is a set of javascript files that is loaded on all pages on theguardian.com.
- Some modules that are imported used by other parts of the Guardian codebase, such as DCR. This is published as a package to npm, `@guardian/commercial`.
- Some modules that are used by other parts of the Guardian codebase, such as DCR. This is published as a package to npm, `@guardian/commercial`.

The exported modules are in `src/core`, everything else is part of the commercial bundle.

Expand Down Expand Up @@ -87,12 +87,12 @@ Frontend will then use the local bundle instead of the one from PROD/CODE.

To test the bundle on CODE, create a PR, wait for github actions to run and a riff-raff comment should appear. Click the link in the comment to confirm the CODE deployment.

Although technically we don't need to "take" Frontend or DCR CODE environments anymore, it may be a good idea to claim it any way if your change may break things and cause an issue for another developer testing their changes.
Although you can deploy CODE changes without deploying Frontend or DCR, it's a good idea to flag any CODE deployments on the dotcom semaphore chat in case it has an effect on anything anyone else is testing.

#### Testing changes to the `@guardian/commercial` npm package
You can add the [beta] @guardian/commercial label to your pull request, this will release a beta version of the bundle to NPM, the exact version will be commented on your PR.

In order to do this, first run: pnpm changeset add, again, This will create a new changeset file in the .changeset directory. Commit this file with your PR.
In order to do this, run `pnpm changeset`. This will create a new changeset file in the .changeset directory. Commit this file with your PR.

Note: Once the beta version is released, the label will be removed from the PR, so you will need to add it again if you want to release subsequent new versions.

Expand Down
2 changes: 1 addition & 1 deletion docs/deployment/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ This is neccessary as the production bundle files have a hash in their paths for
As part of the CI process a build is created in riff-raff with the javascripts and cloudformation. When deployment is initiated in riff-raff (automatically on prod, or manually for PRs on CODE) the javascripts are uploaded to the dotcom static S3 bucket, and the cloudformation updating the bundlepath is executed.

## Frontend
[Frontend](https://github.com/guardian/frontend/blob/main/common/app/common/CommercialBundle.scala) perioducally checks the parameter store for the path to the commercial bundle, caching it for 1 minute. This is to avoid hitting the parameter store on every request.
[Frontend](https://github.com/guardian/frontend/blob/ad634eed65451a5994413da1039665a4c3cea574/common/app/common/CommercialBundle.scala) perioducally checks the parameter store for the path to the commercial bundle, caching it for 1 minute. This is to avoid hitting the parameter store on every request.

0 comments on commit 133ee8d

Please sign in to comment.