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

Shouldn't warn with "Context access might be invalid" if not logged in #60

Open
1 of 4 tasks
birjj opened this issue Sep 14, 2023 · 0 comments
Open
1 of 4 tasks
Labels
bug Something isn't working

Comments

@birjj
Copy link

birjj commented Sep 14, 2023

Describe the bug
This mostly shows itself when using the GitHub Actions VSCode extension, but not logging in. In this case the extension reports the warning "Context access might be invalid" on all secret names, which is presumably unwanted behavior.

Since the warning is caused by the language server, this seems like the appropriate repo to open the issue in.

To Reproduce
Steps to reproduce the behavior:

  1. Install the GitHub Actions VSCode extension but do not log in (or log out if you're already logged in).
  2. Navigate to an action file using a secret.
  3. Observe that the warning is logged.

Expected behavior
The language server either logs one warning, saying that it isn't logged in, or doesn't log any warning at all.

Screenshots
Screenshot of the warning

Package/Area

  • Expressions
  • Workflow Parser
  • Language Service
  • Language Server

Package Version
v0.3.8

Additional context
Code logging the warning appears to be:

if (e instanceof AccessError) {
this.errors.push({
message: `Context access might be invalid: ${e.keyName}`,
severity: "warning"
});

This has been previously reported in the github/vscode-github-actions repo, including in github/vscode-github-actions#222 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant