Replies: 10 comments 20 replies
-
Hey @mshanemc - this sounds like a reasonable solution. I would add that we'd also want to be able to do this with deploys and not just validations - I'm not sure if that works exactly the same way under the hood minus a flag here or there, or something similar. |
Beta Was this translation helpful? Give feedback.
-
I think
I'd like to understand this a bit better. The alternative to
I'm authorising with
I'm getting the jobId from the tl;dr The cache is nice, but shouldn't be a source of truth. The org is the source of truth. If a deploy id isn't in the cache, just query the org. And return the new job id when doing Sidenote: I find it really weird that |
Beta Was this translation helpful? Give feedback.
-
I have got part way towards achieving my expected behaviour with the following patch. Unfortunately I still get undefinedComponentSet during the |
Beta Was this translation helpful? Give feedback.
-
I want to add my two cents here because the path from sfdx -> sf and these new changes has me frustrated at the CLI consistency. We almost exclusively use SF CLI commands in CI/CD and not locally. The latest changes seem to be geared heavily to local development for small teams and not enterprise workflows. CLI commands should not be dependent on filesystem information. I believe all commands should accept parameter's for the org for extensibility within complex CI/CD pipelines. It seems common in the CLI space to align closely to the REST service, but I've found this sf change seems further from the Salesforce REST service. |
Beta Was this translation helpful? Give feedback.
-
@mshanemc you could add a new env variable which let us control where the global cache is stored SF_GLOBAL_CACHE_PATH. this way we configure our cicd pipelines to cache and restore this path when running workflows on different machine. |
Beta Was this translation helpful? Give feedback.
-
Why the --target-org is not going to be available in The ❯ sf project deploy report --job-id 0Af1q00001fUUDcCAO
0Af1q00001fUUDcCAO... InProgress
Deploy Info
===================================================
| Key Value
| ──────────────────────── ────────────────────────
| checkOnly true
| createdBy 0053W000000SkTN
| createdByName MIGUEL NUÑEZ DIAZ-MONTES
| createdDate 2023-09-05T11:59:53.000Z
| done false
| id 0Af1q00001fUUDcCAO
| ignoreWarnings true
| lastModifiedDate 2023-09-05T11:59:58.000Z
| numberComponentErrors 0
| numberComponentsDeployed 1
| numberComponentsTotal 1
| numberTestErrors 0
| numberTestsCompleted 0
| numberTestsTotal 0
| rollbackOnError true
| runTestsEnabled true
| startDate 2023-09-05T11:59:53.000Z
| status InProgress # 😵💫
| success false Also ❯ sf project deploy resume --job-id 0Af1q00001fUUJUCA4
Error (1): Job ID 0Af1q00001fUUJUCA4 is not resumable with status Succeeded. # error and succeded in the same line 😵💫 |
Beta Was this translation helpful? Give feedback.
-
Good news! - I believe everything discussed in this thread has been addressed and is in the CLI release candidate published about an hour ago. sf v2.11.7. See the release notes here or run |
Beta Was this translation helpful? Give feedback.
-
@mnunezdm - sf v2.11.8 is now available as the CLI release candidate and I verified it has the updated |
Beta Was this translation helpful? Give feedback.
-
sf v2.11.8 is now the production version. Everything in this thread should be addressed in that version, but as always let us know if it isn't. Big thanks to everyone involved in getting this implemented! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
project deploy quick
is meant to followproject deploy validate
.validate
stores information about the deployment (deployId, orgId) in sf's DeployCache~/.sf/deployCache.json
so that quick can be run using--use-most-recent
and not require an ID.We've seen some open issues around this change, where people want to run these at different times from different machines that don't share a filesystem but somehow passing the
job-id
around.One proposed design would be for quick to have a new 3rd option where we'd add a
--target-org
flag--use-most-recent
will read from the deployCache (current behavior)--job-id
will read from the deployCache (current behavior)--job-id
and it's not in the cache, BUT you also supplied the target org flag, attempt to run the quick deployment against the specified org. Throw if thetarget-org
is undefined.copy the same logic for
project:deploy:report
. This would work with any deployId, not just ones produced bydeploy validate
caveat
We would not extend this behavior to the
deploy:resume
command. That's meant to deal with other scenarios like keeping source tracking files correct after a deployment timeout/interruption that wouldn't be valid on the "do it from different machines" use case.alternatives:
since you're having to share the jobId (deploy id) anyway, why not share the rest of the information with it?
a way to make the deployCache more portable (ex
project deploy get
to read the cache file, andproject deploy set
to set the cache file in the new place. Then you'd be passing the full json between systems.Or we add the deployCache information to the validate/deploy output so that you can send it to the new place using the scripting tools of your choice.
reference issues:
#2293 (this one takes a bit to get to the root issue)
#2297
#2078
Beta Was this translation helpful? Give feedback.
All reactions