GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

Unusual behavior of `configs` command

Open
#1,597 0 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: bug
Dominant language
Python
Stars
524
Forks
171
Avg merge
5d 15h
Merged PRs (30d)
4

Description

**Describe the bug**
`configs` command has some unusual behaviors as listed below. Most are harmless, the first one likely being the most serious. However even that is not a big problem.

Consider the set up - on a file system and GCS. Filesystem `~/blog/bq600part/public.sales` has 60 `.yaml` files and the GCS location `gs://pso-kokoro-mudupalli/blog/600part` contains the same 60 yaml files.

1. `data-validation configs run -cdir gs://pso-kokoro-mudupalli/blog/6` returns success - (exit status 0) even though it finds no yaml files to validate. This bug can impact customers who are running in Cloud Run and make a simple error in their script. The Cloud Run Execution will complete all the tasks and mark them as success even though no validation was performed. This could be related to the error below.

2. With non existent files/paths, `configs list` with the file system always throws an error while the GCS path often does not.
The command `data-validation configs list -c ~/blog/bq600part/public.sale` (`public.sale` does not exist) throws the error `No such file or directory: '/home/user/blog/bq600part/public.sale'`, while the command `data-validation configs list -c gs://pso-kokoro-mudupalli/blog/600par` returns successfully (exit 0) without showing any files. If the GCS bucket does not exist, e.g. `data-validation configs list -c gs://pso-kokoro-mudupall`, then an error is thrown `The specified bucket does not exist.`.

3. With `configs list`, `-c` and `-cdir` are synonymous
```
data-validation configs list -c ~/blog/bq600part/public.sales
data-validation configs list -cdir ~/blog/bq600part/public.sales
data-validation configs list -cdir gs://pso-kokoro-mudupalli/blog/600part
data-validation configs list -c gs://pso-kokoro-mudupalli/blog/600part
```
All produce the same result - i.e. a list of the 60 yaml files found in the directory

4. `data-validation configs get -cdir gs://pso-kokoro-mudupall/blog` produces an error `error: unrecognized arguments: gs://pso-kokoro-mudupall/blog`. A more appropriate error might be `-cdir not a valid option for configs get`

5. Listing failures as "success". The command `data-validation configs list -c ~/blog/bq600part`, and `data-validation configs list -c gs://pso-kokoro-mudupalli/blog`, both return with a success status (exit status 0) with this output (i.e. no yamls found)
```
09/19/2025 11:05:52 PM-INFO: Looking for validations in path gs://pso-kokoro-mudupalli/blog
09/19/2025 11:05:54 PM-INFO: Validation YAMLs found:
```

**What version of DVT are you using?**
8.1.1

**Additional context**
Unclear if this is an issue that is important to fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.