Skip to content

Commit

Permalink
Merge branch 'develop' into M3-9420-nb-vpc-feature-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DevDW committed Feb 27, 2025
2 parents 81fdea8 + 49aa305 commit 654558b
Show file tree
Hide file tree
Showing 180 changed files with 24,747 additions and 11,990 deletions.
264 changes: 112 additions & 152 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ jobs:
with:
ref: ${{ github.base_ref }} # The base branch of the PR (develop)

- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10

- name: Use Node.js v20.17 LTS
uses: actions/setup-node@v4
with:
node-version: "20.17"

- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build @linode/validation
run: yarn build:validation
run: pnpm build:validation

- name: Build @linode/api-v4
run: yarn build:sdk
run: pnpm build:sdk

- name: Run Base Branch Coverage
run: yarn coverage:summary
run: pnpm coverage:summary

- name: Write Base Coverage to an Artifact
run: |
Expand All @@ -56,28 +56,28 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10

- name: Use Node.js v20.17 LTS
uses: actions/setup-node@v4
with:
node-version: "20.17"

- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build @linode/validation
run: yarn build:validation
run: pnpm build:validation

- name: Build @linode/api-v4
run: yarn build:sdk
run: pnpm build:sdk

- name: Run Current Branch Coverage
run: yarn coverage:summary
run: pnpm coverage:summary

- name: Write PR Number to an Artifact
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/coverage_badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10

- name: Use Node.js v20.17 LTS
uses: actions/setup-node@v4
with:
node-version: "20.17"

- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
cache: "pnpm"

- name: Install Dependencies
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build @linode/validation
run: yarn build:validation
run: pnpm build:validation

- name: Build @linode/api-v4
run: yarn build:sdk
run: pnpm build:sdk

- name: Run Base Branch Coverage
run: yarn coverage:summary
run: pnpm coverage:summary

- name: Generate Coverage Badge
uses: jaywcjlove/coverage-badges-cli@7f0781807ef3e7aba97a145beca881d36451b7b7 # v1.1.1
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/e2e_schedule_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,14 @@ jobs:
- name: install command line utilities
run: sudo apt-get install -y expect
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
version: 10
- uses: actions/setup-node@v4
with:
node-version: "20.17"
- uses: actions/cache@v4
with:
path: |
node_modules
*/*/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
cache: "pnpm"
- run: |
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}" >> $GITHUB_ENV
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
Expand All @@ -57,9 +54,9 @@ jobs:
echo "REACT_APP_API_ROOT=${{ secrets.REACT_APP_API_ROOT }}" >> ./packages/manager/.env
echo "REACT_APP_APP_ROOT=${{ secrets.REACT_APP_APP_ROOT }}" >> ./packages/manager/.env
echo "REACT_APP_DISABLE_NEW_RELIC=1" >> ./packages/manager/.env
yarn install:all
yarn build
yarn start:manager:ci &
pnpm install:all
pnpm build
pnpm start:manager:ci &
- name: Run tests
uses: cypress-io/github-action@v6
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,6 @@ packages/manager/bundle_analyzer_report.html

# vitepress
docs/.vitepress/cache

# pnpm store will be generated if you run pnpm install in docker environments
.pnpm-store
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn workspaces run precommit
pnpm run -r --workspace-concurrency=1 --if-present precommit
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ x-e2e-runners:
target: e2e
env_file: ./packages/manager/.env
volumes: *default-volumes
entrypoint: 'yarn'
entrypoint: 'pnpm'

services:
# Serves a local instance of Cloud Manager for Cypress to use for its tests.
Expand Down Expand Up @@ -164,7 +164,7 @@ services:
entrypoint:
- "/bin/sh"
- "-c"
- "caddy reverse-proxy --from $${CYPRESS_BASE_URL} --to $${REVERSE_PROXY_URL} > /dev/null 2>&1 & yarn $0 $@"
- "caddy reverse-proxy --from $${CYPRESS_BASE_URL} --to $${REVERSE_PROXY_URL} > /dev/null 2>&1 & pnpm $0 $@"

# Cypress component test runner service.
#
Expand All @@ -191,7 +191,7 @@ services:
environment:
<<: *default-env
MANAGER_OAUTH: ${MANAGER_OAUTH}
entrypoint: ['yarn', 'cy:e2e']
entrypoint: ['pnpm', 'cy:e2e']

# Component test runner.
# Does not require any Cloud Manager environment to run.
Expand All @@ -201,7 +201,7 @@ services:
environment:
CY_TEST_DISABLE_RETRIES: ${CY_TEST_DISABLE_RETRIES}
CY_TEST_JUNIT_REPORT: ${CY_TEST_JUNIT_REPORT}
entrypoint: ['yarn', 'cy:component:run']
entrypoint: ['pnpm', 'cy:component:run']

# End-to-end test runner for Cloud's synthetic monitoring tests.
# Configured to run against a remote Cloud instance hosted at some URL.
Expand All @@ -211,4 +211,4 @@ services:
environment:
<<: *default-env
MANAGER_OAUTH: ${MANAGER_OAUTH}
entrypoint: ['yarn', 'cy:e2e']
entrypoint: ['pnpm', 'cy:e2e']
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feel free to open an issue to report a bug or request a feature.
- install it via `brew`: https://github.com/cli/cli#installation or upgrade with `brew upgrade gh`
- Once installed, run `gh repo set-default` and pick `linode/manager` (only > 2.21.0)
- You can also just create the changeset manually, in this case make sure to use the proper formatting for it.
- Run `yarn changeset`from the root, choose the package to create a changeset for, and provide a description for the change.
- Run `pnpm changeset`from the root, choose the package to create a changeset for, and provide a description for the change.
You can either have it committed automatically or do it manually if you need to edit it.
- A changeset is optional, but should be included if the PR falls in one of the following categories:<br>
`Added`, `Fixed`, `Changed`, `Removed`, `Tech Stories`, `Tests`, `Upcoming Features`
Expand Down Expand Up @@ -74,4 +74,4 @@ Break down *additional* things in your PR into multiple PRs (like you would do w

## Docs

To run the docs development server locally, [install Bun](https://bun.sh/) and start the server: `yarn docs`.
To run the docs development server locally, [install Bun](https://bun.sh/) and start the server: `pnpm run docs`.
37 changes: 21 additions & 16 deletions docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,52 @@
8. Install Node.js 20.17 LTS. We recommend using [Volta](https://volta.sh/):

```bash

$ curl https://get.volta.sh | bash
curl https://get.volta.sh | bash

## Add volta to your .*rc file, or open a new terminal window.

$ volta install [email protected]
volta install [email protected]

$ node --version
node --version
## v20.17.0

```

9. Install the latest version of Yarn:
9. Install pnpm v10 using Volta or view the [pnpm docs](https://pnpm.io/installation) for more installation methods

```bash
$ npm install --global yarn --upgrade
# 1.22.10
volta install pnpm@10

pnpm --version
# 10.2.0
```

10. Navigate to the root directory of the repository, then start Cloud Manager and the JS client with `yarn up`.
11. After installation, Cloud Manager should be running at `http://localhost:3000`.
10. Navigate to the root directory of the repository
11. Run `pnpm bootstrap` to install dependencies and perform an initial build of our packages
12. Run `pnpm dev` to start the local development server. Cloud Manager should be running at `http://localhost:3000`

## Serving a production build of Cloud Manager

You can then serve these files however you prefer or use our included local http server.
You can build a production bundle of Cloud Manager and serve it locally.

```bash
yarn install:all
pnpm install

pnpm run --filter @linode/validation build # build the @linode/validation package

pnpm run --filter @linode/api-v4 build # build the @linode/api-v4 (it depends on @linode/validation)

yarn workspace linode-manager build
pnpm run --filter linode-manager build # build a production bundle of Cloud Manager

yarn workspace linode-manager run start:ci
pnpm run --filter linode-manager start:ci # start a local http server on http://localhost:3000/
```

## Exposing Cloud Manager's dev server to the network

By default, Cloud Manager's dev server only listens on `localhost`. If you need to
expose the Vite dev server, you can use the following command.
expose the Vite dev server to all network interfaces, you can use the following command.

> **Note**: This is useful for running Cloud Manager's dev server in Docker-like environments
```bash
yarn up:expose
pnpm run up:expose
```
4 changes: 2 additions & 2 deletions docs/development-guide/01-repository-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The linode/manager repository is a monorepo that houses three packages:

The **manager** package is dependent on the **api-v4** package, which is itself dependent on the **validation** package.

The repo has a root level `package.json` which defines project-level scripts, hooks, and dependencies. The code for dependencies shared across projects are hoisted up to the root-level `/node_modules` directory. There is a single `yarn.lock` file for the repo which lives at the root level.
The repo has a root level `package.json` which defines project-level scripts, hooks, and dependencies. The code for dependencies shared across projects are hoisted up to the root-level `/node_modules` directory. There is a single `pnpm-lock.yaml` file for the repo which lives at the root level.

Any files relevant to the entire project or repo should be included at the root level. Files belonging to a specific package belong in `/packages/<package_name>`.

Expand Down Expand Up @@ -52,7 +52,7 @@ Like api-v4, TypeScript files are compiled to /lib and compiled + minified to in
A few notable directories in the root level of the manager package:

- **/build**
- where the app is compiled to after running `yarn build` (gitignored)
- where the app is compiled to after running `pnpm build` (gitignored)
- **/config**
- configuration for unit tests
- **/cypress**
Expand Down
4 changes: 2 additions & 2 deletions docs/development-guide/04-component-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ We use [Storybook](https://storybook.js.org/) to document our UI component libra

#### Running Storybook Locally

`yarn build-storybook`: builds Storybook as a static web application, with build output located in `/packages/manager/storybook-static`; must be run from `/packages/manager` directory
`pnpm run --filter linode-manager build-storybook`: builds Storybook as a static web application, with build output located in `/packages/manager/storybook-static`; must be run from `/packages/manager` directory

`yarn storybook`: starts the local dev server at `localhost:6006`
`pnpm storybook`: starts the local dev server at `localhost:6006`

#### Adding Stories

Expand Down
Loading

0 comments on commit 654558b

Please sign in to comment.