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

Unable to perform Quick Deploy using 15 character deployment job Id #2591

Closed
rajeswaropsera opened this issue Dec 4, 2023 · 6 comments
Closed
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@rajeswaropsera
Copy link

Summary

We are getting an error while trying to run below quick deploy command using the 15 character job id. The command works fine when the 18 character id is provided. We have verified that Quick Deploy option is also visible in Salesforce under the Deployment Status page.
This behaviour is replicable from sf cli version 2.11.8 onwards.
This was not the case using sfdx cli command and we were able to perform quick deploy using either the 15 or 18 character job id.
sfdx force:source:deploy -u <username> -q <job-id-15-character>

This is breaking some of the automated pipelines we have created, and the error message that cli throws is causing confusion for all.

Steps To Reproduce

  1. Connect CLI to the Org
  2. Setup project
  3. Run the below command using a successfully validated job Id.
    sf project deploy quick -o <username> -i <job-id-15-character>

Expected result

Deploy ID: <job-id-18-character>

Deployed Source
===============================================================================
| State     Name                  Type         Path
| ───────── ───────────────────── ──────────── ────────────────────────────────
|

Successfully deployed (<deployed-job-id-18-character>).

Actual result

Error (1): No job found for ID: <job-id-15-character>

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.19.8",
  "nodeVersion": "node-v19.6.0",
  "osVersion": "Darwin 23.1.0",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.2 (core)",
    "@oclif/plugin-commands 3.0.7 (core)",
    "@oclif/plugin-help 6.0.7 (core)",
    "@oclif/plugin-not-found 3.0.4 (core)",
    "@oclif/plugin-plugins 4.1.8 (core)",
    "@oclif/plugin-search 1.0.8 (core)",
    "@oclif/plugin-update 4.1.3 (core)",
    "@oclif/plugin-version 2.0.7 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.3 (core)",
    "@oclif/plugin-which 3.0.10 (core)",
    "@salesforce/cli 2.19.8 (core)",
    "apex 3.0.6 (core)",
    "auth 3.0.7 (core)",
    "data 3.0.1 (core)",
    "deploy-retrieve 2.1.3 (core)",
    "info 3.0.3 (core)",
    "limits 3.0.2 (core)",
    "marketplace 1.0.6 (core)",
    "org 3.0.7 (core)",
    "packaging 1.27.2 (core)",
    "schema 3.0.4 (core)",
    "settings 2.0.6 (core)",
    "sobject 1.0.2 (core)",
    "source 2.11.4 (core)",
    "telemetry 3.1.2 (core)",
    "templates 56.0.2 (core)",
    "trust 3.0.4 (core)",
    "user 3.0.4 (core)",
    "sfdmu 4.30.0 (user)"
  ]
}

Additional information

  • Below is the command and the error message snapshot when using sf cli command
    image

  • Salesforce Deployment Status page, showing the job id
    image

  • Below is the snapshot of successful run using sfdx cli command
    image

  • Below is the snapshot of successful run using sf cli command after providing 18 character job Id
    image

@rajeswaropsera rajeswaropsera added the investigating We're actively investigating this issue label Dec 4, 2023
@github-actions github-actions bot added the validated Version information for this issue has been validated label Dec 4, 2023
Copy link

github-actions bot commented Dec 4, 2023

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.

@mdonnalley
Copy link
Contributor

@rajeswaropsera I was unable to reproduce this with the following and sf 2.21.1

  • clone dreamhouse-lwc repo
  • sf org create scratch --alias gh2591 --set-default --edition developer
  • sf project deploy validate -d force-app (copied 18 char id from output)
  • sf project deploy quick -i <ID> (used first 15 chars from 18 char id in previous step)

Can you provide any more details on how I might be able to reproduce it? Thanks!

@rajeswaropsera
Copy link
Author

rajeswaropsera commented Dec 6, 2023

@mdonnalley We are able to reproduce the same using v 2.21.1 as well, with multiple Orgs as well.
Please find below the snapshot, where first scenario command was provided with 15 character ID (incorrect response), and second with 18 character ID (expected result)

image

I went ahead and tried with some dummy ID as well, and looks like the error response seems to be the same (highlighted one)

image

@mdonnalley
Copy link
Contributor

@rajeswaropsera two questions:

  1. How are you validating the deploy?
  2. After validating the deploy, do you see the 18 character deploy id listed in .sf/deploy-cache.json?

@cristiand391 cristiand391 added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jan 11, 2024
Copy link

git2gus bot commented Jan 11, 2024

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

@cristiand391
Copy link
Member

cristiand391 commented Jan 11, 2024

I was able to repro this on latest sf:

  1. clone dreamhouse and create scratch org
  2. validate deployment: sf project deploy validate --async --source-dir force-app
  3. now remove the entry for this ID in the cache (~/.sf/deploy-cache.json) (this is what would happen in you validate a deploy but quick deploy it in different CI jobs)
  4. try to quick deploy it using the ID step 2 but remove the last 3 char: sf project deploy quick --target-org <org> --job-id <15-char-ID>, you get the No job found for ID err.

If do step 4 with force source deploy it works with the 15-char-ID:
sf force source deploy --target-org <org> --validateddeployrequestid <15-char-ID>

So the bug happens when you try to quick deploy to an org with a 15-char deploy ID and it's not in the local cache. plugin-deploy-retrieve is trying to resolve the short ID (15) to the long one (18) but the API doesn't seem to require that (plugin-source doesn't do that).

@mshanemc mshanemc closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

4 participants