Skip to content

feat(postgres): set up dual-writes - #6316

Merged
michaelkedar merged 8 commits into
google:masterfrom
michaelkedar:💽✍️✍️
Nov 26, 2026

Hidden character warning

The head ref may contain hidden characters: "\ud83d\udcbd\u270d\ufe0f\u270d\ufe0f"
Merged

michaelkedar merged 8 commits into
google:masterfrom
michaelkedar:💽✍️✍️

Conversation

@michaelkedar

Copy link
Copy Markdown
Member

(Sorry this PR is so big, a lot of things ended up having to be done at the same time)
Set up dual-writing infrastructure for Postgres in the places where vulns get written:

  • Implemented the remaining VulnerabilityStore for postgres (splitting the queries.sql into files corresponding to the go files they're used in)
  • Propagated data needed from importer (and recoverer) to worker to enable raw_vulnerabilities and historic_vulnerabilities to be written with all needed fields
    • Doing this meant passing a compressed JSON object instead of a compressed proto over the Pub/Sub for the raw vulnerability. We need to make sure there are no jobs in Pub/Sub while this is being merged (i.e. pause the importers).
  • Implemented Dual-write wrapper, to write to Datastore/GCS, then Postgres. Using this for workers and vanir signatures.
  • Updated relations cron-job to also mutate in Postgres (this wasn't using the database interfaces, and I have plans to change how this is done when postgres becomes the source of truth)
  • Configured all the GKE images with the POSTGRES_* env vars (I've already set up the GKE secret for the db password)
  • tests and such

I may have to make a follow-up PR fairly quickly to bump the CPUs of the postgres if affected commits are too plentiful.

In a future PR, I plan to re-jig the tests so they spin up postgres in a docker container instead of trying to mock all the endpoints, so we can make sure our queries actually work properly.

@codecov-commenter

codecov-commenter commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.69847% with 172 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.20%. Comparing base (5c27e94) to head (ca4f092).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
go/internal/database/postgres/vulnerability.go 77.89% 61 Missing ⚠️
go/cmd/worker/main.go 0.00% 19 Missing ⚠️
go/cmd/relations/relations.go 0.00% 17 Missing ⚠️
go/internal/importer/importer.go 53.33% 14 Missing ⚠️
go/internal/worker/subscriber.go 45.45% 12 Missing ⚠️
go/cmd/vanir_signatures/main.go 0.00% 11 Missing ⚠️
go/internal/database/postgres/affected_versions.go 70.96% 9 Missing ⚠️
go/cmd/relations/update.go 85.36% 6 Missing ⚠️
go/internal/worker/taskmsg/taskmsg.go 82.85% 6 Missing ⚠️
go/internal/database/dualwrite/vulnerability.go 79.16% 5 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6316      +/-   ##
==========================================
+ Coverage   55.83%   56.20%   +0.37%     
==========================================
  Files         223      225       +2     
  Lines       23001    23458     +457     
==========================================
+ Hits        12842    13184     +342     
- Misses      10156    10271     +115     
  Partials        3        3              
Flag Coverage Δ
go 59.98% <70.69%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For both vanir signatures, and delete, they have the same issue of:

  • datastore/gcs write succeeds
  • postresql fails to write
  • error is returned and retry is sent
  • Upon receiving the retry message, worker checks if it's already done ( vanir signature generated, record withdrawn...etc), then early exit. Leaving postgresql not updated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flipped the dual write ordering to do Postgres first. If Datastore/GCS fails after Postgres succeeds, the job will retry later and rewrite when it does succeed.

Comment thread go/cmd/relations/update.go Outdated
if !pgChanged {
return false, nil
}
pgVuln.Modified = timestamppb.New(modified)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm should this be checking whether pgVuln's modified is already newer than this modified?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a check for this (and for Datastore too!)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this leaks POSTGRES_PASSWORD into the vanir signature runner. We'll be fixing that anyway before we restart vanir, so this is probably fine to ignore

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filtered POSTGRES_* env vars from vanir command since it was simple.

);

-- name: SyncAffectedCommits :exec
WITH old_set AS (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check that there's actually a change before we make all the queries and unnests.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

VALUES (@vuln_id, @commits::bytea[])
ON CONFLICT (vuln_id) DO UPDATE
SET commits = EXCLUDED.commits
WHERE vuln_commits.commits IS DISTINCT FROM EXCLUDED.commits;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this up earlier so that it doesn't do all the unnest work before reaching here and realize nothing needs to be done.

e.g.

+changed AS (
+    SELECT COALESCE((SELECT commits FROM existing), ARRAY[]::bytea[]) AS old_commits
+    WHERE (SELECT commits FROM existing) IS DISTINCT FROM @commits::bytea[]
+),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

} else {
sortedCommits := slices.Clone(req.AffectedCommits.Commits)
slices.SortFunc(sortedCommits, bytes.Compare)
sortedCommits = slices.CompactFunc(sortedCommits, bytes.Equal)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit sorting inside the transaction? This could get pretty big...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved sorting outside the transaction

Comment thread go/internal/recoverer/recoverer.go Outdated
return err
}

var data []byte

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very similar to importer, pls refactor and dedup this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted to taskmsg.NewUpdateMessage for both importer and recoverer to use

Comment thread go/internal/worker/subscriber.go Outdated
@@ -130,18 +136,28 @@ func (s *Subscriber) parseVuln(m *pubsub.Message) (*osvschema.Vulnerability, err
var err error
data, err = zstd.DecodeTo(data, m.Data)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The max 10MB encoded size could blow up to a huge amount of memory usage.

You can set a WIthDecoderMaxMemory limit for zstd. This way we at least know when we are causing issues due to too big records.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using WithDecoderMaxMemory, with 128 MiB

Comment thread deployment/README.md Outdated
--zone="$CLUSTER_ZONE" \
--project="$PROJECT_ID"
kubectl create secret generic osv-db-worker-password \
--from-literal="password=$PG_WORKER_PASS" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should pass password in via stdin, not via cli flags (since anyone on the pc can read the cli flag when the command is running). Not really a big deal since we are all on relatively trusted machines though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sending password through stdin via printf into --from-file=password=/dev/stdin

Comment thread go/internal/worker/engine.go Outdated
Comment on lines +127 to +130
if len(rawSHA256) == 0 && len(task.RawJSON) > 0 {
sum := sha256.Sum256(task.RawJSON)
rawSHA256 = sum[:]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postgres.VulnerabilityStore.Write already computes the sha256.Sum256(rawJSON) fallback when req.RawSHA256 is empty, and Datastore doesn't use RawSHA256. We can drop this duplicate fallback (and the "crypto/sha256" import on L5):

--- a/go/internal/worker/engine.go
+++ b/go/internal/worker/engine.go
@@ -2,7 +2,6 @@ package worker
 
 import (
 	"context"
-	"crypto/sha256"
 	"encoding/hex"
 	"errors"
 	"fmt"
@@ -124,10 +123,6 @@ func (e *Engine) handleUpdate(ctx context.Context, task Task) error {
 			rawSHA256 = decoded
 		}
 	}
-	if len(rawSHA256) == 0 && len(task.RawJSON) > 0 {
-		sum := sha256.Sum256(task.RawJSON)
-		rawSHA256 = sum[:]
-	}
 
 	if err := e.Stores.Vulnerability.Write(ctx, models.WriteRequest{
 		ID:              enriched.GetId(),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}

// Write atomically updates the base record and its derived indexes.
func (s *VulnerabilityStore) Write(ctx context.Context, req models.WriteRequest) error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write can be simplified quite a bit by:

  • Dropping the unused req.Raw == nil && len(req.RawJSON) > 0 unmarshal branch (datastore.Write and all callers either pass Raw or omit both).
  • Using cmp.Or(req.ID, req.Enriched.GetId()).
  • Moving commit sorting/dedup out before opening the transaction.
  • Extracting small pbTimePtr, derefTime, withTx, upsertRawVulnerability, and updateAffectedCommits helpers (which also cleans up the repeated nullable timestamp conversions in GetWithMetadata, ListBySource, and Mutate).

Suggested diff:

--- a/go/internal/database/postgres/vulnerability.go
+++ b/go/internal/database/postgres/vulnerability.go
@@ -16,6 +16,7 @@ package postgres
 
 import (
 	"bytes"
+	"cmp"
 	"context"
 	"crypto/sha256"
 	"errors"
@@ -36,6 +37,7 @@ import (
 	"github.com/ossf/osv-schema/bindings/go/osvschema"
 	"google.golang.org/protobuf/encoding/protojson"
 	"google.golang.org/protobuf/proto"
+	"google.golang.org/protobuf/types/known/timestamppb"
 )
 
 // isValidPGText reports whether s can be sent as a PostgreSQL UTF-8 TEXT
@@ -227,16 +229,11 @@ func (s *VulnerabilityStore) GetWithMetadata(ctx context.Context, id string) (*o
 		return nil, nil, err
 	}
 
-	var modRaw time.Time
-	if row.SourceModified != nil {
-		modRaw = *row.SourceModified
-	}
-
 	ref := &models.VulnSourceRef{
 		ID:          row.ID,
 		Source:      row.SourceID,
 		Path:        row.SourcePath,
-		ModifiedRaw: modRaw,
+		ModifiedRaw: derefTime(row.SourceModified),
 	}
 
 	return v, ref, nil
@@ -296,15 +293,11 @@ func (s *VulnerabilityStore) ListBySource(ctx context.Context, source string, sk
 				afterPath = r.SourcePath
 				afterID = r.ID
 
-				var modRaw time.Time
-				if r.SourceModified != nil {
-					modRaw = *r.SourceModified
-				}
 				ref := &models.VulnSourceRef{
 					ID:          r.ID,
 					Source:      r.SourceID,
 					Path:        r.SourcePath,
-					ModifiedRaw: modRaw,
+					ModifiedRaw: derefTime(r.SourceModified),
 				}
 				if !yield(ref, nil) {
 					return
@@ -364,15 +357,51 @@ func marshalVulnJSON(v *osvschema.Vulnerability) ([]byte, error) {
 	return schema.SanitizeJSON(data), nil
 }
 
+func pbTimePtr(ts *timestamppb.Timestamp) *time.Time {
+	if ts == nil {
+		return nil
+	}
+	t := ts.AsTime().UTC()
+	return &t
+}
+
+func derefTime(t *time.Time) time.Time {
+	if t == nil {
+		return time.Time{}
+	}
+	return *t
+}
+
+func (s *VulnerabilityStore) withTx(ctx context.Context, id string, fn func(*Queries) error) error {
+	beginner, ok := s.db.(txBeginner)
+	if !ok {
+		return fn(s.queries)
+	}
+
+	tx, err := beginner.Begin(ctx)
+	if err != nil {
+		return fmt.Errorf("failed to begin transaction for %s: %w", id, err)
+	}
+	defer func() {
+		_ = tx.Rollback(ctx)
+	}()
+
+	if err := fn(s.queries.WithTx(tx)); err != nil {
+		return err
+	}
+	if err := tx.Commit(ctx); err != nil {
+		return fmt.Errorf("failed to commit transaction for %s: %w", id, err)
+	}
+
+	return nil
+}
+
 // Write atomically updates the base record and its derived indexes.
 func (s *VulnerabilityStore) Write(ctx context.Context, req models.WriteRequest) error {
 	if req.Enriched == nil {
 		return errors.New("enriched vulnerability is required")
 	}
-	id := req.ID
-	if id == "" {
-		id = req.Enriched.GetId()
-	}
+	id := cmp.Or(req.ID, req.Enriched.GetId())
 	if id == "" {
 		return errors.New("vulnerability ID is required")
 	}
@@ -386,29 +415,17 @@ func (s *VulnerabilityStore) Write(ctx context.Context, req models.WriteRequest)
 		return fmt.Errorf("failed to marshal enriched JSON for %s: %w", id, err)
 	}
 
-	hasRaw := req.Raw != nil || len(req.RawJSON) > 0
-	rawProto := req.Raw
-	var rawJSON []byte
-	var rawSHA256 []byte
-	if hasRaw {
+	var rawJSON, rawSHA256 []byte
+	if req.Raw != nil {
 		if len(req.RawJSON) > 0 {
 			rawJSON = schema.SanitizeJSON(req.RawJSON)
-			if rawProto == nil {
-				var parsed osvschema.Vulnerability
-				if err := (protojson.UnmarshalOptions{DiscardUnknown: true}).Unmarshal(rawJSON, &parsed); err != nil {
-					return fmt.Errorf("failed to unmarshal raw JSON for %s: %w", id, err)
-				}
-				rawProto = &parsed
-			}
-		} else {
-			rawJSON, err = marshalVulnJSON(rawProto)
-			if err != nil {
-				return fmt.Errorf("failed to marshal raw JSON for %s: %w", id, err)
-			}
+		} else if rawJSON, err = marshalVulnJSON(req.Raw); err != nil {
+			return fmt.Errorf("failed to marshal raw JSON for %s: %w", id, err)
 		}
-		if len(req.RawSHA256) > 0 {
-			rawSHA256 = req.RawSHA256
-		} else {
+
+		rawSHA256 = req.RawSHA256
+		if len(rawSHA256) == 0 {
 			sum := sha256.Sum256(rawJSON)
 			rawSHA256 = sum[:]
 		}
@@ -419,112 +436,92 @@ func (s *VulnerabilityStore) Write(ctx context.Context, req models.WriteRequest)
 		return fmt.Errorf("failed to compute affected versions for %s: %w", id, err)
 	}
 
-	q := s.queries
-	var tx pgx.Tx
-	if beginner, ok := s.db.(txBeginner); ok {
-		tx, err = beginner.Begin(ctx)
-		if err != nil {
-			return fmt.Errorf("failed to begin transaction for %s: %w", id, err)
-		}
-		defer func() {
-			_ = tx.Rollback(ctx)
-		}()
-		q = s.queries.WithTx(tx)
+	var sortedCommits [][]byte
+	if !req.AffectedCommits.Skip && req.Enriched.GetWithdrawn() == nil && len(req.AffectedCommits.Commits) > 0 {
+		sortedCommits = slices.Clone(req.AffectedCommits.Commits)
+		slices.SortFunc(sortedCommits, bytes.Compare)
+		sortedCommits = slices.CompactFunc(sortedCommits, bytes.Equal)
 	}
 
-	var rawVulnID *int64
-	if hasRaw {
-		fetchedAt := time.Now().UTC()
-		if req.FetchedAt != nil && !req.FetchedAt.IsZero() {
-			fetchedAt = req.FetchedAt.UTC()
-		}
-		var gitCommit *string
-		if req.GitCommitHash != "" {
-			gitCommit = &req.GitCommitHash
-		}
-
-		rawID, err := q.UpsertRawVulnerability(ctx, UpsertRawVulnerabilityParams{
-			VulnID:        &id,
-			SourceID:      req.Source,
-			SourcePath:    req.Path,
-			ContentSha256: rawSHA256,
-			GitCommitHash: gitCommit,
-			GcsGeneration: req.GCSGeneration,
-			RawData:       rawJSON,
-			FetchedAt:     fetchedAt,
-		})
-		if err != nil {
-			return fmt.Errorf("failed to upsert raw_vulnerabilities for %s: %w", id, err)
+	return s.withTx(ctx, id, func(q *Queries) error {
+		params := UpsertVulnerabilityParams{
+			ID:         id,
+			SourceID:   req.Source,
+			SourcePath: req.Path,
+			Modified:   req.Enriched.GetModified().AsTime().UTC(),
+			Withdrawn:  pbTimePtr(req.Enriched.GetWithdrawn()),
+			Data:       enrichedJSON,
+			Proto:      enrichedProto,
+			HasRaw:     req.Raw != nil,
 		}
-		rawVulnID = &rawID
-	}
-
-	var sourceModified *time.Time
-	var aliasRaw, relatedRaw, upstreamRaw []string
-	if rawProto != nil {
-		if rawProto.GetModified() != nil {
-			t := rawProto.GetModified().AsTime().UTC()
-			sourceModified = &t
+		if req.Raw != nil {
+			rawID, err := upsertRawVulnerability(ctx, q, id, req, rawJSON, rawSHA256)
+			if err != nil {
+				return err
+			}
+			params.RawVulnID = &rawID
+			params.SourceModified = pbTimePtr(req.Raw.GetModified())
+			params.AliasRaw = req.Raw.GetAliases()
+			params.RelatedRaw = req.Raw.GetRelated()
+			params.UpstreamRaw = req.Raw.GetUpstream()
 		}
-		aliasRaw = rawProto.GetAliases()
-		relatedRaw = rawProto.GetRelated()
-		upstreamRaw = rawProto.GetUpstream()
-	}
 
-	var withdrawn *time.Time
-	if req.Enriched.GetWithdrawn() != nil {
-		t := req.Enriched.GetWithdrawn().AsTime().UTC()
-		withdrawn = &t
-	}
-
-	if err := q.UpsertVulnerability(ctx, UpsertVulnerabilityParams{
-		ID:             id,
-		SourceID:       req.Source,
-		SourcePath:     req.Path,
-		RawVulnID:      rawVulnID,
-		Modified:       req.Enriched.GetModified().AsTime().UTC(),
-		SourceModified: sourceModified,
-		Withdrawn:      withdrawn,
-		AliasRaw:       aliasRaw,
-		RelatedRaw:     relatedRaw,
-		UpstreamRaw:    upstreamRaw,
-		Data:           enrichedJSON,
-		Proto:          enrichedProto,
-		HasRaw:         hasRaw,
-	}); err != nil {
-		return fmt.Errorf("failed to upsert vulnerabilities for %s: %w", id, err)
-	}
+		if err := q.UpsertVulnerability(ctx, params); err != nil {
+			return fmt.Errorf("failed to upsert vulnerabilities for %s: %w", id, err)
+		}
+		if err := updateAffectedVersions(ctx, q, id, affectedVersions); err != nil {
+			return err
+		}
+		return updateAffectedCommits(ctx, q, id, req.AffectedCommits.Skip, sortedCommits)
+	})
+}
 
-	if err := updateAffectedVersions(ctx, q, id, affectedVersions); err != nil {
-		return err
+func upsertRawVulnerability(ctx context.Context, q *Queries, id string, req models.WriteRequest, rawJSON, rawSHA256 []byte) (int64, error) {
+	fetchedAt := time.Now().UTC()
+	if req.FetchedAt != nil && !req.FetchedAt.IsZero() {
+		fetchedAt = req.FetchedAt.UTC()
 	}
+	var gitCommit *string
+	if req.GitCommitHash != "" {
+		gitCommit = &req.GitCommitHash
+	}
 
-	if !req.AffectedCommits.Skip {
-		if req.Enriched.GetWithdrawn() != nil || len(req.AffectedCommits.Commits) == 0 {
-			if err := q.ClearAffectedCommits(ctx, id); err != nil {
-				return fmt.Errorf("failed to clear affected_commits for %s: %w", id, err)
-			}
-		} else {
-			sortedCommits := slices.Clone(req.AffectedCommits.Commits)
-			slices.SortFunc(sortedCommits, bytes.Compare)
-			sortedCommits = slices.CompactFunc(sortedCommits, bytes.Equal)
-
-			if err := q.SyncAffectedCommits(ctx, SyncAffectedCommitsParams{
-				VulnID:  id,
-				Commits: sortedCommits,
-			}); err != nil {
-				return fmt.Errorf("failed to sync affected_commits for %s: %w", id, err)
-			}
-		}
+	rawID, err := q.UpsertRawVulnerability(ctx, UpsertRawVulnerabilityParams{
+		VulnID:        &id,
+		SourceID:      req.Source,
+		SourcePath:    req.Path,
+		ContentSha256: rawSHA256,
+		GitCommitHash: gitCommit,
+		GcsGeneration: req.GCSGeneration,
+		RawData:       rawJSON,
+		FetchedAt:     fetchedAt,
+	})
+	if err != nil {
+		return 0, fmt.Errorf("failed to upsert raw_vulnerabilities for %s: %w", id, err)
 	}
 
-	if tx != nil {
-		if err := tx.Commit(ctx); err != nil {
-			return fmt.Errorf("failed to commit transaction for %s: %w", id, err)
+	return rawID, nil
+}
+
+func updateAffectedCommits(ctx context.Context, q *Queries, id string, skip bool, sortedCommits [][]byte) error {
+	if skip {
+		return nil
+	}
+	if len(sortedCommits) == 0 {
+		if err := q.ClearAffectedCommits(ctx, id); err != nil {
+			return fmt.Errorf("failed to clear affected_commits for %s: %w", id, err)
 		}
+
+		return nil
 	}
+	if err := q.SyncAffectedCommits(ctx, SyncAffectedCommitsParams{
+		VulnID:  id,
+		Commits: sortedCommits,
+	}); err != nil {
+		return fmt.Errorf("failed to sync affected_commits for %s: %w", id, err)
+	}
 
 	return nil
 }
@@ -641,15 +638,9 @@ func (s *VulnerabilityStore) Mutate(ctx context.Context, id string, mutateFn mod
 			return false, fmt.Errorf("failed to marshal mutated JSON for %s: %w", id, err)
 		}
 
-		var withdrawn *time.Time
-		if v.GetWithdrawn() != nil {
-			t := v.GetWithdrawn().AsTime().UTC()
-			withdrawn = &t
-		}
-
 		_, err = s.queries.UpdateVulnerabilityOnMutate(ctx, UpdateVulnerabilityOnMutateParams{
 			Modified:         v.GetModified().AsTime().UTC(),
-			Withdrawn:        withdrawn,
+			Withdrawn:        pbTimePtr(v.GetWithdrawn()),
 			Data:             newJSON,
 			Proto:            newProto,
 			ID:               id,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# Conflicts:
#	AGENTS.md
#	deployment/clouddeploy/gke-workers/base/core/workers.yaml
#	deployment/clouddeploy/gke-workers/base/extra/workers-cves.yaml
#	deployment/clouddeploy/gke-workers/base/extra/workers-reimport.yaml
#	deployment/clouddeploy/gke-workers/environments/oss-vdb-test/workers.yaml
#	deployment/clouddeploy/gke-workers/environments/private/workers.yaml
#	go/internal/worker/subscriber_test.go
@michaelkedar
michaelkedar merged commit c54e429 into google:master Nov 26, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants