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

feat: add network diagnostic check #828

Merged
merged 8 commits into from
May 23, 2024
Merged

feat: add network diagnostic check #828

merged 8 commits into from
May 23, 2024

Conversation

WillieRuemmele
Copy link
Contributor

What does this PR do?
adds a few network checks to verify the users machine can access

yarn/npm registries

What issues does this PR fix or reference?
@W-15758164@

@mshanemc
Copy link
Contributor

QA notes:

✅ works

📓 https://registry.npmjs.org vs. https://registry.npmjs.org/ no big deal, probably better to take their env/config "as is" rather than try to clean it up

pass - can access: https://registry.npmjs.org
pass - can access: https://registry.yarnpkg.com
pass - can access: https://registry.npmjs.org/

💡 I see that the diagnostics for PDR and auth identify themselves like

warn - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
fail - [@salesforce/plugin-auth] CLI supports v2 crypto

Maybe plugin-trust should call addPluginData like https://github.com/salesforcecli/plugin-deploy-retrieve/blob/eaf7a2bc7d38fc6e58f39ff821da2d4d97960baa/src/hooks/diagnostics.ts#L59-L60

@mshanemc
Copy link
Contributor

QA notes (sad paths)

npm_config_registry=https://google.com

fail - can't access: https://registry.npmjs.org
fail - can't access: https://registry.yarnpkg.com
fail - can't access: https://google.com

I think that's somewhat misleading (maybe just change the output text?)

  1. the environment can totally access it. It's more of it not responding with the correct reply (assuming npm expects something that a registry would give back)
  2. the presence of the env is impacting the npm.ping that the test uses, so that they're all picking up npm_config_registry=https://google.com and not what they say the problem is?

💡 suggestions...what if we told people to run npm ping from their environment so they "replicate" that problem, too?
💡 what if we told them about the environment variable we found or are using?

@mshanemc mshanemc merged commit 4577086 into main May 23, 2024
13 checks passed
@mshanemc mshanemc deleted the wr/networkCheck branch May 23, 2024 18:34
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