"Context access might be invalid" warning thrown for repository variables and secrets
Describe the bug After upgrading to 0.25.8, a "Context access might be invalid" warning is thrown for all repository variables and secrets in the workflow file. Refreshing the secrets/vars in the extension has no effect.
Expected behavior Secrets/vars should not throw a "Context access might be invalid" warning.
Screenshots
Extension Version
v0.25.8
Additional context Add any other context about the problem here.
Also seeing this issue still with the latest release.
Previous issues #47 #61 and #67 stated the issue would be fixed with the next release, but issue continues to persist into release v0.25.8 and the change log seems to make no mention of a fix being deployed.
Any update on this?
I still see this as well; the extension version is v0.25.8
Seeing the same here constantly with v0.25.8
Just wanted to confirm that the issue continues to persist in 0.25.8 (and it's feeling really annoying)
also seeing this constantly in v0.25.8 with env variables, but not secrets
Same here. A bit annoying indeed 👍
Still persists kind of embarrassing for GH
ah, i see this is an actual issue. i was going mad with this. Let´s hope it´s fixed soon.
Yep, its a bug. Moved to triage. No ETA on a fix, if someone makes a PR to fix, I'm happy to review it.
I uninstalled, reinstalled and restarted VSCode and then the warnings went away. v0.25.8
I was receiving this error after installing the extension. Simply running the "Developer: Reload Window" command fixed it for me without needing to reinstall. So far it hasn't seemed to return yet, at least for repo secrets.
I was receiving this error after installing the extension. Simply running the "Developer: Reload Window" command fixed it for me without needing to reinstall. So far it hasn't seemed to return yet, at least for repo secrets.
I tried this but it came back :(
Okay, at least in my instance, the issue seems to be because I have a setup like this:
organization/repo - Main repository. Secrets/vars are done on this.
myuser/repo - Fork which I do my work on before creating a merge to push to upstream/main. Therefore in actions, its thinks the vars/secrets don't exist because they existing the main repo not my fork. There should at least be a way of ignoring this specific error if this is the case.
👋 Reporting in, still happening on v0.26.1.
There should at least be a way of ignoring this specific error if this is the case.
Agreed, there should at least be a # github-actions-extension ignore comment one can use.
I get this warning for any environment variable exported in a previous step via echo "foo=bar" >>$GITHUB_ENV
v0.26.1
I uninstalled, reinstalled and restarted VSCode and then the warnings went away.
v0.25.8
This worked for me.
This seems to only happen when environment property is dynamic.
I get this error for all of my secrets, am I missing something?
Expected behavior Secrets/vars should not throw a "Context access might be invalid" warning.
I actually like this warning. Because our YAML file has no access to production environment variables when we're editing it, it's a nice reminder to double-check our variable names.
Expected behavior Secrets/vars should not throw a "Context access might be invalid" warning.
I actually like this warning. Because our YAML file has no access to production environment variables when we're editing it, it's a nice reminder to double-check our variable names.
That's one way of looking at it. I would say a more realistic view is that it will condition you to ignore the warnings which causes the opposite effect of what you described.
I'm seeing this same behavior when pulling an output from a previous step through needs "Context access might be invalid". Is this being triggered by the value not being available to read because the previous step has not run? Just wondering as you'd think it could see the output it'd be pulling the value from is in the previous needed step.
I had this error on secrets. Turns out I wasn't properly signed in on github inside Vscode. Signing in and reloading fixed the issue.
I had this error on
secrets. Turns out I wasn't properly signed in on github inside Vscode. Signing in and reloading fixed the issue.
How does one "sign in to GitHub inside VS Code"?
And I'd argue this is a bug regardless; if you're not signed in, then it should just assume all variables are fine, not spam you with spurious warnings.
However, this will cause VSCode to color this folder yellow, override source control's color. I can't tell if any project is committed or not as all my project folders are alway marked yellow. I might forget to commit changes for that reason.
How does one "sign in to GitHub inside VS Code"?
Open the "github actions" extension side-panel and click "Sign in with Github".
Authenticating this extension with Github worked for me.
And I'd argue this is a bug regardless; if you're not signed in, then it should just assume all variables are fine, not spam you with spurious warnings.
I agree this is still a bug, but Instead of assuming all variables are correct (which could easily be mistaken for being a valid secret) it should indicate that secrets (and potentially other checks) cannot be verified until authenticated. This extension requires authentication for a lot of features.
Saw this error after installing and signing in. Uninstalled it and reinstalled it, and it worked fine after
I signed in to github after installing the extension and saw the secrets errors. I completely quit VS Code and re-opened it again and the secrets were no longer throwing any warnings. :)
I signed in to github after installing the extension and saw the secrets errors. I completely quit VS Code and re-opened it again and the secrets were no longer throwing any warnings. :)
Yeah, this happened to me too. I think I just clicked the "refresh current branch" button in the sidebar and the errors went away.
Same here. Restarting VS Code after install and login fixed the issue for me!