镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

TRAP Caching: Unset missing cache rather than setting to undefined - #1207

Merged
edoardopirovano merged 1 commit into
mainfrom
edoardo/fix-warning
Aug 23, 2022
Merged

edoardopirovano merged 1 commit into
mainfrom
edoardo/fix-warning

Conversation

@edoardopirovano

Copy link
Copy Markdown
Contributor

In other parts of the code, we expect the values in the map to not be undefined, so we are getting warnings like https://github.com/github/vscode-codeql/actions/runs/2911692423 if we fail to find a cache in the Actions cache because we are setting a value of undefined here. Let's just remove the language from the map entirely if we don't have a cache for it.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@edoardopirovano
edoardopirovano requested a review from a team as a code owner August 23, 2022 14:41

@henrymercer henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. When we set the property undefined, it still appears in Object.values(...). Deleting it removes it from Object.values(...), so we don't attempt to find its size.

@edoardopirovano
edoardopirovano merged commit 3e49948 into main Aug 23, 2022
@edoardopirovano
edoardopirovano deleted the edoardo/fix-warning branch August 23, 2022 15:58
@github-actions github-actions Bot mentioned this pull request Aug 25, 2022
4 of 6 tasks
@henrymercer henrymercer mentioned this pull request Aug 25, 2022
4 tasks done
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.

3 participants