Skip to content

Fix: fission-cli adds incorrect url for source archive in fission's package #2982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

soharab-ic
Copy link
Contributor

Description

  • Fission-cli create package resource with incorrect url domain name for sourcearchive and we see below error when builder pod tries to fetch the source form storagesvc for building the source.
error fetching source package: Invalid argument - failed to download url : Get "http://127.0.0.1:51862/v1/archive?id=%2Ffission%2Ffission-functions%2F0ef2ca22-0a16-4832-b7a6-c54f7a895424": dial tcp 127.0.0.1:51862: connect: connection refused%

The correct URL should be like this where storagesvc is storage service and fission is namespace where fission is installed.

http://storagesvc.fission/v1/archive?id=%2Ffission%2Ffission-functions%2F0ef2ca22-0a16-4832-b7a6-c54f7a895424
  • This PR fixes this issue by fetching services across all K8s namespaces then filtering those services using label application=fission-storage and using this service to create sourcearchive url.

Which issue(s) this PR fixes:

Fixes #2980

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 44.66%. Comparing base (35276a5) to head (e0a3e9d).
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/fission-cli/util/util.go 0.00% 14 Missing ⚠️
pkg/fission-cli/cmd/package/util/util.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2982      +/-   ##
==========================================
- Coverage   44.70%   44.66%   -0.05%     
==========================================
  Files         236      236              
  Lines       24306    24411     +105     
==========================================
+ Hits        10865    10902      +37     
- Misses      12032    12100      +68     
  Partials     1409     1409              
Flag Coverage Δ
unittests 44.66% <0.00%> (-0.05%) ⬇️

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.

@soharab-ic soharab-ic requested a review from sanketsudake July 26, 2024 07:08
@sanketsudake sanketsudake merged commit cb3a765 into main Aug 14, 2024
10 checks passed
@sanketsudake sanketsudake deleted the fix-storagesvc-url branch September 26, 2024 16:17
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.

How can we provide the dependencies along with function code in the source zip ?
2 participants