jetstream
jetstream copied to clipboard
[WIP] Allow user to add a name to a deployment so that in history it can be…
… more easily identified
Adding new functionality that will allow users to save deployments. This should be accessible from all deployment options
resolves #331
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 88049fece0ffe4445de6e3d08189a4819f91737a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
✅ Successfully ran 1 target
Sent with 💌 from NxCloud.
@paustint I am curious what opinions you have on the current build so far. At the moment, I have it working but it feels disjointed. I have worked it out for one scenario, the Deploy to Org button.
This is how the logic gets called for displaying the deployment options:
DeploymentMetadataToOrg --> DeploymentMetadataPackageConfigModal --> DeploymentOptions
The logic gets called for displaying the deployment status:
DeploymentMetadataToOrg --> DeployMetadataPackageStatusModal --> DeployMetadataStatusModal
The logic gets passed to and from DeploymentMetadataToOrg but I can't tell if there is a better way.
I am also running into the following error for DeployMetadataToOrgConfigModal:
And into this error in DeployOptions:
Thank you in advance!
@joiecosby - I didn't review everything in full detail, but here are some thoughts:
It really does not feel right to add deploymentHistoryName to export interface DeployResult { since that should truly represent the data that Salesforce returns - I think we can remove this.
I would probably do something like this (I did not do a full analysis, just a cursory glance)
Basically just store the name locally wherever it is needed, and then pass it along with the function call to initiate the deployment (basically everywhere saveHistory({ is called)
// deploy-metadata.utils.tsx
export async function saveHistory({
...
deployOptions: DeployOptions;
+/** Optional name to use for history */
+name?: string;
...
}) {
// there are a few places very similar to this
// useDeployMetadata....tsx
-const deployMetadata = useCallback(async () => {
+const deployMetadata = useCallback(async (deploymentHistoryName?: string) => {
saveHistory({
...
+name: deploymentHistoryName,
...
});
Notes from pair programming:
- Change defining deploymentHistoryName as string | null and instead define as Maybe
- Remove logic adding deploymentHistoryName to DeployResults instead wherever saveHistory() is being referenced, add the logic inside there
- Make sure that we are including the logic for change set scenario and delete metadata scenario.
☁️ Nx Cloud Report
CI is running/has finished running commands for commit cd7749719b85ea6a3e54d41e074fe27b4bb4cde8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
| 🟥 Failed Commands |
|---|
nx run-many --target=build --parallel=3 --projects=jetstream,api,download-zip-sw,landing --configuration=production |
Sent with 💌 from NxCloud.