Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow deploy report on validated deploys #962

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

WillieRuemmele
Copy link
Contributor

What does this PR do?

allows you to deploy report on a successful deployment

What issues does this PR fix or reference?

@W-15426325@

@cristiand391
Copy link
Member

cristiand391 commented Apr 5, 2024

QA notes:

setup: followed steps in WI

✅ can get a deploy report after validate -> quick deploy

BEFORE:
➜  undefined-cset-proj sf project deploy report --job-id 0AfDa00001liMDHKA2
Error (1): undefinedComponentSet

AFTER:
➜  undefined-cset-proj sf project deploy report --job-id 0AfDa00001liMDHKA2
 ›   Warning: @salesforce/plugin-deploy-retrieve is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.
0AfDa00001liMDHKA2... Succeeded

Deploy Info
===================================================
| Key                      Value
| ──────────────────────── ────────────────────────
| checkOnly                false
| completedDate            2024-04-05T19:58:31.000Z
| createdBy                005Da00000BwZlf
....

❌ getting the deploy report without the org username fails

➜  undefined-cset-proj sf config unset target-org
 ›   Warning: @salesforce/plugin-deploy-retrieve is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.
Unset Config
====================
| Name       Success
| ────────── ───────
| target-org true
➜  undefined-cset-proj sf project deploy report --job-id 0AfDa00001liMDHKA2
 ›   Warning: @salesforce/plugin-deploy-retrieve is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.
Error (10): Cannot read properties of undefined (reading 'getConnection')

the cached result doesn't store the username:

➜  undefined-cset-proj jq '."0AfDa00001liMDHKA2"' ~/.sf/deploy-cache.json
{
  "status": "Succeeded",
  "timestamp": "2024-04-05T19:58:33.136Z"
}

maybe check if neither the cache org --targe-org has any value and throw earlier? I think the undefined behavior was already present but SDR just thrown before it got used.

@WillieRuemmele WillieRuemmele requested a review from a team as a code owner April 8, 2024 14:44
@cristiand391 cristiand391 merged commit 67affbb into main Apr 8, 2024
38 checks passed
@cristiand391 cristiand391 deleted the wr/deployReportSuccess branch April 8, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants