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

chore(deps): bump cloud.google.com/go/longrunning from 0.6.3 to 0.6.4 #436

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cb42796
fix: increase http timeout
fritterhoff Oct 22, 2022
238fcfe
feat: add health endpoint
fritterhoff Jul 2, 2023
52e7fdb
fix/extend eab functionality
fritterhoff Oct 22, 2022
047ece9
Adaptions for MUAS
fritterhoff Oct 22, 2022
2918b27
feat: add validation agent functionality
fritterhoff Jul 10, 2023
d6ad592
feat: permit insecure endpoints for reverse proxying
fritterhoff Sep 22, 2023
1019924
chore: upgrade packages
fritterhoff Sep 29, 2023
9ce8308
feat: better errors for eab usage
fritterhoff Oct 20, 2023
61a82fb
fix: optimize error logging
fritterhoff Oct 20, 2023
f7509bc
chore: update github actions
fritterhoff Oct 22, 2023
9b105c0
feat: more mqtt logging
fritterhoff Oct 26, 2023
57af82b
chore: better handling of reconnects
fritterhoff Oct 26, 2023
18d2a73
fix: try to handle concurrent saving better
fritterhoff Nov 25, 2023
80d4285
tests: start fixing broken tests
fritterhoff Mar 24, 2024
57713e7
tests: fix broken tests
fritterhoff Mar 24, 2024
afe588a
make eab optional
fritterhoff Mar 24, 2024
ce93a2d
stick to old repo name
fritterhoff Mar 26, 2024
5ade613
fix agent image name
fritterhoff Mar 26, 2024
37af2c2
upgrade packages
fritterhoff Apr 5, 2024
d0cafa5
fix: make client id unique
fritterhoff May 13, 2024
55bf055
chore: upgrade packages
fritterhoff May 29, 2024
cd0501a
chore(deps): bump docker/build-push-action from 5 to 6
dependabot[bot] Jun 23, 2024
65fc3b2
feat: custom dns resolver
fritterhoff Aug 8, 2024
542192e
chore: upgrade packages
fritterhoff Aug 27, 2024
8e00ab4
chore: update packages
fritterhoff Nov 10, 2024
525cdbb
feat: switch to sentry tracing
fritterhoff Nov 25, 2024
45faaf9
reuse context
fritterhoff Nov 25, 2024
389d0c1
try capturing acme errors
fritterhoff Nov 25, 2024
20ee1a4
fix: debug sentry integration
fritterhoff Nov 25, 2024
65ed5a8
debug sentry
fritterhoff Nov 25, 2024
9881852
wrapping sentry trace
fritterhoff Nov 25, 2024
d1d5bbe
fix sentry wrapping
fritterhoff Nov 25, 2024
2a46063
try fixing context usage
fritterhoff Nov 25, 2024
ff50509
try reusing trace
fritterhoff Nov 25, 2024
e4230cc
fix: set transaction name
fritterhoff Nov 25, 2024
0cf64a3
feat: enrich sentry
fritterhoff Nov 26, 2024
63b045d
fix: catch store error
fritterhoff Dec 9, 2024
b7469ff
chore: upgrade packages
fritterhoff Dec 13, 2024
f1bb2e1
chore(deps): bump cloud.google.com/go/longrunning from 0.6.3 to 0.6.4
dependabot[bot] Jan 6, 2025
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
4 changes: 4 additions & 0 deletions .devcontainer/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
POSTGRES_HOSTNAME=localhost
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.18, 1.17, 1-bullseye, 1.18-bullseye, 1.17-bullseye, 1-buster, 1.18-buster, 1.17-buster
ARG VARIANT=1-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment the next lines to use go get to install anything else you need
# USER vscode
# RUN go get -x <your-dependency-or-tool>
# USER root

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/go-postgres
{
"name": "Go & PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go",
"go.goroot": "/usr/local/go"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"golang.Go"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5432],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "go version",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
53 changes: 53 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
version: '3.8'

volumes:
postgres-data:

null
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
# [Choice] Go version 1, 1.18, 1.17
# Append -bullseye or -buster to pin to an OS version.
# Use -bullseye variants on local arm64/Apple Silicon.
VARIANT: 1.18-bullseye
# Options
NODE_VERSION: "lts/*"
env_file:
# Ensure that the variables in .env match the same variables in devcontainer.json
- .env

# Security Opt and cap_add allow for C++ based debuggers to work.
# See `runArgs`: https://github.com/Microsoft/vscode-docs/blob/main/docs/remote/devcontainerjson-reference.md
# security_opt:
# - seccomp:unconfined
# cap_add:
# - SYS_PTRACE

volumes:
- ..:/workspace:cached

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
# Uncomment the next line to use a non-root user for all processes.
# user: vscode

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

db:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
env_file:
# Ensure that the variables in .env match the same variables in devcontainer.json
- .env
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)
7 changes: 7 additions & 0 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "1"
rules:
- base: master
upstream: smallstep:master
mergeMethod: merge
assignees:
- fritterhoff
7 changes: 0 additions & 7 deletions .github/workflows/code-scan-cron.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Docker Images

on:
push:
pull_request:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: hm-edu/certificates
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value={{branch}}-{{sha}}-{{date 'X'}},enable=${{ github.event_name != 'pull_request' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: docker/Dockerfile
build-agent:
runs-on: ubuntu-latest
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: hm-edu/certificates-agent
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value={{branch}}-{{sha}}-{{date 'X'}},enable=${{ github.event_name != 'pull_request' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: docker/Dockerfile.agent
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/step-ca",
}
]
}
2 changes: 1 addition & 1 deletion acme/api/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func NewAccount(w http.ResponseWriter, r *http.Request) {
render.Error(w, r, err)
return
}
if err := db.UpdateExternalAccountKey(ctx, prov.ID, eak); err != nil {
if err := db.UpdateExternalAccountKey(ctx, prov.GetID(), eak); err != nil {
render.Error(w, r, acme.WrapErrorISE(err, "error updating external account binding key"))
return
}
Expand Down
30 changes: 15 additions & 15 deletions acme/api/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ func TestHandler_GetOrdersByAccountID(t *testing.T) {
"fail/nil-account": func(t *testing.T) test {
return test{
db: &acme.MockDB{},
ctx: context.WithValue(context.Background(), accContextKey, http.NoBody),
ctx: context.WithValue(context.Background(), AccContextKey, http.NoBody),
statusCode: 400,
err: acme.NewError(acme.ErrorAccountDoesNotExistType, "account does not exist"),
}
},
"fail/account-id-mismatch": func(t *testing.T) test {
acc := &acme.Account{ID: "foo"}
ctx := context.WithValue(context.Background(), accContextKey, acc)
ctx := context.WithValue(context.Background(), AccContextKey, acc)
ctx = context.WithValue(ctx, chi.RouteCtxKey, chiCtx)
return test{
db: &acme.MockDB{},
Expand All @@ -348,7 +348,7 @@ func TestHandler_GetOrdersByAccountID(t *testing.T) {
},
"fail/db.GetOrdersByAccountID-error": func(t *testing.T) test {
acc := &acme.Account{ID: accID}
ctx := context.WithValue(context.Background(), accContextKey, acc)
ctx := context.WithValue(context.Background(), AccContextKey, acc)
ctx = context.WithValue(ctx, chi.RouteCtxKey, chiCtx)
return test{
db: &acme.MockDB{
Expand All @@ -363,7 +363,7 @@ func TestHandler_GetOrdersByAccountID(t *testing.T) {
acc := &acme.Account{ID: accID}
ctx := context.WithValue(context.Background(), chi.RouteCtxKey, chiCtx)
ctx = acme.NewProvisionerContext(ctx, prov)
ctx = context.WithValue(ctx, accContextKey, acc)
ctx = context.WithValue(ctx, AccContextKey, acc)
return test{
db: &acme.MockDB{
MockGetOrdersByAccountID: func(ctx context.Context, id string) ([]string, error) {
Expand Down Expand Up @@ -698,7 +698,7 @@ func TestHandler_NewAccount(t *testing.T) {
}
ctx := acme.NewProvisionerContext(context.Background(), prov)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: b})
ctx = context.WithValue(ctx, accContextKey, acc)
ctx = context.WithValue(ctx, AccContextKey, acc)
return test{
db: &acme.MockDB{},
ctx: ctx,
Expand Down Expand Up @@ -879,7 +879,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
}
},
"fail/nil-account": func(t *testing.T) test {
ctx := context.WithValue(context.Background(), accContextKey, nil)
ctx := context.WithValue(context.Background(), AccContextKey, nil)
return test{
db: &acme.MockDB{},
ctx: ctx,
Expand All @@ -888,7 +888,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
}
},
"fail/no-payload": func(t *testing.T) test {
ctx := context.WithValue(context.Background(), accContextKey, &acc)
ctx := context.WithValue(context.Background(), AccContextKey, &acc)
return test{
db: &acme.MockDB{},
ctx: ctx,
Expand All @@ -897,7 +897,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
}
},
"fail/nil-payload": func(t *testing.T) test {
ctx := context.WithValue(context.Background(), accContextKey, &acc)
ctx := context.WithValue(context.Background(), AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, nil)
return test{
db: &acme.MockDB{},
Expand All @@ -907,7 +907,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
}
},
"fail/unmarshal-payload-error": func(t *testing.T) test {
ctx := context.WithValue(context.Background(), accContextKey, &acc)
ctx := context.WithValue(context.Background(), AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{})
return test{
db: &acme.MockDB{},
Expand All @@ -922,7 +922,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
}
b, err := json.Marshal(uar)
assert.FatalError(t, err)
ctx := context.WithValue(context.Background(), accContextKey, &acc)
ctx := context.WithValue(context.Background(), AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: b})
return test{
db: &acme.MockDB{},
Expand All @@ -937,7 +937,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
}
b, err := json.Marshal(uar)
assert.FatalError(t, err)
ctx := context.WithValue(context.Background(), accContextKey, &acc)
ctx := context.WithValue(context.Background(), AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: b})
return test{
db: &acme.MockDB{
Expand All @@ -959,7 +959,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
b, err := json.Marshal(uar)
assert.FatalError(t, err)
ctx := acme.NewProvisionerContext(context.Background(), prov)
ctx = context.WithValue(ctx, accContextKey, &acc)
ctx = context.WithValue(ctx, AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: b})
return test{
db: &acme.MockDB{
Expand All @@ -978,7 +978,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
b, err := json.Marshal(uar)
assert.FatalError(t, err)
ctx := acme.NewProvisionerContext(context.Background(), prov)
ctx = context.WithValue(ctx, accContextKey, &acc)
ctx = context.WithValue(ctx, AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: b})
return test{
db: &acme.MockDB{},
Expand All @@ -993,7 +993,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
b, err := json.Marshal(uar)
assert.FatalError(t, err)
ctx := acme.NewProvisionerContext(context.Background(), prov)
ctx = context.WithValue(ctx, accContextKey, &acc)
ctx = context.WithValue(ctx, AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{value: b})
return test{
db: &acme.MockDB{
Expand All @@ -1009,7 +1009,7 @@ func TestHandler_GetOrUpdateAccount(t *testing.T) {
},
"ok/post-as-get": func(t *testing.T) test {
ctx := acme.NewProvisionerContext(context.Background(), prov)
ctx = context.WithValue(ctx, accContextKey, &acc)
ctx = context.WithValue(ctx, AccContextKey, &acc)
ctx = context.WithValue(ctx, payloadContextKey, &payloadInfo{isPostAsGet: true})
return test{
db: &acme.MockDB{},
Expand Down
Loading
Loading