You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Reorganize README.md and add guide for updating Cadence IDL files (#1131)
* Reorganize README.md into separate sections for Usage and Development
* Add guide for updating Cadence IDLs under the Development section
* Fix minor formatting issues & typos
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Copy file name to clipboardExpand all lines: README.md
+41-14Lines changed: 41 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,17 @@ This web UI is used to view workflows from [Cadence][cadence], see what's runnin
9
9
10
10
## Getting Started
11
11
12
+
### Using cadence-web
13
+
14
+
The latest version of `cadence-web` is included in the `cadence` composed docker containers in the [main Cadence repository][cadence]. Follow the instructions there to get started.
15
+
16
+
```
17
+
docker-compose -f docker/docker-compose.yml up
18
+
```
19
+
12
20
### Configuration
13
21
14
-
Set these environment variables if you need to change their defaults
22
+
Set these environment variables if you need to change their defaults.
@@ -47,13 +55,7 @@ Feature flags control various UI features and functionality in `cadence-web`. Th
47
55
48
56
**Note:** For advanced customization, feature flags can be modified through resolvers in the dynamic config system ([`src/config/dynamic/resolvers`](src/config/dynamic/resolvers)).
49
57
50
-
### Using cadence-web
51
-
52
-
The latest version of `cadence-web` is included in the `cadence` composed docker containers in the [main Cadence repository][cadence]. Follow the instructions there to get started.
53
58
54
-
```
55
-
docker-compose -f docker/docker-compose.yml up
56
-
```
57
59
58
60
### Using TLS for gRPC
59
61
@@ -82,11 +84,11 @@ docker run -it --rm \
82
84
- Replace `/path/on/host/ca.pem` with the actual location of your CA certificate on the host system.
83
85
-`CADENCE_GRPC_TLS_CA_FILE` must point to the path inside the container where the certificate is mounted.
84
86
85
-
###Building & developing cadence-web
87
+
## Building & developing cadence-web
86
88
87
89
`cadence-web` requires node `v18` or greater to be able to run correctly.
88
90
89
-
####Creating a production build
91
+
### Creating a production build
90
92
91
93
To create a production build, follow these steps:
92
94
@@ -110,7 +112,7 @@ npm start
110
112
111
113
4. Once the webapp is ready, access it through `localhost:8088` (port can be changed using `CADENCE_WEB_PORT` environment variable)
112
114
113
-
####Running development environment
115
+
### Running development environment
114
116
115
117
To run the development server, follow these steps:
116
118
@@ -128,15 +130,15 @@ npm run dev
128
130
129
131
3. Once the webapp is ready, access it through `localhost:8088` (port can be changed using `CADENCE_WEB_PORT` environment variable)
130
132
131
-
Note: For contribution we recommend using dev containers, check [VSCode Dev Containers](#using-vscode-dev-containers)section for more information
133
+
Note: For contribution we recommend using dev containers, check [VSCode Dev Containers](#using-vscode-dev-containers) for more information
132
134
133
135
#### Using VSCode Dev Containers
134
136
135
137
1. Set up the [Remote Containers plugin](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in VSCode.
136
138
2. Open the cadence-web directory in VSCode.
137
139
3. Make sure to update `CADENCE_GRPC_PEERS` with the correct host. (If you are connecting to a server on a container host machine use `host.docker.internal:7833`, where `7833` is the gRPC port for a running [cadence-frontend](https://github.com/cadence-workflow/cadence/tree/master/service/frontend) service)
138
140
4. Use the Command Palette to select the 'Reopen folder in Container' option
139
-
5. Follow same commands listed in [Running development environment](#running-development-environment) section.
141
+
5. Follow the same commands listed in [Running development environment](#running-development-environment).
140
142
141
143
#### Developing cadence-web against cadence composed docker
142
144
@@ -146,11 +148,36 @@ To start development against dockerized cadence services, run the following comm
146
148
docker-compose -f docker-compose-backend-services.yml up
147
149
```
148
150
149
-
You can customize the YAML file or reuse configurations from the [cadence repository](https://github.com/cadence-workflow/cadence/tree/master/docker). (In case of reusing exsisting files: ensure that cadence-web is not included in the composed container services, or just remove it)
151
+
You can customize the YAML file or reuse configurations from the [cadence repository](https://github.com/cadence-workflow/cadence/tree/master/docker). (In case of reusing existing files: ensure that cadence-web is not included in the composed container services, or just remove it)
150
152
151
153
After running `cadence`, start `cadence-web` for development using one of the previous methods ([Running development environment](#running-development-environment), [VSCode Dev Containers](#using-vscode-dev-containers))
152
154
153
-
#### NPM scripts
155
+
### Updating IDLs
156
+
157
+
To update the Cadence IDL files:
158
+
159
+
1. Update the commit hash in `package.json` under `config.cadence_idl_version` to the latest commit hash from the [cadence-idl repository](https://github.com/cadence-workflow/cadence-idl).
160
+
161
+
2. Download the new IDL files:
162
+
```
163
+
npm run install-idl
164
+
```
165
+
166
+
3. Generate TypeScript types from the IDL files:
167
+
```
168
+
npm run generate:idl
169
+
```
170
+
171
+
4. Check for errors:
172
+
```
173
+
npm run lint && npm run typecheck && npm run test
174
+
```
175
+
176
+
5. Run cadence-web locally to sanity-check if everything works as expected (see [Running development environment](#running-development-environment))
177
+
178
+
6. Fix any errors that arise from the updated IDL files.
0 commit comments