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

Feat/updateold #28

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
with:
context: .
file: ./Dockerfile
target: prod
provenance: false
platforms: ${{ inputs.PLATFORMS }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Dev stage
FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/golang:1.22.4 AS dev
RUN go install github.com/air-verse/air@latest
WORKDIR /go/src/app
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod tidy
ENTRYPOINT ["air"]

# Build stage
FROM --platform=${BUILDPLATFORM:-linux/amd64} docker.io/golang:1.22.4 AS build

Expand Down
3 changes: 2 additions & 1 deletion midaas/midaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ func (p *midaasProvider) ApplyRecord(action string, recordInfo *ZoneRecord) erro
}

func (p *midaasProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error {
combinedChanges := make([]*ChangeRecord, 0, len(changes.Create)+len(changes.UpdateNew)+len(changes.Delete))
combinedChanges := make([]*ChangeRecord, 0, len(changes.Create)+len(changes.UpdateNew)+len(changes.Delete)+len(changes.UpdateOld))

combinedChanges = append(combinedChanges, p.newChanges(dnsCreate, changes.Create)...)
combinedChanges = append(combinedChanges, p.newChanges(dnsDelete, changes.UpdateOld)...)
combinedChanges = append(combinedChanges, p.newChanges(dnsUpdate, changes.UpdateNew)...)
combinedChanges = append(combinedChanges, p.newChanges(dnsDelete, changes.Delete)...)

Expand Down