Closed GMlynda closed 1 week 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.
Hello @GMlynda :wave: It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json
for the CLI you're using (sf
or sfdx
).
A few more things to check:
rc
or nightly
versions. (docs)doctor
command to diagnose common issues.Thank you!
version was the most recent - run install in gitlab pipeline via npm command: npm install @salesforce/cli --global
gitlab-ci-master.txt I think I've got the yaml file attached now - not sure what else I need to change to get this work
ok, fixed Environmental Variables and I got further but now I'm getting the same SHA mismatch error again: Error (1): Metadata API request failed: An internal error caused this command to fail. isomorphic-git error: SHA check failed! Expected 2c75a36d67d49f7b3ff0d4df81ca73af3d906095, computed f75b07721a53832b21ed837c7589cb71b3a784c8 Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit code 1
What is the CLI issue you're reporting? From your last post I see this error:
Error (1): Metadata API request failed: An internal error caused this command to fail. isomorphic-git error:
SHA check failed! Expected 2c75a36d67d49f7b3ff0d4df81ca73af3d906095, computed f75b07721a53832b21ed837c7589cb71b3a784c8
That could result from a deployment using an older version of the CLI. Recent CLI versions have fixed this error. I would ensure that the version of the CLI is indeed latest as you state: npm install @salesforce/cli --global
. Before running commands I would output the result of running sf version --verbose
and make sure it's what you expect. What was the command run to cause that error?
When updating from an older CLI (sfdx v7 or sf v1) to the latest I would reference this doc: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm and this doc: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_migrate.htm
If you're using a custom plugin and linking it to your installed CLI then I would ensure it's been updated to work with the latest Salesforce CLI versions and plugins. Ensure the plugin is built either before or after linking it.
Pretty sure at this point its because the custom plugin is not using the most recent version of the CLI but I'm not figuring out how to update it to get it there so I'm pretty stuck and at this point we're probably going to have to just release everything from the unlocked packages in our org so I can do deployments via the CLI until I get GearSet up and running. Unless you cam recommend someone I can reach out to who is familiar with moving custom plug in to the newer CLI cuz I'm not familiar with what it was written in or how to update it.
@GMlynda Is this the plugin that's failing: sfdx-gm-plugin
? Is that internal? Do you know what it does? Maybe worth removing it from your workflow or finding an alternative.
yes that's the plug in - it is internal (but was created way before I got here in January). I know it creates the scratch org and then makes sure the source and the source for those packages listed as dependencies in the package.json are installed in it - if I understand how to do that latter part using just commands in the SF CLI I could probably do without it but I haven't been able to figure that part out.
sorry I mean the sfdx-project.json
I'm fairly certain you can do all that with sf org create scratch
.
100% certain the sf org create scratch gives me a shell and I have to get the source code for each package I need in it and since each of the different packages has different dependencies (with are in the sfdx-project.json but don't include the installationkey for them) that I need some kind of plug in to help me but I'm really not understanding how to use those - plus this all has to be in the yaml file (or in a plug in that can be run from the yaml file for gitlab pipelines)
If the error you reported is coming from your internal plugin then this isn't a CLI issue; it's a plugin issue.
There are 2 approaches I can think of.
@salesforce/plugin-source
. If that's the case, use @salesforce/plugin-deploy-retrieve
instead.sf plugins discover
.This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.
Summary
tried updating the pipeline to the newest version of the SF CLI but now getting another error and the messaging just isn't clear - also there was a custom plugin created that I have no idea how to update
Steps To Reproduce
Expected result
Actual result
System Information
Additional information
This is the current version of the yaml file: image: "node:latest" cache: key: ${CI_COMMIT_REF_NAME} paths:
#
GitLab CI/CD Pipeline for deploying DreamHouse App on Salesforce DX
# before_script:
Clone salesforce server key repository
Decrypt server key
Install jq and npm
Setup SFDX environment variables
Install Salesforce CLI
stages:
#
Check code quality
# code-quality: stage: code-quality allow_failure: false script:
#
Run tests
# run-tests: stage: run-tests script:
install dependency plugin
This is where the job fails (log attached): $ cd .. $ sf plugins link sfdx-gm-plugin (node:1773) Warning: Deprecated environment variable: SFDX_USE_GENERIC_UNIX_KEYCHAIN. Please use SF_USE_GENERIC_UNIX_KEYCHAIN instead. (Use
node --trace-warnings ...
to show where the warning was created) (node:1773) Warning: Deprecated environment variable: SFDX_AUTOUPDATE_DISABLE. Please use SF_AUTOUPDATE_DISABLE instead. (node:1773) Warning: Deprecated environment variable: SFDX_DOMAIN_RETRY. Please use SF_DOMAIN_RETRY instead. (node:1773) Warning: Deprecated environment variable: SFDX_LOG_LEVEL. Please use SF_LOG_LEVEL instead. @salesforce/cli: Linking plugin sfdx-gm-plugin... done $ sf org login jwt --client-id $SF_CONSUMER_KEY --jwt-key-file salesforce-ci/assets/server.key --username $SF_USERNAME --set-default-dev-hub --alias HubOrg (node:1808) Warning: Deprecated environment variable: SFDX_USE_GENERIC_UNIX_KEYCHAIN. Please use SF_USE_GENERIC_UNIX_KEYCHAIN instead. (Usenode --trace-warnings ...
to show where the warning was created) (node:1808) Warning: Deprecated environment variable: SFDX_AUTOUPDATE_DISABLE. Please use SF_AUTOUPDATE_DISABLE instead. (node:1808) Warning: Deprecated environment variable: SFDX_DOMAIN_RETRY. Please use SF_DOMAIN_RETRY instead. (node:1808) Warning: Deprecated environment variable: SFDX_LOG_LEVEL. Please use SF_LOG_LEVEL instead. (node:1808) [DEP0040] DeprecationWarning: Thepunycode
module is deprecated. Please use a userland alternative instead. (node:1808) Warning: Closing file descriptor 18 on garbage collection (node:1808) [DEP0137] DeprecationWarning: Closing a FileHandle object on garbage collection is deprecated. Please close FileHandle objects explicitly using FileHandle.prototype.close(). In the future, an error will be thrown if a file descriptor is closed during garbage collection. Error: default level:INFO must be included in custom levels Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit code 1