Azure / Azure/azure-functions-core-tools

Add lock file to prevent concurrent `func update` invocations

Open
#5,524 0 comments 0 reactions 0 assignees View on GitHub
enhancement Needs: Triage (Functions) v5
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

### Description

`func update` has no interprocess protection against concurrent invocations on the same machine. Two simultaneous updates could race on renaming and copying the same files in the install directory, leading to a corrupted installation.

Add a lock file (e.g. `func.update.lock` in the install directory) that is acquired at the start of `UpdateAsync` and released on completion. If the lock is already held, exit early with a user-friendly message.

Contributor guide

Open the contributing guide

Research direction

Start at the UpdateAsync entry point and trace how the install directory is selected and how completion or early failure is handled. Add protection using a lock file in that directory, release it when the update finishes, and verify that a concurrent invocation exits with a user-friendly message without corrupting the installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.