Skip to content
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

feat: add pvc-size flag to deploy command (#851) #1598

Conversation

grafvonb
Copy link
Contributor

@grafvonb grafvonb commented Mar 6, 2023

Ref: #851

Second try, after recreating the changes on the new project structure (old PR: #1543)

@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 6, 2023
@knative-prow knative-prow bot requested review from navidshaikh and rhuss March 6, 2023 20:03
@grafvonb grafvonb changed the title feat: add pvc-size flag to deploy command (#851) [WIP] feat: add pvc-size flag to deploy command (#851) Mar 6, 2023
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 6, 2023
@grafvonb
Copy link
Contributor Author

grafvonb commented Mar 6, 2023

Getting currently a little bit strange panic during an old UT (in previous version it was ok):

--- FAIL: TestDeploy_BuilderPersists (0.01s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1c38bca]

Needs investigation.

@grafvonb grafvonb force-pushed the 851-configurable-pvc-size-used-by-pipeline branch 2 times, most recently from 0ca47cd to 944b0b3 Compare March 7, 2023 20:39
@knative-prow knative-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 7, 2023
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2023
@grafvonb grafvonb force-pushed the 851-configurable-pvc-size-used-by-pipeline branch 2 times, most recently from 4974ef3 to 42ab2f3 Compare March 7, 2023 20:56
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2023
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 7, 2023
@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Patch coverage: 79.41% and project coverage change: +0.21 🎉

Comparison is base (ca24420) 62.71% compared to head (af9a246) 62.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1598      +/-   ##
==========================================
+ Coverage   62.71%   62.93%   +0.21%     
==========================================
  Files          93       93              
  Lines       11939    11955      +16     
==========================================
+ Hits         7488     7524      +36     
+ Misses       3770     3751      -19     
+ Partials      681      680       -1     
Flag Coverage Δ
e2e-test 38.87% <67.64%> (+0.02%) ⬆️
e2e-test-oncluster 34.71% <79.41%> (+<0.01%) ⬆️
e2e-test-oncluster-runtime 29.57% <79.41%> (?)
e2e-test-runtime-go 28.26% <67.64%> (?)
e2e-test-runtime-node 29.40% <67.64%> (?)
e2e-test-runtime-python 29.40% <67.64%> (?)
e2e-test-runtime-quarkus 29.54% <67.64%> (?)
e2e-test-runtime-springboot 28.42% <67.64%> (?)
e2e-test-runtime-typescript 29.54% <67.64%> (?)
integration-tests 49.43% <76.47%> (+0.06%) ⬆️
unit-tests-macos-latest 48.20% <76.47%> (-0.01%) ⬇️
unit-tests-ubuntu-latest 49.16% <76.47%> (+0.01%) ⬆️
unit-tests-windows-latest 48.14% <76.47%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
pkg/pipelines/tekton/pipelines_pac_provider.go 4.63% <0.00%> (ø)
pkg/pipelines/tekton/pipeplines_provider.go 57.05% <57.14%> (-0.42%) ⬇️
cmd/deploy.go 75.43% <86.95%> (-0.18%) ⬇️
pkg/functions/function.go 77.92% <100.00%> (+0.17%) ⬆️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matejvasek
Copy link
Contributor

Something is wrong with build timestamps.

@matejvasek
Copy link
Contributor

touch func.yaml && /home/mvasek/devel/kn-plugin-func/func build --path /tmp/test-config-labels --registry localhost:50000/user --builder pack && /home/mvasek/devel/kn-plugin-func/func deploy --path /tmp/test-config-labels --registry localhost:50000/user --build=false -v
   🙌 Function image built: localhost:50000/user/test-config-labels:latest
Error: not built

@matejvasek
Copy link
Contributor

touch func.yaml && /home/mvasek/devel/kn-plugin-func/func build --path /tmp/test-config-labels --registry localhost:50000/user --builder pack && /home/mvasek/devel/kn-plugin-func/func deploy --path /tmp/test-config-labels --registry localhost:50000/user --build=false -v
   🙌 Function image built: localhost:50000/user/test-config-labels:latest
Error: not built

It appears that build sets buildStamp at the end of build but it simultaneously creates .gitignore (which affects final stamp). There is apparently some race because sometimes the modified .gitignore is taken into account and sometime is's not.

I don't see how this PR is causing this.

@matejvasek
Copy link
Contributor

See #1608

@grafvonb grafvonb force-pushed the 851-configurable-pvc-size-used-by-pipeline branch from afd28a0 to 998071e Compare March 9, 2023 06:52
@matejvasek
Copy link
Contributor

@grafvonb Now I see similar issue is happening with func.yaml it is also (similarly to .gitignore) modified between build and deploy.

@matejvasek
Copy link
Contributor

@grafvonb Now I see similar issue is happening with func.yaml it is also (similarly to .gitignore) modified between build and deploy.

In deploy step we are updating func.yaml just before running buildStamp. Sometimes the write to FS is delayed so it works sometimes it is fast so stamp is not matching.

@grafvonb
Copy link
Contributor Author

@grafvonb Now I see similar issue is happening with func.yaml it is also (similarly to .gitignore) modified between build and deploy.

In deploy step we are updating func.yaml just before running buildStamp. Sometimes the write to FS is delayed so it works sometimes it is fast so stamp is not matching.

Can I re-run the pipeline without changing anything or faking with --amend of the last commit?

@matejvasek
Copy link
Contributor

@grafvonb Now I see similar issue is happening with func.yaml it is also (similarly to .gitignore) modified between build and deploy.

In deploy step we are updating func.yaml just before running buildStamp. Sometimes the write to FS is delayed so it works sometimes it is fast so stamp is not matching.

Can I re-run the pipeline without changing anything or faking with --amend of the last commit?

I suppose you could, or you could add empty commit. But I don't think it will pass. If it was single test then maybe, but there are multiple and do not think that odds are high that all test will pass.

@matejvasek
Copy link
Contributor

@grafvonb what is weird is that this happens for this PR. We should see it on pretty much all PRs.

@matejvasek
Copy link
Contributor

Could you look into it more closely?

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 27, 2023
grafvonb added a commit to NTTDATA-DACH/kn-plugin-func that referenced this pull request Mar 30, 2023
@grafvonb grafvonb force-pushed the 851-configurable-pvc-size-used-by-pipeline branch from 3a27f1c to 55734a7 Compare March 30, 2023 08:15
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 30, 2023
@grafvonb grafvonb force-pushed the 851-configurable-pvc-size-used-by-pipeline branch from 55734a7 to f4a2ec9 Compare April 4, 2023 20:27
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 4, 2023
@matejvasek
Copy link
Contributor

/approve
/lgtm

@knative-prow knative-prow bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 4, 2023
@grafvonb
Copy link
Contributor Author

grafvonb commented Apr 4, 2023

@lance @matejvasek I rebased the commits again and resolved all conflicts. Can we maybe finalize this soon? Since my change touches function.go, the "out of sync" problem will happen again and again....

@grafvonb grafvonb force-pushed the 851-configurable-pvc-size-used-by-pipeline branch from d7c32b6 to af9a246 Compare April 5, 2023 05:36
@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2023
@grafvonb
Copy link
Contributor Author

grafvonb commented Apr 5, 2023

"Analyse" check fails due to:

Errors during downloading metadata for repository 'baseos':
    - Downloading successful, but checksum doesn't match. Calculated: 67f0fad4fe457471c91c70a50245e5700a98c4b49d509d35a8b6643eed55e789b3afb5ced888da13b63a3bdfd122e7aecc8b6c485a9dedcd1afca23cf81fa288(sha512)  Expected: 60642857dc1e825a77340c6ffe13eb4c84f0c3c1972dd4dfc7ab8e00c6b1980f63a5d331bd97f5a9808466c657325a1063[18](https://github.com/knative/func/actions/runs/4615303335/jobs/8159049308?pr=1598#step:2:18)40267e80cfb5a87b1adb28d52947(sha512)

@matejvasek Who can repair this?

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

/approve
/lgtm

@knative-prow
Copy link

knative-prow bot commented Apr 5, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described 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 merged commit 2502819 into knative:main Apr 5, 2023
@grafvonb grafvonb deleted the 851-configurable-pvc-size-used-by-pipeline branch July 26, 2023 18:41
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. 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.

None yet

4 participants