Repository navigation
Conversation
S3のリクエスト階層、Lambdaの呼び出しと実行時間、NATの処理量を ローカルのFlociに対して確認する。ビルドタグflociのファイルと 専用ワークフローだけを追加し、通常のgo testと上流CIには載せない。 この変更はフォーク専用であり、上流へは送らない。 Signed-off-by: Atsushi Sakashita <ats@saks.industries> Co-authored-by: A. Sakashita <asakaxgit@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork-only. This must never go upstream.
usage-sync-requestsのCloudWatch同期を、ローカルのFlociに対して一度通すスモークテストです。本番コードは変えていません。上流のCIにはFlociが無く、go test ./...もこのファイルをビルドしません。internal/usagesync/aws/floci_smoke_test.goは//go:build flociの後ろに置いてあります。S3バケット1つ、Lambda関数1つ、NAT gateway1つへPutMetricDataでメトリクスを書き、BaseEndpointがhttp://localhost:4566の実SDKクライアントでusage-syncのAWSソースを実行して、同期された値を確認します。GetMetricDataにまとめた経路です。Floci 2.3.0はListMetricsとGetMetricDataを1レスポンスで返し、NextTokenを受けてもページを切りません。ページングそのものは既存のfakeCWユニットテストが担当します。.github/workflows/floci-smoke.ymlはイメージfloci/floci:2.3.0をサービスコンテナで起動し、go test -tags floci -count=1 ./internal/usagesync/...を実行します。トリガーはusage-sync-requestsへのpushとpull_request、およびworkflow_dispatchです。Goはci.ymlと同じ1.27.3です。Test plan
floci/floci:2.3.0(sha256:e0b292df4dc9559b7b1bf4f51bdda4bb8e269276236438cd03cae661260ea8a9) に対するgo test -tags floci -count=1 ./internal/usagesync/...go build ./...、go vet ./...、go test -race ./...、golangci-lint v2.15.0