Skip to content

Changes to a task definition are not effective when the task is selected from "recently used" list #98617

@karolz-ms

Description

@karolz-ms
  • VSCode Version:
  • OS Version:

Steps to Reproduce:

  1. Install Docker Desktop (Windows, Mac) or Docker engine (Linux).
  2. Install Docker extension by Microsoft (ms-azuretools.vscode-docker)
  3. Clone https://github.com/kzadora/guestbook-express/tree/dockerized (note: 'dockerized' branch)
  4. Do Run Task command and run docker-build task. Open Docker view (whale icon) and verify you have the guestbook-express:1.0.0 image built.

image

  1. Right click on 1.0.0 image tag, choose 'Remove...'. and confirm
  2. Open .vscode/tasks.json and change dockerBuild.tag property of the docker-build task to guestbook-express:2.0.0. Save tasks.json file.
  3. Try Run Task command again

Expected: choosing recently used docker-build task should build the guestbook-express image and give it a tag of 2.0.0

Actual: docker-build task shows up twice as "recently used" vs "configured".

image

Running the "recently used" task uses the old task settings and results in an image tagged 1.0.0. This old task configuration survives even VS Code window restart!

This is very non-intuitive behavior and totally contrary to what developers are used to. I would never expect that VS Code will cache old task settings and use them after I save changes to the tasks file.

Does this issue occur when all extensions are disabled?: not applicable

Reproduced on Windows 10, VS Code build 1.45.1 and on Mac, VS Code Insiders build 1.46.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtasksTask system issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions