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

Fix failing concurrent test on Windows #1890

Merged
merged 8 commits into from
Jul 28, 2023

Conversation

matejvasek
Copy link
Contributor

@matejvasek matejvasek commented Jul 26, 2023

Changes

  • 🐛 Fix filing tests on Windows related to incorrect process livenes detection.
  • 🧹 Change symlink from being absolute to being relative.
  • 🧹 Better test output + the test does not hang on Windows.

@knative-prow
Copy link

knative-prow bot commented Jul 26, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 26, 2023
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 26, 2023
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 62.50% and project coverage change: +0.83% 🎉

Comparison is base (a2834c2) 61.95% compared to head (9d9c06c) 62.79%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1890      +/-   ##
==========================================
+ Coverage   61.95%   62.79%   +0.83%     
==========================================
  Files         106      107       +1     
  Lines       13801    13811      +10     
==========================================
+ Hits         8551     8673     +122     
+ Misses       4397     4260     -137     
- Partials      853      878      +25     
Flag Coverage Δ
e2e-test 35.50% <0.00%> (-0.03%) ⬇️
e2e-test-oncluster 30.82% <0.00%> (+0.11%) ⬆️
e2e-test-oncluster-runtime 25.64% <0.00%> (?)
e2e-test-runtime-node 26.93% <0.00%> (?)
e2e-test-runtime-python 26.93% <0.00%> (?)
e2e-test-runtime-quarkus 27.05% <0.00%> (?)
e2e-test-runtime-typescript 27.05% <0.00%> (?)
integration-tests 51.43% <25.00%> (+2.16%) ⬆️
unit-tests-macos-latest 48.66% <25.00%> (-0.56%) ⬇️
unit-tests-ubuntu-latest ?
unit-tests-windows-latest 48.70% <62.50%> (-0.61%) ⬇️

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

Files Changed Coverage Δ
pkg/oci/builder.go 63.79% <62.50%> (-13.46%) ⬇️

... and 13 files with indirect coverage changes

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 26, 2023
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@matejvasek matejvasek changed the title [DO NOT MERGE] test only TestBuilder_Concurrency Better logging/debugging int test Jul 26, 2023
@matejvasek matejvasek changed the title Better logging/debugging int test Better logging/debugging in test Jul 26, 2023
@matejvasek matejvasek requested review from lkingland and removed request for navidshaikh and jrangelramos July 26, 2023 19:48
@matejvasek
Copy link
Contributor Author

@lkingland PTAL

@matejvasek matejvasek marked this pull request as ready for review July 26, 2023 19:48
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 26, 2023
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@matejvasek
Copy link
Contributor Author

=== RUN   TestBuilder_Concurrency
mkdir -p C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113\001\.func\builds\by-hash\8cf6addafdcbc49
5ab800c0a8210f7ca4c486ee17f5cac9cc8be10ed51f7a3f3
mkdir -p C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113\001\.func\builds\by-pid
ln -s ..\by-hash\8cf6addafdcbc495ab800c0a8210f7ca4c486ee17f5cac9cc8be10ed51f7a3f3 C:\Users\mvasek\AppData\Local\Temp\T
estBuilder_Concurrency3717259113\001\.func\builds\by-pid\23056
→ /func 
→ /func/README.md
→ /func/func.yaml
→ /func/go.mod
→ /func/handle.go
→ /func/handle_test.go
mv .\datalayer.tar.gz .\oci\blobs\sha256\17d96d33daa25c79f1086a5d848c8cdceba9e590721c70c48e45176fb1c018ab
→ /etc/ssl/certs/ca-certificates.crt
→ /etc/pki/tls/certs/ca-certificates.crt
mv .\certslayer.tar.gz .\oci\blobs\sha256\6d9104c57ada84f79fdaf1ee171d35c60a98c576776dbe5d409153bbd172310d
rm -rf C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113\001\.func\builds\by-hash\8cf6addafdcbc495a
b800c0a8210f7ca4c486ee17f5cac9cc8be10ed51f7a3f3
    builder_test.go:118: test build error: remove C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113
\001\.func\builds\by-hash\8cf6addafdcbc495ab800c0a8210f7ca4c486ee17f5cac9cc8be10ed51f7a3f3\config.json: The process ca
nnot access the file because it is being used by another process.
mv .\config.json .\oci\blobs\sha256\979f5a8533d239b98f596c2333c02d8ae75568b93f227e71fdf89954e034c745
rm C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113\001\.func\builds\by-pid\23056
rm C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113\001\.func\builds\by-hash\8cf6addafdcbc495ab800
c0a8210f7ca4c486ee17f5cac9cc8be10ed51f7a3f3
    builder_test.go:101: test build error: rename C:\Users\mvasek\AppData\Local\Temp\TestBuilder_Concurrency3717259113
\001\.func\builds\by-hash\8cf6addafdcbc495ab800c0a8210f7ca4c486ee17f5cac9cc8be10ed51f7a3f3\config.json C:\Users\mvasek
\AppData\Local\Temp\TestBuilder_Concurrency3717259113\001\.func\builds\by-hash\8cf6addafdcbc495ab800c0a8210f7ca4c486ee
17f5cac9cc8be10ed51f7a3f3\oci\blobs\sha256\979f5a8533d239b98f596c2333c02d8ae75568b93f227e71fdf89954e034c745: The syste
m cannot find the path specified.
--- FAIL: TestBuilder_Concurrency (0.09s)
FAIL

This is the error I am getting on my Windows machine now. Previously the test just hanged till timeout.

@lkingland
Copy link
Member

This looks like a legitimate bug to me; it appears the test was exiting when a single builder returned on the done channel, rather than waiting for both
/lgtm !

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

@lance please override the failing test.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 27, 2023
@matejvasek matejvasek changed the title Better logging/debugging in test Fix failing concurrent test on Windows Jul 27, 2023
@matejvasek matejvasek requested review from lance and jrangelramos and removed request for navidshaikh July 27, 2023 17:23
Signed-off-by: Matej Vasek <mvasek@redhat.com>
@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 27, 2023
@matejvasek
Copy link
Contributor Author

@lance PTAL

@matejvasek matejvasek requested review from aslom and salaboy July 27, 2023 17:52
@matejvasek
Copy link
Contributor Author

@lkingland PTAL

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2023
@knative-prow
Copy link

knative-prow bot commented Jul 28, 2023

[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

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 24fe6d3 into knative:main Jul 28, 2023
40 checks passed
matejvasek added a commit to matejvasek/faas that referenced this pull request Sep 27, 2023
* src: better debugging

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: wait for both builds

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: detection of process liveness on Windows

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: make symlink relative

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: cleanup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
knative-prow bot pushed a commit that referenced this pull request Oct 2, 2023
* chore: use tkn tasks from PR branch in CI (#1914)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: released binaries refer correct task yamls (#1916)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: refer correct tkn yaml in prow test (#1918)

Without this change prow test will refer tkn yamls from the main branch
not from the PR head branch.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: update release generation (#1924)

* Minimize release binary size.
* Release latest version of buildpack tekton task.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* test: update github ref used on e2e oncluster tests (#1917)

* test: Split of GH oncluster tests by builder. Added FUNC_BUILDER env var for e2e oncluter tests (#1963)

* Use our own s2i image (#1971)

Our image is much more recent and it is multiarch.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: update buildah image ref (#1960)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: update CA certs (#1944)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: update Quarkus platform version to 3.4.1 (#1989)

Co-authored-by: Knative Automation <automation@knative.team>
Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: update mvn wrapper in Quarkus template (#1987)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: use ./mvnw not mvn in tests (#1988)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* chore: update Springboot platform version

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: docker registry/repository parsing (#1929)

* fix: docker registry/repository parsing

Use go-containerregistry to do parsing.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: use kebab-case instead of camelCase

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: use kebab-case instead of camelCase

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Fix failing concurrent test on Windows (#1890)

* src: better debugging

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: wait for both builds

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: detection of process liveness on Windows

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: make symlink relative

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: cleanup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* allowing on cluster build for go runtime (#1445)

* allowing on cluster build for go runtime

* warning message added for go and rust builder

* gofmt

* fixups

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>

* Use custom jammy paketo builder (#1911)

* chore: use custom jammy paketo builder

Use our own modified jammy builder with additional buildpacks for
GoFunc and Rust. This enables on cluster build for Go and Rust functions.
Where possible (Go, Java) we use "tiny" variant, other runtimes use "base"
variant.

The updated task is new file instead of modifying existing task
this is done for sake of keeping compatiblility.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: remove unnecessary code per review request

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup: podman test refers correct tkn task yamls

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* doc: Go and Rust on cluster build is supported (#1923)

* doc: Go and Rust on cluster build is supported

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* doc: build envvars

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: direct upload ppc64le, x390x (#1958)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: report correct error when task doesn't exist (#1915)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* feat: tekton task urls in the env sub-cmd output (#1925)

Signed-off-by: Matej Vasek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Jefferson Ramos <jeramos@redhat.com>
Co-authored-by: Knative Automation <automation@knative.team>
Co-authored-by: Shashank Sharma <48708039+Shashankft9@users.noreply.github.com>
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/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.

None yet

2 participants