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

Cannot specify org for 'project deploy report' command #2078

Closed
thomasminney opened this issue Apr 18, 2023 · 12 comments
Closed

Cannot specify org for 'project deploy report' command #2078

thomasminney opened this issue Apr 18, 2023 · 12 comments
Labels
feature Issue or pull request for a new feature

Comments

@thomasminney
Copy link

Summary

'force:mdapi:deploy:report' command allowed --targetusername argument to specify the org the deloyment job id was for.

There is no such argument for 'project deploy report'.

Steps To Reproduce:

Run sfdx project deploy report --job-id <a job id> --target-org <myorg>

Expected result

Returns deployment report for job id in the given org

Actual result

Returns error:

Error (1): Nonexistent flag: --target-org

If no org is given, and either no default org is set or the default org is not the one the job id is for, then get error: Error (1): No job found for ID: <a job id>.

System Information

  • Which shell/terminal are you using? cmd.exe

{
"cliVersion": "sfdx-cli/7.196.8",
"architecture": "win32-x64",
"nodeVersion": "node-v18.15.0",
"osVersion": "Windows_NT 10.0.22621",
"shell": "cmd.exe",
"rootPath": "C:\Users\thomasminney\AppData\Local\sfdx\client\7.196.8-16a11d1",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.1.8 (core)",
"@oclif/plugin-commands 2.2.13 (core)",
"@oclif/plugin-help 5.2.9 (core)",
"@oclif/plugin-not-found 2.3.23 (core)",
"@oclif/plugin-plugins 2.4.4 (core)",
"@oclif/plugin-search 0.0.15 (core)",
"@oclif/plugin-update 3.1.9 (core)",
"@oclif/plugin-version 1.3.2 (core)",
"@oclif/plugin-warn-if-update-available 2.0.33 (core)",
"@oclif/plugin-which 2.2.18 (core)",
"apex 2.2.10 (core)",
"auth 2.7.11 (core)",
"community 2.2.9 (core)",
"custom-metadata 2.1.11 (core)",
"data 2.3.9 (core)",
"deploy-retrieve 1.8.12 (core)",
"info 2.6.4 (core)",
"limits 2.3.12 (core)",
"org 2.6.12 (core)",
"packaging 1.16.3 (core)",
"schema 2.3.6 (core)",
"settings 1.4.3 (core)",
"signups 1.4.11 (core)",
"source 2.9.4 (core)",
"telemetry 2.1.3 (core)",
"templates 55.4.5 (core)",
"trust 2.4.6 (core)",
"user 2.3.7 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"sfdx-cli 7.196.8 (core)"
]
}

@thomasminney thomasminney added the investigating We're actively investigating this issue label Apr 18, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@WillieRuemmele
Copy link
Member

Hey @thomasminney - I had to go look at the code for this one https://github.com/salesforcecli/plugin-deploy-retrieve/blob/main/src/commands/project/deploy/report.ts#L58... we cache the org's username, and so when you pass it a deploy ID, it's able to correlate those two together to query the proper org

It seems like there still might be a bug there though

@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Apr 18, 2023
@git2gus
Copy link

git2gus bot commented Apr 18, 2023

This issue has been linked to a new work item: W-13055667

@gdman
Copy link

gdman commented Apr 27, 2023

What if I want to do a an org report for a deployment I didn't initiate?

How about, if there is a target-org specified use it, else try to find it in the cache.

@mshanemc
Copy link
Contributor

mshanemc commented May 3, 2023

if you didn't initiate the deployment, how do you get the deploy Id @gdman ?

@gdman
Copy link

gdman commented May 4, 2023

I can't think of a recent time where I've wanted to get a deployment report so it's probably not something that would cause an issue. Just feels like it would be trivial to add the argument for consistency with other commands and keep options open.

I guess a possible scenario is that a deployment has run on a CI server or someone elses machine and I might want to get the raw deploy report locally. That wouldn't be possible as the Id wouldn't be in my local cache so it wouldn't know which org to use. Sometimes a deployment will fail but the output from the deploy command doesn't show any errors - one example of this is coverage errors. Being able to run a report and grab the raw JSON gives the full details on whats wrong.

@thomasminney
Copy link
Author

Yes passing the deployment report and its code coverage details to a static code analyser is an important use case for us. In our pipeline we do not necessarily run a new deployment run every time a change is submitted to the analyser.

@mshanemc mshanemc added feature Issue or pull request for a new feature and removed bug Issue or pull request that identifies or fixes a bug labels May 9, 2023
@github-actions
Copy link

github-actions bot commented May 9, 2023

Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

@git2gus
Copy link

git2gus bot commented May 9, 2023

This issue has been linked to a new work item: W-13176049

@scottlee-symmetry
Copy link

Would just like to mention that my org is also affected by this and we have the exact use case: we need to be able to kick off a job on one virtual machine CI run, and then circle back to report on its status in a target org. The VM instance drops out and doesn't store anything to disk... so instead we store that data in a database and then need the CLI to have the ability to retrieve that job Id's information.

@mshanemc
Copy link
Contributor

@scottlee-symmetry @thomasminney @gdman
can I get y'all's feedback on this discussion? I'd like to solve this use case #2300

@ethan-sargent
Copy link

@mshanemc how come this issue's been closed?
I'm still experiencing this issue when trying to use a deploy ID from a CI job on my local machine to test moving from the older force:source commands, is there supposed to be a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue or pull request for a new feature
Projects
None yet
Development

No branches or pull requests

6 participants