Skip to content

feat(cli): sync function interval in init, pull and push - #2003

Merged
ChiragAgg5k merged 2 commits into
mainfrom
feat/cli-function-interval
Oct 9, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
feat/cli-function-interval

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Functions can now run on an interval (minutes) instead of a cron schedule (appwrite/appwrite#14231). This teaches the CLI about it:

  • appwrite init function writes "interval": 0 next to "schedule".
  • appwrite pull functions keeps interval from the server.
  • appwrite push functions sends interval and shows it in the change table.

Push only sends keys present in the config, and the server keeps the stored interval when interval is omitted (appwrite/appwrite#14307). So a config written before this change no longer clears an interval set in the Console.

Also bumps the CLI's Go SDK to v7.9.0, the release that adds interval.

Test Plan

  • TestFunctionWriteBodySendsIntervalOnlyWhenConfigured: a config without interval sends none, and a configured one is sent.
  • On the generated example CLI: go mod tidy, gofmt, go build, go vet and go test -race ./... all pass.

Related: appwrite/appwrite#14170

Also bumps the validation Go toolchain from 1.26.6 to 1.26.9. govulncheck was failing the go (server) check on main (GO-2026-6617, an HPACK race in net/http, fixed in go1.26.9).

@ChiragAgg5k ChiragAgg5k self-assigned this Oct 9, 2026
@hansi-codes

hansi-codes Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The generated CLI now initializes, pulls, and pushes function intervals, including showing interval differences in the push change table; its Go SDK dependency is updated to v7.9.0. The validation workflow now uses Go 1.26.9.

Latest changes: The newest commit updates the validation workflow's Go toolchain from 1.26.6 to 1.26.9.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 6
File Change
templates/cli/go.mod.twig Updates the generated CLI's Go SDK dependency to v7.9.0.
templates/cli/internal/cmd/initfunction.go Adds a zero-valued interval to initialized function configuration.
templates/cli/internal/cmd/initfunction_test.go Tests that push requests omit an unconfigured interval and send a configured one.
templates/cli/internal/cmd/pullfunction.go Preserves interval values when pulling functions from the server.
templates/cli/internal/cmd/pushdeploy.go Sends configured intervals when pushing functions and includes intervals in change comparisons.
.github/workflows/validation.yml Raises the Go toolchain used by validation to 1.26.9.

Reviewed the commits since 33c7362 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit c63f002 into main Oct 9, 2026
61 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the feat/cli-function-interval branch October 9, 2026 13:58
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.

1 participant