Skip to content

Conversation

@suhas-developer07
Copy link

@suhas-developer07 suhas-developer07 commented Oct 24, 2025

This PR fixes cross-platform build errors when deploying Go functions
from macOS to Linux using the S2I builder. The issue occurred due to
environment inconsistencies (timestamps and GOOS/GOARCH mismatch)
causing runtime crashes like "lfstack.push invalid packing".

This PR fixes the func deploy -b=s2i --platform linux/amd64 build failure that caused runtime crashes like
runtime: lfstack.push invalid packing.

The issue was due to an invalid or missing version reference for github.com/openshift/source-to-image.
replace github.com/openshift/source-to-image => github.com/openshift/source-to-image v1.5.1

@knative-prow knative-prow bot requested review from dsimansk and nainaz October 24, 2025 05:17
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 24, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@knative-prow
Copy link

knative-prow bot commented Oct 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: suhas-developer07
Once this PR has been reviewed and has the lgtm label, please assign jrangelramos for approval. For more information see the Code Review Process.

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

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 24, 2025
@knative-prow
Copy link

knative-prow bot commented Oct 24, 2025

Welcome @suhas-developer07! It looks like this is your first PR to knative/func 🎉

@knative-prow
Copy link

knative-prow bot commented Oct 24, 2025

Hi @suhas-developer07. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@suhas-developer07
Copy link
Author

Verified the fix locally — the s2i linux/amd64 build now completes successfully after adding
replace github.com/openshift/source-to-image => github.com/openshift/source-to-image v1.5.1
to go.mod.

This resolves the lfstack.push invalid packing runtime crash reported in issue #3140.

@suhas-developer07
Copy link
Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: suhas-developer07 Once this PR has been reviewed and has the lgtm label, please assign jrangelramos for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:

* **[OWNERS](https://github.com/knative/func/blob/main/OWNERS)**

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

Hi @jrangelramos,

This PR fixes the s2i linux/amd64 build failure by pinning source-to-image to v1.5.1. Could you please review and /approve if it looks good?

Thanks!

@gauron99
Copy link
Contributor

Hi, you deleted the func-yaml schema, accidentally I assume. also you will need to verify the easyCLA. Thanks for the contribution!

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.82%. Comparing base (b2b8009) to head (564dcc8).
⚠️ Report is 37 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (b2b8009) and HEAD (564dcc8). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (b2b8009) HEAD (564dcc8)
1 0
unit-tests 3 0
e2e-tests 2 0
integration-tests 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3144      +/-   ##
==========================================
- Coverage   59.39%   51.82%   -7.57%     
==========================================
  Files         134      162      +28     
  Lines       13500    19134    +5634     
==========================================
+ Hits         8018     9916    +1898     
- Misses       4539     8241    +3702     
- Partials      943      977      +34     
Flag Coverage Δ
e2e-tests ?
integration 17.90% <ø> (?)
integration-tests ?
unit macos-14 44.37% <ø> (?)
unit macos-latest 44.37% <ø> (?)
unit ubuntu-24.04-arm 44.56% <ø> (?)
unit ubuntu-latest 45.31% <ø> (?)
unit windows-latest 44.39% <ø> (?)
unit-tests ?

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.

@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 24, 2025
@suhas-developer07
Copy link
Author

suhas-developer07 commented Oct 24, 2025

@linux-foundation-easycla recheck

@suhas-developer07
Copy link
Author

Hi @gauron99, thanks for pointing that out! I’ve restored the func-yaml schema and also completed the EasyCLA verification. Please let me know if any other changes are needed.

@gauron99
Copy link
Contributor

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 26, 2025
@gauron99
Copy link
Contributor

please remove the test data from pkg. Theres some absoluteLinks and empty credsStore. These are generated via the tests but not removed yet

@suhas-developer07
Copy link
Author

please remove the test data from pkg. Theres some absoluteLinks and empty credsStore. These are generated via the tests but not removed yet

Thanks for the review! I've removed the test data (including the absolute links) and the empty creditStore. The latest commit includes these changes. Please take another look when you have a moment.

Copy link
Contributor

@gauron99 gauron99 left a comment

Choose a reason for hiding this comment

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

nothing thats already commited to main should be deleted. Only delete what is being added here. you have successfully deleted the absoluteLink files. Only thing remaining is the auth.json file in pkg/creds pls revert the other deletions

@suhas-developer07
Copy link
Author

suhas-developer07 commented Oct 31, 2025

ohh shit!! sorry for the previous contribution i thought that full folder needs to delete. in my latest commit i have reclaimed all the files and deleted what extra added to that. Please take another look when you have a moment.

@RayyanSeliya
Copy link
Contributor

Hey @suhas-developer07 just a little suggestion from my side u can use git rebase main ... approach instead of merging (git merge ) while updating your branch it's a good practice and helps maintain a clean , linear commit history !

@suhas-developer07
Copy link
Author

Hey @suhas-developer07 just a little suggestion from my side u can use git rebase main ... approach instead of merging (git merge ) while updating your branch it's a good practice and helps maintain a clean , linear commit history !

Thanks for the suggestion! Got it — I’ll rebase my branch with main instead of merging going forward to keep the commit history clean.

@gauron99
Copy link
Contributor

gauron99 commented Nov 3, 2025

Would it be possible to add a test for this? I know its a bit of a unstandard case

@RayyanSeliya
Copy link
Contributor

Hey @suhas-developer07 just a small suggestion I guess you have created a pr from main it’s not recommended to create a PR directly from your main branch.
It’s better to create a separate feature or fix branch for your changes (for example, fix/s2i-build-issue).
That way your main stays clean and consistent with the upstream main, making future updates and rebases much smoother ! I see you were facing some issues .. from the comments I have read in this chat no worries take care from now onwards .. ... ! Thx for the contribution !

@lkingland
Copy link
Member

lkingland commented Nov 21, 2025

Almost there? This needs to have ./hack/update-codegen.sh run such that the go.mod is cleaned up.

@suhas-developer07
Copy link
Author

Hey @suhas-developer07 just a small suggestion I guess you have created a pr from main it’s not recommended to create a PR directly from your main branch. It’s better to create a separate feature or fix branch for your changes (for example, fix/s2i-build-issue). That way your main stays clean and consistent with the upstream main, making future updates and rebases much smoother ! I see you were facing some issues .. from the comments I have read in this chat no worries take care from now onwards .. ... ! Thx for the contribution !

Thanks for the suggestion @RayyanSeliya!
You're right — using a separate feature/fix branch makes things much cleaner.
I’ll follow that approach in all future PRs.
Appreciate the guidance and support!

@suhas-developer07
Copy link
Author

Almost there? This needs to have ./hack/update-codegen.sh run such that the go.mod is cleaned up.

Thanks @lkingland!
I’ve run ./hack/update-codegen.sh and pushed the updated changes.
Please let me know if anything else needs to be adjusted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants