Skip to content

Commit a4e7313

Browse files
authored
v1.7.26 - Too Many Queueable Jobs Added Bugfix (#719)
* Fixes an issue found while investigating #629 * Update dependencies and fixed an issue where the sf bummer plugin would not run properly during packaging
1 parent 5e76cd8 commit a4e7313

File tree

10 files changed

+16229
-36277
lines changed

10 files changed

+16229
-36277
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ jobs:
7272
java-version: '17'
7373

7474
- name: Install & run SFDX Scanner
75-
run: |
76-
npx sf plugins install code-analyzer
77-
npm run scan
75+
run: npm run scan
7876

7977
# Authenticate using JWT flow
8078
- name: 'Auth to dev hub'
@@ -119,7 +117,9 @@ jobs:
119117
- name: 'Package & Promote'
120118
shell: pwsh
121119
if: ${{ env.SHOULD_CREATE_AND_PROMOTE == '1' && github.actor == github.event.repository.owner.login && (github.base_ref == 'main' || github.ref == 'refs/heads/main') }}
122-
run: '. ./scripts/build-and-promote-package.ps1'
120+
run: |
121+
echo y | npx sf plugins install @jongpie/sfdx-bummer-plugin
122+
. ./scripts/build-and-promote-package.ps1
123123
env:
124124
SHOULD_CREATE_AND_PROMOTE: ${{ secrets.SHOULD_CREATE_AND_PROMOTE }}
125125

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ As well, don't miss [the Wiki](../../wiki), which includes even more info for co
2424

2525
## Deployment & Setup
2626

27-
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syBeIAI">
27+
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syC8IAI">
2828
<img alt="Deploy to Salesforce" src="./media/deploy-package-to-prod.png">
2929
</a>
3030

31-
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syBeIAI">
31+
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syC8IAI">
3232
<img alt="Deploy to Salesforce Sandbox" src="./media/deploy-package-to-sandbox.png">
3333
</a>
3434
<br/>

package-lock.json

Lines changed: 16199 additions & 36250 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apex-rollup",
3-
"version": "1.7.25",
3+
"version": "1.7.26",
44
"description": "Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.",
55
"repository": {
66
"type": "git",
@@ -11,16 +11,15 @@
1111
"devDependencies": {
1212
"@jongpie/sfdx-bummer-plugin": "^0.0.20",
1313
"@lwc/eslint-plugin-lwc": "3.2.0",
14-
"@prettier/plugin-xml": "3.4.1",
15-
"@salesforce/cli": "2.75.5",
14+
"@prettier/plugin-xml": "3.4.2",
15+
"@salesforce/cli": "2.105.6",
1616
"@salesforce/eslint-config-lwc": "4.0.0",
1717
"@salesforce/eslint-plugin-lightning": "2.0.0",
1818
"@salesforce/sfdx-lwc-jest": "7.1.0",
19-
"@salesforce/plugin-code-analyzer": "^5.3.0",
2019
"husky": "9.1.7",
2120
"lint-staged": "15.4.3",
22-
"prettier": "3.4.2",
23-
"prettier-plugin-apex": "2.2.4"
21+
"prettier": "3.6.2",
22+
"prettier-plugin-apex": "2.2.6"
2423
},
2524
"keywords": [
2625
"salesforce",

rollup-namespaced/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ For more info, see the base `README`.
1818

1919
## Deployment & Setup
2020

21-
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syBjIAI">
21+
<a href="https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syCDIAY">
2222
<img alt="Deploy to Salesforce"
2323
src="./media/deploy-package-to-prod.png">
2424
</a>
2525

26-
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syBjIAI">
26+
<a href="https://test.salesforce.com/packaging/installPackage.apexp?p0=04tKf000000syCDIAY">
2727
<img alt="Deploy to Salesforce Sandbox"
2828
src="./media/deploy-package-to-sandbox.png">
2929
</a>

rollup-namespaced/sfdx-project.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"default": true,
55
"package": "apex-rollup-namespaced",
66
"path": "rollup-namespaced/source/rollup",
7-
"versionName": "Fixes managed packaging known issue a028c00000qQ7V6AAK",
8-
"versionNumber": "1.2.22.0",
7+
"versionName": "Updates finalizer code paths to avoid re-queueing more than once during a full recalc",
8+
"versionNumber": "1.2.23.0",
99
"versionDescription": "Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.",
1010
"releaseNotesUrl": "https://github.com/jamessimone/apex-rollup/releases/latest",
1111
"unpackagedMetadata": {
@@ -39,6 +39,7 @@
3939
"[email protected]": "04tKf000000syAWIAY",
4040
"[email protected]": "04tKf000000syAlIAI",
4141
"[email protected]": "04tKf000000syBZIAY",
42-
"[email protected]": "04tKf000000syBjIAI"
42+
"[email protected]": "04tKf000000syBjIAI",
43+
"[email protected]": "04tKf000000syCDIAY"
4344
}
44-
}
45+
}

rollup/core/classes/RollupFinalizer.cls

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
public without sharing virtual class RollupFinalizer implements Finalizer {
22
@TestVisible
33
private static Boolean wasExceptionLogged = false;
4+
45
protected final List<RollupAsyncProcessor> cabooses = new List<RollupAsyncProcessor>();
6+
protected Boolean hasAlreadyStartedConductor = false;
57

68
// Avoids issues with serializing Exceptions in Apex by flattening the finalizer context data structure
79
private class FinalizerContextLoggable implements RollupLogger.ToStringObject {
@@ -27,6 +29,7 @@ public without sharing virtual class RollupFinalizer implements Finalizer {
2729
}
2830

2931
public virtual void execute(FinalizerContext fc) {
32+
this.hasAlreadyStartedConductor = false;
3033
RollupLogger.Instance.log('Beginning finalizer with cabooses: ' + this.cabooses.size(), System.LoggingLevel.INFO);
3134
switch on fc?.getResult() {
3235
when UNHANDLED_EXCEPTION {
@@ -58,10 +61,11 @@ public without sharing virtual class RollupFinalizer implements Finalizer {
5861
}
5962

6063
private void recurseThroughConductors() {
61-
if (this.cabooses.isEmpty() == false) {
64+
if (this.cabooses.isEmpty() == false && this.hasAlreadyStartedConductor == false) {
6265
RollupAsyncProcessor conductor = this.cabooses.remove(0);
6366
RollupLogger.Instance.log('Starting up new conductor', conductor, System.LoggingLevel.INFO);
6467
String potentialProcessId = conductor.runCalc();
68+
this.hasAlreadyStartedConductor = potentialProcessId != conductor.getNoProcessId();
6569
if (potentialProcessId == conductor.getNoProcessId() && this.cabooses.isEmpty() == false) {
6670
this.recurseThroughConductors();
6771
}

rollup/core/classes/RollupFullBatchRecalculator.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public without sharing virtual class RollupFullBatchRecalculator extends RollupF
131131
public override void handleSuccess() {
132132
if (this.conductor.retriever?.shouldContinue() ?? false) {
133133
this.conductor.startAsyncWork();
134+
this.hasAlreadyStartedConductor = true;
134135
} else {
135136
this.conductor.finish();
136137
}

rollup/core/classes/RollupLogger.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
global without sharing virtual class RollupLogger implements ILogger {
33
@TestVisible
44
// this gets updated via the pipeline as the version number gets incremented
5-
private static final String CURRENT_VERSION_NUMBER = 'v1.7.25';
5+
private static final String CURRENT_VERSION_NUMBER = 'v1.7.26';
66
private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG;
77
private static final RollupPlugin PLUGIN = new RollupPlugin();
88

sfdx-project.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"package": "apex-rollup",
66
"path": "rollup",
77
"scopeProfiles": true,
8-
"versionName": "Fixes managed packaging known issue a028c00000qQ7V6AAK",
9-
"versionNumber": "1.7.25.0",
8+
"versionName": "Updates finalizer code paths to avoid re-queueing more than once during a full recalc",
9+
"versionNumber": "1.7.26.0",
1010
"versionDescription": "Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.",
1111
"releaseNotesUrl": "https://github.com/jamessimone/apex-rollup/releases/latest",
1212
"unpackagedMetadata": {
@@ -102,11 +102,9 @@
102102
"Apex Rollup - Rollup [email protected]": "04t6g000008Sis0AAC",
103103
"Nebula Logger - [email protected]": "04t5Y0000015oRNQAY",
104104
"apex-rollup": "0Ho6g000000TNcOCAW",
105-
"[email protected]": "04tKf000000sy9dIAA",
106-
"[email protected]": "04tKf000000syA7IAI",
107-
"[email protected]": "04tKf000000syARIAY",
108105
"[email protected]": "04tKf000000syAgIAI",
109106
"[email protected]": "04tKf000000syBUIAY",
110-
"[email protected]": "04tKf000000syBeIAI"
107+
"[email protected]": "04tKf000000syBeIAI",
108+
"[email protected]": "04tKf000000syC8IAI"
111109
}
112-
}
110+
}

0 commit comments

Comments
 (0)