Skip to content

Conversation

@twoGiants
Copy link
Contributor

@twoGiants twoGiants commented Dec 1, 2025

Changes

  • 🧹 Extract FunctionLoader, FunctionSaver, and FunctionLoaderSaver interfaces into new cmd/common package
  • 🧹 Move standardLoaderSaver implementation to cmd/common as DefaultLoaderSaver
  • ✅ Add tests for the common loader/saver functionality
  • 🔧 Add common testing factory function CreateFuncInTempDir for reuse in upcoming tests

/kind cleanup

Subtask of #3256.

Release Note


Docs


@knative-prow knative-prow bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Dec 1, 2025
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 1, 2025
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 53.65854% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.56%. Comparing base (8e83a41) to head (a62ee65).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/testing/factory.go 0.00% 15 Missing ⚠️
cmd/config.go 40.00% 3 Missing ⚠️
cmd/config_volumes.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3262      +/-   ##
==========================================
- Coverage   57.26%   54.56%   -2.70%     
==========================================
  Files         162      164       +2     
  Lines       14811    19231    +4420     
==========================================
+ Hits         8481    10493    +2012     
- Misses       5322     7697    +2375     
- Partials     1008     1041      +33     
Flag Coverage Δ
e2e 39.68% <58.33%> (ø)
e2e go 35.61% <25.00%> (?)
e2e node 30.98% <25.00%> (?)
e2e python 35.27% <25.00%> (?)
e2e quarkus 31.14% <25.00%> (?)
e2e rust 30.58% <25.00%> (?)
e2e springboot 30.61% <25.00%> (?)
e2e typescript 31.10% <25.00%> (?)
integration 17.90% <0.00%> (-0.02%) ⬇️
unit macos-14 44.35% <44.44%> (+0.02%) ⬆️
unit macos-latest 44.35% <44.44%> (+0.02%) ⬆️
unit ubuntu-24.04-arm 44.55% <48.78%> (?)
unit ubuntu-latest 45.29% <50.00%> (+0.02%) ⬆️
unit windows-latest 44.37% <44.44%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

Choose a reason for hiding this comment

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

I am wondering, if we should have them in the pkg/functions package instead, like we have it for some function related interfaces too 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept in in the cmd layer because it just a thin wrapper around very little functionality of the Function package which is not used outside the cmd layer.

i.e. it is not a real extension of the Functions API...just a facade.

Move FunctionLoader, FunctionSaver, and FunctionLoaderSaver
interfaces along with standardLoaderSaver implementation into
new cmd/common package to enable reuse across commands.

Add tests and a common testing factory function which will
be used in the upcoming tests for config ci subcommand too.

Issue knative#3256

Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
@twoGiants twoGiants force-pushed the issue-744-extract-common-interfaces branch from 787aa4c to a62ee65 Compare December 1, 2025 15:18
@matejvasek
Copy link
Contributor

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2025
@matejvasek
Copy link
Contributor

/approve

@knative-prow
Copy link

knative-prow bot commented Dec 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matejvasek, twoGiants

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 1, 2025
@matejvasek
Copy link
Contributor

matejvasek commented Dec 1, 2025

Ah it looks like you are not project reviewer/approver so you PRs are not auto approved.

@knative-prow knative-prow bot merged commit 33702b0 into knative:main Dec 1, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants