instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GoogleCloudPlatform__ops-agent__2276 | GoogleCloudPlatform/ops-agent | 2,276 | defect | 5a8fdd864495e9e35616c1974599eab11f4dbf6d | 79d019a2f17ca10414bb30186e5657005eea4f1c | Centralized port config in environment | ## Description
Expose an environment variable that allows customer to set sub-agent ports.
## Related issue
b/236599678
## How has this been tested?
Integration test.
## Checklist:
- Unit tests
- [X] Unit tests do not apply.
- [ ] Unit tests have been added/modified and passed for this PR.
- Integra... | diff --git a/confgenerator/confgenerator.go b/confgenerator/confgenerator.go
index 33e659753d..c43a31b0ef 100644
--- a/confgenerator/confgenerator.go
+++ b/confgenerator/confgenerator.go
@@ -224,8 +224,8 @@ func (uc *UnifiedConfig) GenerateOtelConfig(ctx context.Context, outDir, stateDi
agentSelfMetrics := AgentSelfM... | 1 | 1 | 1 | [{"id": "G0", "claim": "The metrics-port environment variables should be renamed with the EXPERIMENTAL prefix and their names extracted into constants so the tests can reference the constants too.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__osconfig__107 | GoogleCloudPlatform/osconfig | 107 | defect | 371e008ff532a8ec7b9815b89fef7a4d0adb99d4 | 7ce90d3308468871847790cdd5f6377d7674b8e9 | Implement patch whitelisting for zypper | --with-update is a tricky case to handle with patches. All the other fields/flags in zyppersettings work on patches except for --with-update, which runs on packages.
readmore: https://www.mankier.com/8/zypper#--with-update
Here is the algorithm to prepare patch and package list for zypper:
- Fetch the list of pa... | diff --git a/inventory/packages/zypper.go b/inventory/packages/zypper.go
index f24699bc1b..498579cfe5 100644
--- a/inventory/packages/zypper.go
+++ b/inventory/packages/zypper.go
@@ -18,7 +18,9 @@ import (
"bytes"
"fmt"
"os/exec"
+ "regexp"
"runtime"
+ "strconv"
"strings"
"github.com/GoogleCloudPlatform/o... | 3 | 3 | 0 | [{"id": "G0", "claim": "The zypper install command construction should be removed from RunZypperPatch and extracted into a new function ZypperInstall(patches, packages) in the packages package.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The runner fi... | null |
GoogleCloudPlatform__osconfig__113 | GoogleCloudPlatform/osconfig | 113 | defect | 812c9eb9cbf9dafe588bbc114eb95c0df7e52a9a | 17ebc4ccef09a7f4a3dc4a0e23b1050017fce103 | Implement logic to parse and merge VM instance software configs. | * Add implementation & test for the JSON-based format of VM configs
* Add implementation & test for the logic to merge the configs | diff --git a/instance/instance.go b/instance/instance.go
new file mode 100644
index 000000000..aad9bba66
--- /dev/null
+++ b/instance/instance.go
@@ -0,0 +1,139 @@
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file... | 7 | 6 | 1 | [{"id": "G0", "claim": "ParseLocalConfig should use err or errors for the error variable and return *LocalConfigs (a pointer).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "ParseLocalConfig should work in one line: return rv, json.Unmarshal(a, &rv).", "... | null |
GoogleCloudPlatform__osconfig__117 | GoogleCloudPlatform/osconfig | 117 | defect | b4cfcf3b9a53414bb79e4c7aab2b1e2b4c4a20c4 | aa7394305d23a0b49c456c59ac054c50a2760c8e | Activated the local software configs feature | TESTED: Ran the locally-built osconfig on a VM, verified that a recipe from metadata is being applied. | diff --git a/policies/local.go b/policies/local.go
index 0824083cb..1d52d5465 100644
--- a/policies/local.go
+++ b/policies/local.go
@@ -19,6 +19,7 @@ import (
"bytes"
"encoding/json"
+ "cloud.google.com/go/compute/metadata"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
@@ -71,6 +72... | 2 | 2 | 0 | [{"id": "G0", "claim": "The error log added for a failed lookup says \"Error running GuestPolicies\" when the failing call is LookupEffectiveGuestPolicies.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "mergeConfigs should take *agentendpointpb.... | null |
GoogleCloudPlatform__osconfig__168 | GoogleCloudPlatform/osconfig | 168 | defect | e053f4fb2503a5e00d14d8bb9c53c418ec8b6518 | dbb1b016711ad9c596d15b7dd327f88a97829f23 | Merge V1 and Beta agentendpoint clients in the same package | This reduces common code duplication, still not happy with it though, more changes will come later though.
Updated protos. | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
index 7893b8817..d268308cb 100644
--- a/agentendpoint/agentendpoint.go
+++ b/agentendpoint/agentendpoint.go
@@ -336,8 +336,7 @@ func (c *Client) WaitForTaskNotification(ctx context.Context) {
}()
}
-func mkLabels(task *agentendpointpb.Tas... | 2 | 2 | 1 | [{"id": "G0", "claim": "The error log in policies/policies.go should name the function actually called, agentendpoint.NewBetaClient, instead of agentendpoint.NewClient.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request as submitted has... | null |
GoogleCloudPlatform__osconfig__177 | GoogleCloudPlatform/osconfig | 177 | defect | cd2f18000b1f3a54fe6629d9e3066391fd7e2b37 | a95b0e10e1b48680d5737272d04a2742c4dfba15 | watch on osconfig specific metadata changes | without this, watchmetadata would return on any change in for this instance which this makes the agent logs a little spammy.
from now, the agent keeps a hash of the current agentconfig and only returns from watchconfig if there is anything that changes in the agentconfig.
| diff --git a/config/config.go b/config/config.go
index 2438a4808a..5538b57587 100644
--- a/config/config.go
+++ b/config/config.go
@@ -17,6 +17,7 @@ package config
import (
"context"
+ "crypto/sha256"
"encoding/json"
"flag"
"fmt"
@@ -77,10 +78,11 @@ var (
debug = flag.Bool("debug", false, "set debug log... | 3 | 3 | 1 | [{"id": "G0", "claim": "Minor: the variable name `lAgentConfigHash` is confusing — the `l` prefix is unclear and the name suggests it is the hash of `agentConfig` rather than a cached hash of the last config.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",... | null |
GoogleCloudPlatform__osconfig__179 | GoogleCloudPlatform/osconfig | 179 | defect | 4b0cfa0df990d9ee78b5105c494ba08ddc93dd89 | 909fe56621be7048b80914047aa07c038aa0b090 | make agent talk to zonal agentendpoint | with zonal agentendpoints, agents will now be talking to zonal agentendpoints.
the zonal endpoint is crafted by prefixing `osconfig-endpoint` metadata with the instancezone name.
The assumption here is that, zone value is always present in instancemetadata
referrred this
https://cloud.google.com/compute/docs/stor... | diff --git a/config/config.go b/config/config.go
index b2371b5c37..7d03b8c63f 100644
--- a/config/config.go
+++ b/config/config.go
@@ -298,6 +298,12 @@ func createConfigFromMetadata(md metadataJSON) *config {
c.debugEnabled = true
}
+ setSVCEndpoint(md, c)
+
+ return c
+}
+
+func setSVCEndpoint(md metadataJSON, ... | 1 | 1 | 1 | [{"id": "G0", "claim": "Unconditionally prepending the zone to c.svcEndpoint breaks overriding the endpoint to a non-zonal endpoint; the endpoint flag should be honored, with the zone applied only when the default endpoint is used.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introdu... | null |
GoogleCloudPlatform__osconfig__187 | GoogleCloudPlatform/osconfig | 187 | defect | fac315b7fbd8218864f7389135171c645c8eefdd | 4c2a2df8ae8ee30f6a1691c27967c593c99cbe1c | Add RegisterAgent rpcs, update libraries, update error handling | RegisterAgent currently unused
agentendpoint tests had to be updated because of new client library retries (really wasn't testing something that we cared about)
Moved a few error handling to new go 1.13 errors.Is and errors.As | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
index e3c61962d..2d884aec5 100644
--- a/agentendpoint/agentendpoint.go
+++ b/agentendpoint/agentendpoint.go
@@ -23,6 +23,7 @@ import (
"sync"
"time"
+ "cloud.google.com/go/compute/metadata"
agentendpoint "cloud.google.com/go/osconfig/a... | 1 | 1 | 0 | [{"id": "G0", "claim": "A comment should be added explaining how the values in the capabilities list are decided.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__osconfig__203 | GoogleCloudPlatform/osconfig | 203 | defect | e9a737434b7a63958883879461ff70ff2b771664 | eca42b6e563d81817c30ebd0b9cf30eb6c87409a | report inventory to agent endpoint | Also moved content in inventory/inventory_test.go to agentendpoint/inventory_test.go. | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
index 9f0a6501be..c243809ad4 100644
--- a/agentendpoint/agentendpoint.go
+++ b/agentendpoint/agentendpoint.go
@@ -108,8 +108,8 @@ func (c *Client) RegisterAgent(ctx context.Context) error {
return err
}
-// ReportInventory calls ReportInv... | 4 | 4 | 2 | [{"id": "G0", "claim": "The WUA package should use the package's MoreInfoUrls as SupportUrls (populating it with only pkg.SupportURL is incomplete and the field is usually unpopulated).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The code should use t... | null |
GoogleCloudPlatform__osconfig__204 | GoogleCloudPlatform/osconfig | 204 | defect | 5d40a51cf72c2faa19b2242328a563e3f9693eda | ca5d879eb9c2b758b30e9bba413792dc1792be18 | fix missing yum flags passed during yum update | * currently we do not pass update-minimal and security flag when customer sets these options.
* introduced commandRunner to make flags testing easier.
* refactored YumUpdates method to workaround exitcode 100 from yum check-update | diff --git a/go.mod b/go.mod
index c4f79a8ea0..61c324ec4d 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,8 @@ require (
github.com/GoogleCloudPlatform/guest-logging-go v0.0.0-20200113214433-6cbb518174d4
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
github.com/go-ole/go-ole v1.2.4
- github.com/golan... | 4 | 3 | 0 | [{"id": "G0", "claim": "The Run(command string, args ...string) method of CommandRunner is never called, so the interface is redundant and should be simplified (e.g. use Run instead of RunCommand, or remove RunCommand and have RunWithPty take string args).", "category": "design", "verdict": "supported", "priority": "P2... | null |
GoogleCloudPlatform__osconfig__221 | GoogleCloudPlatform/osconfig | 221 | defect | 908f50d7228986323755a1b4a981352a7eb39954 | d69b5da8e3e0f91370bc21d7248ba7ed0606ed41 | Move all packages run calls to CommandRunner | This is mostly a replacement of the existing run function in the "packages" package to use our new CommandRunner interface and all the associated tests.
Tests were also refactored to use a common style and reduce code duplication.
CommandRunner.Run was updated to return separated stdout and stderr, the parsing functi... | diff --git a/go.mod b/go.mod
index ca211ff3e..b1546e64f 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@ require (
github.com/GoogleCloudPlatform/guest-logging-go v0.0.0-20200113214433-6cbb518174d4
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d
github.com/go-ole/go-ole v1.2.4
- github.com/golang/... | 2 | 1 | 0 | [{"id": "G0", "claim": "Since the pull request stops appending gem/pip listing errors to the returned errors, those failures are only logged at debug level and silently ignored, so the reviewer asks whether their log level should be raised (possibly via a logOnce helper to avoid spew).", "category": "maintainability", ... | null |
GoogleCloudPlatform__osconfig__236 | GoogleCloudPlatform/osconfig | 236 | defect | 7b3ba83547eb4179c2773e2df4ffcf8a6a084b34 | 258d20bffbc0ae5301a9b620d02e3faf188e8cdb | Report installed packages on COS | Passed gofmt, goimports, goline, go vet, go build, go test.
The resulted binary worked as expected on a COS instance. | diff --git a/go.mod b/go.mod
index 29ae3c8fe..0b2afc171 100644
--- a/go.mod
+++ b/go.mod
@@ -5,6 +5,7 @@ go 1.13
require (
cloud.google.com/go v0.67.0
cloud.google.com/go/storage v1.10.0
+ cos.googlesource.com/cos/tools.git v0.0.0-20201006044527-f4f20a5be968
github.com/GoogleCloudPlatform/guest-logging-go v0.0.0... | 4 | 4 | 2 | [{"id": "G0", "claim": "The Packages struct field for COS should be named COS rather than Cos.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "GetInstalledPackages is missing the check for COSPkgInfoExists before calling InstalledCOSPackages.", "category"... | null |
GoogleCloudPlatform__osconfig__246 | GoogleCloudPlatform/osconfig | 246 | defect | 2f6b2b7bfd34109455a07afe03fd36433a833f2c | cbbe963f911257d28f2dcefb604d51b324f08984 | Support deb and rpm in PackageResource | Merged latest two commits from master as one was related to the code I was changing. | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
index 0823983491..fa9d3706f0 100644
--- a/agentendpoint/agentendpoint.go
+++ b/agentendpoint/agentendpoint.go
@@ -319,10 +319,6 @@ func (c *Client) waitForTask(ctx context.Context) error {
}
if s, ok := status.FromError(err); ok {
switc... | 4 | 1 | 0 | [{"id": "G0", "claim": "The reviewer asks why INSTALLED is the only applicable desired state for deb (and similarly for the other package types in this file), instead of supporting other desired states.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The re... | null |
GoogleCloudPlatform__osconfig__268 | GoogleCloudPlatform/osconfig | 268 | defect | e166ad09b2c89d86f1e46c2257ed4770928bb1e7 | 0556ade20357c75506b68d0752c27af88a334318 | Add ExecResource | Add ExecResource
Move downloading of data from checkState to validate in both PackageResouce and FileResource as checkState gets run multiple times and we don't want to keep downloading. | diff --git a/config/exec_resource.go b/config/exec_resource.go
new file mode 100644
index 000000000..19f7317dd
--- /dev/null
+++ b/config/exec_resource.go
@@ -0,0 +1,184 @@
+// Copyright 2020 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The exec-resource exit-code convention (100/101 for validate) should be captured in the API documentation, and added there if it is not already.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment explaining why ex... | null |
GoogleCloudPlatform__osconfig__296 | GoogleCloudPlatform/osconfig | 296 | defect | 0fdd9dc6e618aab01e8be0f3970fa98864d44b38 | 8566567ddb2952f3227b9c94254ede6ec2812537 | config_task: Rework config step logic | Added additional debug log for printing each policy before execution
ConfigSteps will only contain the steps that ran for each resource
Logic change:
For each policy in policies:
- For each resource in this policies resources
- If management of a previous resource ended in failure, skip managing this resourc... | diff --git a/agentendpoint/config_task.go b/agentendpoint/config_task.go
index 3a2f96c30..5993889fe 100644
--- a/agentendpoint/config_task.go
+++ b/agentendpoint/config_task.go
@@ -21,18 +21,11 @@ import (
"github.com/GoogleCloudPlatform/osconfig/clog"
"github.com/GoogleCloudPlatform/osconfig/config"
+ "github.co... | 2 | 2 | 0 | [{"id": "G0", "claim": "The context log labels should be named \"os_policy_assignment\" and \"os_policy_id\" instead of \"config_assignment\" and \"policy_id\".", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The boolean return value of enforceConfigResou... | null |
GoogleCloudPlatform__osconfig__317 | GoogleCloudPlatform/osconfig | 317 | defect | 7331df8f08537e9c5772b1315e5909dc78ecad3d | fe387b0bb9f0da9c928e0373b167ce62eac7a9d7 | Config task: only run post check on resources that have already been evaluated | When any resource is enforced mark all previous resources (for all policies) as needing post check.
With this change any resource that is evaluated AFTER the last resource that was "enforced" the agent will not re check. | diff --git a/agentendpoint/config_task.go b/agentendpoint/config_task.go
index 78dc510d3..2b67cabd7 100644
--- a/agentendpoint/config_task.go
+++ b/agentendpoint/config_task.go
@@ -26,8 +26,8 @@ import (
agentendpointpb "google.golang.org/genproto/googleapis/cloud/osconfig/agentendpoint/v1"
)
-var newResource = fu... | 3 | 2 | 0 | [{"id": "G0", "claim": "Add comments explaining when the `!ok`/nil conditions in markPostCheckRequired would be met and why policies with errors are skipped, since this is not obvious to future readers.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "clai... | null |
GoogleCloudPlatform__osconfig__350 | GoogleCloudPlatform/osconfig | 350 | defect | acda57c07ae18b155eee70a2692d5179ed7d2b19 | cd480e3dc4c4f09ce2ef2f5dae030d05147365e4 | Config Task: add error message and ExecResource output recording | Pull latest proto libraries
Populate ErrorMessage field for config task steps that end in failure (max size of 512)
Add ExecResourceOutput recording (max size of 100K)
If an error with an enforce step is encountered, end the policy application but still run post check on all resources. | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
index 857bccade..f31f8019d 100644
--- a/agentendpoint/agentendpoint.go
+++ b/agentendpoint/agentendpoint.go
@@ -51,7 +51,6 @@ var (
errResourceExhausted = errors.New("ResourceExhausted")
taskStateFile = agentconfig.TaskStateFile()
... | 8 | 2 | 1 | [{"id": "G0", "claim": "Reviewer asked whether maxErrorMessage is measured in bytes or characters and whether the byte-based truncation can cut multi-byte characters in half.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The conflict-error branch i... | null |
GoogleCloudPlatform__osconfig__353 | GoogleCloudPlatform/osconfig | 353 | defect | f41fd9506658c5dc3e5b7369542dced3a74b9d01 | f711bdce172c2a6b76d1441bfd120d91798041f5 | Run fieldalignment on all structs | https://pkg.go.dev/golang.org/x/tools@v0.1.0/go/analysis/passes/fieldalignment | diff --git a/agentconfig/agentconfig.go b/agentconfig/agentconfig.go
index 769f1c568..9fc5d8f88 100644
--- a/agentconfig/agentconfig.go
+++ b/agentconfig/agentconfig.go
@@ -105,10 +105,21 @@ var (
)
type config struct {
- osInventoryEnabled, guestPoliciesEnabled, taskNotificationEnabled, debugEnabled bool
- s... | 2 | 2 | 1 | [{"id": "G0", "claim": "Mention the new debug.FreeOSMemory() call in agentendpoint/inventory.go in the commit description too.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The debug.FreeOSMemory() call added to ReportInventory was unintentional ... | null |
GoogleCloudPlatform__osconfig__355 | GoogleCloudPlatform/osconfig | 355 | defect | edf439cd3c3fe838b933cff484ab677091752077 | 4cc53b7b845cf192a62c99ad49247ac77d30c7b7 | Agent efficiency improvements/bugfixes/logging updates | Update agentendpoint api calls to new debug logging system
If debug logging is not enabled don't create the debug log message at all to avoid unnecessary memory usage
Set debug logging settings on every config refresh so the agent does not need to be restarted
Don't log error for config post check state if resource ... | diff --git a/agentconfig/agentconfig.go b/agentconfig/agentconfig.go
index 9fc5d8f88..3e5709760 100644
--- a/agentconfig/agentconfig.go
+++ b/agentconfig/agentconfig.go
@@ -114,7 +114,7 @@ type config struct {
zypperRepoFilePath string
yumRepoFilePath string
instanceID string
- numericPr... | 4 | 3 | 1 | [{"id": "G0", "claim": "The PR should keep the before/after RPC logs (removed for ReportInventory) to help track response times and hung requests, and should add helpers like logRequest/logResponse that give standard naming and redact the token.", "category": "maintainability", "verdict": "uncertain", "priority": "P1",... | null |
GoogleCloudPlatform__osconfig__382 | GoogleCloudPlatform/osconfig | 382 | defect | c03caa5ee11d81042cda0c4c1c118dce1f86651f | 7864110ef2eff3f1d67c504caa2adbe5e204532b | Add more info logs, actually cleanup unmanaged repos | During a config run there will now be clear info logs when actions are taken or after a check has been completed.
We need to remove repos that config is no longer managing, we do this by clearing out all unmanaged repos that match our naming.
Actually limit error messages to the 512 byte limit.
For the new logging... | diff --git a/agentconfig/agentconfig.go b/agentconfig/agentconfig.go
index a986144f4..66aea6fe0 100644
--- a/agentconfig/agentconfig.go
+++ b/agentconfig/agentconfig.go
@@ -26,6 +26,7 @@ import (
"net/http"
"net/url"
"os"
+ "path/filepath"
"runtime"
"strconv"
"strings"
@@ -514,6 +515,11 @@ func ZypperRepoDi... | 4 | 3 | 1 | [{"id": "G0", "claim": "The 'resource conflict in policy' error message should also be wrapped with truncateMessage like the other error paths.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The 'Enforce state: No enforcement required' log should be... | null |
GoogleCloudPlatform__osconfig__391 | GoogleCloudPlatform/osconfig | 391 | defect | 12766745ba517397af6525de13bda1e6d6c72b98 | ab5bd5478afac846b30457c9497e5d1bef15b925 | Config: Add package info caching | Keep a cache of package info for config package resource so we don't need to download the package on every run
This cache is keyed to the source of the resource so multiple resources that use the exact same source will use the same cache item
On every run update the timestamp for each accessed item in the cache so th... | diff --git a/agentconfig/agentconfig.go b/agentconfig/agentconfig.go
index 8eb55b10d..3b9504a8b 100644
--- a/agentconfig/agentconfig.go
+++ b/agentconfig/agentconfig.go
@@ -75,9 +75,6 @@ const (
taskStateFileLinux = cacheDirLinux + "/osconfig_task.state"
oldTaskStateFileLinux = oldConfigDirLinux + "/osconfig_tas... | 5 | 4 | 1 | [{"id": "G0", "claim": "It would be better to use a hash of the file contents as the cache key, since a large file could otherwise lead to a very large key.", "category": "performance", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comment should read \"is to just always r... | null |
GoogleCloudPlatform__osconfig__425 | GoogleCloudPlatform/osconfig | 425 | defect | 991293047263c51f19b8e5fd112ae06c5e956a62 | a1eea782a75acbc07593c88a49d177f7578d5907 | Fix previous PR: exec.CommandContext cannot be reused | Changed logic to recreate exec.CommandContext when retrying with a new flag | diff --git a/packages/apt_deb.go b/packages/apt_deb.go
index 35a2bd48c..f4d9950d9 100644
--- a/packages/apt_deb.go
+++ b/packages/apt_deb.go
@@ -124,18 +124,20 @@ func runAptGet(ctx context.Context, args []string, cmdModifiers []cmdModifier) (
modifier(cmd)
}
- stdout, stderr, err := runner.Run(ctx, cmd)
- stdou... | 1 | 1 | 1 | [{"id": "G0", "claim": "runAptGetWithDowngradeRetrial should only be called for the apt-get upgrade scenario, not for every call site the PR switched over.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__osconfig__626 | GoogleCloudPlatform/osconfig | 626 | defect | a235d3366ebc7183a106d62dddd22cfe1f18822d | 40a2cf0bd09673ba1f623b135fc419c870058687 | Adding Architecture to the packages being installed/updated in yum repo | Currently, OsConfig Agent does not support installing packages with multiarchitecture (where both 32bit and 64 bit architecture packages are present). To support this, we are going to thereby use "packageName.arch" instead of "packageName" in yum install <packageName> command. | diff --git a/ospatch/yum_update.go b/ospatch/yum_update.go
index 2a3208ea35..d758f6d0ec 100644
--- a/ospatch/yum_update.go
+++ b/ospatch/yum_update.go
@@ -108,7 +108,7 @@ func RunYumUpdate(ctx context.Context, opts ...YumUpdateOption) error {
var pkgNames []string
for _, pkg := range fPkgs {
- pkgNames = append(... | 1 | 1 | 1 | [{"id": "G0", "claim": "Do not add the NameWithArch field to PkgInfo; make Arch a dedicated type able to hold both the raw and the standardized architecture instead of a new field needed only for one package manager's use case.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__osconfig__646 | GoogleCloudPlatform/osconfig | 646 | defect | bd75fc253cb839cad524723a2c25cdb16f36067d | f2ed86bc2d351c20ed4f0ddc9a028e3e6f3b3082 | Add debugging logs for repository resource config | /assign @ekremenetskii
/cc @dowgird
/cc @MarcMarc
/cc @ekremenetskii | diff --git a/config/file_resource.go b/config/file_resource.go
index b345d406b..1352b1ec5 100644
--- a/config/file_resource.go
+++ b/config/file_resource.go
@@ -154,7 +154,7 @@ func (f *fileResource) checkState(ctx context.Context) (inDesiredState bool, err
case agentendpointpb.OSPolicy_Resource_FileResource_PRESENT:... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new debugging log messages in contentsMatch should not repeat the function name, since the logging framework already logs the function and line with each message.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__osconfig__788 | GoogleCloudPlatform/osconfig | 788 | defect | ca7a31c60ddb25c3d400333e07ece0ee37e337d2 | a62c40dbc7e7a3d238f471a1910f45e384998a2a | Rename `RebootCount` to `PostPatchRebootCount` and only increment it for post-patch reboots. | `RebootCount` was used only for forcing post-patch reboots via `RebootConfig = always`, but incremented for every reboot. As a result, the forced post-patch reboot was skipped if pre-patch reboot was required.
Note that the rename should be fine, since reading the old state file will result with counter being reset ... | diff --git a/agentendpoint/patch_task.go b/agentendpoint/patch_task.go
index 356806fb8b..bcd570b2d4 100644
--- a/agentendpoint/patch_task.go
+++ b/agentendpoint/patch_task.go
@@ -45,11 +45,11 @@ type patchTask struct {
lastProgressState map[agentendpointpb.ApplyPatchesTaskProgress_State]time.Time
state ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Guard against a potential pre-patch reboot loop by keeping a RebootCount-style counter and breaking out once too many pre-patch reboots have occurred.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__osconfig__79 | GoogleCloudPlatform/osconfig | 79 | defect | eb50e7e8f797b87d26c11dc000e72725c5bbc227 | 7c15cb4c4f59c0eada1c93e0d3bbc33069d548bb | Move ospatch to ospatchog, cleanup WUA library | WUA library updated to be easier to understand
ospatchog will be replaced by new agentendpoint ospatch soon | diff --git a/inventory/packages/wua_windows.go b/inventory/packages/wua_windows.go
index 7180d6758..260957793 100644
--- a/inventory/packages/wua_windows.go
+++ b/inventory/packages/wua_windows.go
@@ -15,15 +15,139 @@ package packages
import (
"fmt"
+ "sync"
ole "github.com/go-ole/go-ole"
"github.com/go-ole/... | 3 | 2 | 1 | [{"id": "G0", "claim": "NewUpdateSession locks wuaSession but returns errors without unlocking it, so a failed session creation leaves the mutex locked forever.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The nil receiver guards in IUpdateCollect... | null |
GoogleCloudPlatform__osconfig__799 | GoogleCloudPlatform/osconfig | 799 | defect | 16dea177a73936cbd4f85b3801026946fd9e0faf | 21fbcfcb5abf42d6acb149d0ca5ea594e722853e | Update hash computation algorithm | * Introduce new function that compute hash that independent from the order of inventory items.
* Write tests for computeHash and computeStableHash functions.
* Benchmark computeHash and computeStableHash to be able to compare approaches.
Benchmark results:
goos: linux
goarch: amd64
pkg: github.com/GoogleCloudP... | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
index 0b021d3897..f7196734fa 100644
--- a/agentendpoint/agentendpoint.go
+++ b/agentendpoint/agentendpoint.go
@@ -16,10 +16,7 @@
package agentendpoint
import (
- "bytes"
"context"
- "crypto/sha256"
- "encoding/hex"
"errors"
"fmt"
"... | 6 | 6 | 2 | [{"id": "G0", "claim": "The hashing helpers should be named \"fingerprint\" rather than \"hash\", matching the project's usual terminology.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The stable hash may not be stable because hashing pkg.Stri... | null |
GoogleCloudPlatform__osconfig__811 | GoogleCloudPlatform/osconfig | 811 | defect | 4075b9f0a2e57e7ffcd8f285ef955f695957f6cb | 97aaef5725bec1f569ddfd31c6b63991e8ad026d | Introduce MatchSnapshot large test results matcher function, snapshot apt-deb GetPackageUpdates | Proposed workflow:
Given large input test data is present (e.g. raw CLI tooling stdout from real machine)
and you wish to capture / snapshot the equally large output to avoid regressions without digging deeper and extracting specific cases,
you can use `MatchSnapshot(t, output, filename)` that writes pretty-fo... | diff --git a/go.mod b/go.mod
index c9f4eab75a..c240ff0e5e 100644
--- a/go.mod
+++ b/go.mod
@@ -12,6 +12,7 @@ require (
github.com/go-ole/go-ole v1.3.0
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.7.0
+ github.com/kr/pretty v0.3.1
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
github.co... | 12 | 10 | 0 | [{"id": "G0", "claim": "The package should be named after its folder (e.g. a test-only package util/utiltest instead of utilsnapshot in util/snapshot) following common Go naming conventions.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The byt... | null |
GoogleCloudPlatform__osconfig__84 | GoogleCloudPlatform/osconfig | 84 | defect | eb50e7e8f797b87d26c11dc000e72725c5bbc227 | 2925f05b7a6216eedddc0cf9e4b5ce8f3418a102 | Add basic agentendpoint logic | This does not contain any patch or exec system code yet, just the basic api interactions and basic logic. | diff --git a/agentendpoint/agentendpoint.go b/agentendpoint/agentendpoint.go
new file mode 100644
index 000000000..0c1691e60
--- /dev/null
+++ b/agentendpoint/agentendpoint.go
@@ -0,0 +1,221 @@
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
... | 8 | 6 | 2 | [{"id": "G0", "claim": "When OSPatch is not enabled the agent silently skips an APPLY_PATCHES task with continue, so the agent should call ReportTaskComplete with status FAILED instead of leaving the task unreported.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "... | null |
GoogleCloudPlatform__osconfig__846 | GoogleCloudPlatform/osconfig | 846 | defect | 4243d93d1aaf4ac2ab7887155d84655cec2d067f | 257241cdeab5fe6f7ddc3a949a5a926b427f6303 | Make OS Config agent TPC aware | Changes include:
- Disabling Cloud Logging if agent works in a TPC
- Changing SvcEndpoint host according to the universe domain | diff --git a/agentconfig/agentconfig.go b/agentconfig/agentconfig.go
index 0df954a9e1..9ca222b715 100644
--- a/agentconfig/agentconfig.go
+++ b/agentconfig/agentconfig.go
@@ -82,6 +82,9 @@ const (
osConfigPollIntervalDefault = 10
osConfigMetadataPollTimeout = 60
+
+ //GDU domain
+ universeDomainDefault = "googlea... | 2 | 2 | 1 | [{"id": "G0", "claim": "The '//GDU domain' comment should avoid abbreviations and instead read '// Default Google API domain'.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Although OS Config Agent Client creation was updated for the universe dom... | null |
GoogleCloudPlatform__osconfig__87 | GoogleCloudPlatform/osconfig | 87 | defect | e0b7493a206a160504442bb509cf99f4bfb4edb0 | f37baaffc9761976966a4798b3db7d4c1aa866ef | Fork ospatch to work with agentendpoint | This is essentially a straight copy/paste with some bits pulled out. Those will be added back in in a subsequent PR connecting the task execution code to patch | diff --git a/ospatch/apt_upgrade.go b/ospatch/apt_upgrade.go
new file mode 100644
index 000000000..496fe4e0e
--- /dev/null
+++ b/ospatch/apt_upgrade.go
@@ -0,0 +1,117 @@
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use thi... | 2 | 2 | 0 | [{"id": "G0", "claim": "The retry helper should be named \"retry\" rather than \"retry2\", or the two retry functions combined if there is a name collision.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Remove the extra blank line (rendered as ... | null |
GoogleCloudPlatform__osconfig__90 | GoogleCloudPlatform/osconfig | 90 | defect | 9d4a6f10149d6e547f41c43050409d392c09e903 | 0a8f5d41c09029caa6c1aa3b1783669cc87a6956 | set a PowerShell execution policy when running an OS Config pre-/post-patch task | Agent e2e test case "[OSPatch] [PatchJob runs pre-step and post-step] [windows-cloud/windows-2008-r2]" has been failing, and step execution shows the following output:
"File C:\Windows\TEMP\windows_gcs_pre_patch_script.ps1 cannot be loaded because
running scripts is disabled on this system. For more information, s... | diff --git a/agentendpoint/exec_task.go b/agentendpoint/exec_task.go
index 77586e1a57..761a04cfa2 100644
--- a/agentendpoint/exec_task.go
+++ b/agentendpoint/exec_task.go
@@ -83,7 +83,7 @@ func getGCSObject(ctx context.Context, gcsObject *agentendpointpb.GcsObject, log
return localPath, nil
}
-func executeCommand(... | 1 | 1 | 1 | [{"id": "G0", "claim": "Set the PowerShell execution policy to Bypass instead of RemoteSigned, and also pass the -NonInteractive and -NoProfile flags when running the pre-/post-patch script.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1047 | GoogleCloudPlatform/professional-services-data-validator | 1,047 | defect | faa32dc011fce77c12a1e2e673d671c8022c07e2 | 61010a14806ce640bc4bb59974564a5591d1bda0 | fix: --dry-run for SQLAlchemy clients with valid raw SQL | Previously, the `--dry-run` flag, similar to the `--verbose` flag, didn't print the exact raw query w/client specific rendering for SQLAlchemy clients. This PR corrects that and adds tests for one non-SQLAlchemy backend (BigQuery) and one SQLAlchemy backend (MySQL).
This prevents rendering of `:param1` parameters an... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 5b6503ee1..2ed30c73d 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -468,16 +468,37 @@ def run_validation(config_manager, dry_run=False, verbose=False):
result_handler=None,
verbose=verbose,
... | 2 | 1 | 1 | [{"id": "G0", "claim": "The new dry-run tests in test_bigquery.py (line 1160) and test_mysql.py should assert that \"err\" is \"\" after capsys.readouterr(), so that an error message printed during the dry run is caught and surfaced by the test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope"... | null |
GoogleCloudPlatform__professional-services-data-validator__1058 | GoogleCloudPlatform/professional-services-data-validator | 1,058 | defect | 4d21d65cb25185a56ce3ba260d40fa8476c4fb7f | fc46d6b156d9c96396716cc48a281061a81769e1 | feat: Support for Kubernetes | Hi,
This merge includes an upgrade to enable DVT to be orchestrated using Kubernetes jobs. See below
**feat**: _Horizontal scaling row validations via Kubernetes_ - For how this can be used see [here](https://github.com/GoogleCloudPlatform/professional-services-data-validator/tree/K8-indexed#scaling-dvt-to-run-10s-... | diff --git a/README.md b/README.md
index 2282cc850..3c5dffa5d 100644
--- a/README.md
+++ b/README.md
@@ -86,6 +86,10 @@ over all columns ('*') will only run over numeric columns, unless the
```
data-validation (--verbose or -v) (--log-level or -ll) validate column
+ [--secret-manager-type or -sm gcp]
+ [--secret-... | 15 | 12 | 1 | [{"id": "G0", "claim": "Adding a secret-manager type/project-id option to every validation command breaks the decoupling of connection configuration from validation commands; the PR should instead let users supply connection configuration through GCS-based connections (an environment variable) fetched at runtime.", "ca... | null |
GoogleCloudPlatform__professional-services-data-validator__1080 | GoogleCloudPlatform/professional-services-data-validator | 1,080 | defect | 58f8fcb56d6b6c73647a925550085fea8e7a0562 | 2ab8df6062b5f9a91bb4161f2fc33441ce6adc4a | fix: Row validation primary key columns >64bit int/float are cast to string | This PR fixes a problem where some large decimal primary key values were being returned as a 64bit float and rounded meaning there was a mismatch in the join between source and target. I've added code that will cast primary key columns to string if they are a `Decimal` with precision > 18 or a `Decimal` with no known p... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index e0dc7f163..6f17f30e4 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -235,7 +235,6 @@ def build_config_from_args(args: Namespace, config_manager: ConfigManager):
# For custom-query row command
... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new SQL Server test test_row_validation_large_decimals_to_bigquery has a docstring that wrongly says \"Oracle to BigQuery dvt_large_decimals row validation.\" and should instead say \"SQL Server to BigQuery dvt_large_decimals row validation.\".", "category": "documentation", "verdict": "supp... | null |
GoogleCloudPlatform__professional-services-data-validator__1089 | GoogleCloudPlatform/professional-services-data-validator | 1,089 | defect | b4ee5bf9f9ee53c97b3dc5c7b5674fd2a6362307 | 1f0a552293b7f6829ca206ff2b0958eb4b628bbb | feat: Add support to generate a JSON config file only for applications purposes | Fixes #908
New optional CLI flag parameter for any type of validation:
`[--config-file-json or -cj CONFIG_FILE_JSON]`
JSON Config File Path to be used for storing validations for application purposes, since we only support generating a JSON config file and all other features are exclusive for YAML config ... | diff --git a/.gitignore b/.gitignore
index 7f8d6daf4..f60db0632 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,6 +84,7 @@ terraform.rc
# Custom
*.yaml
+*.json
partitions_dir
setup.sh
diff --git a/README.md b/README.md
index 85f90e55f..c7671a189 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ Before us... | 1 | 1 | 1 | [{"id": "G0", "claim": "Setting a default PROJECT_ID env var in the noxfile unit session may be causing the nox tests to fail and is probably unnecessary, since unit tests usually get the PROJECT_ID env var from the environment when needed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":... | null |
GoogleCloudPlatform__professional-services-data-validator__1129 | GoogleCloudPlatform/professional-services-data-validator | 1,129 | defect | 984564318b2fc6bf3f60a8a4d15078666bcf8264 | a1d63af2f707951a789fc5b4cfcfd9c9e4e608c4 | feat!: Support for GCS config paths decoupled from environment variables | Fixes #1106
This PR de-couples the usage of `PSO_DV_CONFIG_HOME` env var to manage _both_ connection and configuration files. Instead, the `--config-file` flag supports GCS paths. This will give users more autonomy over where their configs are stored. To reflect this, the StateManager class will only maintain state... | diff --git a/README.md b/README.md
index bf4c56053..3e0fba27e 100644
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
If target filter is not provided, the source filter will run on source and target tables.
... | 5 | 5 | 1 | [{"id": "G0", "claim": "store_validation should not call os.makedirs unconditionally: writing configs to GCS still creates an empty 'gs:' directory in the CWD, so the makedirs call should be moved into gcs_helper for local filesystem writes only.", "category": "correctness", "verdict": "supported", "priority": "P1", "s... | null |
GoogleCloudPlatform__professional-services-data-validator__1133 | GoogleCloudPlatform/professional-services-data-validator | 1,133 | defect | 72e41b7192b95b00284500514b19d26fed48ca85 | 0bc57277361e03540cf499e58176348c59d6c11d | docs: Distributed DVT Cloud Run Jobs sample | Sample code to run DVT in a distributed manner using Cloud Run and documentation clean up. | diff --git a/README.md b/README.md
index 3e0fba27e..c2c1f5210 100644
--- a/README.md
+++ b/README.md
@@ -435,7 +435,7 @@ For example, this flag can be used as follows:
Running DVT with YAML configuration files is the recommended approach if:
* you want to customize the configuration for any given validation OR
-* y... | 3 | 3 | 0 | [{"id": "G0", "claim": "The README sentence should read \"(i.e. a `--config-file` is provided instead)\" instead of \"(a `--config-file` is provided instead)\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "\"Job\" in \"When creating a Job\" in d... | null |
GoogleCloudPlatform__professional-services-data-validator__1178 | GoogleCloudPlatform/professional-services-data-validator | 1,178 | defect | 973e6b64268c4ac62640a215be1a4788e61d07a1 | cd13866a09cf7fcbaa6c8476b2becd0552bf59f6 | feat: generate-table-partitions write multiple partitions to a single yaml file | Added a new parameter to generate-table-partitions `--parts-per-file` which validates multiple partitions in one yaml file. Containers have some startup time - so having multiple partitions (validations) in one yaml file spreads the cost across multiple partitions. Each yaml file can still be run concurrently with othe... | diff --git a/README.md b/README.md
index 4c3d9d627..275dc32bb 100644
--- a/README.md
+++ b/README.md
@@ -241,9 +241,11 @@ data-validation (--verbose or -v) (--log-level or -ll) generate-table-partitions
Directory Path to store YAML Config Files
GCS: Provide a full gs://... | 13 | 9 | 1 | [{"id": "G0", "claim": "The README should document the supported range for the --partition-num flag, e.g. as '[2-10000]' with closed brackets indicating the endpoints are included.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README should s... | null |
GoogleCloudPlatform__professional-services-data-validator__1184 | GoogleCloudPlatform/professional-services-data-validator | 1,184 | defect | 9dcaad16e3de7032597571bac7a6f671d1686498 | 39548edab172732ba46251f1b4943135317c9c24 | fix!: Failing validations of strings with extended ascii characters | DVT while performing row validations converts all columns to upper case before computing the hash function. This is generally OK, except when the upper case function works differently in different databases. For example in Teradata applying upper case to an extended ascii character (e.g. á, â or é) has no effect. Where... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index 8c53375b4..be9bf270e 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -975,7 +975,7 @@ def build_dependent_aliases(self, calc_type, col_list=None):
"cast",
... | 1 | 1 | 0 | [{"id": "G0", "claim": "The commented-out \"upper\" entries in the order-of-operations lists should be deleted from the code rather than left commented out.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1203 | GoogleCloudPlatform/professional-services-data-validator | 1,203 | defect | 3dc9fa77677194f4b5ca99f8c1293f7e5cc042bb | 022d10c27519e49e40f88e1bd85674a1b6742186 | fix: Support char comparison fields in Teradata | Closes #1190
Due to a Teradata client "quirk" extra padding is added to CHAR data types. This adds an rtrim() when doing comparison field row validations. It affects all string comparison fields when Teradata is a source or target system. | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 99b0bf936..c53ddba28 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -160,7 +160,7 @@ def get_aggregate_config(args, config_manager: ConfigManager):
return aggregate_configs
-def get_calculated_config(arg... | 2 | 1 | 0 | [{"id": "G0", "claim": "The Teradata rstrip wiring should be hidden inside build_config_comparison_fields() (or expressed as a column_config field) rather than placed in __main__.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new char comparison-fie... | null |
GoogleCloudPlatform__professional-services-data-validator__1229 | GoogleCloudPlatform/professional-services-data-validator | 1,229 | defect | 3a7c1649acdc01a0982ed765db83ef53d4b307ba | 1abc61dc2d6cbbb1352e5a40178caa27b0f9363a | feat: Time data type support - some additional fixes for timezone aware types | Supports new data type [Time for Teradata and BigQuery](https://github.com/GoogleCloudPlatform/professional-services-data-validator/issues/1189)
Fixes other time zone aware types [MS SQL server](https://github.com/GoogleCloudPlatform/professional-services-data-validator/issues/929) and [Teradata](https://github.com/Go... | diff --git a/tests/resources/bigquery_test_tables.sql b/tests/resources/bigquery_test_tables.sql
index af7a3b2eb..c20f02ca1 100644
--- a/tests/resources/bigquery_test_tables.sql
+++ b/tests/resources/bigquery_test_tables.sql
@@ -128,6 +128,16 @@ INSERT INTO `pso_data_validator`.`dvt_char_id` VALUES
('DVT4 ', 'Row 4')... | 9 | 7 | 0 | [{"id": "G0", "claim": "The new BigQuery test table column should be declared as `col_time TIME` (uppercase type keyword), per the applied suggestion.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new table's OPTIONS description should read... | null |
GoogleCloudPlatform__professional-services-data-validator__1243 | GoogleCloudPlatform/professional-services-data-validator | 1,243 | defect | 1e9f458c33ed072987779580ad3a20829ba5c7fc | cbbbad22b263eaa7b697852d7b2272638ed00968 | feat: Adding exclude_columns flag for row validation hash | Closes issue https://github.com/GoogleCloudPlatform/professional-services-data-validator/issues/880
Added parameter --exclude-columns or -ec as a flag that identifies the column list as an exclusion, and not an inclusion when calculating hash operations in row validation and custom query row.
Updated Read Me with ... | diff --git a/README.md b/README.md
index fce14b1fe..4056b1be2 100644
--- a/README.md
+++ b/README.md
@@ -184,6 +184,8 @@ data-validation (--verbose or -v) (--log-level or -ll) validate row
See: *Calculated Fields* section for details
--hash COLUMNS Comma separated list of columns to h... | 6 | 3 | 0 | [{"id": "G0", "claim": "The README's new flag name `[--exclude-columns or -ec]` should be renamed to something like `[--exclude-columns-list or -ecl]` to avoid confusion with the pre-existing `--exclusion-columns` flag used by schema validations (on the row, custom-query row and related option help lines).", "category"... | null |
GoogleCloudPlatform__professional-services-data-validator__1263 | GoogleCloudPlatform/professional-services-data-validator | 1,263 | defect | 44863bd81a913447d0b8d90d6c98130fea5f2ce5 | 57ef2085d8684619f198f9ebf666e38d012b3be5 | fix: big query run id message | I started out on this PR by trying to add additional unit test scenarios around running row level validations where I'm writing results to BQ.
In particular these scenarios...
1. log level = INFO + some results returned with filter_status = fail -> Does not write results to console + we get the run id message
2.... | diff --git a/data_validation/result_handlers/bigquery.py b/data_validation/result_handlers/bigquery.py
index 1b13e6082..d3c6f66d0 100644
--- a/data_validation/result_handlers/bigquery.py
+++ b/data_validation/result_handlers/bigquery.py
@@ -107,7 +107,7 @@ def execute(self, result_df):
logging.info("No res... | 1 | 1 | 0 | [{"id": "G0", "claim": "Run black on tests/unit/test_data_validation.py and commit the result to fix the over-indentation in the newly added test config.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1265 | GoogleCloudPlatform/professional-services-data-validator | 1,265 | defect | db7e9d37e91be17ac5a71ff011073ea2ab61eb06 | 1690980bcd4f02752ac2e53e78078b3f782f930d | feat: Enhance --tables-list to support schema.* shorthand for find-tables command | Two recent projects for different customers have demonstrated the need for this. In both projects the end user wanted to run column validation across the whole schema. They ended up using `find-tables` to pull a list of tables and then feed that into validation commands. The output of find tables can quickly exceed BAS... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 01b31862e..c6eeebf42 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -24,11 +24,11 @@
cli_tools,
clients,
consts,
- jellyfish_distance,
state_manager,
)
from data_validation.config_manager... | 5 | 5 | 1 | [{"id": "G0", "claim": "The new schema.* shorthand should also be documented in the README, but only in the `column` and `schema` validation sections.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The conditions guarding the schema.* expansion ar... | null |
GoogleCloudPlatform__professional-services-data-validator__1289 | GoogleCloudPlatform/professional-services-data-validator | 1,289 | defect | 84824dbd166111c9d511af11d01061ca7f356692 | 10c88f6b1855419df2f5c908d4ba31f5e1894a50 | feat: Partition Custom Queries | Hi,
When validating rows of large datasets, validations can run out of memory. Large datasets can be validating by partitioning them into smaller chunks. This feat extends partitioning to queries.
For Row and Column validations, DVT used a separate command `validate custom-query row` and `validate custom-query c... | diff --git a/README.md b/README.md
index 4afea2f65..131d37045 100644
--- a/README.md
+++ b/README.md
@@ -226,13 +226,13 @@ data-validation
[--case-insensitive-match, -cim]
Performs a case insensitive match by adding an UPPER() before comparison.
```
-#### Generate Table Partitions for Large... | 10 | 10 | 0 | [{"id": "G0", "claim": "The inline comment explaining that generate-table-partitions sets validation_type and args.custom_query_type should be moved into the function's documentation or deleted rather than left as a code-line comment.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "in... | null |
GoogleCloudPlatform__professional-services-data-validator__1298 | GoogleCloudPlatform/professional-services-data-validator | 1,298 | defect | 7e947d52967ff0acea641df066b9b47af7a6ecb4 | 751a1761ada6285c24731656c20daf38bafe667a | feat: Added ORC and PARQUET support among source tests | Closes #1252
/gcbrun | diff --git a/cloudbuild.yaml b/cloudbuild.yaml
index a696ee29a..ae3889fe0 100644
--- a/cloudbuild.yaml
+++ b/cloudbuild.yaml
@@ -113,6 +113,13 @@ steps:
- 'NOX_SESSION=integration_snowflake'
- 'PROJECT_ID=pso-kokoro-resources'
secretEnv: ['SNOWFLAKE_ACCOUNT', 'SNOWFLAKE_USER', 'SNOWFLAKE_PASSWORD']
+- id: inte... | 12 | 10 | 0 | [{"id": "G0", "claim": "docs/connections.md line 253 (the section listing the FileSystem connection flags) also needs updating to add the new file types, not just the section title.", "category": "documentation", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new file's cop... | null |
GoogleCloudPlatform__professional-services-data-validator__1310 | GoogleCloudPlatform/professional-services-data-validator | 1,310 | defect | 7e5a120571519c57d2f0b387a40878f423597358 | 75def1e518da24e9530ca2ddcd283c315d30003e | feat: user defined input `run_id` via config | I would like to be able to define `run_id`s before I start individual row validations, so that I can better keep track of individual runs.
Before this change = The `run_id` is generated as part of `RunMetadata` object using `str(uuid.uuid4())`
After this change = The `run_id` can be input via config, in which cas... | diff --git a/data_validation/cli_tools.py b/data_validation/cli_tools.py
index cabffb20a..96b8ad146 100644
--- a/data_validation/cli_tools.py
+++ b/data_validation/cli_tools.py
@@ -990,6 +990,12 @@ def _add_common_arguments(
# TODO: update if we start to support other statuses
help="Comma separated li... | 2 | 2 | 1 | [{"id": "G0", "claim": "The value from the new --run-id command line option is not being passed through: code should be added to get_pre_build_configs() to pass the argument value through to the config manager, and perhaps a similar test should also be added to test_config_manager.py.", "category": "correctness", "verd... | null |
GoogleCloudPlatform__professional-services-data-validator__1317 | GoogleCloudPlatform/professional-services-data-validator | 1,317 | defect | 783d1b09359490f1977ac66534c92dddd55a4e74 | 30b6b3cad38ce2674b20f9105ddf23dd4fd7fcf1 | fix: Issue 1312 incorrect status code | Hi,
This fixes the issue that DVT returns status code (0) even if there is an exception while validating the yaml file. This results in Cloud Run considering the validation a success even when there is a transient error such as writing to BigQuery.
The issue [Error handling for --config-dir YAMLs](https://github.... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 1f2c751a5..b90dd11f2 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -388,9 +388,24 @@ def config_runner(args):
)
config_file_names = cli_tools.list_validations(config_dir=args.config... | 3 | 3 | 0 | [{"id": "G0", "claim": "Rather than raising a vanilla Exception it would be better to add an exception to exceptions.py and raise that instead, since raising a vanilla Exception is frowned upon.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The log text... | null |
GoogleCloudPlatform__professional-services-data-validator__1340 | GoogleCloudPlatform/professional-services-data-validator | 1,340 | defect | dfff798fa100314b2c0b8a4aac232b42b20997a1 | fdbc1a9980b433ff3857d3da05e3620c634ee04b | feat: Support customer defined api endpoint for BigQuery and Spanner | This PR add a new attribute to BigQuery and Spanner connection files: api_endpoint.
This is because some customers do not expose the default API endpoints, for example "bigquery.googleapis.com"` internally and instead have a private endpoint. Both the BigQuery and Spanner client support provision of a customer endpo... | diff --git a/README.md b/README.md
index 50f958464..baf1a2526 100644
--- a/README.md
+++ b/README.md
@@ -113,7 +113,7 @@ data-validation
[--std COLUMNS] Comma separated list of columns for stddev_samp or * for all numeric
[--exclude-columns or -ec]
Flag to indicate the list of colum... | 4 | 4 | 0 | [{"id": "G0", "claim": "The api_endpoint docstring entry should read \"BigQuery API endpoint (e.g. https://mybq.p.googleapis.com)\" instead of the copy-pasted filter-status description.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "project_id in ... | null |
GoogleCloudPlatform__professional-services-data-validator__1365 | GoogleCloudPlatform/professional-services-data-validator | 1,365 | defect | 97cfdbd53da3d8f941f00793d7095767b61fd3a1 | 6712df7072112d82abf53e310cf8d493436b0e66 | feat: Prevent column validation exceptions caused by Oracle CLOB JSON columns | This PR:
- Adds Oracle/PostgreSQL JSON columns to the dvt_ora2pg_types test table.
- Piggy backs existing string column validation code path for JSON columns, i.e. uses the string length. Not ideal but it is also not ideal to compare strings in this way. Especially min/max aggregations, they should be executed on t... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index 456fd9e36..8869ebdde 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -748,11 +748,32 @@ def build_and_append_pre_agg_calc_config(
return calculated_config
def append_pre_agg... | 5 | 3 | 0 | [{"id": "G0", "claim": "The comment should read \"JSON data needs casting to string before we apply a length function.\" instead of \"JSON data which needs casting to string before we apply a length function.\"", "category": "documentation", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "... | null |
GoogleCloudPlatform__professional-services-data-validator__1398 | GoogleCloudPlatform/professional-services-data-validator | 1,398 | defect | 183c81681c833c31d743c9aa8df5555ee748608f | b17a6d7a1fa2e0b4d6feeab1591fc61b28566ce5 | feat: add connections cli commands | Hello!
I've been using this tool quite a bit lately and its helped me a lot, so I figured it would be a good idea to spread some love and give back to this great tool. 🫡
Essentially there are 2 new feature with this PR:
1. The ability to perform a `connections delete -c CONN_NAME` command.
2. The ability to p... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 20e37524e..252722fd5 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -640,6 +640,10 @@ def run_connections(args):
"""Run commands related to connection management."""
if args.connect_cmd == "list":
... | 5 | 5 | 0 | [{"id": "G0", "claim": "The new describe_connection method should carry a return type hint, e.g. `-> Union[dict, str]`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new delete/describe sections should be moved above \"List supporting conne... | null |
GoogleCloudPlatform__professional-services-data-validator__1412 | GoogleCloudPlatform/professional-services-data-validator | 1,412 | defect | e76a123f53275285fd004fcefc11efad0bd64e05 | db6ca97018b390380c48006d5b385626532aed3c | fix: Cast sum of epoch_seconds to string to avoid int64 overflow | Merges a fix to prevent sum of epoch seconds from overflowing int64 in Pandas. See the issue test for a longer description.
The fix will be tested for exception across all engines in our standard column tests, but the specific value matching is only tested on PostgreSQL. We only test explicit sum results on PostgreS... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index b347918e4..eb4544c26 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -784,7 +784,9 @@ def append_pre_agg_calc_field(
column_position: int,
) -> dict:
"""Append calcul... | 4 | 4 | 0 | [{"id": "G0", "claim": "The new DROP statement for dvt_high_epoch_seconds should be changed to 'DROP TABLE IF EXISTS' so that running the SQL script on environments where the table does not yet exist does not error out.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id"... | null |
GoogleCloudPlatform__professional-services-data-validator__1417 | GoogleCloudPlatform/professional-services-data-validator | 1,417 | defect | e76a123f53275285fd004fcefc11efad0bd64e05 | 4603d768357325b7b772b6e2ec990f7beeee3d37 | feat: Print summary information after row validation | ## Description of changes
_Write a description of the changes you have made in this PR. Extremely small changes such as fixing typos do not need a description._
- `data_validation/__main__.py`: removed TODO comment for an issue already closed (#31)
- `data_validation/combiner.py`: implemented `_get_summary` functi... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 252722fd5..63aaeed9a 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -570,7 +570,6 @@ def run_validations(args, config_managers):
Args:
config_managers (list[ConfigManager]): List of config manager i... | 2 | 2 | 1 | [{"id": "G0", "claim": "Imports used only for type hints (ibis.expr.types, pandas DataFrame) should be placed inside a TYPE_CHECKING condition.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Adding the summary metadata to the result data frame i... | null |
GoogleCloudPlatform__professional-services-data-validator__1463 | GoogleCloudPlatform/professional-services-data-validator | 1,463 | defect | e85ba40fcbc021e41e3644e2d16726f633a3aa72 | a5738993482a3536e700d0f78258c8b6f65430f2 | feat: Enhanced row validation summary logging (support for custom-query row, change to JSON compliant log output) | ## Description of changes
- Adding support for custom-query row validations, not restricting anymore to only pure row validations.
- Changing the log object to be JSON compliant (dates following ISO format)
- Updates to related unit tests
## Issues to be closed
Closes #1462
## Checklist
- [x] I have fo... | diff --git a/data_validation/combiner.py b/data_validation/combiner.py
index 6fb1131bc..001f42b86 100644
--- a/data_validation/combiner.py
+++ b/data_validation/combiner.py
@@ -27,6 +27,7 @@
from typing import TYPE_CHECKING
from data_validation import consts
+from data_validation.util import datetime_to_iso_format
... | 3 | 3 | 0 | [{"id": "G0", "claim": "In _get_summary, flip the empty check to an early return (if result_df.empty: return) so the body does not need to be indented further.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The TypeError raised by datetime_to_iso_format ... | null |
GoogleCloudPlatform__professional-services-data-validator__1465 | GoogleCloudPlatform/professional-services-data-validator | 1,465 | defect | 66cff07d51f607452f56b19c888ad6a749a31de4 | 5d9e0e7c48dd2896ae928b0b0053cb65b0908921 | fix: Prevent RecursionError in combiner by slicing Dataframes by validation count | ## Description of changes
The issue behind this PR is `RecursionError` thrown in the validation combiner code at this line:
https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/66cff07d51f607452f56b19c888ad6a749a31de4/data_validation/combiner.py#L84
It appears that the code in `combin... | diff --git a/data_validation/combiner.py b/data_validation/combiner.py
index d0845a06f..d8f212300 100644
--- a/data_validation/combiner.py
+++ b/data_validation/combiner.py
@@ -22,10 +22,12 @@
import functools
import json
import logging
+from typing import TYPE_CHECKING
+
import ibis
import ibis.expr.datatypes as ... | 12 | 9 | 0 | [{"id": "G0", "claim": "The docstring of the new test test_row_validation_comp_fields_many_columns should describe what the test does (\"dvt_many_cols row validation using comparison fields\") instead of mentioning reserved words.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introd... | null |
GoogleCloudPlatform__professional-services-data-validator__1495 | GoogleCloudPlatform/professional-services-data-validator | 1,495 | defect | b96a5e48fc5a39ef3fc588fc7d9e0e05cea18cd7 | 5e834075114ac08bb4e3bb0b45e4d4f1fb84804d | feat: Optimize PostgreSQL result handler | ## Description of changes
After recently merging the PostgreSQL result handler into develop I realised I should have done more volume testing. After doing some testing I've been able to optimize the writer from 2 minutes per million rows down to 50 seconds.
Also added some documentation in the internal doc area t... | diff --git a/data_validation/result_handlers/base_backend.py b/data_validation/result_handlers/base_backend.py
index adc656321..f2ae40e50 100644
--- a/data_validation/result_handlers/base_backend.py
+++ b/data_validation/result_handlers/base_backend.py
@@ -17,7 +17,7 @@
import ibis
-from data_validation import con... | 6 | 6 | 0 | [{"id": "G0", "claim": "The psql_insert_copy helper used only internally should be private (renamed with a leading underscore).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The keys parameter's docstring should read 'str list for the column names' inst... | null |
GoogleCloudPlatform__professional-services-data-validator__1513 | GoogleCloudPlatform/professional-services-data-validator | 1,513 | defect | 7fc5b252fc0faf12eddb4546d068c7b227ac2bc9 | 30c88d7ed8f22bd541175b64b996feb31180762f | fix: Protect trailing spaces in PostgreSQL length(bpchar) expression | ## Description of changes
This PR merges a fix that protects length(bpchar) expressions from losing the trailing space.
I also added more constants which has increased the size of this PR.
## Issues to be closed
Closes #842
## Checklist
- [x] I have followed the [`CONTRIBUTING` Guide](https://github.com... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index 86e8a367b..be51a88ec 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -611,7 +611,7 @@ def add_rstrip_to_comp_fields(self, comparison_fields: List[str]) -> List[str]:
se... | 1 | 1 | 0 | [{"id": "G0", "claim": "Fix the typo \"emtpty\" in the docstring of sa_format_postgres_padded_char_length, changing it to \"empty\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1516 | GoogleCloudPlatform/professional-services-data-validator | 1,516 | defect | 25d1f54f51583a6fd1291bab424d6a334fdb121c | 1416795bc6f249b5f07bd56c0897cb7368c7c8a4 | fix: Use trim_scale() to format cast(decimal, string) consistently when scale is None | ## Description of changes
The PR merges a change which fixes a problem on PostgreSQL with trailing zeros in [unconstrained numeric](http://postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL) columns. An example is included in this comment: https://github.com/GoogleCloudPlatform/professional-ser... | diff --git a/docs/installation.md b/docs/installation.md
index d1ea5b37b..8a8d246b4 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -43,12 +43,19 @@ If you require Teradata and have a license, install the `teradatasql` package.
python -m pip install teradatasql
```
+## Supporting Objects
+### Terada... | 2 | 2 | 0 | [{"id": "G0", "claim": "Capitalize \"teradata\" to \"Teradata\" in the row-level hashing sentence of docs/installation.md, to match the product name and the newly added \"### Teradata\" heading.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Rew... | null |
GoogleCloudPlatform__professional-services-data-validator__1521 | GoogleCloudPlatform/professional-services-data-validator | 1,521 | defect | e75816b043cb63e9706e89c22d61776b2f821081 | 22abb019e6bbc585493a48b9e48feb7ef4d5a2d9 | fix: Fix `find-tables` execution for SQL Server to properly filter by schema | ## Description of changes
_Write a description of the changes you have made in this PR. Extremely small changes such as fixing typos do not need a description._
- Fix DDL and DML for `test_generate_partitions_v2` table on SQL Server
- Changes on `tests/system/data_sources/test_sql_server.py`:
- Unskip `test_fi... | diff --git a/data_validation/clients.py b/data_validation/clients.py
index a4f74d340..f7c978442 100644
--- a/data_validation/clients.py
+++ b/data_validation/clients.py
@@ -261,7 +261,7 @@ def list_tables(client, schema_name, tables_only=True):
if tables_only and client.name != "pandas"
else client.li... | 3 | 2 | 1 | [{"id": "G0", "claim": "LIST_DATABASE_SQL and LIST_TABLE_SQL should use ? bind variables for the SQL parameters instead of string formatting, to protect against SQL injection.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new _execute() helper is ... | null |
GoogleCloudPlatform__professional-services-data-validator__153 | GoogleCloudPlatform/professional-services-data-validator | 153 | defect | d71fcc29d1556f749ff4484222ab9607e1b35e91 | 65649c3834a450e2566de6e9d4e05e247cfad06c | Cli filters git#151 | As a part of enhancing a CLI interface to allow users to pass filters, I made following changes:
__main__.py: Added an args parser to parse JSON filters into filter_config.
cli_tools.py: Added an arg in args parser for filters.
config_manager.py: Changed code to build filters along with other properties.
v... | diff --git a/README.md b/README.md
index 0cb175219..ea541b4f3 100644
--- a/README.md
+++ b/README.md
@@ -135,6 +135,7 @@ data-validation run
--result-handler-config RESULT_HANDLER_CONFIG
Result handler config details.
See: *Output Handler Configurations* section
+ -... | 5 | 5 | 3 | [{"id": "G0", "claim": "Filters must be maintained as a list rather than a single dict, since many can be supplied — the --filters help text example and the test's sample CONFIG_FILTERS and its assertion all use a single dict.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}... | null |
GoogleCloudPlatform__professional-services-data-validator__1532 | GoogleCloudPlatform/professional-services-data-validator | 1,532 | defect | 6642eef0460e4d55878f896258f89b5bc48630b9 | b493d13c5ba87aebad8f4371bd7d1542bb72209a | fix: Use Pandas object for Impala timestamp (not datetime64[ns]) | ## Description of changes
This PR treats Hive/Impala timestamp as a Pandas `Object` instead of `datetime64[ns]`. This is because `datetime64[ns]` overflows for dates far in the past or future. I looked at what BigQuery and Oracle engines do and they use `Object` and do not have an issue.
The changes also add a new ... | diff --git a/tests/resources/bigquery_test_tables.sql b/tests/resources/bigquery_test_tables.sql
index d24b871da..72782801c 100644
--- a/tests/resources/bigquery_test_tables.sql
+++ b/tests/resources/bigquery_test_tables.sql
@@ -707,13 +707,15 @@ CREATE OR REPLACE TABLE `pso_data_validator`.`dvt_tricky_dates` (
, col_... | 4 | 4 | 0 | [{"id": "G0", "claim": "The comment in pytest_collection_modifyitems says \"--runslow given in cli\" but the option this PR adds is \"--run-slow\" (and CLI should be capitalised).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The comments in the ... | null |
GoogleCloudPlatform__professional-services-data-validator__1539 | GoogleCloudPlatform/professional-services-data-validator | 1,539 | defect | e3d28f88ab4d9145845a30e8ce839d24ed735e73 | a97dd994840e2009dac6e31fd1e86bf44e9fe52f | fix: Convert base64 Spanner BYTES string to standard bytes string | ## Description of changes
This PR:
1. Adds tests for binary values in comp-fields validations (the newly added Spanner test failed).
2. Changed our Spanner `to_pandas()` method to decode base64 Spanner output from BYTES columns to a binary string. The test added in item 1 now passes.
3. Cleans up some unit tests ... | diff --git a/noxfile.py b/noxfile.py
index 40ba9c5a0..1cdc22e7d 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -303,7 +303,7 @@ def integration_db2(session):
"""Run DB2 integration tests.
Ensure DB2 validation is running as expected.
"""
- _setup_session_requirements(session, extra_packages=["ibm-db-sa"]... | 3 | 1 | 0 | [{"id": "G0", "claim": "The new list comprehensions in to_pandas.py should use named loop variables (field, f) instead of underscores to keep the code simple, easy to read and maintain.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The duplicated... | null |
GoogleCloudPlatform__professional-services-data-validator__1552 | GoogleCloudPlatform/professional-services-data-validator | 1,552 | defect | f955f0d274e96c72eed3b5af70dae603f409a7d3 | e14f089cdc9637028f9d76480821e8e97f5adbaf | fix: Fixes and tests for validate column avg and std | ## Description of changes
This PR:
- Adds tests for `-avg` and `-std` across most engines.
- Excludes columns from above tests where the SQL engines cannot support the data type.
- Casts output of `-avg` and `-std` to `float64` instead of `string` when the input column data type overflows Pandas native types.
-... | diff --git a/README.md b/README.md
index 47f34769b..4e5e21ce7 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,9 @@ data-validation
[--min COLUMNS] Comma separated list of columns for min or * for all numeric
[--max COLUMNS] Comma separated list of columns for max or * for all numeric
[--avg C... | 6 | 6 | 0 | [{"id": "G0", "claim": "The Snowflake test's TODO comment should be updated to reflect the new code: \"# TODO Add col_tstz to cols and std_cols when issue-916 is complete\" instead of the old --sum/min/max wording.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "... | null |
GoogleCloudPlatform__professional-services-data-validator__1556 | GoogleCloudPlatform/professional-services-data-validator | 1,556 | defect | 456ca79e9bc727a9745f410a1bfef8e0e09fe206 | 14d4a8605b37c1df7b21acd63c7ec90d004e11ba | feat: Prevent exceptions when using Oracle INTERVAL YM and PostgreSQL INTERVAL | ## Description of changes
This PR adds basic support for INTERVAL types in:
- Oracle
- PostgreSQL
- BigQuery
- Teradata
Spanner and Snowflake don't appear to allow intervals as table columns, only in expressions. As far as I can see, other supported engines don't have an interval data type.
By basic suppor... | diff --git a/tests/resources/bigquery_test_tables.sql b/tests/resources/bigquery_test_tables.sql
index 1fd09c239..d15486606 100644
--- a/tests/resources/bigquery_test_tables.sql
+++ b/tests/resources/bigquery_test_tables.sql
@@ -751,3 +751,14 @@ CREATE OR REPLACE TABLE `pso_data_validator`.`dvt_decimals_no_precision` (... | 2 | 1 | 0 | [{"id": "G0", "claim": "The PR's test suites perform column validation of the INTERVAL YEAR TO MONTH columns with the sum aggregate even though the PR does not print the error issue 1555 describes, so the changes are inconsistent with the issue list and issue 1555 must either be closed by this PR or updated.", "categor... | null |
GoogleCloudPlatform__professional-services-data-validator__1558 | GoogleCloudPlatform/professional-services-data-validator | 1,558 | defect | 5e010441b3428f9f274e79e2b81c0df2c15c5fc5 | f16a9c875011f74835fb43db2de684d9b6bfb456 | feat: add support for Oracle BOOLEAN | <!--
Thanks for taking the time to contribute to DVT!
Please ensure that your pull request title matches the conventional commits
specification: https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/develop/CONTRIBUTING.md#conventional-commits
-->
## Description of changes
_Write a descript... | diff --git a/tests/resources/oracle_test_tables.sql b/tests/resources/oracle_test_tables.sql
index 97e910ee1..988babd1c 100644
--- a/tests/resources/oracle_test_tables.sql
+++ b/tests/resources/oracle_test_tables.sql
@@ -788,6 +788,19 @@ INSERT INTO pso_data_validator.dvt_bool VALUES (1,1,1,'1','Y');
INSERT INTO pso_d... | 4 | 4 | 1 | [{"id": "G0", "claim": "The new ORACLE_BOOLEAN class duplicates a type SQLAlchemy already defines, so it should be removed and the register call changed to use sqltypes.BOOLEAN (raised by the author as a question about sharing built-in types instead of custom ones).", "category": "design", "verdict": "supported", "prio... | null |
GoogleCloudPlatform__professional-services-data-validator__1579 | GoogleCloudPlatform/professional-services-data-validator | 1,579 | defect | da7324a119abbb56115521f6bc29c8936743efad | 788340e406770449392edde7dc0627fd4b3c01c9 | fix: SQL Server string length fixes | ## Description of changes
This PR fixes three issues:
1. DVT used `datalength()` to get the length of a string, but `datalength()` returns the "byte length" which is incompatible with other SQL engines. This PR switches support to `len()` which returns the length in characters. However...
2. `len()` ignores trail... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index 9c4133ddd..1bbc1c420 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -664,6 +664,25 @@ def _is_uuid(
isinstance(source_type, dt.UUID) or isinstance(target_type, dt.UUID)
... | 2 | 2 | 1 | [{"id": "G0", "claim": "Check whether the source and/or target engine is SQL Server before checking for TEXT/NTEXT column types, since right now that type lookup runs for every string column regardless of engine.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1",... | null |
GoogleCloudPlatform__professional-services-data-validator__1601 | GoogleCloudPlatform/professional-services-data-validator | 1,601 | defect | 075c87c943e032a90b7e3fd7e2521618a919b80e | 3ed3e4acb4a733d44c6beb6fcdee8bb63d966fd1 | fix: Lower case schema.table find-tables keys (if possible) when matching names | <!--
Thanks for taking the time to contribute to DVT!
Please ensure that your pull request title matches the conventional commits
specification: https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/develop/CONTRIBUTING.md#conventional-commits
-->
## Description of changes
This PR l... | diff --git a/data_validation/find_tables.py b/data_validation/find_tables.py
index 3477ff48e..f10b669a3 100644
--- a/data_validation/find_tables.py
+++ b/data_validation/find_tables.py
@@ -60,15 +60,9 @@ def _compare_match_tables(source_table_map, target_table_map, score_cutoff=0.8)
return table_configs
-def _... | 3 | 2 | 1 | [{"id": "G0", "claim": "It would be better to use casefold() instead of lower() when lower-casing schema.table keys, since table names can contain unicode characters (e.g. German customers), unless there is a reason to stick with lower.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introdu... | null |
GoogleCloudPlatform__professional-services-data-validator__1619 | GoogleCloudPlatform/professional-services-data-validator | 1,619 | defect | 73baad71e2b1d78f6b6055547a89d726f38ae314 | 3dc4a67a905f3adb35f6b7f30618b06d26539386 | fix: Include dialect when compiling predicates in partition builder | ## Description of changes
Ensure predicates are compiled with correct dialect so that correctly formatted literals are included in partition config files. This not only fixes the date formatting but also bugs related to booleans. Prior to this fix SQL Server predicates included `true`/`false` which should have been `1... | diff --git a/.gitignore b/.gitignore
index f60db0632..d77ec3a92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,6 @@ pip-log.txt
.cache
.pytest_cache
-
# Mac
.DS_Store
@@ -44,6 +43,9 @@ pip-log.txt
# emacs
*~
+# Gemini
+GEMINI.md
+
# Built documentation
docs/_build
bigquery/docs/generated
@@ -97,4 ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Replace or remove the dependency on the ibis internal function `_find_backend()` in `ibis_table_to_sql`, using `client.name` wherever `backend_name` is used.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1641 | GoogleCloudPlatform/professional-services-data-validator | 1,641 | defect | bceec8cdea0162a973fe67ea6cfa4eb76e69b50e | 15fe6f2c0fc453d055a5cc8bc5d0dea8078506c7 | fix: Db2 fixes for padded char identification and default IfNull replacement token | ## Description of changes
We had a customer with issues on Db2 with a CHAR padded primary key.
To fix this I needed to resolve part of issue 1470, although only for Db2 so this PR does NOT close that issue. Unfortunately the fix only covers table level validations. There does not appear to be a way to get the raw d... | diff --git a/data_validation/combiner.py b/data_validation/combiner.py
index 1d4125218..433247120 100644
--- a/data_validation/combiner.py
+++ b/data_validation/combiner.py
@@ -194,7 +194,7 @@ def _generate_report_slice(
logging.debug(documented.compile())
result_df = client.execute(documented)
- res... | 2 | 2 | 0 | [{"id": "G0", "claim": "Getting type information for custom queries on Db2 appears to require calling the SQLGetTypeInfo stored procedure via ibm_db_sa, opening a cursor for the query and another for the procedure and closing both afterwards, which is likely not trivial; if custom query support is not needed now, the r... | null |
GoogleCloudPlatform__professional-services-data-validator__1662 | GoogleCloudPlatform/professional-services-data-validator | 1,662 | defect | 91ca7e7b39e5ae1b5993b1043c1a85212bbaa52e | ce5f6116c2dca2cb79069e78eabeb6a968e3aec0 | fix: Trim default IfNull replacement token on Db2 | ## Description of changes
Introduces a Db2 specific workaround for coalesce limitation where the second argument cannot exceed the length of the initial argument resulting in:
```
String data right truncation. SQLSTATE=22001
```
On Db2 we need to ensure the replacement token is trimmed to the length ... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index aabf5493f..b97d06ed7 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -23,7 +23,10 @@
from data_validation.result_handlers.factory import build_result_handler
from data_validation.validati... | 1 | 1 | 1 | [{"id": "G0", "claim": "This may be acceptable, but if the source and target are both DB2 and the target has different constraints, then only the source limits are applied.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1666 | GoogleCloudPlatform/professional-services-data-validator | 1,666 | defect | 28c60255f3a63955e61c1b994fa9599412ca7c0f | 90a70913b87c8907880f2dee401b4e233eb4f2d8 | feat: Add --use-random-row for custom-query row validations | ## Description of changes
This PR adds the options `--use-random-row` and `--random-row-batch-size` for custom-query row validations.
This PR also restricts the tested Python version to 3.11 because 3.9 and 3.10 are no longer available on the python-multi image. We'll need to prioritise the Ibis upgrade issue soon.... | diff --git a/README.md b/README.md
index d0fdbc8cf..336ca2fe9 100644
--- a/README.md
+++ b/README.md
@@ -494,6 +494,10 @@ data-validation
Comma-separated key value pair labels for the run.
[--format or -fmt FORMAT]
Format for stdout output. Supported formats are (tex... | 1 | 1 | 0 | [{"id": "G0", "claim": "The comment above the --use-random-row guard should drop 'and custom-query', since this pull request makes random rows supported for custom-query row validations.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__1690 | GoogleCloudPlatform/professional-services-data-validator | 1,690 | defect | da96a2f2031685c101a865f2fa713af6c3d88572 | b10d103879ad951b44973f51386c02cff66eb515 | fix: Force Db2 FOR BIT DATA columns to Ibis Binary | ## Description of changes
This PR ensure Db2 FOR BIT DATA data types are detected as Ibis Binary columns and not strings.
FOR BIT DATA columns are not obviously marked as such in the Db2 data dictionary, we need to reference the CODEPAGE column in the raw data types.
This PR also changes the integration test to ... | diff --git a/tests/resources/bigquery_test_tables.sql b/tests/resources/bigquery_test_tables.sql
index 7bb3684a6..3b6a4647d 100644
--- a/tests/resources/bigquery_test_tables.sql
+++ b/tests/resources/bigquery_test_tables.sql
@@ -226,8 +226,8 @@ CREATE OR REPLACE TABLE pso_data_validator.dvt_db2_types
, col_nclob ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new table() method should skip the raw_column_metadata call when both schema and database are None, so that raw_column_metadata's assertion does not raise.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__227 | GoogleCloudPlatform/professional-services-data-validator | 227 | defect | d67974c6a35bf38c663cdad6d3ee8cdc955f1fb3 | 0bcd570b98d5deb469afde12cdb7239ea0997fef | Issue226/Add Schema Filters to find-tables | Adding a feature `--allowed-schemas` which can be supplied a list of source schemas you would like to match.
Many databases have many schemas, but only a small number of important ones which will be replicated (ie. info_schema or sys tables).
Also documents the find-tables features in the README | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f7be7db67..398e87585 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
## Untagged
+- Adding and documenting `find-tables` CLI feature with schema filter
+- Correct filter errors caused by SQL Alchemy errors
+
## 1.1.7
- Adding tests to validate BIGNUME... | 3 | 3 | 1 | [{"id": "G0", "claim": "Fix the typo in the new README paragraph so it reads 'may help you to match all of the tables together' instead of 'may all the tables together'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Raise a ValueError when the us... | null |
GoogleCloudPlatform__professional-services-data-validator__232 | GoogleCloudPlatform/professional-services-data-validator | 232 | defect | 69c9f5c5552b54720a5489e0d81b3de7e1e4338b | 7b486c1fa30078789976472ddcce155fe9ff8888 | Issue111 MSSQL and Postgres Integration tests | - Added MSSQL and Postgres integration tests
- Updated Cloud Build to install Cloud SQL Proxy for connection to the instances (This is because Cloud Build does not support VPCs, so we can't use Private IP. An org policy on the project also doesn't allow adding authorized networks). The Cloud Build process now takes ~3... | diff --git a/.gitignore b/.gitignore
index a46782e56..55a719b82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,9 @@ coverage.xml
# System test environment variables.
system_tests/local_test_setup
+# Cloud SQL Proxy
+cloud_sql_proxy
+
# Make sure a generated file isn't accidentally committed.
pylintrc
pyli... | 3 | 3 | 1 | [{"id": "G0", "claim": "In the run-all-sessions else branch the cloud SQL proxy is not started even though the new integration sessions would run there, so the proxy should probably run in that branch too.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim... | null |
GoogleCloudPlatform__professional-services-data-validator__26 | GoogleCloudPlatform/professional-services-data-validator | 26 | defect | 2807529528faf0fb0f4b9c3e224026346e76ad09 | 859e53f164e353fae4432e9fd234dcf15bb8c8d1 | include run metadata in BigQuery report | Introduces new metadata classes, which are populated by the validation
builder.
TODO
- [x] Determine why no aggregates are added to validation builder. (count wasn't included #28)
- [x] Update unit tests for new combine logic.
Closes #2 | diff --git a/data_validation/combiner.py b/data_validation/combiner.py
index 10b764eed..2a3e9cad4 100644
--- a/data_validation/combiner.py
+++ b/data_validation/combiner.py
@@ -28,12 +28,18 @@
def generate_report(
- client, source_table=DEFAULT_SOURCE, target_table=DEFAULT_TARGET, join_on_fields=()
+ client,... | 2 | 2 | 0 | [{"id": "G0", "claim": "ValidationMetadata replaces the aggregate alias concept, so the aggregate_aliases list and its accessor are redundant and should be removed for clarity.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "ValidationMetadata co... | null |
GoogleCloudPlatform__professional-services-data-validator__280 | GoogleCloudPlatform/professional-services-data-validator | 280 | defect | ae076e52d91ea43e2d41fbf7535222e15c96f4ed | 625d5fe7fa9fd6936fb814a096915442c7a41ba0 | feat: logic to deploy dvt on Cloud Run | Adding logic in samples which walk through deploying DVT on Cloud Run.
The README for the sample walks through
- Dockerfile used in the build
- How to build DVT on gcr with gcloud
- Deploying a service to Cloud Run
- An example test against the new Cloud Run service | diff --git a/samples/run/Dockerfile b/samples/run/Dockerfile
new file mode 100644
index 000000000..8826f7271
--- /dev/null
+++ b/samples/run/Dockerfile
@@ -0,0 +1,23 @@
+FROM python:3.9-slim
+
+# Allow statements and log messages to immediately appear in the Knative logs
+ENV PYTHONUNBUFFERED True
+
+# Copy local code ... | 6 | 5 | 0 | [{"id": "G0", "claim": "Remove the hardcoded 'pso-kokoro-resources' fallback for PROJECT_ID in the README and test.py examples so the sample is universal and users set their own project.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README ... | null |
GoogleCloudPlatform__professional-services-data-validator__303 | GoogleCloudPlatform/professional-services-data-validator | 303 | defect | ec1af22006f75b11430ac87262ae55634dc897a6 | cd4f37a1e789e333287a00928d060a58bc74178a | feat: Refactor CLI to fit Command Pattern | Closes #279
Updates DVT to use validation type specific commands like so:
```
data-validation validate column --flags
data-validation validate schema --flags
```
Updated documentation and examples to reflect the change. It is backwards compatible to continue support for the `data-validation run` command. | diff --git a/README.md b/README.md
index ce0a7efe1..ed8201ea5 100644
--- a/README.md
+++ b/README.md
@@ -70,9 +70,19 @@ Once you have your connections set up, you are ready to run the validations.
### Validation command syntax and options
+Below are the command syntax and options for running validations from the C... | 1 | 1 | 1 | [{"id": "G0", "claim": "The -bqrh flag has shown inconsistencies on the develop branch, so confirm whether a test exists showing it is currently functional.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__340 | GoogleCloudPlatform/professional-services-data-validator | 340 | defect | 0e65babf28437738c1b3e864d05b053ead9dce54 | ccf9012b6321aad623350e772ce2344d62347ca6 | feat: GCS support for validation configs | Resolves #288. Allows validation configs to be saved to GCS when the `PSO_DV_CONFIG_HOME` env var is set. Also adds 'list' functionality and corresponding docs updates. | diff --git a/README.md b/README.md
index 49382f2c4..084e81dff 100644
--- a/README.md
+++ b/README.md
@@ -183,7 +183,9 @@ case specific CLI arguments or editing the saved YAML configuration file.
For example, the following command creates a YAML file for the validation of the
`new_york_citibike` table: `data-validatio... | 4 | 2 | 2 | [{"id": "G0", "claim": "The pull request should expose the validation-config functionality as an explicit `configs` CLI section with `list`, `run` and (nice to have) `get` subcommands, keeping `run-config` for backwards compatibility, instead of the hard-to-discover optional `run-config list` parser.", "category": "des... | null |
GoogleCloudPlatform__professional-services-data-validator__38 | GoogleCloudPlatform/professional-services-data-validator | 38 | defect | 2807529528faf0fb0f4b9c3e224026346e76ad09 | da501bf561c93494780663f6bd0b4f9e9a6ee26f | Query filters: Custom SQL Design | From what I could find, adding a design for custom SQL filters is somewhat roundabout. The best steps would be to push this change upstream since right now the RawSql expression needs to be registered with each data source and is quite hacky.
| diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 1e592568a..06599e45a 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -106,7 +106,6 @@ def _get_yaml_config_from_file(config_file_path):
with open(config_file_path, "r") as yaml_file:
yaml_configs = l... | 4 | 4 | 1 | [{"id": "G0", "claim": "The raw-SQL registry entry should (conceptually) be provided for each supported data source until the feature is upstreamed to Ibis.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Filter metadata may need to be tracked (e.g. the f... | null |
GoogleCloudPlatform__professional-services-data-validator__390 | GoogleCloudPlatform/professional-services-data-validator | 390 | defect | 3d78ee578b4222a9bdb19c7091445f48f413b9a0 | 455eeab492bd410906540151223c232b8ba1b18b | feat: Support for custom query | Custom query support for column level aggregations. Adds custom query CLI options to the existing validation options.
Closes #315 | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 35c5758ae..2b0870ee5 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -150,6 +150,15 @@ def build_config_from_args(args, config_manager):
# TODO(GH#18): Add query filter config logic
+
+ if config_manag... | 6 | 4 | 1 | [{"id": "G0", "claim": "The --target-query-file help description contains a copy-paste typo: it says 'File containing the source sql commands' but should say 'target sql commands'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The _adjust_schema ... | null |
GoogleCloudPlatform__professional-services-data-validator__420 | GoogleCloudPlatform/professional-services-data-validator | 420 | defect | fc73e21810ffe74459a90b79b956a91168c0dc1c | dbea3e752b3085a4c0546a546e5f5455c967933a | feat!: Changed result schema 'status' column to 'validation_status' | Changed result schema 'status' column to 'validation_status' to resolve duplicate column error.
Closes #417
| diff --git a/data_validation/combiner.py b/data_validation/combiner.py
index 8c5fff5c7..b4e7f1007 100644
--- a/data_validation/combiner.py
+++ b/data_validation/combiner.py
@@ -90,8 +90,7 @@ def generate_report(
print(documented.compile())
result_df = client.execute(documented)
- result_df.status.fil... | 2 | 2 | 2 | [{"id": "G0", "claim": "DVT should catch the BigQuery load error caused by the changed results schema and raise an exception with a descriptive error message telling the user the schema was updated and must be updated on BigQuery.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduc... | null |
GoogleCloudPlatform__professional-services-data-validator__500 | GoogleCloudPlatform/professional-services-data-validator | 500 | defect | 179d1c5378e1c727f579cb5083a2565f9a772f45 | 48896ca1285f707dc0eb236bf3a5d8da465a2d1a | fix: Schema validation to make case insensitive column name comparision | Closes #385 | diff --git a/data_validation/schema_validation.py b/data_validation/schema_validation.py
index 1d8e62a7a..f7df050ba 100644
--- a/data_validation/schema_validation.py
+++ b/data_validation/schema_validation.py
@@ -97,12 +97,26 @@ def execute(self):
def schema_validation_matching(source_fields, target_fields):
"""C... | 2 | 2 | 0 | [{"id": "G0", "claim": "The redundant dict() wrapper around the casefolded dict comprehension is unneeded; plain curly braces will instantiate the dictionaries.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README's Schema Validation sectio... | null |
GoogleCloudPlatform__professional-services-data-validator__582 | GoogleCloudPlatform/professional-services-data-validator | 582 | defect | a979931787bdaa04ac0f52ee2a8946eca54e8a8e | 9b21090addffc2e90965555cf2f88bb11dd7c44b | fix: random rows with filter option | Closes #552 | diff --git a/data_validation/data_validation.py b/data_validation/data_validation.py
index 723e11778..87e3ef454 100644
--- a/data_validation/data_validation.py
+++ b/data_validation/data_validation.py
@@ -107,6 +107,7 @@ def _add_random_row_filter(self):
# Filter for only first primary key (multi-pk filter n... | 3 | 3 | 1 | [{"id": "G0", "claim": "Order the imports in random_row_builder.py with public imports first and local imports last.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The calc_table variable is unnecessary and table can be used directly in the places calc_ta... | null |
GoogleCloudPlatform__professional-services-data-validator__593 | GoogleCloudPlatform/professional-services-data-validator | 593 | defect | c80dcd1281af3c686d92c956c1a23122ca1404f1 | 2cc4b0eda5999bc99bd0d60a1d17221f1419a2db | feat: New flag to filter results by status in all supported validations | Closes #412
- [x] It doesn't accept unknown statuses
- [x] Filters in the command line output
- [x] Filters the records before saving it to BigQuery
- [x] It's an optional flag, so if not provided all statuses (success, fail) are shown
Tested for:
- [x] Column
- [x] Row
- [x] Schema
- [x] YAML
- [ ] Cu... | diff --git a/README.md b/README.md
index 3393165bc..8b4e47513 100644
--- a/README.md
+++ b/README.md
@@ -124,6 +124,8 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
Comma-separated key value pair labels for the run.
[--format or -fmt] Format for stdout output. S... | 12 | 12 | 8 | [{"id": "G0", "claim": "TextResultHandler should default status_list to None so callers do not have to pass a status list on every instantiation.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "BigQueryResultHandler.__init__ and get_handler_for_project sh... | null |
GoogleCloudPlatform__professional-services-data-validator__62 | GoogleCloudPlatform/professional-services-data-validator | 62 | defect | 75fec3e060cb769c5fadc19a6fcd3bae8dcbc40b | e88ec1344c55d1df800dabd596770d1c4b102f9d | feat: add find-tables command to simplify config building | Using fuzzywuzzy, this feature allows for very easy table list building which can be a very tiresome process manually | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 5ad1ce86a..76141e1d8 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -48,7 +48,7 @@
import json
from yaml import dump, load, Dumper, Loader
-from data_validation import consts
+from data_validation import cons... | 10 | 8 | 2 | [{"id": "G0", "claim": "Name the unused `score` variable `_` to indicate it is not used.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Rename `find_tables_using_fuzzy` since the pull request no longer uses fuzzywuzzy.", "category": "maintainabi... | null |
GoogleCloudPlatform__professional-services-data-validator__643 | GoogleCloudPlatform/professional-services-data-validator | 643 | defect | 3041bd142ca48860a1861486dd10cdd791b7f8bf | 770ef80a5716425e237a43fbcb517bd0a848496a | feat: Logic to add allow-list to support datatype matching with a provided list in case of mismatched datatypes between source and target | This PR is under progress. This has been raised for parallel review. So that useful review comments can be added as part of development.
Closes #606 | diff --git a/data_validation/cli_tools.py b/data_validation/cli_tools.py
index 057808d23..a563651d8 100644
--- a/data_validation/cli_tools.py
+++ b/data_validation/cli_tools.py
@@ -485,6 +485,11 @@ def _configure_schema_parser(schema_parser):
"-ec",
help="Comma separated list of columns 'col_a,col_b' ... | 3 | 3 | 1 | [{"id": "G0", "claim": "The PR should not add a 'warning' validation status; when a data type is not an exact match but still fits within the target type it should log a warning with logging.warning and the row should still be marked as a validation success.", "category": "design", "verdict": "supported", "priority": "... | null |
GoogleCloudPlatform__professional-services-data-validator__676 | GoogleCloudPlatform/professional-services-data-validator | 676 | defect | f79c30873e9ec7a0377cdbce4e781cdf69a2a305 | c372ab51305fb9465d56b0e1285f6a6c94ecacbb | test: Add system integration test for MSSQL row validation with different datatypes | Closes #657
Adds system integration test for MSSQL row validation with different datatypes
- Added file mssql_data_row.sql to generate dummy data with serial, int, text, char, varchar, float, decimal, datetime and date datatypes
- Added test_mssql_row function in tests/system/data_sources/test_mysql.py to perfo... | diff --git a/tests/system/data_sources/deploy_cloudsql/mssql_data_row.sql b/tests/system/data_sources/deploy_cloudsql/mssql_data_row.sql
new file mode 100644
index 000000000..37feac170
--- /dev/null
+++ b/tests/system/data_sources/deploy_cloudsql/mssql_data_row.sql
@@ -0,0 +1,37 @@
+-- Copyright 2020 Google LLC
+--
+--... | 1 | 1 | 0 | [{"id": "G0", "claim": "The statements in tests/system/data_sources/deploy_cloudsql/mssql_data_row.sql should be aligned with each other (consistent whitespace/indentation).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__701 | GoogleCloudPlatform/professional-services-data-validator | 701 | defect | 8777e00d048970b6c833825a23de335b4a87c249 | 958676400e5b7239428beada6ef204df0bfdc89c | fix!: issue673 optimize CLI tools arg parser | ### Summary:
> CLI command for data-validation custom-query has changed. A new subparser has been added to support `data-validation custom-query row` and `data-validation custom-query column` validations. Please refer [README.md](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/develo... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 7dbe81ed6..4ec91656d 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -19,6 +19,7 @@
from yaml import Dumper, dump
from argparse import Namespace
+from typing import List
from data_validation import (
cli... | 5 | 2 | 2 | [{"id": "G0", "claim": "PKs should not be a required argument of the custom-query command, since they are only required for custom-query row validations.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The SCHEMA_VALIDATION condition in build_config_... | null |
GoogleCloudPlatform__professional-services-data-validator__734 | GoogleCloudPlatform/professional-services-data-validator | 734 | defect | b1141de481216f2adfe4cabbf3cb69efac1d5c89 | 0f0104a19ba78b3c0c5793838ffedde21ea9f251 | feat: :sparkles: Add support for source/target inline sql queries for `validate custom-query` command | Add support for source/target inline sql queries for `validate custom-query` command
### Example:
```
data-validation validate custom-query column \
-sc my_bq_conn \
-tc my_bq_conn \
--source-query 'select bikeid, gender from bigquery-public-data.new_york_citibike.citibike_trips' \
--target-query 'select bikeid,... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index 9510557ce..826512ccc 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -181,10 +181,22 @@ def build_config_from_args(args: Namespace, config_manager: ConfigManager):
if config_manager.validation_type == consts.... | 2 | 2 | 2 | [{"id": "G0", "claim": "The pull request needs a unit test for the 'get_query_from_inline' method.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new source/target inline query flags should be added to the custom query CLI guide in the README.", "ca... | null |
GoogleCloudPlatform__professional-services-data-validator__87 | GoogleCloudPlatform/professional-services-data-validator | 87 | defect | 78bc2a1c240006814ea3ebc3041a679b1329af0b | 33472db83dfbcfd121f5ae103439f32a6ee403cf | feat/row level validation alpha | Working mock of Row level validation, using In Memory validations when Source != Target and In DB validation when Source == Target.
The in DB execution works smoothly, the query ends up looking like:
```
WITH t0 AS (
SELECT CAST(`starttime` AS DATE) AS `starttime`, `bikeid`,
sum(`end_station_id`) AS `... | diff --git a/data_validation/__main__.py b/data_validation/__main__.py
index a39c141f8..19f3e314f 100644
--- a/data_validation/__main__.py
+++ b/data_validation/__main__.py
@@ -66,11 +66,18 @@ def build_config_from_args(args, config_manager):
config_manager (ConfigManager): Validation config manager instance.
... | 13 | 12 | 2 | [{"id": "G0", "claim": "The comment '# Primary Keys are' left above the primary-keys parsing code is an incomplete sentence and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Nothing should stop removing the now-unneeded sourc... | null |
GoogleCloudPlatform__professional-services-data-validator__881 | GoogleCloudPlatform/professional-services-data-validator | 881 | defect | 2e24eae5a5dae9225bc74291ec233d32b56ea36c | 6b2b4a83125a7f859d7fee2d6437e6aa9401800e | fix: Adding enhancements to allow-list in schema validation | Closes #751
Adding two enhancements to allow list in Schema Validation:
1. Removing spaces from allow-list parameter to avoid issues when matching data types during validation.
2. Adding functionality to match the same datatype in source to different datatypes in target, by changing the values in the allow list d... | diff --git a/data_validation/config_manager.py b/data_validation/config_manager.py
index 9d9cb530d..e1c739af2 100644
--- a/data_validation/config_manager.py
+++ b/data_validation/config_manager.py
@@ -314,6 +314,7 @@ def append_exclusion_columns(self, column_configs):
def append_allow_list(self, allow_list):
... | 1 | 1 | 1 | [{"id": "G0", "claim": "The change fails the lint check: data_validation/schema_validation.py:219:1 raises flake8 E302, expected 2 blank lines before the function definition but found 1.", "category": "style", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__941 | GoogleCloudPlatform/professional-services-data-validator | 941 | defect | 936744b37fbae8fc0718da9a515c7c1652a5dfc0 | 49b61a034ac4c266de4c59a13a650a3b857c10da | feat: support timestamp aggregation for Oracle and TD | Closes #762
This removes timestamp from being included in wildcard aggregations by default.
Adds new flag `--wildcard-include-timestamp` to include timestamp columns in wildcard aggregations i.e. `--sum='*'`. This will calculate the SUM(UNIX_SECONDS(ts_column))
When manually specifying `--sum ts_column`, the ... | diff --git a/README.md b/README.md
index fd0e6d5e0..4cc7d69a7 100644
--- a/README.md
+++ b/README.md
@@ -79,9 +79,10 @@ Below is the command syntax for column validations. To run a grouped column
validation, simply specify the `--grouped-columns` flag.
You can specify a list of string columns for aggregations in or... | 3 | 3 | 1 | [{"id": "G0", "claim": "Cast the epoch multiplier to Oracle's NUMBER (sa.dialects.oracle.NUMBER) instead of sa.NUMERIC, so the generated SQL shows the type name Oracle developers expect.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new to_... | null |
GoogleCloudPlatform__professional-services-data-validator__959 | GoogleCloudPlatform/professional-services-data-validator | 959 | defect | 703ca7522ef94641a333312b9fb8a34a827afaf3 | 00d08f268e45ab25eff7bc724895e7b3d66b6c6c | fix: Add missing SnowflakeDialect mapping for BINARY data type | Closes #958
/gcbrun | diff --git a/third_party/ibis/ibis_snowflake/datatypes.py b/third_party/ibis/ibis_snowflake/datatypes.py
index 80770075b..6e47f7168 100644
--- a/third_party/ibis/ibis_snowflake/datatypes.py
+++ b/third_party/ibis/ibis_snowflake/datatypes.py
@@ -18,7 +18,7 @@
from ibis.backends.snowflake import Backend as SnowflakeBack... | 1 | 1 | 0 | [{"id": "G0", "claim": "Other Snowflake data types such as DATE, TEXT and BOOLEAN may also be missing a SnowflakeDialect mapping and should be registered too, unless they are already supported.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
GoogleCloudPlatform__professional-services-data-validator__960 | GoogleCloudPlatform/professional-services-data-validator | 960 | defect | 703ca7522ef94641a333312b9fb8a34a827afaf3 | e45e038c4b64938478cce4391c3f3522faeaef32 | feat: Support BQ decimal precision and scale for schema validation | - Limit Teradata query to one row for custom query schema generation (Avoids full table scan)
- Support non-defualt BigQuery precision/scale (Closes #883 and Closes #882 ) | diff --git a/tests/system/data_sources/test_hive.py b/tests/system/data_sources/test_hive.py
index 603024ffc..dddccb0cf 100644
--- a/tests/system/data_sources/test_hive.py
+++ b/tests/system/data_sources/test_hive.py
@@ -166,10 +166,6 @@ def test_schema_validation_core_types_to_bigquery():
(
... | 1 | 1 | 0 | [{"id": "G0", "claim": "Hive (and possibly other engines) should limit the schema query to one row instead of fetching all rows, as done here for Teradata — happy for it to be spun into another issue if needed.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
GoogleCloudPlatform__professional-services-data-validator__961 | GoogleCloudPlatform/professional-services-data-validator | 961 | defect | d902061926fe69e26497bb3a913dc79524fe612c | bab4b0d0653b31e60bcf73413cae98960ee91223 | feat: Adding Exclude columns flag for aggregations in column validations | Closes issue #880
* Added parameter --exclude-columns or -ec to column validation to get a flag that identifies the column list as an exclusion, and not an inclusion.
* Updated Read Me to document the new parameter.
* Modified logic in Config Manager to process the column list accordingly to exclusion or inclusio... | diff --git a/README.md b/README.md
index b268ce8e0..2282cc850 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,7 @@ data-validation (--verbose or -v) (--log-level or -ll) validate column
[--max COLUMNS] Comma separated list of columns for max or * for all numeric
[--avg COLUMNS] Comma separated l... | 10 | 8 | 1 | [{"id": "G0", "claim": "The --exclude-columns flag appears to have no effect on --std columns — the std aggregation call in get_aggregate_config was missed when threading exclude_cols through (with the new five-parameter signature it also omits the required supported_types argument, so any --std run raises a TypeError)... | null |
GoogleCloudPlatform__prometheus__259 | GoogleCloudPlatform/prometheus | 259 | defect | 812241bb4f63981b5e110ed2a65a6171c10d3cd9 | eb9a01e913311c48493f9d828622d4933616c0d3 | feat(2.53.5): opt-in fix for export.match from config; ensure ApplyConfig before export | Implements step 1 from go/gmp:matchstuck
NOTE: This PR also expects `ApplyConfig` to be triggered for export to work. Otherwise it's noop (similar to disable export = true). IMO this is required for reliable startup behaviour for all options (especially matching). Imagine flag is setting = matchAll and config is set... | diff --git a/google/config/config.go b/google/config/config.go
index ead384b768..fc41f8924a 100644
--- a/google/config/config.go
+++ b/google/config/config.go
@@ -14,7 +14,19 @@ type GoogleCloudExportConfig struct {
// CredentialsFile controls ExporterOpts.CredentialsFile
CredentialsFile string `yaml:"credentials,o... | 15 | 10 | 1 | [{"id": "G0", "claim": "Runtime configuration cannot re-enable auth/export that was disabled via flags, a pre-existing gap the PR only documents in a NOTE, and the author defers fixing it to a follow-up issue.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", ... | null |
GoogleCloudPlatform__prometheus__267 | GoogleCloudPlatform/prometheus | 267 | defect | 3a83a91a9e4fd25a9fa365a89765d5c08e65c523 | f03a21891d34b18e420004b0b50e18acb22dbb61 | feat: support info metrics | Add support for INFO metrics by converting them to Gauges. | diff --git a/google/export/series_cache.go b/google/export/series_cache.go
index fac1d126ce..3d091baff2 100644
--- a/google/export/series_cache.go
+++ b/google/export/series_cache.go
@@ -446,6 +446,14 @@ func (c *seriesCache) populate(ref storage.SeriesRef, entry *seriesCacheEntry, e
metric_pb.MetricDescriptor_DOUB... | 3 | 1 | 1 | [{"id": "G0", "claim": "The new info-metric case should be checked with the other reviewers for whether reusing the gauge suffix gcmMetricSuffixGauge is right versus adding a dedicated /info suffix (similarly for stateset), accepting that gauge is fine for now (YAGNI).", "category": "design", "verdict": "opposed", "pri... | null |
GoogleCloudPlatform__prometheus__282 | GoogleCloudPlatform/prometheus | 282 | defect | fbe95de8892a24ea97abb5f8911481fbb58f9d3c | 86c8075879d8ee616af331ce2aa1152d918c4ff8 | feat: add stateset support | Fixes https://github.com/GoogleCloudPlatform/prometheus-engine/issues/490
Let's fix statesets which tend to be also used in OM 1 https://prometheus.io/docs/specs/om/open_metrics_spec/#stateset-1 and are present in KSM (see https://github.com/GoogleCloudPlatform/prometheus-engine/issues/490#issuecomment-1940851286)
... | diff --git a/google/export/export_test.go b/google/export/export_test.go
index 0b19089d0b..60af027c08 100644
--- a/google/export/export_test.go
+++ b/google/export/export_test.go
@@ -278,6 +278,22 @@ func TestExporter_wrapMetadata(t *testing.T) {
Help: "info help",
},
wantOK: true,
+ }, {
+ desc: "sta... | 1 | 1 | 1 | [{"id": "G0", "claim": "The test's expected metadata type for a stateset metric should be MetricTypeStateset, not MetricTypeInfo.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
GoogleCloudPlatform__pubsub__144 | GoogleCloudPlatform/pubsub | 144 | defect | d1a3a8b12e305ae1449fb40badc60405b92c8841 | 121beba5ae6714a014f73c790d6aff4618b86b0f | Adding timestamp message attribute | When moving messages from Pubsub to Kafka, Kafka message ingress time is set to Pubsub message publish time. In some cases would be more appropriate to set Kafka ingress time to some other time (eg. event time contained in the payload). This way the semantics and reasoning about time is the same across different system... | diff --git a/kafka-connector/src/main/java/com/google/pubsub/kafka/source/CloudPubSubSourceConnector.java b/kafka-connector/src/main/java/com/google/pubsub/kafka/source/CloudPubSubSourceConnector.java
index 1c9ef97b..87497334 100644
--- a/kafka-connector/src/main/java/com/google/pubsub/kafka/source/CloudPubSubSourceCon... | 2 | 2 | 0 | [{"id": "G0", "claim": "Add the format of the timestamp to the description of the kafka.timestamp.attribute config setting.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In getLongValue, eagerly return null when the timestamp argument is null, so... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.