Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

feat(validate): do not delete scratch org when there is no package to be built - #972

Merged
azlam-abdulsalam merged 10 commits into
developfrom
issue/971
May 9, 2022
Merged

azlam-abdulsalam merged 10 commits into
developfrom
issue/971

Conversation

@azlam-abdulsalam

@azlam-abdulsalam azlam-abdulsalam commented May 7, 2022 •

Copy link
Copy Markdown
Contributor

Description

fix #971, set status back to available for a scratch org in case build fails or there is nothing to deploy

Checklist

All items have to be completed before a PR is merged

  • Adhere to Contribution Guidelines
  • Updates to Decision Records considered?
  • Updates to documentation at DX@Scale Guide considered?
  • Tested changes?
  • Unit Tests new and existing passing locally?

@azlam-abdulsalam
azlam-abdulsalam requested review from aly76 and vuha-acn May 7, 2022 07:31
@codecov-commenter

codecov-commenter commented May 7, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #972 (01f8c6a) into develop (688c807) will increase coverage by 22.79%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           develop     #972       +/-   ##
============================================
+ Coverage    63.81%   86.60%   +22.79%     
============================================
  Files           49        8       -41     
  Lines         1495      209     -1286     
  Branches       315       50      -265     
============================================
- Hits           954      181      -773     
+ Misses         504       28      -476     
+ Partials        37        0       -37     
Impacted Files Coverage Δ
packages/core/src/project/ProjectConfig.ts
.../core/src/apex/coverage/IndividualClassCoverage.ts
packages/core/src/apextest/ApexTestSuite.ts
packages/core/src/utils/xml2json.ts
packages/core/src/apex/ApexTriggerFetcher.ts
packages/core/src/stats/SFPStatsSender.ts
...ages/core/src/apexLinkWrapper/ApexLinkCheckImpl.ts
...c/package/packageCreators/CreateDataPackageImpl.ts
packages/core/src/git/GitTags.ts
...re/src/permsets/PermissionSetGroupUpdateAwaiter.ts
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 688c807...01f8c6a. Read the comment docs.

@azlam-abdulsalam azlam-abdulsalam added this to the Release - May 2022 milestone May 9, 2022
@azlam-abdulsalam
azlam-abdulsalam merged commit 9d28102 into develop May 9, 2022
@azlam-abdulsalam
azlam-abdulsalam deleted the issue/971 branch May 9, 2022 06:32
azlam-abdulsalam added a commit that referenced this pull request May 20, 2022
* revert(coverage): Fail Package validation if low coverage (#941)

Revert back to normal behaviour, as coverage calculation is stable with retries

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(release-title): update release title to May22

* feat(fast-feedback): experimental mode for faster feedback during validate (#945)

* feat(fast-feedback): experimental mode for faster feedback during validate

experimental feature: Add option which would help validate command to provide validation using

- Deploy only changed components of a changed package
- Trigger only testclasses for impacted classes
- Skip coverage validation
- Skip package dependencies installation

Utilize a hidden flag 'fastfeedback', this feature may be revoked at any time and should be considered unstable

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(validateimpl): fast feed back testing to respect testMode set in package

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]

* fix(apex-tests): ensure retry is available for all types of test modes

* fix(validate): fix headers being incorrectly displayed when there is no impacted test classes

* refactor(validate): use constants declared in core lib instead of hardcoding

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(dependencies): update @salesforce/core to 2.36.0

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(impacted-apex): add further conditions to impacted test class

- add test classes when it is changed
 -add all test classes to invalidated, when security model
changes

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(impacted-apex): use array concat instead of push, as it pushes whole array as a new element

* feat(validateimpl): add a env variable to support debugging

provide an env variable 'SFPOWERSCRIPTS_DEBUG_PREFETCHED_SCRATCHORG' to support during debugging
fetch. This allows to skip a new org from fetched from the pool

* fix(install-source): remove warning around selective, as its currently only used during fastfeedback

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* refactor(trigger-apex-tests): converge writing junit into write block and remove redundant write

* feat(docker): add apex-link to docker image

* refactor(apex-tests): refactor to make it readable and fix related bugs

Refactor trigger logic to make it readable, fix the following issues as well
 1. Handle Tests with
multiple results
 2. Skip retrieving coverage when not requested \3.Split into smaller functions

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* refactor(fast-feedback): move fast feedback from using env variable to a deployment type

* feat(fast-feedback): add fast feedback support in ValidateAgainstOrg

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(scripts): fix paths to pre and post deployment scripts when executed without repository (#954)

scripts paths is always pointed to one in the repository, rather than in the artifacts. This started
surfacing as the deploy impl generates a version of source package again from the provided artifact
(this is being refactored).

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(scripts): fix the incorrect fix to paths to pre and post

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix: predeployment script path

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix: upgrade semver from 7.3.5 to 7.3.6 (#956)

Snyk has created this PR to upgrade semver from 7.3.5 to 7.3.6.

See this package in npm:
https://www.npmjs.com/package/semver

See this project in Snyk:
https://app.snyk.io/org/azlam-abdulsalam/project/05b6b6d2-ba3e-421a-b920-224a7c9e0896?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade semver from 7.3.5 to 7.3.6 (#956)

Snyk has created this PR to upgrade semver from 7.3.5 to 7.3.6.

See this package in npm:
https://www.npmjs.com/package/semver

See this project in Snyk:
https://app.snyk.io/org/azlam-abdulsalam/project/05b6b6d2-ba3e-421a-b920-224a7c9e0896?utm_source=github&utm_medium=referral&page=upgrade-pr

* refactor/sfpPackage (#964)

* refactor(sfppackage): refactor to use sfppackage

* refactor(fast-feedback): migrate fastfeedback to build as opposed to validate building after success

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* feat(deploy): add additional log with trace level

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]

* fix(artifacts): remove temp directories before packaging artifact

* fix(publish): fix issue when publishing artifacts bigger than 5 MB

fix #967

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(deploy): fix crash when skipIfInstall is used with deploy

* fix(test-options): fix lodash import

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(changelog): fix crash in changelog due to incorrect usage of sourceVersionFrom

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(package-test-coverage): fix matching of package type

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* refactor(packagetype): move to an enum for packageType

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(package-type): fix issues with overriding packageType during validate

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(deploy): override package type in validate mode

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]

* fix(sfpackagebuilder): ignore diff computation on any error

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* [CodeFactor] Apply fixes to commit cea880f (#969)

Co-authored-by: codefactor-io <[email protected]>

* fix(fast-feedback): fix multiple issues with package diff creation

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* refactor(sfppackagebuilder): remove usage of ChangeComponent and rather use componentSet directly

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(install-source): skip reconcile if no profiles are found in diff package

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(changedcomponents): revert to an earlier version,as its no longer used by fast feedback

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(dependencies): update @salesforce/core to 2.36.1

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(dependencies): update marked to 4.0.14

* chore(dependencies): update semver to 7.3.6

* chore(dependencies): update @oclif/plugin-help to 5.1.12

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(dependencies): update source-deploy-retrieve to 5.12.13

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(apex-tests): do not replace coverage when coverage is not requested

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* feat(validate): do not delete scratch org when there is no package to be built (#972)

* feat(validate): do not delete scratch org when there is no package to be built

fix #971

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* chore(dependencies): update sfdc-soup to 18.2.1

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(fast-feedback): fix and refactor impacted test class selection

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]

* fix(log): fix time displayed as well as packages desplaying undefined keys

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(scratchorg-info-assigner): fix incorrect use of async-retry

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(get-formatted-time): fix get formatted time to use milliseconds

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(pool): fix issues while returning scratch org to pool

the code was using incorrect Id of the scratch org.. this fixes to the correct id, However its is
still dependent on pre-requisite pool package

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(data-pkg): fix vlocity package being incorrectly returned as empty

* fix(install-source): packages are committed even when push fails

fix issue where packages are committed to the org even when push fails to deploy, as error was
incorrectly handled

* feat(fast-feedback): fast feedback to skip packages from validation when descriptor changes

validate will validate the full package when the descriptor of the package changes. Most often the
change is in a version number, and this triggers full deployment and testing, in fast feedback mode,
this could be skipped. This has a negative issue when additonal orchestrator parameters are added
like assignPermissionSets etc, this could be validated in a thorough mode

* feat(fast-feedback): unhide fast-feedback and display info in header

* feat(reconcile): enhance how reconcile is handled during fast feedback

* docs(dr): add a dr on fast feedback

* chore(sfpowerkit): update sfpowerkit to 4.2.7

* fix(alias): fix aliasified packages using username instead of alias

Fix aliasified packages t use aliases instead of username. Refactor to utilize sfpOrg as opoosed to
passing targetusername

* fix(install-package): fix import casing

* chore(dockerfile): update sfpowerkit to 4.2.8

* fix(creation-metrics): fix package creation metrics reporting

package metrics during creation is not sending the flag whether its used with build or quickbuild,
added an additional metric to deprecate package.elapsed.time in the future

* chore(dependencies): update @salesforce/core to 2.36.3

* fix(dependencies): update import of core to same version in core

* fix(package-lock): sync package lock across

* Add chunking to ApexClassFetcher, ApexTriggerFetcher and ACCG Fetcher (#953)

* Add chunking to ApexClassFetcher, ApexTriggerFetcher and ACCG Fetcher

* Fix return values

Co-authored-by: Azlam <[email protected]>

* fix(fast-feedback): fix All tests  getting triggered when invalidated test class was not found

* Update 002-fast-feedback.md

Fixed typos and minor edits to wording for better flow.

* fix(publish): create tags when atleast one package is published

fix a bug when a tag when the same package would have been published

* fix(fast-feedback): add warning message when tests are skipped due to a full package being deployed

* fix(install-package): fix logs to show 'default' when aliasifed folder is not found

* fix(fast-feedback): add additional logs about selective components utilized in fast feedback

* fix(validate): add error to display when validate fails for anyother reason

* fix(validate): remove erroneous json stringify on error message

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]

* chore(dependencies): update simple-git to 3.7.1

* chore(publish): update versions and publish to npm

 - @dxatscale/[email protected]
 - @dxatscale/[email protected]
 - @dxatscale/[email protected]

* fix(git): use command to fetch git remote instead of simple-git

* fix(git): fix git related issues on docker

- Rollback change made earlier to simple-git
  - Use pinned version of heroku docker image as this
version seems not to have the issue. This will be analyzed in a future release

Co-authored-by: Alan Ly <[email protected]>
Co-authored-by: Snyk bot <[email protected]>
Co-authored-by: codefactor-io <[email protected]>
Co-authored-by: Alan Ly <[email protected]>
Co-authored-by: Vu Ha <[email protected]>
@azlam-abdulsalam azlam-abdulsalam removed this from the Release June 2022 milestone Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants