Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sh/connection perf #712

Merged
merged 4 commits into from
Nov 30, 2022
Merged

Sh/connection perf #712

merged 4 commits into from
Nov 30, 2022

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Nov 30, 2022

What does this PR do?

Saves DNS resolution status and max API version per Connection instance. The API version cache is used from more places within Connection.

What issues does this PR fix or reference?

@W-12129008@
forcedotcom/cli#1713

src/org/connection.ts Outdated Show resolved Hide resolved
src/org/connection.ts Outdated Show resolved Hide resolved
@mshanemc
Copy link
Contributor

QA Notes:

using sfdx-core linked into sdr linked into plugin source, running DEBUG=* bin/dev source:deploy so I can see logs from myDomainResolver and maxApiVersion stuff.

✅ extra calls go away and I see these instead

sf:connection DEBUG API version cache last checked on 11/30/2022, 4:22:27 PM (now is 11/30/2022, 4:40:04 PM) +58ms
sf:connection DEBUG Using cached API version: 56.0 +0ms
sf:connection DEBUG Connection created with apiVersion 56.0 +0ms

set the timestamp on the AuthFile back a year ( "instanceApiVersionLastRetrieved": "11/30/2021, 4:43:51 PM". )
✅ I see resolver
✅ I see call to max url
✅ file gets updated

set the version on the AuthFile back to 54.
✅ it uses that version, no calls to maxApi or resolver

set the version back and set an old timestamp
✅ timestamp and version are updated as expected

set timestamp,version back and SFDX_IGNORE_API_VERSION_CACHE
❓ updates timestamp, cache but makes all the calls to maxApiVersion (expected) and resolver (not expected) each time
-- after conferring with Steve, this'll be a fix in the source plugin to pass SDR a connection instead of a username

remove those 2 props from the AuthFile
✅ they were re-added and used on subsequent calls

remove only the timestamp
✅ it was re-added and used

--apiversion 50.0
✅ uses api version 50.0. Checks max version from the file as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants