Skip to content

chore: deprecate constructive/functions in favor of constructive-functions repo#1127

Open
Anmol1696 wants to merge 2 commits into
mainfrom
chore/deprecate-functions-dir
Open

chore: deprecate constructive/functions in favor of constructive-functions repo#1127
Anmol1696 wants to merge 2 commits into
mainfrom
chore/deprecate-functions-dir

Conversation

@Anmol1696
Copy link
Copy Markdown
Contributor

Summary

Phase 1 of removing duplicated function infrastructure from this repo. The simple-email and send-email-link function workloads now live in the dedicated constructive-functions repository (new architecture: handler.ts + fn-runtime + handler.json manifests, auto-generated workspace packages, k8s/Skaffold deployment). The hub (constructive-hub) already launches function processes from that submodule, so the copies here under functions/ are dead weight at runtime.

This PR removes functions/ and the unreachable cnc jobs up CLI command. The jobs/ directory is intentionally kept for a follow-up PR — the hub still resolves the job-server entrypoint from constructive/jobs/<server>/dist/run.js, and that path will be flipped to constructive-functions/job/<server>/dist/run.js in a separate hub PR before jobs/ itself can be retired.

Changes

  • Delete functions/ (both simple-email and send-email-link packages) and docker/functions/simple-email.Dockerfile.
  • Drop 'functions/*' from pnpm-workspace.yaml.
  • Remove cnc jobs up:
    • Delete packages/cli/src/commands/jobs.ts.
    • Drop its import + registration in packages/cli/src/commands.ts.
    • Drop the Jobs: section from packages/cli/src/utils/display.ts help text.
    • Drop @constructive-io/knative-job-service from packages/cli/package.json dependencies.
  • Surgical patch to jobs/knative-job-service to keep the workspace installable after functions/* is gone:
    • Drop the now-broken workspace deps on @constructive-io/{simple-email,send-email-link}-fn.
    • Empty the in-memory functionRegistry and widen FunctionName to string. The legacy in-process launcher will simply fail with "Unknown function" if invoked — acceptable because it's slated for removal in the follow-up PR.
  • Docs: update CLAUDE.md and AGENTS.md to point readers at constructive-functions.

Non-goals (deferred to follow-up PRs)

  • Removing jobs/ (still consumed by hub's client.ts:640).
  • Removing docker-compose.jobs.yml, docker-compose.local-email.yml, docker/jobs/.
  • Hub-side change to flip client.ts:640 from constructive/jobs/... to constructive-functions/job/....
  • Republishing @constructive-io/{simple-email,send-email-link}-fn from the new repo (separate coordination — note the new repo currently sits at v2.6.4 / v1.6.4 vs the v2.10.0 / v1.10.0 just removed here, and uses a different entrypoint shape).

Verification

  • pnpm install resolves with no workspace:^ errors after the registry/dep edits.
  • pnpm build green across all 87 workspace projects; jobs/knative-job-service/dist/ and packages/cli/dist/ produced.
  • node packages/cli/dist/index.js --help no longer lists jobs and renders cleanly.
  • Pre-existing pnpm lint failures (ESLint v9 config migration in graphile-upload-plugin, graphile-sql-expression-validator, graphql/gql-ast, packages/12factor-env) are unrelated to this PR — confirmed by re-running lint on the parent commit; same packages fail there.

Test plan

  • Sanity-check pnpm install && pnpm build on the branch.
  • Confirm cnc --help no longer advertises jobs up and unknown-command path still works.
  • Confirm consumers downstream do not import @constructive-io/{simple-email,send-email-link}-fn from this repo's workspace (they should use the npm-published versions or the new repo).
  • Coordinate hub PR that flips client.ts:640 to constructive-functions/job/server/dist/run.js before the follow-up that deletes jobs/.

…tions repo

The simple-email and send-email-link function workloads now live in the
dedicated constructive-functions repository under handler.ts +
fn-runtime, and the hub already launches functions from that submodule.
The copies under this repo's functions/ directory are no longer
referenced at runtime, so drop them along with the unreachable
cnc jobs up CLI command.

- Remove functions/ (both packages) and docker/functions/simple-email.Dockerfile.
- Drop 'functions/*' from pnpm-workspace.yaml.
- Delete packages/cli/src/commands/jobs.ts, its registration in
  commands.ts, the help text entries, and the
  @constructive-io/knative-job-service dep from packages/cli.
- Empty the jobs/knative-job-service function registry and drop the
  now-broken workspace deps on simple-email-fn / send-email-link-fn
  so the workspace still installs. jobs/ itself is kept for a
  follow-up PR pending the hub job-server cutover.
- Update CLAUDE.md / AGENTS.md to point readers at constructive-functions.
@Anmol1696 Anmol1696 force-pushed the chore/deprecate-functions-dir branch from d773f29 to 0381d9b Compare May 11, 2026 06:24
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 11, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​express@​5.0.61001007185100
Added@​types/​babel__generator@​7.27.01001007280100
Added@​types/​geojson@​7946.0.161001007280100
Added@​types/​graphql-upload@​8.0.121001009080100
Added@​types/​cors@​2.8.191001009181100
Added@​types/​cookie-parser@​1.4.101001008481100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 11, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@Anmol1696
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: Anmol1696 <10805402+Anmol1696@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 14, 2026

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in commit 1b57622. I merged origin/main, fixed the delete/modify and lockfile conflicts, and verified targeted builds/tests are passing (@constructive-io/knative-job-service build, @constructive-io/cli build + tests).

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.

2 participants