Skip to content

refactor: removes redundant ip region and uptime7d#3205

Merged
stalniy merged 1 commit into
mainfrom
refactor/remove-redundant-columns
May 20, 2026
Merged

refactor: removes redundant ip region and uptime7d#3205
stalniy merged 1 commit into
mainfrom
refactor/remove-redundant-columns

Conversation

@stalniy
Copy link
Copy Markdown
Contributor

@stalniy stalniy commented May 20, 2026

Why

This functionality is not implemented, if we need them later we will add them

What

Summary by CodeRabbit

  • Refactor
    • Removed IP region and 7-day uptime tracking fields from the provider inventory data model to simplify the schema and reduce stored data.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eebecfba-8002-4654-bf85-d92b85fc4137

📥 Commits

Reviewing files that changed from the base of the PR and between 1c827fb and 4c28404.

📒 Files selected for processing (8)
  • apps/provider-inventory/drizzle/0000_initial_provider_inventory.sql
  • apps/provider-inventory/drizzle/meta/0000_snapshot.json
  • apps/provider-inventory/env/.env.functional.test
  • apps/provider-inventory/src/model-schemas/provider-inventory/provider-inventory.schema.ts
  • apps/provider-inventory/src/repositories/bid-screening/bid-screening.repository.ts
  • apps/provider-inventory/src/services/bid-screening/bid-screening.service.spec.ts
  • apps/provider-inventory/src/types/provider.ts
  • apps/provider-inventory/test/services/test-database.service.ts
💤 Files with no reviewable changes (5)
  • apps/provider-inventory/src/services/bid-screening/bid-screening.service.spec.ts
  • apps/provider-inventory/drizzle/meta/0000_snapshot.json
  • apps/provider-inventory/src/types/provider.ts
  • apps/provider-inventory/drizzle/0000_initial_provider_inventory.sql
  • apps/provider-inventory/src/repositories/bid-screening/bid-screening.repository.ts

📝 Walkthrough

Walkthrough

Two unused columns (ipRegion and uptime7d) are removed from the provider_inventory table across the schema, database migrations, repository queries, and tests. Environment variable naming is aligned to PROVIDER_INVENTORY_POSTGRES_URL.

Changes

Remove ipRegion and uptime7d from provider inventory

Layer / File(s) Summary
Type and schema contract updates
src/types/provider.ts, src/model-schemas/provider-inventory/provider-inventory.schema.ts
ProviderWithClusterState interface and providerInventory Drizzle table schema remove optional ipRegion and uptime7d fields. Import of doublePrecision is removed from schema imports.
Database schema migration
drizzle/0000_initial_provider_inventory.sql, drizzle/meta/0000_snapshot.json
SQL migration and Drizzle snapshot remove ip_region (TEXT) and uptime_7d (DOUBLE PRECISION) column definitions from the provider_inventory table creation.
Repository query projection
src/repositories/bid-screening/bid-screening.repository.ts
BidScreeningRepository.findCandidates removes ipRegion and uptime7d from the Drizzle select projection and stops hydrating those fields when mapping rows to BidScreeningCandidate objects.
Test fixtures and environment configuration
src/services/bid-screening/bid-screening.service.spec.ts, env/.env.functional.test, test/services/test-database.service.ts
Test helper makeCandidate removes ipRegion and uptime7d properties. Environment variable is renamed from POSTGRES_BASE_URL to PROVIDER_INVENTORY_POSTGRES_URL in functional test config and TestDatabaseService constructor.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • akash-network/console#3184: Introduces bid-screening repository and prefilter flow; this PR completes the schema cleanup by removing unused columns from the provider_inventory table that feeds into those queries.

Suggested labels

size: S, experienced-contributor

Suggested reviewers

  • baktun14
  • ygrishajev
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/remove-redundant-columns

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.30%. Comparing base (1c827fb) to head (4c28404).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3205      +/-   ##
==========================================
- Coverage   64.05%   63.30%   -0.76%     
==========================================
  Files        1098     1057      -41     
  Lines       26704    25668    -1036     
  Branches     6481     6312     -169     
==========================================
- Hits        17106    16249     -857     
+ Misses       8400     8234     -166     
+ Partials     1198     1185      -13     
Flag Coverage Δ *Carryforward flag
api 84.48% <ø> (ø) Carriedforward from 1c827fb
deploy-web 47.44% <ø> (ø) Carriedforward from 1c827fb
log-collector ?
notifications 91.06% <ø> (ø) Carriedforward from 1c827fb
provider-console 81.48% <ø> (ø) Carriedforward from 1c827fb
provider-inventory 80.25% <ø> (ø)
provider-proxy 86.08% <ø> (ø) Carriedforward from 1c827fb
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...as/provider-inventory/provider-inventory.schema.ts 100.00% <ø> (ø)
...sitories/bid-screening/bid-screening.repository.ts 100.00% <ø> (ø)

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stalniy stalniy added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 10fe223 May 20, 2026
55 of 56 checks passed
@stalniy stalniy deleted the refactor/remove-redundant-columns branch May 20, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants