Skip to main content

🚀 New Feature: Async Validation 🚀

 

Unlocked & 2GP Managed Package developers, we're excited to introduce Async Validation on package version creates to speed up your development process!

 

➕ Key Benefits:

 

  • Speed: Get an installable package version quicker than with the default, synchronous process.
  • Efficiency: Start post-package creation steps while validations & Apex tests are in progress.
  • Ease: Easily add this to your CI workflows.

 

💻 How to Use:

Include the --async-validation parameter:

 

sf package version create --async-validation <rest of command syntax>

 

✔️ To check validation status, use the request ID provided by the above command's output:

 

sf package version create report --package-create-request-id 08cxx

 

⏰ When to use: Almost always (unless you have no need to promote the version, in which case, consider using --skip-validation). Seriously. Do you have a reason not to? Let us know!

 

Want more detail? Check out the new Async Validation section of this doc (scroll down).

 

🤔 Feedback? Please let us know in thread 🧵⬇️

14 件のコメント
  1. 2024年10月30日 19:12

    Hi @James Quinn, thanks for the followup!

     

    Enabling promotion of package versions using scratch org snapshots would improve package version creation time for our (longer-running) feature packages.

    Below I have attached the package version creation metrics for the same packages as in my previous post, using scratch org snapshots:

     

    core package

    3 dependencies:Hi , thanks for the followup! Enabling promotion of package versions using scratch org snapshots would improve package version creation time for our (longer-running) feature packages.Average: 10.5 minutes, 3 minutes longer than without snapshot due to longer build org provisioning (snapshot orgs have significantly longer provisioning times)

     

    feature package

    Our longest running feature package, having 5 managed package dependencies and 5 unlocked dependencies:Screenshot 2024-10-30 at 19.25.11.pngAverage: 17 min, half the time compared without snapshots

     

    Average feature package creation time using snapshots

    • Initializing take 8 minutes on average
    • Verifying Dependencies takes ≈ 3 minutes
      • Note that there are still dependencies to install as our core packages change too frequently to be included in snapshots
    • Verifying Metadata takes ≈ 1-3 minutes

    Thus, for many of our feature packages, the reduction in verifying dependencies stage is currently not compensating for the increase in build org provisioning stage. The more dependencies a feature package has, the better snapshots improves performance. Thus, for our 50 feature packages, 40% of them yields faster creation times (≈ 4 min) with snapshots. And 10% of these has 10+ min faster creation.

    It could go much faster if snapshot orgs could be pre-provisioned, something I brought up on Rohit's webinar. I recall him stating that they are looking into it, but it's probably not the first priority.

     

    To summarize, being able to promote package versions would certainly help for ≈ 40% of our packages. And I hope this will be supported in the future. If snapshot orgs also could be pre-provisioned the remove/reduce the initialization stage, then that could be a powerful & viable alternative to my feature request for --async-validation

    However, given the current state of snapshots, being able to get a package version within 30 seconds after PR merge (using -skip--validation like functionality), install it in our QA sandbox, execute automated UI & Integration tests and get a production-ready package (asynchronously), all within 12-13 minutes on average, is the fastest and most likely alternative.

     

    Here's the Idea btw.

0/9000