Skip to content

Enhance GetInstance method to handle instance not found error gracefully #256

Enhance GetInstance method to handle instance not found error gracefully

Enhance GetInstance method to handle instance not found error gracefully #256

Workflow file for this run

name: PR Validation
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
paths-ignore: [ '**.md' ]
pull_request:
branches: [ "main" ]
paths-ignore: [ '**.md' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Configure protoc and go grpc plugin
PROTOC_VERSION: "25.x"
PROTOC_GEN_GO: "v1.30"
PROTOC_GEN_GO_GRPC: "v1.3"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22.x', '1.21.x', '1.20.x' ]
# Boot up a local, clean postgres instance for the postgres tests
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:13.18
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get .
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: ${{ env.PROTOC_VERSION }}
- name: Installing protoc-gen-go
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@$PROTOC_GEN_GO
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@$PROTOC_GEN_GO_GRPC
- name: Generate grpc code
run: protoc --go_out=. --go-grpc_out=. -I ./submodules/durabletask-protobuf/protos orchestrator_service.proto
- name: Run integration tests
env:
POSTGRES_ENABLED: "true"
run: go test ./tests/... -coverpkg ./api,./task,./client,./backend/...,./internal/helpers