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

Stop auto importing accounts #1539

Merged
merged 3 commits into from
May 10, 2024
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 extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@
},
{
"view": "posit.publisher.credentials",
"contents": "Posit Publisher currently uses credentials managed by the following utilities:\n- [RSConnect](https://github.com/rstudio/rsconnect) (R Package)\n- [RSConnect-Python](https://github.com/rstudio/rsconnect-python) (Python utility).\n\nUse one of these utilities to define a credential to your server, then return and click the refresh button\n[Refresh](command:posit.publisher.credentials.refresh)",
"contents": "To publish your content, you need account credentials for a Connect server.\n[Add Credential](command:posit.publisher.credentials.add)",
"when": "posit.publisher.credentials.isEmpty == empty"
},
{
Expand All @@ -505,7 +505,7 @@
},
{
"view": "posit.publisher.project",
"contents": "Use of Posit Publisher requires that you create at least one account credential using [RSConnect](https://github.com/rstudio/rsconnect) (R Package) or [RSConnect-Python](https://github.com/rstudio/rsconnect-python) (Python utility).\n\nUse one of these utilities to define a credential to your server, then return and click the refresh button\n[Refresh](command:posit.publisher.init-project.refresh)",
"contents": "Use of Posit Publisher requires that you create at least one account credential.",
"when": "posit.publish.initialization.credentialCheck == 'failed'"
},
{
Expand Down
4 changes: 3 additions & 1 deletion extensions/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ export async function activate(context: ExtensionContext) {
context.subscriptions.push(stream);

service = new Service(context, port);
checkForCredentials();
// TEMP
// checkForCredentials();
setCredentialCheckContext(PositPublishCredentialCheck.succeeded);

// First the construction of the data providers
const projectTreeDataProvider = new ProjectTreeDataProvider(context);
Expand Down
3 changes: 1 addition & 2 deletions extensions/vscode/src/multiStepInputs/deployProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export async function publishDeployment(
`Unable to continue with no matching credentials for\n` +
`deployment URL: ${deployment.serverUrl}\n` +
`\n` +
`Establish account credentials using rsconnect (R package) or\n` +
`rsconnect-python (Python package) and then retry operation.`,
`Establish account credentials, then try again.`,
);
return reject();
}
Expand Down
3 changes: 1 addition & 2 deletions extensions/vscode/src/multiStepInputs/initWorkspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ export async function initWorkspace(
if (accountListItems.length === 0) {
window.showErrorMessage(
`Unable to continue with no credentials.\n` +
`Establish account credentials using rsconnect (R package) or\n` +
`rsconnect-python (Python package) and then retry operation.`,
`Establish account credentials, then try again.`,
);
return reject();
}
Expand Down
3 changes: 1 addition & 2 deletions extensions/vscode/src/multiStepInputs/newDeployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ export async function newDeployment(
if (accountListItems.length === 0) {
window.showInformationMessage(
`Unable to continue with no credentials.\n` +
`Establish account credentials using rsconnect (R package) or\n` +
`rsconnect-python (Python package) and then retry operation.`,
`Establish account credentials, then try again.`,
);
return reject();
}
Expand Down
2 changes: 0 additions & 2 deletions internal/accounts/account_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ func NewAccountList(fs afero.Fs, log logging.Logger) *defaultAccountList {
return &defaultAccountList{
providers: []AccountProvider{
newEnvVarProvider(log),
newRSConnectProvider(fs, log),
newRSConnectPythonProvider(fs, log),
NewCredentialsProvider(),
},
log: log,
Expand Down
2 changes: 1 addition & 1 deletion internal/accounts/account_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (s *AccountListSuite) TestNewAccountList() {
log := logging.New()
fs := utiltest.NewMockFs()
accountList := NewAccountList(fs, log)
s.Len(accountList.providers, 4)
s.Len(accountList.providers, 2)
s.Equal(log, accountList.log)
}

Expand Down