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: rewrite route with http logger plugin with ginkgo && fix: base.CleanAPISIXErrorLog api #1755

Merged

Conversation

bisakhmondal
Copy link
Member

Please answer these questions before submitting a pull request, or your PR will get closed.

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

Please update this section with detailed description.

Related issues
#1500

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@netlify
Copy link

netlify bot commented Apr 12, 2021

Deploy preview for apisix-dashboard ready!

Built with commit 57f16ec

https://deploy-preview-1755--apisix-dashboard.netlify.app

Comment on lines 251 to 253
cmd = exec.Command("sudo", "echo", " > ", pwd+"/docker/apisix_logs/error.log")
_, err = cmd.CombinedOutput()
cmdStr := "echo | sudo tee " + pwd+"/docker/apisix_logs/error.log"
cmd = exec.Command("bash", "-c", cmdStr)
_, err = cmd.Output()
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI, earlier the cleanup was not taking place properly by the exec command and it got prominent during the execution of this line. As for this assertion to be successful, the substring must not be present in the error.log and for that the cleanup must be done.
Reference: ref1 ref2

@codecov-io
Copy link

Codecov Report

Merging #1755 (f24ead2) into master (1d2bc54) will decrease coverage by 19.84%.
The diff coverage is n/a.

❗ Current head f24ead2 differs from pull request most recent head ef21446. Consider uploading reports for the commit ef21446 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1755       +/-   ##
===========================================
- Coverage   72.13%   52.29%   -19.85%     
===========================================
  Files         132       38       -94     
  Lines        5721     2660     -3061     
  Branches      649        0      -649     
===========================================
- Hits         4127     1391     -2736     
+ Misses       1350     1081      -269     
+ Partials      244      188       -56     
Flag Coverage Δ
backend-e2e-test ?
backend-e2e-test-ginkgo ?
backend-unit-test 52.29% <ø> (ø)
frontend-e2e-test ?

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

Impacted Files Coverage Δ
api/internal/utils/version.go 0.00% <0.00%> (-100.00%) ⬇️
api/internal/filter/request_id.go 0.00% <0.00%> (-100.00%) ⬇️
api/internal/core/entity/entity.go 0.00% <0.00%> (-100.00%) ⬇️
api/internal/core/store/storehub.go 0.00% <0.00%> (-71.03%) ⬇️
api/internal/filter/cors.go 0.00% <0.00%> (-66.67%) ⬇️
api/internal/filter/schema.go 0.00% <0.00%> (-55.47%) ⬇️
api/internal/utils/consts/api_error.go 0.00% <0.00%> (-50.00%) ⬇️
api/internal/handler/data_loader/route_import.go 27.41% <0.00%> (-37.50%) ⬇️
api/internal/handler/handler.go 42.59% <0.00%> (-35.19%) ⬇️
api/internal/handler/schema/schema.go 66.66% <0.00%> (-33.34%) ⬇️
... and 118 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d2bc54...ef21446. Read the comment docs.

base.CleanAPISIXErrorLog()
})

table.DescribeTable("test route with log plugin",
Copy link
Contributor

Choose a reason for hiding this comment

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

This description confused me.
Maybe delete the route?

Copy link
Member

Choose a reason for hiding this comment

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

we could use clean test data

Copy link
Member Author

Choose a reason for hiding this comment

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

Awesome!!

Copy link
Member

@nic-chen nic-chen left a comment

Choose a reason for hiding this comment

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

LGTM expect some descriptions.

Copy link
Member

@Jaycean Jaycean left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@gxthrj gxthrj left a comment

Choose a reason for hiding this comment

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

LGTM

@starsz starsz merged commit ae116ae into apache:master Apr 13, 2021
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.

None yet

6 participants