Skip to content

Commit

Permalink
Update metadata.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel authored Jan 5, 2024
1 parent 352379d commit 068dba6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions contributing/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ Want to make sure your types are working as expected?
1. Create a new scratch org. `sf org create scratch`
1. Push the source `sf project deploy start`
1. Convert the source to mdapi format `sf project convert source -d mdapiOut`
1. Look in the resulting `metadataPackage_` and `package.xml` to see that it looks as expected
1. Deploy it to the org using `sfdx force:mdapi:deploy --deploydir mdapiOut --wait 30` and verify that it succeeds
1. Look in the resulting `mdapiOut` directory and the `package.xml` to see that it looks as expected
1. Deploy it to the org using `sf project deploy start --metadata-dir mdapiOut --wait 30` and verify that it succeeds
1. Delete the source directory `rm -rf force-app/main/default/*`
1. Create a new scratch org and convert the source back
1. Convert back from mdapi to source format `sfdx force:mdapi:convert -r mdapiOut -d force-app`
1. `sfdx force:source:push`
1. Convert back from mdapi to source format `sf project convert mdapi -r mdapiOut -d force-app`
1. `sf project deploy start`

### Caveats

Expand All @@ -173,9 +173,9 @@ Reach out to the CLI team for help with unit tests.

If you're doing anything complex (you've used any of the following properties `strategies`, `folderType`, `inFolder=true`, `ignoreParsedFullName`, `folderContentType`, `ignoreParentName`), you'll want to add some NUTs (not-unit-tests) that verify the behavior or your types using real orgs and to prevent SDR changes from causing regressions on your types.

[This NUT](https://github.com/salesforcecli/plugin-source/blob/main/test/nuts/territory2.nut.ts) validates the behavior for a particularly bizarre metadataType, territory2.
[This NUT](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/main/test/nuts/specialTypes/territory2.nut.ts) validates the behavior for a particularly bizarre metadataType, territory2.

NUTs live in [plugin-source](https://github.com/salesforcecli/plugin-source) but run on branches to SDR.
NUTs live in [plugin-deploy-retrieve](https://github.com/salesforcecli/plugin-deploy-retrieve) but run on branches to SDR.

See [testkit](https://github.com/salesforcecli/cli-plugins-testkit) for examples and usage.

Expand Down Expand Up @@ -209,7 +209,7 @@ You can use an existing org for the metadata describe portion of the script by

## Prerequisites

1. A sfdx project must exists in local.
1. A sfdx project must exist in local.
`sf project generate --name <projectname> --default-package-dir <directory> -x`
2. An authorized devhub org must exists
`sf org login web -a <alias> -r <localhost url> -d`
Expand All @@ -235,8 +235,8 @@ You can use an existing org for the metadata describe portion of the script by
Now changes are available in local, we have to link the registry with sfdx project

8. From SDR git repo directory, run `yarn build; yarn link`
9. Clone sfdx plugins repo (https://github.com/salesforcecli/plugin-source)
10. Execute `yarn link @salesforce/source-deploy-retrieve` and `sfdx plugins:link .` from cloned plugins repo directory
9. Clone plugin repo (https://github.com/salesforcecli/plugin-deploy-retrieve)
10. Execute `yarn link @salesforce/source-deploy-retrieve` and `sfdx plugins:link .` from cloned plugin repo directory

Registry has been set for your entities, now you can run `sfdx force:source` command for your entities:
Registry has been set for your entities, now you can run (e.g.) `sf project deploy start` command for your entities:
Proceed to `Manual Testing` section above in this document.

2 comments on commit 068dba6

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 068dba6 Previous: 8cb5067 Ratio
eda-componentSetCreate-linux 200 ms 230 ms 0.87
eda-sourceToMdapi-linux 1978 ms 2364 ms 0.84
eda-sourceToZip-linux 1666 ms 1716 ms 0.97
eda-mdapiToSource-linux 3400 ms 3114 ms 1.09
lotsOfClasses-componentSetCreate-linux 371 ms 379 ms 0.98
lotsOfClasses-sourceToMdapi-linux 3597 ms 3567 ms 1.01
lotsOfClasses-sourceToZip-linux 2959 ms 2876 ms 1.03
lotsOfClasses-mdapiToSource-linux 3479 ms 3443 ms 1.01
lotsOfClassesOneDir-componentSetCreate-linux 642 ms 655 ms 0.98
lotsOfClassesOneDir-sourceToMdapi-linux 6333 ms 6422 ms 0.99
lotsOfClassesOneDir-sourceToZip-linux 5174 ms 5413 ms 0.96
lotsOfClassesOneDir-mdapiToSource-linux 6204 ms 6222 ms 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 068dba6 Previous: 8cb5067 Ratio
eda-componentSetCreate-win32 402 ms 415 ms 0.97
eda-sourceToMdapi-win32 3494 ms 3657 ms 0.96
eda-sourceToZip-win32 2669 ms 2531 ms 1.05
eda-mdapiToSource-win32 5758 ms 5694 ms 1.01
lotsOfClasses-componentSetCreate-win32 908 ms 894 ms 1.02
lotsOfClasses-sourceToMdapi-win32 7704 ms 7652 ms 1.01
lotsOfClasses-sourceToZip-win32 4851 ms 4800 ms 1.01
lotsOfClasses-mdapiToSource-win32 7557 ms 7554 ms 1.00
lotsOfClassesOneDir-componentSetCreate-win32 1463 ms 1530 ms 0.96
lotsOfClassesOneDir-sourceToMdapi-win32 13861 ms 13993 ms 0.99
lotsOfClassesOneDir-sourceToZip-win32 8542 ms 8728 ms 0.98
lotsOfClassesOneDir-mdapiToSource-win32 13541 ms 13802 ms 0.98

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.