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: support Tencent Cloud Log Service #7593

Merged
merged 26 commits into from
Aug 25, 2022

Conversation

ychensha
Copy link
Contributor

@ychensha ychensha commented Aug 2, 2022

Description

product doc

apisix log util is more powerfull than nginx access log, and it's useful for debugging and replaying later.

Fixes #7592

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

add tencent-cloud-cls

add tencent-cloud-cls

add tencent-cloud-cls

add tencent-cloud-cls

add tencent-cloud-cls
@ychensha ychensha changed the title [WIP]support Tencent Cloud Log Service support Tencent Cloud Log Service Aug 2, 2022
@soulbird soulbird changed the title support Tencent Cloud Log Service feat: support Tencent Cloud Log Service Aug 3, 2022
@soulbird
Copy link
Contributor

soulbird commented Aug 3, 2022

Thanks for your contribution. But please add a license to each file and add test cases first.

@ychensha
Copy link
Contributor Author

ychensha commented Aug 3, 2022

any doc for testing? I have no exp for env setup & PERL testing framework...

@soulbird
Copy link
Contributor

soulbird commented Aug 3, 2022

any doc for testing? I have no exp for env setup & PERL testing framework...

See: https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md

@ychensha
Copy link
Contributor Author

ychensha commented Aug 3, 2022

any doc for testing? I have no exp for env setup & PERL testing framework...

See: https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md

tried.. I work on Mac, and now trapped in etcd configuration for more tesing case

add ut
@ychensha ychensha force-pushed the feature/cls-logger branch 2 times, most recently from 78579de to 2ab9eef Compare August 4, 2022 01:23
fix lint

fix lint
apisix/plugins/tencent-cloud-cls.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
properties = {
cls_host = { type = "string" },
cls_topic = { type = "string" },
-- https://console.cloud.tencent.com/capi
Copy link
Member

Choose a reason for hiding this comment

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

what is this link for?

apisix/plugins/tencent-cloud-cls.lua Outdated Show resolved Hide resolved
@tzssangglass
Copy link
Member

I have a question: Is it that we can't do the test case to verify that this plugin is working correctly?
Because it requires a Tencent account and to make sure that this account is always available.

@spacewander
Copy link
Member

I have a question: Is it that we can't do the test case to verify that this plugin is working correctly? Because it requires a Tencent account and to make sure that this account is always available.

We can inject a hook or mock into the code? Like:

my $extra_init_by_lua = <<_EOC_;

--- extra_init_by_lua

@ychensha
Copy link
Contributor Author

I have same question too. But same question can be applie to other plugins that have env matters

@ychensha
Copy link
Contributor Author

I have same question too. But same question can be applie to other plugins that have env matters

@ychensha ychensha closed this Aug 10, 2022
@ychensha
Copy link
Contributor Author

ychensha commented Aug 10, 2022

@spacewander @tzssangglass after code related conversations closed, I will do the function test again for the related code modification.

Copy link
Member

@spacewander spacewander left a comment

Choose a reason for hiding this comment

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

apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
@tzssangglass
Copy link
Member

@ychensha pls don't use force-push to update code, or reviews' comments may be ignore.

t/plugin/tencent-cloud-cls.t Show resolved Hide resolved
t/plugin/tencent-cloud-cls.t Outdated Show resolved Hide resolved
t/plugin/tencent-cloud-cls.t Outdated Show resolved Hide resolved
t/plugin/tencent-cloud-cls.t Outdated Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Show resolved Hide resolved
apisix/plugins/tencent-cloud-cls/cls-sdk.lua Outdated Show resolved Hide resolved
t/plugin/tencent-cloud-cls.t Outdated Show resolved Hide resolved
t/plugin/tencent-cloud-cls.t Outdated Show resolved Hide resolved
t/plugin/tencent-cloud-cls.t Show resolved Hide resolved
@spacewander
Copy link
Member

Let's merge master to make CI pass.

spacewander
spacewander previously approved these changes Aug 23, 2022
Copy link
Member

@spacewander spacewander left a comment

Choose a reason for hiding this comment

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

Approve except https://github.com/apache/apisix/pull/7593/files#r941961486
As this PR is big enough, let's open another PR for the doc.

@spacewander
Copy link
Member

As this PR is big enough, let's open another PR for the doc.

@spacewander spacewander merged commit 3c07574 into apache:master Aug 25, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request Nov 4, 2022
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.

feat: Support Tencent Cloud Log Service
4 participants