Skip to content

Conversation

@yagihash
Copy link
Contributor

@yagihash yagihash commented Jul 4, 2025

WHAT

  • Make app not use CloudEvents client when METRICS is set to false

WHY

CloudEvents logging is not essential to run the service. This is for who wanna run the service with minimum requirements. And ceclient is not used when METRICS is set to false in fact.

ISSUE

#949


Since it is an update on main, I did not add any test.
Instead of that, I have quickly checked the behavior with those commands below.
This should not break anything since CloudEvents client is referred only when METRICS is set to true.

METRICS=false \
PORT=8080 \
GITHUB_APP_ID=11111 \
STS_DOMAIN=test.localhost \
APP_SECRET_CERTIFICATE_FILE=$HOME/tmp/private.pem \
go run cmd/app/main.go
❯ http test.localhost:8080
HTTP/1.1 200 OK
Content-Length: 80
Content-Type: application/json
Date: Fri, 04 Jul 2025 00:49:50 GMT

{
    "msg": "please check documentation for usage: https://github.com/octo-sts/app"
}

yagihash added 3 commits July 4, 2025 09:42
I am not sure whether I should remain this or not.
Just deleting this would be better perhaps.
@yagihash yagihash marked this pull request as ready for review July 4, 2025 00:55
should work properly because it will never be called when METRICS is set to true
@yagihash yagihash requested a review from cpanato July 4, 2025 07:50
Copy link
Collaborator

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

thanks

@cpanato cpanato merged commit 56a5b83 into octo-sts:main Jul 11, 2025
12 checks passed
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.

2 participants