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 vlogs server. #5343

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

bearslyricattack
Copy link
Member

No description provided.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Jan 13, 2025

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 2256
✅ Successful 525
⏳ Timeouts 6
🔀 Redirected 0
👻 Excluded 1722
❓ Unknown 0
🚫 Errors 1

Errors per input

Errors in docs/blog/en/2023/what-is-sealos.md

Errors in docs/blog/zh-Hans/2024/how-to-deploy-and-configure-meilisearch-using-docker/index.md

Full action output

Full Github Actions output

@@ -0,0 +1,55 @@
IMG ?= ghcr.io/labring/sealos-launchpad-service:latest
Copy link
Member

Choose a reason for hiding this comment

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

change image name


.PHONY: docker-build
docker-build: build
mv bin/manager bin/service-launchpad-${TARGETARCH}
Copy link
Member

Choose a reason for hiding this comment

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

change binary name

1. Build and push your image to the location specified by `IMG`:

```sh
make docker-build docker-push IMG=<some-registry>/sealos-cloud-database-monitor:tag
Copy link
Member

Choose a reason for hiding this comment

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

change name

env:
- name: VM_SERVICE_HOST
value: http://vmsingle-victoria-metrics-k8s-stack.vm.svc:8429
image: ghcr.io/labring/sealos-launchpad-service:latest
Copy link
Member

Choose a reason for hiding this comment

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

change name

kind: Service
metadata:
labels:
app: launchpad-vlogs
Copy link
Member

Choose a reason for hiding this comment

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

name

if config, err := url.PathUnescape(kubeConfig); err == nil {
kubeConfig = config
} else {
return "", "", "", err
Copy link
Member

Choose a reason for hiding this comment

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

return with fmt.Errorf("failed to PathUnescape : %s", err)
For different errors in the same method, please use format to wrap different error messages.

vlogsReq := &api.VlogsRequest{}
err := json.NewDecoder(req.Body).Decode(&vlogsReq)
if err != nil {
return "", "", "", errors.New("invalid JSON data,decode error")
Copy link
Member

Choose a reason for hiding this comment

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

The original error message is not included, replace with fmt.Errorf and include the original err information.

return stream + generateCommonQuery(req) + builder.String() + generateDropQuery() + generateNumberQuery(req), nil
}

func generateStreamQuery(req *api.VlogsRequest) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Why is there no error return, but the return parameter needs to contain error?

return builder.String() + stream + generateCommonQuery(req) + generateDropQuery() + generateNumberQuery(req), nil
}

func generateJsonQuery(req *api.VlogsRequest) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

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

no error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants