Skip to content

Fix non-containerized build/run with external deps#2847

Merged
knative-prow[bot] merged 1 commit intoknative:mainfrom
matejvasek:fix-run-non-ctr
May 28, 2025
Merged

Fix non-containerized build/run with external deps#2847
knative-prow[bot] merged 1 commit intoknative:mainfrom
matejvasek:fix-run-non-ctr

Conversation

@matejvasek
Copy link
Copy Markdown
Contributor

@matejvasek matejvasek commented May 28, 2025

Changes

Fix non-containerized build/run with external deps.
It's necessary to call "go mod tidy" on scaffolded code.

fixes #2846

/kind bug

fix: non-containerized build/run with external dependencies

It's necessary to call "go mod tidy" on scaffolded code.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
@knative-prow knative-prow bot added the kind/bug Bugs label May 28, 2025
@matejvasek matejvasek requested a review from lkingland May 28, 2025 12:59
@knative-prow knative-prow bot added the approved 🤖 PR has been approved by an approver from all required OWNERS files. label May 28, 2025
@knative-prow knative-prow bot requested review from dsimansk and nainaz May 28, 2025 12:59
@knative-prow knative-prow bot added the size/S 🤖 PR changes 10-29 lines, ignoring generated files. label May 28, 2025
@matejvasek matejvasek requested review from gauron99, jrangelramos and matzew and removed request for dsimansk and nainaz May 28, 2025 12:59
Comment thread pkg/functions/runner.go
return
}

// Build
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Diff is little bit confusing here, the code below is actually not added code, but the old code.
The code above that looks unchanged is the actual addition here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

difftastic IS AWESOME!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Screenshot from 2025-05-28 15-07-56

@codecov
Copy link
Copy Markdown

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.

Project coverage is 63.46%. Comparing base (3150fed) to head (f4940a6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/functions/runner.go 76.92% 2 Missing and 1 partial ⚠️
pkg/oci/go_builder.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2847      +/-   ##
==========================================
+ Coverage   60.93%   63.46%   +2.53%     
==========================================
  Files         127      127              
  Lines       15549    15570      +21     
==========================================
+ Hits         9475     9882     +407     
+ Misses       5187     4746     -441     
- Partials      887      942      +55     
Flag Coverage Δ
e2e-tests 43.62% <43.47%> (+1.47%) ⬆️
integration-tests 49.44% <30.43%> (?)
unit-tests 49.55% <73.91%> (+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.

@matejvasek
Copy link
Copy Markdown
Contributor Author

PTAL @jrangelramos @gauron99

@jrangelramos
Copy link
Copy Markdown
Contributor

fixes #2846

@matejvasek
Copy link
Copy Markdown
Contributor Author

PTAL @lkingland

Copy link
Copy Markdown
Member

@lkingland lkingland left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm 🤖 PR is ready to be merged. label May 28, 2025
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented May 28, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [lkingland,matejvasek]

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 merged commit 22e4f6d into knative:main May 28, 2025
39 checks passed
matejvasek added a commit to openshift-knative/kn-plugin-func that referenced this pull request Oct 3, 2025
picking knative#2847

Signed-off-by: Matej Vašek <mvasek@redhat.com>
matejvasek added a commit to openshift-knative/kn-plugin-func that referenced this pull request Oct 6, 2025
* feat: remote storage class

picking knative#2693

Co-authored-by: Luke Kingland <lkinglan@redhat.com>
Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Python Middleware v2 Scaffolding

picking knative#2685

Co-authored-by: Luke Kingland <lkinglan@redhat.com>
Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix Python S2I On-Cluster build

picking knative#2770

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix http port 433 => 443

picking knative#2742

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Trust loopback builders

picking knative#2750

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Add testcase for Go private repositories

picking knative#2748

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Test adjustments

picking knative#2751

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Allow host mounts for build phahse

picking knative#2753

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Use s2i in standard mode, not "as-dockerfile"

picking knative#2764

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Improvements for Go s2i assembler

picking knative#2765

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* S2I (source-to-image) host binds

picking knative#2766

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Make build binds more similar to runtime binds

picking knative#2768

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Add guideline for private Go module usage

picking knative#2771

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Improve Go templates README

picking knative#2848

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix detection of hostname resolution failure

picking knative#2841

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix: Go scaffolding uses correct module name

picking knative#2769

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix non-containerized build/run /w external deps

picking knative#2847

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Tekton 1.0.x fixes

picking #1349

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix co-scheduling

picking #1358

Co-authored-by: Jefferson Ramos <jeramos@redhat.com>
Signed-off-by: Matej Vašek <mvasek@redhat.com>

* test: fix gitlab test

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* dapr install upgrade

picking knative#3055

Co-authored-by: David Fridrich <fridrich.david19@gmail.com>
Co-authored-by: Luke Kingland <lkinglan@redhat.com>
Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: go.mod

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: update alpine version

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Migrate golangci-lint config to v2

picking knative#2781

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Bump golangci-lint version

picking knative#2784

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix flaky unit test

picking knative#2749

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
Co-authored-by: Luke Kingland <lkinglan@redhat.com>
Co-authored-by: Jefferson Ramos <jeramos@redhat.com>
Co-authored-by: David Fridrich <fridrich.david19@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/bug Bugs lgtm 🤖 PR is ready to be merged. size/S 🤖 PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

func run --container=false fails for go with external modules

3 participants