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

[Access] ws controller error handling #6798

Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2c17c96
change error handling in reader and writer routines
illia-malachyn Dec 4, 2024
48c8e4e
Merge branch 'illia-malachyn/6635-tests-for-websocket-controller' int…
illia-malachyn Dec 4, 2024
665cdb0
Handle different data flows in controller
illia-malachyn Dec 11, 2024
b62f8db
cover all actions with tests
illia-malachyn Dec 11, 2024
4c573c1
fix tests shutdown
illia-malachyn Dec 12, 2024
8e6fe46
Merge branch 'master' into illia-malachyn/6642-ws-controller-error-ha…
illia-malachyn Dec 12, 2024
78ca825
remove old mockery cmds
illia-malachyn Dec 12, 2024
09bf64d
refactor places where we return error
illia-malachyn Dec 12, 2024
849b5a8
remove comments
illia-malachyn Dec 13, 2024
eed3b63
Merge branch 'master' into illia-malachyn/6642-ws-controller-error-ha…
illia-malachyn Dec 13, 2024
b8850f8
Merge branch 'UlyanaAndrukhiv/6639-ws-ping-pong' into illia-malachyn/…
illia-malachyn Dec 13, 2024
2920042
remove log msg
illia-malachyn Dec 13, 2024
e9795fb
remove unnecessary func
illia-malachyn Dec 13, 2024
c00a12c
fix parallel running and turn it on
illia-malachyn Dec 13, 2024
b41f176
use once instead of maybe where needed
illia-malachyn Dec 13, 2024
ee1cf77
refactor msg
illia-malachyn Dec 13, 2024
7049e0c
Merge branch 'master' into illia-malachyn/6642-ws-controller-error-ha…
illia-malachyn Dec 13, 2024
502c74f
add assert expectations for mocks in tests
illia-malachyn Dec 13, 2024
6c71168
shuffle code
illia-malachyn Dec 13, 2024
ac529ad
move stream draining to write routine to not run into deadlock. fix p…
illia-malachyn Dec 15, 2024
911e6cd
Updated return statements to latest changes
UlyanaAndrukhiv Dec 16, 2024
1c008f7
Merge branch 'master' of github.com:The-K-R-O-K/flow-go into illia-ma…
Guitarheroua Dec 19, 2024
2dd1ed2
fix comments
illia-malachyn Dec 19, 2024
f56fa5a
fix comments
illia-malachyn Dec 19, 2024
02ad488
change error messsages
illia-malachyn Dec 19, 2024
72de9e5
change request-response models
illia-malachyn Dec 19, 2024
a6f604a
Merge branch 'master' into illia-malachyn/6642-ws-controller-error-ha…
illia-malachyn Dec 23, 2024
780b0c2
remove old comments
illia-malachyn Dec 27, 2024
2c808a2
Add godoc for controller and websockets package
illia-malachyn Dec 27, 2024
7503ca5
Merge branch 'master' into illia-malachyn/6642-ws-controller-error-ha…
illia-malachyn Dec 27, 2024
963a6e7
Remove unused values from config
illia-malachyn Dec 27, 2024
51a567f
add comment about multiplexed stream lifecycly
illia-malachyn Dec 27, 2024
af09389
improve package godoc
illia-malachyn Dec 27, 2024
52210b9
add more explanation on how multiplexed stream is closed
illia-malachyn Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ on:
type: boolean
description: 'Build amd64 `without_adx` and `without_netgo_without_adx` images, and arm64 images'
required: false
private_build:
type: boolean
description: 'Build private images'
required: false

jobs:
# matrix_builder generates a matrix that includes the roles selected in the input
Expand Down Expand Up @@ -109,16 +113,30 @@ jobs:
credentials_json: ${{ secrets.GCR_SERVICE_KEY_SECRET }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Authenticate docker with gcloud

- name: Authenticate Docker with gcloud
run: |
gcloud auth configure-docker
if [[ "${{ github.event.inputs.private_build }}" == "true" ]]; then
gcloud auth configure-docker us-central1-docker.pkg.dev
else
gcloud auth configure-docker
fi

- name: Set CONTAINER_REGISTRY
id: set-registry
run: |
if [[ "${{ github.event.inputs.private_build }}" == "true" ]]; then
echo "CONTAINER_REGISTRY=${{ vars.PRIVATE_REGISTRY }}" >> $GITHUB_ENV
else
echo "CONTAINER_REGISTRY=${{ vars.PUBLIC_REGISTRY }}" >> $GITHUB_ENV
fi

- name: Build/Push ${{ matrix.role }} amd64 images with adx (default)
env:
IMAGE_TAG: ${{ inputs.docker_tag }}
CADENCE_DEPLOY_KEY: ${{ secrets.CADENCE_DEPLOY_KEY }}
run: |
make docker-build-${{ matrix.role }}-with-adx docker-push-${{ matrix.role }}-with-adx
make docker-build-${{ matrix.role }}-with-adx docker-push-${{ matrix.role }}-with-adx CONTAINER_REGISTRY=$CONTAINER_REGISTRY

- name: Build/Push ${{ matrix.role }} amd64 images without netgo and without adx, arm64 images
if: ${{ inputs.include_alternative_builds }}
Expand All @@ -128,7 +146,7 @@ jobs:
run: |
make docker-build-${{ matrix.role }}-without-adx docker-push-${{ matrix.role }}-without-adx \
docker-build-${{ matrix.role }}-without-netgo-without-adx docker-push-${{ matrix.role }}-without-netgo-without-adx \
docker-cross-build-${{ matrix.role }}-arm docker-push-${{ matrix.role }}-arm
docker-cross-build-${{ matrix.role }}-arm docker-push-${{ matrix.role }}-arm CONTAINER_REGISTRY=$CONTAINER_REGISTRY



1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ docker-all-tools: tool-util tool-remove-execution-fork
PHONY: docker-build-util
docker-build-util:
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/util --build-arg GOARCH=$(GOARCH) --build-arg VERSION=$(IMAGE_TAG) --build-arg CGO_FLAG=$(DISABLE_ADX) --target production \
--secret id=cadence_deploy_key,env=CADENCE_DEPLOY_KEY --build-arg GOPRIVATE=$(GOPRIVATE) \
-t "$(CONTAINER_REGISTRY)/util:latest" \
-t "$(CONTAINER_REGISTRY)/util:$(IMAGE_TAG)" .

Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/utils/md5.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package utils

// The google storage API only provides md5 and crc32 hence overriding the linter flag for md5
import (
"crypto/md5" //nolint:gosec
// #nosec
"crypto/md5"
"io"
"os"
)
Expand Down
20 changes: 13 additions & 7 deletions cmd/util/cmd/verify_execution_result/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,33 @@ func run(*cobra.Command, []string) {
chainID := flow.ChainID(flagChain)
_ = chainID.Chain()

lg := log.With().
Str("chain", string(chainID)).
Str("datadir", flagDatadir).
Str("chunk_data_pack_dir", flagChunkDataPackDir).
Logger()

if flagFromTo != "" {
from, to, err := parseFromTo(flagFromTo)
if err != nil {
log.Fatal().Err(err).Msg("could not parse from_to")
lg.Fatal().Err(err).Msg("could not parse from_to")
}

log.Info().Msgf("verifying range from %d to %d", from, to)
lg.Info().Msgf("verifying range from %d to %d", from, to)
err = verifier.VerifyRange(from, to, chainID, flagDatadir, flagChunkDataPackDir)
if err != nil {
log.Fatal().Err(err).Msgf("could not verify range from %d to %d", from, to)
lg.Fatal().Err(err).Msgf("could not verify range from %d to %d", from, to)
}
log.Info().Msgf("successfully verified range from %d to %d", from, to)
lg.Info().Msgf("successfully verified range from %d to %d", from, to)

} else {
log.Info().Msgf("verifying last %d sealed blocks", flagLastK)
lg.Info().Msgf("verifying last %d sealed blocks", flagLastK)
err := verifier.VerifyLastKHeight(flagLastK, chainID, flagDatadir, flagChunkDataPackDir)
if err != nil {
log.Fatal().Err(err).Msg("could not verify last k height")
lg.Fatal().Err(err).Msg("could not verify last k height")
}

log.Info().Msgf("successfully verified last %d sealed blocks", flagLastK)
lg.Info().Msgf("successfully verified last %d sealed blocks", flagLastK)
}
}

Expand Down
Loading
Loading