feat: enable remote taskfiles#2906
Conversation
vmaerten
left a comment
There was a problem hiding this comment.
Nice !
You need to update completions files :
Line 131 in b5861b1
Line 76 in b5861b1
task/completion/fish/task.fish
Line 110 in b5861b1
Thanks! Updated. Completion scripts aren't my forte, so please check them 😆 Also fixed the broken links. |
There was a problem hiding this comment.
Pull request overview
Enables Remote Taskfiles as a generally available feature by removing the experiment gate in core code, promoting related CLI flags/completions to always be available, and restructuring website documentation to move content from the experiment page into first-class docs and reference sections.
Changes:
- Remove the runtime experiment check that previously blocked remote Taskfile nodes.
- Make remote-related CLI flags and shell completions always available (no experiment gating).
- Add/update website docs: new Remote Taskfiles page, guide snippets, and expanded reference docs for remote config/env/CLI.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/public/schema-taskrc.json | Removes REMOTE_TASKFILES from the experiments schema to reflect GA status. |
| website/src/docs/remote-taskfiles.md | Adds a dedicated Remote Taskfiles documentation page. |
| website/src/docs/reference/environment.md | Adds a “Remote Taskfile Variables” section. |
| website/src/docs/reference/config.md | Documents remote.* configuration keys in reference docs. |
| website/src/docs/reference/cli.md | Documents remote-related CLI flags in the CLI reference. |
| website/src/docs/guide.md | Adds guide-level examples for running/including remote Taskfiles and formatting tweaks. |
| website/src/docs/experiments/remote-taskfiles.md | Replaces experiment content with a pointer to released docs/changelog. |
| website/.vitepress/config.ts | Adds “Remote Taskfiles” to the docs navigation. |
| taskfile/node.go | Removes the experiment-enabled check for remote nodes. |
| task_test.go | Removes test-only experiment enabling for remote include/http tests. |
| internal/flags/flags.go | Registers remote flags unconditionally (previously behind experiment). |
| experiments/experiments.go | Treats RemoteTaskfiles as a released (inactive) experiment for warning-only behavior. |
| experiments/experiment.go | Adds “released/abandoned” inactive experiment helpers and richer inactive reason tracking. |
| experiments/errors.go | Improves inactive experiment error messaging with an optional reason. |
| completion/zsh/_task | Makes remote flags/completions always available in zsh completion. |
| completion/ps/task.ps1 | Makes remote flags/completions always available in PowerShell completion. |
| completion/fish/task.fish | Makes remote flags/completions always available in fish completion. |
| .taskrc.yml | Removes REMOTE_TASKFILES from the repo’s default experiments list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pflag.BoolVarP(&Failfast, "failfast", "F", getConfig(config, "FAILFAST", func() *bool { return &config.Failfast }, false), "When running tasks in parallel, stop all tasks if one fails.") | ||
| pflag.BoolVarP(&Global, "global", "g", false, "Runs global Taskfile, from $HOME/{T,t}askfile.{yml,yaml}.") | ||
| pflag.BoolVar(&Experiments, "experiments", false, "Lists all the available experiments and whether or not they are enabled.") | ||
| pflag.BoolVar(&Download, "download", false, "Downloads a cached version of a remote Taskfile.") |
| If for any reason you lose access to the internet or you are running Task in | ||
| offline mode (via the `--offline` flag or `TASK_OFFLINE` environment variable), | ||
| Task will run the any available cached files _even if they are expired_. This | ||
| means that you should never be stuck without the ability to run your tasks as |
| `remote.cache-dir` option in your | ||
| [configuration file](./reference/config.md#remotecache-dir), or the | ||
| `TASK_REMOTE_DIR` environment variable. This way, you can share the cache | ||
| between different projects. |
| flag or the `--trust` flag. The `--trust` flag allows you to specify trusted | ||
| hosts for remote Taskfiles, while `--yes` applies to all prompts in Task. You | ||
| can also configure trusted hosts in your | ||
| [taskrc configuration](./reference/config.md#remotetrusted-hosts) using |
| It is also possible to adjust remote Taskfile functionality can be edited via a | ||
| configuration file. Check out the |
| - **Environment variable**: | ||
| [`TASK_REMOTE_CACHE_EXPIRY`](./environment.md#task_remote_cache_expiry) | ||
|
|
| - **Environment variable**: | ||
| [`TASK_REMOTE_CACHE_DIR`](./environment.md#task_remote_cache_dir) | ||
|
|
| - **Environment variable**: | ||
| [`TASK_REMOTE_TRUSTED_HOSTS`](./environment.md#task_remote_trusted_hosts) | ||
| (comma-separated) |
| Using wildcards with aliases Wildcards also work with aliases. If a task has an | ||
| alias, you can use the alias name with wildcards to capture arguments. For | ||
| example: |
| - defer: | ||
| echo '{{if .EXIT_CODE}}Failed with {{.EXIT_CODE}}!{{else}}Success!{{end}}' | ||
| echo '{{if .EXIT_CODE}}Failed with | ||
| {{.EXIT_CODE}}!{{else}}Success!{{end}}' |
Not merging until after 1st Aug (after the 30 day period for comments is complete).
Closes #1317
This PR enables the remote taskfile functionality globally without the need for an experiment flag/config. If users continue to attempt to enable the remote taskfile experiment, they will be presented with a warning telling them that they no longer need to do this.
Additionally, large changes have been made to the documentation on the website. Namely: