forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
485 stars 78 forks source link

sf package version create takes long time for 60.0 source api version #2680

Closed mohan-raheja closed 7 months ago

mohan-raheja commented 7 months ago

Note Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

I'm using the External Credential component in my package, for that I want build the package version using sourceapiVersion as 60.0 in the package.xml, but it takes or not progressing for long time.

Steps To Reproduce

IMPORTANT Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue. can't share it as it as a private repo

We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Expected result

package version. should be created

Actual result

Not able to create the package version

System Information

zsh
sf version --verbose --json
{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.25.7",
  "nodeVersion": "node-v20.10.0",
  "osVersion": "Darwin 23.1.0",
  "rootPath": "/Users/cccc/.local/share/sf/client/2.25.7-b42201f",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.5 (core)",
    "@oclif/plugin-commands 3.1.1 (core)",
    "@oclif/plugin-help 6.0.12 (core)",
    "@oclif/plugin-not-found 3.0.9 (core)",
    "@oclif/plugin-plugins 4.1.17 (core)",
    "@oclif/plugin-search 1.0.12 (core)",
    "@oclif/plugin-update 4.1.8 (core)",
    "@oclif/plugin-version 2.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.9 (core)",
    "@oclif/plugin-which 3.0.15 (core)",
    "@salesforce/cli 2.25.7 (core)",
    "apex 3.0.18 (core)",
    "auth 3.3.2 (core)",
    "data 3.0.16 (core)",
    "deploy-retrieve 3.2.0 (core)",
    "functions 1.22.11 (user)",
    "info 3.0.17 (core)",
    "limits 3.1.4 (core)",
    "marketplace 1.0.16 (core)",
    "org 3.3.5 (core)",
    "packaging 1.20.1 (user)",
    "schema 3.1.0 (core)",
    "settings 2.0.17 (core)",
    "signups 2.0.17 (user)",
    "sobject 1.1.2 (core)",
    "source 3.1.5 (core)",
    "telemetry 3.1.10 (core)",
    "templates 56.0.10 (core)",
    "trust 3.3.2 (core)",
    "user 3.2.3 (core)",
    "@salesforce/sfdx-scanner 3.20.0 (user)"
  ]
}

Additional information

Ran the below command on my project

sf package version create -p "sample" -d force-app --wait 20 --target-dev-hub devhub_salesforce -x --code-coverage › Warning: Plugin @salesforce/plugin-packaging (1.20.1) differs from the version specified by sf (2.1.1) Warning: Starting in v59.0 or later, specifying both the --package and --path flag will no longer be supported. Only one is required. Version create.... ⣾ 02 minutes remaining until timeout. Create version status: Initializing

My package.xml

{ "packageDirectories": [ { "path": "force-app", "default": true, "package": "hidden", "versionName": "ver 0.1", "versionNumber": "0.1.0.NEXT", "versionDescription": "" } ], "name": "hidden", "namespace": "everstage", "sfdcLoginUrl": "https://login.salesforce.com", "sourceApiVersion": "60.0", "packageAliases": { "hidden": "0Hoan000CAI" } }

External credential

<?xml version="1.0" encoding="UTF-8" ?>
<ExternalCredential xmlns="http://soap.sforce.com/2006/04/metadata">
    <authenticationProtocol>Custom</authenticationProtocol>
    <externalCredentialParameters>
        <parameterGroup>Auth Secret Key</parameterGroup>
        <parameterName>Auth Secret Key</parameterName>
        <parameterType>NamedPrincipal</parameterType>
        <sequenceNumber>1</sequenceNumber>
    </externalCredentialParameters>
    <externalCredentialParameters>
        <parameterGroup>DefaultGroup</parameterGroup>
        <parameterName>Authorization</parameterName>
        <parameterType>AuthHeader</parameterType>
        <parameterValue
    >{!&apos;Bearer &apos; &amp; $Credential.callout.secretKey}</parameterValue>
        <sequenceNumber>1</sequenceNumber>
    </externalCredentialParameters>
    <label>API Credentials</label>
</ExternalCredential>
github-actions[bot] commented 7 months ago

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.

mshanemc commented 7 months ago

this warning

Warning: Plugin @salesforce/plugin-packaging (1.20.1) differs from the version specified by sf (2.1.1) and "packaging 1.20.1 (user)",

are trying to tell you that at some point you installed a version of the packaging plugin manually (that's 7 months old!)

Run sf plugins uninstall packaging to uninstall it, so that you're using the current one that ships with the CLI. Then report back in a new issue (since you'll have new versions of things) if you still have problems.