-
Notifications
You must be signed in to change notification settings - Fork 1
v0.4.0 #11
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
v0.4.0 #11
Changes from all commits
de40740
d647901
33ca7b4
d5dfb79
89b5243
dde82a4
74a35b3
1d4ef8c
b2fb894
aa49536
8330250
89e1d72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| name: Golangci-lint | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [dev, release/**] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,8 @@ | ||
| name: Go Test | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [dev, release/**] | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,7 @@ | ||||||
| name: Integration Tests | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| packages: read | ||||||
| on: | ||||||
| pull_request: | ||||||
| branches: [ main, dev ] | ||||||
|
|
@@ -55,7 +57,7 @@ jobs: | |||||
|
|
||||||
| - name: Initialize database schema | ||||||
| run: | | ||||||
| go run indexer/main.go setup create-db --db-user postgres --db-name postgres | ||||||
| go run indexer/indexer.go setup create-db --db-user postgres --db-name postgres | ||||||
| env: | ||||||
| DB_HOST: localhost | ||||||
| DB_PORT: 5432 | ||||||
|
|
@@ -129,7 +131,7 @@ jobs: | |||||
|
|
||||||
| - name: Initialize database schema | ||||||
| run: | | ||||||
| go run indexer/main.go setup create-db | ||||||
| go run indexer/indexer.go setup create-db --db-user postgres --db-name postgres | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Database schema mismatch in medium test setup. Same issue as the small test: the setup command creates the schema in the Unlike the small test, the container (line 107) initializes with - go run indexer/indexer.go setup create-db --db-user postgres --db-name postgres
+ go run indexer/indexer.go setup create-db --db-user postgres --db-name gnoland📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| env: | ||||||
| DB_HOST: localhost | ||||||
| DB_PORT: 5432 | ||||||
|
|
@@ -203,7 +205,7 @@ jobs: | |||||
|
|
||||||
| - name: Initialize database schema | ||||||
| run: | | ||||||
| go run indexer/main.go setup create-db | ||||||
| go run indexer/indexer.go setup create-db | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainScript executed: #!/bin/bash
# Examine the workflow file around the relevant lines
cat -n .github/workflows/integration-tests.yml | sed -n '55,65p; 130,140p; 205,215p'Repository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Find indexer.go and examine its setup and create-db command handling
find . -name "indexer.go" -type f | head -5Repository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Check file size then examine setup create-db command handling
wc -l ./indexer/indexer.goRepository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Read the full indexer.go file and search for setup command implementation
cat -n ./indexer/indexer.go && find ./indexer -name "*.go" -type f | grep -E "(setup|cmd)" | head -10Repository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Check setup.go size and examine it
wc -l ./indexer/cmd/setup.go
cat -n ./indexer/cmd/setup.goRepository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Find parseCommonFlags function definition
grep -n "func parseCommonFlags" ./indexer/cmd/*.goRepository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Read func.go to understand parseCommonFlags and env var handling
cat -n ./indexer/cmd/func.goRepository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Script executed: #!/bin/bash
# Verify the default db name logic for create-db
sed -n '65,78p' ./indexer/cmd/setup.goRepository: Cogwheel-Validator/spectra-gnoland-indexer <shell_result> stdout: </shell_result> Based on my verification, I have confirmed the inconsistency claim. Here's what I found: Verification Summary: The
This creates functionally different behavior:
The inconsistency is real and impacts initialization behavior across test sizes. Inconsistency: Large test omits The small and medium tests explicitly pass This creates inconsistent initialization behavior: small/medium tests connect to "postgres" to create/initialize "gnoland", while the large test connects directly to "gnoland". If the large test intends to initialize from "postgres" like the other tests, add the explicit flags. If "gnoland" is the intended starting database for large tests, document this intentional difference and verify the schema initialization handles both scenarios correctly. 🤖 Prompt for AI Agents |
||||||
| env: | ||||||
| DB_HOST: localhost | ||||||
| DB_PORT: 5432 | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: Database schema mismatch in small test setup.
The setup command creates the schema in the
postgresdatabase (--db-name postgres), but the test config connects to thegnolanddatabase (line 75). The schema won't exist in the target database, causing test failures.The small test's container (line 33) initializes with
POSTGRES_DB: postgres, but the test config should targetpostgresdatabase, notgnoland. Alternatively, pass--db-name gnolandto the setup command.Proposed fix (option 1: align setup with test config):
Or (option 2: align test config with setup):
Which approach is correct depends on your data model. Please verify.
📝 Committable suggestion
🤖 Prompt for AI Agents