Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktop/src/renderer/js/screens/advanced-settings/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ window.AdvancedSettingsScreen = {
${ConfigForm.numberField('perf-memory', 'Memory limit (MB)', perf.maxMemoryMB, { min: 0, max: 32768, hint: '0 = let the system decide' })}
${ConfigForm.numberField('perf-source', 'Source file extraction concurrency', perf.sourceExtraction?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent source file fetches from SonarQube' })}
${ConfigForm.numberField('perf-hotspot', 'Hotspot extraction concurrency', perf.hotspotExtraction?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent hotspot detail fetches from SonarQube' })}
${ConfigForm.numberField('perf-issue-sync', 'Issue sync concurrency', perf.issueSync?.concurrency ?? 20, { min: 1, max: 50, hint: 'Max concurrent issue metadata sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-hotspot-sync', 'Hotspot sync concurrency', perf.hotspotSync?.concurrency ?? 20, { min: 1, max: 50, hint: 'Max concurrent hotspot sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-issue-sync', 'Issue sync concurrency', perf.issueSync?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent issue metadata sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-hotspot-sync', 'Hotspot sync concurrency', perf.hotspotSync?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent hotspot sync operations to SonarCloud' })}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Desktop defaults file not updated to match new defaults

Medium Severity

desktop/src/renderer/js/screens/advanced-settings/defaults.js still has issueSync: { concurrency: 20 } and hotspotSync: { concurrency: 20 } while the renderer, schema, and all runtime code now default to 50. This means new installations and "Reset to Defaults" will use 20 instead of 50, and AdvancedSettingsReader.readFromForm uses these stale values as parse fallbacks. The ADVANCED_DEFAULTS object was missed in this PR.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6f5e4d8. Configure here.

${ConfigForm.numberField('perf-project', 'Project migration concurrency', perf.projectMigration?.concurrency ?? 8, { min: 1, max: 16, hint: 'Max concurrent project migrations' })}
${ConfigForm.numberField('perf-verify', 'Project verification concurrency', perf.projectVerification?.concurrency ?? 3, { min: 1, max: 16, hint: 'Max concurrent project verifications' })}
</div>
Expand Down
8 changes: 4 additions & 4 deletions desktop/src/renderer/js/screens/transfer-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ window.TransferConfigScreen = {
${ConfigForm.numberField('perf-memory', 'Max Memory (MB)', perf.maxMemoryMB, { min: 0, max: 32768, hint: 'Max heap size in MB. 0 = let the system decide. CLI flag: --max-memory' })}
${ConfigForm.numberField('perf-source', 'Source file extraction concurrency', perf.sourceExtraction?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent source file fetches from SonarQube' })}
${ConfigForm.numberField('perf-hotspot', 'Hotspot extraction concurrency', perf.hotspotExtraction?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent hotspot detail fetches from SonarQube' })}
${ConfigForm.numberField('perf-issue-sync', 'Issue sync concurrency', perf.issueSync?.concurrency ?? 20, { min: 1, max: 50, hint: 'Max concurrent issue metadata sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-hotspot-sync', 'Hotspot sync concurrency', perf.hotspotSync?.concurrency ?? 20, { min: 1, max: 50, hint: 'Max concurrent hotspot sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-issue-sync', 'Issue sync concurrency', perf.issueSync?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent issue metadata sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-hotspot-sync', 'Hotspot sync concurrency', perf.hotspotSync?.concurrency ?? 50, { min: 1, max: 100, hint: 'Max concurrent hotspot sync operations to SonarCloud' })}
${ConfigForm.numberField('perf-project', 'Project Concurrency', perf.projectMigration?.concurrency ?? 8, { min: 1, max: 16, hint: 'Max concurrent project migrations. CLI flag: --project-concurrency' })}
${ConfigForm.numberField('perf-verify', 'Verification Concurrency', perf.projectVerification?.concurrency ?? 3, { min: 1, max: 16, hint: 'Max concurrent project verifications' })}
</div>
Expand Down Expand Up @@ -206,8 +206,8 @@ window.TransferConfigScreen = {
this.config.performance.maxMemoryMB = numVal('perf-memory', 8192);
this.config.performance.sourceExtraction = { concurrency: numVal('perf-source', 50) };
this.config.performance.hotspotExtraction = { concurrency: numVal('perf-hotspot', 50) };
this.config.performance.issueSync = { concurrency: numVal('perf-issue-sync', 20) };
this.config.performance.hotspotSync = { concurrency: numVal('perf-hotspot-sync', 20) };
this.config.performance.issueSync = { concurrency: numVal('perf-issue-sync', 50) };
this.config.performance.hotspotSync = { concurrency: numVal('perf-hotspot-sync', 50) };
this.config.performance.projectMigration = { concurrency: numVal('perf-project', 8) };
this.config.performance.projectVerification = { concurrency: numVal('perf-verify', 3) };

Expand Down
8 changes: 4 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ Controls CPU, memory, and concurrency tuning. Add a `performance` section to any
"maxMemoryMB": 8192,
"sourceExtraction": { "concurrency": 50 },
"hotspotExtraction": { "concurrency": 50 },
"issueSync": { "concurrency": 20 },
"hotspotSync": { "concurrency": 20 },
"issueSync": { "concurrency": 50 },
"hotspotSync": { "concurrency": 50 },
"projectMigration": { "concurrency": 8 }
}
}
Expand All @@ -247,8 +247,8 @@ Controls CPU, memory, and concurrency tuning. Add a `performance` section to any
| `maxMemoryMB` | `8192` | Max heap size in MB. Set to `0` for Node.js default. The tool auto-restarts with the increased heap size when needed. |
| `sourceExtraction.concurrency` | `50` | Max concurrent source file fetches from SonarQube Server (1–50) |
| `hotspotExtraction.concurrency` | `50` | Max concurrent hotspot detail fetches from SonarQube Server (1–50) |
| `issueSync.concurrency` | `20` | Max concurrent issue metadata sync operations to SonarQube Cloud (1–20) |
| `hotspotSync.concurrency` | `20` | Max concurrent hotspot sync operations to SonarQube Cloud (1–20) |
| `issueSync.concurrency` | `50` | Max concurrent issue metadata sync operations to SonarQube Cloud (1–100) |
| `hotspotSync.concurrency` | `50` | Max concurrent hotspot sync operations to SonarQube Cloud (1–100) |
| `projectMigration.concurrency` | `8` | Max concurrent project migrations (1–8) |

**Auto-tune defaults:** When `autoTune` is enabled (or `--auto-tune` CLI flag is used), the following values are calculated based on your hardware:
Expand Down
4 changes: 2 additions & 2 deletions examples/migrate-config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"maxMemoryMB": 0,
"sourceExtraction": { "concurrency": 10 },
"hotspotExtraction": { "concurrency": 10 },
"issueSync": { "concurrency": 5 },
"hotspotSync": { "concurrency": 3 },
"issueSync": { "concurrency": 50 },
"hotspotSync": { "concurrency": 50 },
"projectMigration": { "concurrency": 1 }
}
}
2 changes: 1 addition & 1 deletion src/commands/migrate/helpers/build-migrate-perf-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function buildMigratePerfConfig(config, options) {
return resolvePerformanceConfig({
...config.performance,
...(options.autoTune && { autoTune: true }),
...(options.concurrency && { maxConcurrency: options.concurrency, sourceExtraction: { concurrency: options.concurrency }, hotspotExtraction: { concurrency: options.concurrency }, issueSync: { concurrency: options.concurrency }, hotspotSync: { concurrency: Math.min(options.concurrency, 3) } }),
...(options.concurrency && { maxConcurrency: options.concurrency, sourceExtraction: { concurrency: options.concurrency }, hotspotExtraction: { concurrency: options.concurrency }, issueSync: { concurrency: options.concurrency }, hotspotSync: { concurrency: options.concurrency } }),
...(options.maxMemory && { maxMemoryMB: options.maxMemory }),
...(options.projectConcurrency && { projectMigration: { concurrency: options.projectConcurrency } })
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export { mapHotspotChangelogDiffToAction, extractHotspotTransitionsFromChangelog
// -------- Sync Hotspots --------

export async function syncHotspots(projectKey, sqHotspots, client, options = {}) {
const concurrency = options.concurrency || 3;
const concurrency = options.concurrency || 50;
const stats = createEmptyHotspotStats();

if (options.sqClient && options.sonarqubeProjectKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export { mapChangelogDiffToTransition, extractTransitionsFromChangelog } from '.
// -------- Sync Issues Orchestrator --------

export async function syncIssues(projectKey, sqIssues, client, options = {}) {
const concurrency = options.concurrency || 5;
const concurrency = options.concurrency || 50;
const sqClient = options.sqClient || null;
const userMappings = options.userMappings || null;
const stats = createEmptyStats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function fetchAndSyncHotspots(opts) {
performanceConfig = {} } = opts;

const extractConcurrency = performanceConfig?.hotspotExtraction?.concurrency || 10;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 3;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 50;

logger.info('Extracting SonarQube hotspots with details...');
const sqHotspots = await extractHotspots(sonarQubeClient, null, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function fetchAndSyncIssues(opts) {
const { sonarQubeClient, sonarCloudClient, projectKey,
performanceConfig = {} } = opts;

const concurrency = performanceConfig?.issueSync?.concurrency || 5;
const concurrency = performanceConfig?.issueSync?.concurrency || 50;

logger.info('Fetching SonarQube issues with comments...');
const sqIssues = await sonarQubeClient.getIssuesWithComments();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { syncSingleHotspot } from './sync-single-hotspot.js';

// Sync hotspot statuses, assignments, and comments from SonarQube to SonarCloud.
export async function syncHotspots(projectKey, sqHotspots, client, options = {}) {
const concurrency = options.concurrency || 3;
const concurrency = options.concurrency || 50;
const stats = createSyncStats();

if (options.sqClient && options.sonarqubeProjectKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import logger from '../../../../../../shared/utils/logger.js';
* Pre-filters SQ issues to only those with manual changes for efficiency.
*/
export async function syncIssues(projectKey, sqIssues, client, options = {}) {
const concurrency = options.concurrency || 5;
const concurrency = options.concurrency || 50;
const sqClient = options.sqClient || null;
const userMappings = options.userMappings || null;
const stats = createSyncStats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function fetchAndSyncHotspots(opts) {
performanceConfig = {} } = opts;

const extractConcurrency = performanceConfig?.hotspotExtraction?.concurrency || 10;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 3;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 50;

logger.info('Extracting SonarQube hotspots with details...');
const sqHotspots = await extractHotspots(sonarQubeClient, null, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function fetchAndSyncIssues(opts) {
const { sonarQubeClient, sonarCloudClient, projectKey,
performanceConfig = {} } = opts;

const concurrency = performanceConfig?.issueSync?.concurrency || 5;
const concurrency = performanceConfig?.issueSync?.concurrency || 50;

logger.info('Fetching SonarQube issues with comments...');
const sqIssues = await sonarQubeClient.getIssuesWithComments();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export { mapHotspotChangelogDiffToAction, extractHotspotTransitionsFromChangelog

/** Sync hotspot statuses, comments, and source links from SQ to SC. */
export async function syncHotspots(projectKey, sqHotspots, client, options = {}) {
const concurrency = options.concurrency || 3;
const concurrency = options.concurrency || 50;
const stats = { matched: 0, statusChanged: 0, commented: 0, metadataSyncCommented: 0, sourceLinked: 0, failed: 0 };

if (options.sqClient && options.sonarqubeProjectKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export { extractTransitionsFromChangelog } from './helpers/extract-transitions.j
* Pre-filters SQ issues to only those with manual changes for efficiency.
*/
export async function syncIssues(projectKey, sqIssues, client, options = {}) {
const concurrency = options.concurrency || 5;
const concurrency = options.concurrency || 50;
const sqClient = options.sqClient || null;
const userMappings = options.userMappings || null;
const stats = createSyncStats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function fetchAndSyncHotspots(opts) {
performanceConfig = {} } = opts;

const extractConcurrency = performanceConfig?.hotspotExtraction?.concurrency || 10;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 3;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 50;

logger.info('Extracting SonarQube hotspots with details...');
const sqHotspots = await extractHotspots(sonarQubeClient, null, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function fetchAndSyncIssues(opts) {
const { sonarQubeClient, sonarCloudClient, projectKey,
performanceConfig = {} } = opts;

const concurrency = performanceConfig?.issueSync?.concurrency || 5;
const concurrency = performanceConfig?.issueSync?.concurrency || 50;

logger.info('Fetching SonarQube issues with comments...');
const sqIssues = await sonarQubeClient.getIssuesWithComments();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { syncHotspotComments } from './sync-hotspot-comments.js';
// -------- Sync Hotspots from SonarQube to SonarCloud --------

export async function syncHotspots(projectKey, sqHotspots, client, options = {}) {
const concurrency = options.concurrency || 3;
const concurrency = options.concurrency || 50;
const stats = { matched: 0, statusChanged: 0, commented: 0, metadataSyncCommented: 0, sourceLinked: 0, failed: 0 };

if (options.sqClient && options.sonarqubeProjectKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { syncIssueCommentsAndTags } from './sync-issue-comments-and-tags.js';
// -------- Sync Issues from SonarQube to SonarCloud --------

export async function syncIssues(projectKey, sqIssues, client, options = {}) {
const concurrency = options.concurrency || 5;
const concurrency = options.concurrency || 50;
const sqClient = options.sqClient || null;
const userMappings = options.userMappings || null;
const stats = createEmptyStats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function fetchAndSyncHotspots(opts) {
performanceConfig = {} } = opts;

const extractConcurrency = performanceConfig?.hotspotExtraction?.concurrency || 10;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 3;
const syncConcurrency = performanceConfig?.hotspotSync?.concurrency || 50;

logger.info('Extracting SonarQube hotspots with details...');
const sqHotspots = await extractHotspots(sonarQubeClient, null, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function fetchAndSyncIssues(opts) {
const { sonarQubeClient, sonarCloudClient, projectKey,
performanceConfig = {} } = opts;

const concurrency = performanceConfig?.issueSync?.concurrency || 5;
const concurrency = performanceConfig?.issueSync?.concurrency || 50;

logger.info('Fetching SonarQube issues with comments...');
const sqIssues = await sonarQubeClient.getIssuesWithComments();
Expand Down
4 changes: 2 additions & 2 deletions src/shared/config/schema-shared/helpers/performance-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export const performanceSchema = {
},
issueSync: {
type: 'object', additionalProperties: false,
properties: { concurrency: { type: 'integer', minimum: 1, maximum: 50, default: 20, description: 'Max concurrent issue metadata sync operations to SonarCloud' } }
properties: { concurrency: { type: 'integer', minimum: 1, maximum: 100, default: 50, description: 'Max concurrent issue metadata sync operations to SonarCloud' } }
},
hotspotSync: {
type: 'object', additionalProperties: false,
properties: { concurrency: { type: 'integer', minimum: 1, maximum: 50, default: 20, description: 'Max concurrent hotspot sync operations to SonarCloud' } }
properties: { concurrency: { type: 'integer', minimum: 1, maximum: 100, default: 50, description: 'Max concurrent hotspot sync operations to SonarCloud' } }
},
projectMigration: {
type: 'object', additionalProperties: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function resolvePerformanceConfig(perfConfig = {}) {
const defaults = perfConfig.autoTune ? getAutoTuneDefaults() : {
maxConcurrency: 64, maxMemoryMB: 8192,
sourceExtraction: { concurrency: 50 }, hotspotExtraction: { concurrency: 50 },
issueSync: { concurrency: 20 }, hotspotSync: { concurrency: 20 },
issueSync: { concurrency: 50 }, hotspotSync: { concurrency: 50 },
projectMigration: { concurrency: 8 }
};
return {
Expand Down