-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: simple DB CLI for local development #13715
Open
MasonM
wants to merge
8
commits into
argoproj:main
Choose a base branch
from
MasonM:feat-cli-db-generator2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Oct 6, 2024
-
feat(cli): add DB CLI for local development
This adds a small CLI tool for developers to use when working with the DB locally. It provides two functions: 1. Explicitly migrate the DB (which is normally only done when the workflow controller starts) to help test migrations: ``` $ go run ./hack/db migrate INFO[0000] Migrating database schema clusterName=default dbType=postgres ``` 2. Insert randomly-generated archived workflows into the DB, which is intended to help test query performance (e.g. argoproj#13601) ``` $ time go run ./hack/db/main.go fake-archived-workflows --rows 100000 Using seed 2600415997737113470 Clusters: [cx5j6rrzm5vnkfqqr4d] Namespaces: [bs98pxsfhs9z v95848 hq76xbj4kq7vrdp49vm ghzj6vcrth 262wb8w2b8v2wd2p2p9] Inserted 100000 rows real 17m56.554s user 1m53.833s sys 0m43.581s ``` This is obviously not as efficient as it could be, but it's only intended to be run on an adhoc basis when manually testing query performance. To make it fast, we'd probably have to switch to direct SQL inserts, which would couple this script to the logic in `persist/sqldb/workflow_archive.go`. Signed-off-by: Mason Malone <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 02f17d6 - Browse repository at this point
Copy the full SHA 02f17d6View commit details
Commits on Oct 7, 2024
-
fix: randomize start/end time and cleanup
Signed-off-by: Mason Malone <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a11cb62 - Browse repository at this point
Copy the full SHA a11cb62View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8eb262 - Browse repository at this point
Copy the full SHA e8eb262View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9158de - Browse repository at this point
Copy the full SHA c9158deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7235cb5 - Browse repository at this point
Copy the full SHA 7235cb5View commit details
Commits on Oct 15, 2024
-
Merge branch 'main' into feat-cli-db-generator2
Signed-off-by: Mason Malone <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 33d01e3 - Browse repository at this point
Copy the full SHA 33d01e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30f3c91 - Browse repository at this point
Copy the full SHA 30f3c91View commit details
Commits on Oct 16, 2024
-
refactor: switch --clusters and --namespaces to be arrays
Signed-off-by: Mason Malone <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c9f0376 - Browse repository at this point
Copy the full SHA c9f0376View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.