Skip to content

Skip shell completions provisioning on cache miss#5878

Open
inancgumus wants to merge 4 commits intobump-k6provider-v0.4.0from
add/skip-completion-provisioning
Open

Skip shell completions provisioning on cache miss#5878
inancgumus wants to merge 4 commits intobump-k6provider-v0.4.0from
add/skip-completion-provisioning

Conversation

@inancgumus
Copy link
Copy Markdown
Contributor

@inancgumus inancgumus commented Apr 24, 2026

What?

Skips completions for uncached provisioned extensions. The cache-only provisioner skips the build on cache miss and times out on service slowness. Once k6provider moves to fully offline lookups, this code will pick up that improvement without any changes in k6.

Why?

Completions for uncached extensions may hang users without feedback because of provisioning.

Related PR(s)/Issue(s)

@inancgumus inancgumus closed this Apr 24, 2026
@inancgumus inancgumus reopened this Apr 24, 2026
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 17:19 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 17:21 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 17:22 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 17:23 — with GitHub Actions Inactive
@inancgumus inancgumus changed the title Bump k6provider to v0.4.0 Completion provisioning Apr 24, 2026
@inancgumus inancgumus force-pushed the add/skip-completion-provisioning branch from c492123 to 5eb55bf Compare April 24, 2026 19:26
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 19:32 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 19:35 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/skip-completion-provisioning branch from 5eb55bf to 3387b0e Compare April 24, 2026 20:49
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 20:55 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 20:57 — with GitHub Actions Inactive
@inancgumus inancgumus changed the title Completion provisioning Shell completions skip provisioning on cache miss Apr 24, 2026
@inancgumus inancgumus force-pushed the add/skip-completion-provisioning branch from 3387b0e to ee08516 Compare April 24, 2026 21:01
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 21:07 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 21:09 — with GitHub Actions Inactive
@inancgumus inancgumus force-pushed the add/skip-completion-provisioning branch from ee08516 to eb75aad Compare April 24, 2026 21:27
@inancgumus inancgumus changed the base branch from master to bump-k6provider-v0.4.0 April 24, 2026 21:27
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 21:33 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 21:33 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 21:35 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 21:35 — with GitHub Actions Inactive
Both interfaces read the context from gs.Ctx. Passing it explicitly
makes the timeout boundary visible at call sites and avoids mutating
shared state to propagate deadlines.
Completion delegation needs to skip when the binary isn't cached,
otherwise the shell hangs 10-30s on a build. Adding a cachedOnly
field to buildProvisioner switches GetBinary to GetCachedBinary,
which returns fs.ErrNotExist on miss so callers bail out instantly.
Shell completions for extensions called buildExtensionDeps which
triggered full provisioning. completeExtension uses a cacheProvisioner
with a 3s timeout so completions return nothing on cache miss instead
of hanging on a build-service round trip.
The completion path called buildExtensionDeps which triggered full
provisioning. Switching to completeExtension with cacheProvisioner
makes completions bail out on cache miss instead of blocking on a build.
@inancgumus inancgumus force-pushed the add/skip-completion-provisioning branch from eb75aad to 2b05c01 Compare April 24, 2026 22:06
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 22:12 — with GitHub Actions Inactive
@inancgumus inancgumus temporarily deployed to azure-trusted-signing April 24, 2026 22:14 — with GitHub Actions Inactive
@inancgumus inancgumus self-assigned this Apr 24, 2026
@inancgumus inancgumus added this to the v2.0.0 milestone Apr 24, 2026
@inancgumus inancgumus added the area: Auto Extension Resolution Previously known as binary provisioning. label Apr 24, 2026
@inancgumus inancgumus marked this pull request as ready for review April 24, 2026 22:42
@inancgumus inancgumus requested a review from a team as a code owner April 24, 2026 22:42
@inancgumus inancgumus requested review from mstoykov and oleiade and removed request for a team April 24, 2026 22:42
@inancgumus inancgumus changed the title Shell completions skip provisioning on cache miss Shell completions provisioning on cache miss Apr 24, 2026
@inancgumus inancgumus changed the title Shell completions provisioning on cache miss Skip shell completions provisioning on cache miss Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Auto Extension Resolution Previously known as binary provisioning.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip provisioning in completions

1 participant