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
Latest Snippets: Functions, Expressions, and manifests (#46)
* Development (#45)
* update diagram and readme
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* update commit hash
* update commit hash
* remove function name prefix
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* update commit hash
* remove function name prefix
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* update commit hash
* remove function name prefix
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* update unit tests to use changeEvent object
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* update expression manifest
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* update commit hash
* remove function name prefix
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
* update commit hash
* update commit hash
* Commit performed using Copy Push Files action
* update commit hash
* update project manifest
* update commit hash
* update action to add git commit hash to manifest rather than extra file
* add debugging
* combine steps
* update commit hash
* remove old file
* update commit hash
* BAAS-30361: add amazon third party snippets (#47)
* update commit hash
* Update trigger insert title correctly (#48)
* update commit hash
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* Commit performed using Copy Push Files action
* remove function name prefix
* update commit hash
---------
Co-authored-by: mongodb-atlas-app-services[bot] <mongodb-atlas-app-services[bot]@users.noreply.github.com>
Co-authored-by: MongoCaleb <[email protected]>
Co-authored-by: jwongmongodb <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+41-24Lines changed: 41 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,29 +9,46 @@ and a push to `main` uploads to the `production` directory.
9
9
10
10
For bucket access, consult the Developer Docs team.
11
11
12
-
## Add Function and Trigger Snippets
12
+
## Adding Function and Trigger Snippets
13
13
14
14
The Developer Docs team maintains these code snippets as tested examples.
15
-
Adding a new snippet involves:
16
-
17
-
1. Adding a Function or Trigger to the Atlas backend (ask Dev Docs for details
18
-
and access).
19
-
2. Adding a relevant test for the Function or Trigger to the test suite. Refer to
20
-
the README in the `test/integration` directory for more details.
21
-
3. Exporting or pulling the Atlas backend with your Function or Trigger, and adding
22
-
the relevant file(s) to this repository's `backend`.
23
-
4. Running the Bluehawk script in the `tools` directory to copy the files from the
24
-
backend into the `snippets` files that get uploaded to S3.
25
-
5. Adding a metadata file to the `metadata` directory with a title and other
26
-
relevant details based on the type of snippet you're adding.
27
-
28
-
Details about filenames and metadata schema will be added to this repository
29
-
after the spec is finalized.
30
-
31
-
If you are not a member of the Bushicorp org, create your own test app to test
32
-
the Function or Trigger, and the Developer Docs team will import your Function
33
-
or Trigger into the org test app as part of your PR. You can use the `backend`
34
-
in this repository to create your own test app that should run the entire test
35
-
suite successfully.
36
-
37
-
<!-- TODO: Add more details about the repo structure and its purpose -->
15
+
When you add a new function, be sure to:
16
+
17
+
1. Add a Function or Trigger to the Atlas backend (ask Dev Docs for details
18
+
and access). Follow these rules when creating a function or trigger:
19
+
20
+
- Function names **must** start with their type, which is one of `api_`,
21
+
`crud_`, or `context_`.
22
+
- Functions must be tested within the AAS app.
23
+
- Triggers should use the "fake_function_for_expressions"
24
+
function, since we're only creating triggers to extract the ``match`` and ``project`` stages and nothing function-related. Following this rule means we don't end up with any additional functions in the repo.
25
+
26
+
2. Deploy your changes. This will automatically push the changes to the *source* repo, where github actions will remove function name prefixes, extract the ``match`` and ``project`` json from the triggers, and then copy the functions and expressions to this repo.
27
+
28
+
3. Update the `manifest.json` file in the correct subfolder (snippets/functions/crud, for example) with your new function. Be sure to generate a new uuid for the `id` field.
29
+
30
+
4. Add a relevant test for the function or trigger to the test suite. Refer to the README in the `test/integration` directory for more details.
31
+
32
+
## Adding a New Function Category
33
+
34
+
If we decide we need a type of function beyond CRUD, function context, third-party integration, and API calls, do the following:
35
+
36
+
1. Coordinate with dev and product for naming the new `viewType` and subfolder.
37
+
2. Create the new subfolder that will contain these functions.
38
+
3. Copy an existing `manifest.json` file from one of the other function types and update it with the following:
39
+
a. The new `viewType`
40
+
b. The new snippets. Even if there is only 1 new snippet, be sure it is in an array.
41
+
4. In the `atlas-functions-triggers-source` repo, you **must** update the `/.github/workflows/Copy-Functions-to-Examples-Repo.yml` action to copy the new category functions. Each function category has a section in the github action that looks like this:
0 commit comments