Skip to content

Commit

Permalink
fix: use org62 for last resort api version call
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Jan 19, 2024
1 parent 842a9f8 commit 5d4299b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/registry/coverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ type ApiVersion = {
version: string;
};

let apiVer: number;

export const getCurrentApiVersion = async (): Promise<number> => {
const apiVersionsUrl = 'https://dx-extended-coverage.my.salesforce-sites.com/services/data';
const lastVersionEntry = (await got(getProxiedOptions(apiVersionsUrl)).json<ApiVersion[]>()).pop() as ApiVersion;
return +lastVersionEntry.version;
if (apiVer === undefined) {
const apiVersionsUrl = 'https://org62.my.salesforce-sites.com/services/data';
const lastVersionEntry = (await got(getProxiedOptions(apiVersionsUrl)).json<ApiVersion[]>()).pop() as ApiVersion;
apiVer = +lastVersionEntry.version;
}
return apiVer;
};

export const getCoverage = async (apiVersion: number): Promise<CoverageObject> => {
Expand Down

2 comments on commit 5d4299b

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 5d4299b Previous: 826638f Ratio
eda-componentSetCreate-linux 247 ms 247 ms 1
eda-sourceToMdapi-linux 2129 ms 2095 ms 1.02
eda-sourceToZip-linux 1707 ms 1661 ms 1.03
eda-mdapiToSource-linux 3011 ms 3090 ms 0.97
lotsOfClasses-componentSetCreate-linux 396 ms 376 ms 1.05
lotsOfClasses-sourceToMdapi-linux 3562 ms 3538 ms 1.01
lotsOfClasses-sourceToZip-linux 2922 ms 2927 ms 1.00
lotsOfClasses-mdapiToSource-linux 3491 ms 3431 ms 1.02
lotsOfClassesOneDir-componentSetCreate-linux 647 ms 640 ms 1.01
lotsOfClassesOneDir-sourceToMdapi-linux 6399 ms 6182 ms 1.04
lotsOfClassesOneDir-sourceToZip-linux 5338 ms 5318 ms 1.00
lotsOfClassesOneDir-mdapiToSource-linux 6221 ms 6173 ms 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Collaborator

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 5d4299b Previous: 826638f Ratio
eda-componentSetCreate-win32 412 ms 422 ms 0.98
eda-sourceToMdapi-win32 3532 ms 3751 ms 0.94
eda-sourceToZip-win32 2632 ms 2724 ms 0.97
eda-mdapiToSource-win32 5754 ms 6031 ms 0.95
lotsOfClasses-componentSetCreate-win32 862 ms 931 ms 0.93
lotsOfClasses-sourceToMdapi-win32 7648 ms 8081 ms 0.95
lotsOfClasses-sourceToZip-win32 4721 ms 4867 ms 0.97
lotsOfClasses-mdapiToSource-win32 7543 ms 7937 ms 0.95
lotsOfClassesOneDir-componentSetCreate-win32 1506 ms 1604 ms 0.94
lotsOfClassesOneDir-sourceToMdapi-win32 14256 ms 14755 ms 0.97
lotsOfClassesOneDir-sourceToZip-win32 9034 ms 8290 ms 1.09
lotsOfClassesOneDir-mdapiToSource-win32 14080 ms 13424 ms 1.05

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.