Skip to content

feat: support loading proto file from URL#261

Merged
LinuxSuRen merged 1 commit intomasterfrom
feat/grpc-proto-url
Nov 1, 2023
Merged

feat: support loading proto file from URL#261
LinuxSuRen merged 1 commit intomasterfrom
feat/grpc-proto-url

Conversation

@LinuxSuRen
Copy link
Owner

No description provided.

@LinuxSuRen LinuxSuRen added the enhancement New feature or request label Nov 1, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Nov 1, 2023

There are 21 test cases:

API Average Max Min Count Error
POST http://localhost:8080/server.Runner/GenerateCode 6.178872ms 6.178872ms 6.178872ms 1 0
POST http://localhost:8080/server.Runner/ConvertTestSuite 4.29145ms 4.29145ms 4.29145ms 1 0
gRPC 127.0.0.1:7070/server.Runner/GetVersion 4.065147ms 5.327962ms 1.580818ms 3 0
POST http://localhost:8080/server.Runner/FunctionsQuery 3.607742ms 3.607742ms 3.607742ms 1 0
gRPC 127.0.0.1:7070/server.Runner/FunctionsQuery 2.912634ms 4.002947ms 2.239126ms 3 0
POST http://localhost:8080/server.Runner/GetStores 2.760732ms 2.760732ms 2.760732ms 1 0
POST http://localhost:8080/server.Runner/CreateTestSuite 2.527129ms 2.527129ms 2.527129ms 1 0
gRPC 127.0.0.1:7070/server.Runner/FunctionsQueryStream 2.483195ms 3.240538ms 1.412816ms 3 0
POST http://localhost:8080/server.Runner/ListCodeGenerator 2.213026ms 2.213026ms 2.213026ms 1 0
POST http://localhost:8080/server.Runner/ListTestCase 1.72652ms 2.012824ms 1.440216ms 2 0
POST http://localhost:8080/server.Runner/GetTestCase 1.397316ms 1.397316ms 1.397316ms 1 0
POST http://localhost:8080/server.Runner/DeleteTestSuite 1.275914ms 1.489617ms 1.062212ms 2 0
POST http://localhost:8080/server.Runner/GetSecrets 1.265515ms 1.265515ms 1.265515ms 1 0
POST http://localhost:8080/server.Runner/PopularHeaders 1.241315ms 1.241315ms 1.241315ms 1 0
POST http://localhost:8080/server.Runner/GetSuggestedAPIs 1.110413ms 1.110413ms 1.110413ms 1 0
POST http://localhost:8080/server.Runner/GetVersion 1.067813ms 1.067813ms 1.067813ms 1 0
POST http://localhost:8080/server.Runner/GetSuites 1.023512ms 1.023512ms 1.023512ms 1 0
POST http://localhost:8080/server.Runner/UpdateTestSuite 743.109µs 743.109µs 743.109µs 1 0
POST http://localhost:8080/server.Runner/GetTestSuite 730.109µs 730.109µs 730.109µs 1 0
POST http://localhost:8080/server.Runner/ListConverter 631.108µs 631.108µs 631.108µs 1 0
tRPC Hello 498.306µs 498.306µs 498.306µs 1 1

@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.09% 76.70%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (3c1e0aa) 6006 5295 88.16%
Head commit (1dd91f2) 6103 (+97) 5375 (+80) 88.07% (-0.09%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#261) 103 79 76.70%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Comment on lines +584 to +608
for _, f := range archive.File {
if f.FileInfo().IsDir() {
continue
}

targetFilePath := filepath.Join(targetDir, f.Name)
if err = os.MkdirAll(filepath.Dir(targetFilePath), os.ModePerm); err != nil {
return
}

var targetFile *os.File
if targetFile, err = os.OpenFile(targetFilePath,
os.O_CREATE|os.O_RDWR, f.Mode()); err != nil {
continue
}

var fileInArchive io.ReadCloser
fileInArchive, err = f.Open()
if err != nil {
continue
}

_, err = io.Copy(targetFile, fileInArchive)
_ = targetFile.Close()
}

Check failure

Code scanning / CodeQL

Arbitrary file access during archive extraction ("Zip Slip")

Unsanitized archive entry, which may contain '..', is used in a [file system operation](1). Unsanitized archive entry, which may contain '..', is used in a [file system operation](2).
@LinuxSuRen LinuxSuRen merged commit 0e5ee61 into master Nov 1, 2023
@LinuxSuRen LinuxSuRen deleted the feat/grpc-proto-url branch November 1, 2023 02:59
LinuxSuRen pushed a commit that referenced this pull request Jun 17, 2024
* chore(deps): update moonrailgun/tailchat docker tag to v1.8.6

* Update app version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-action update-app-version <githubaction@githubaction.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant