Skip to content

refreshextracts refreshes the wrong extract if you have multiple data sources with the same name and same Project name#376

Merged
jacalata merged 7 commits into
developmentfrom
jac/datasources-need-parent-project-path
Feb 13, 2026
Merged

refreshextracts refreshes the wrong extract if you have multiple data sources with the same name and same Project name#376
jacalata merged 7 commits into
developmentfrom
jac/datasources-need-parent-project-path

Conversation

@jacalata

Copy link
Copy Markdown
Contributor

setup
MyProjects/ProjectA/Cats/my-datasource
MyProjects/ProjectB/Cats/my-datasource
MyPorjects/Cats/my-datasource

Run:
tabcmd refreshextracts --project "Cats" --parent-project-path "MyProjects/ProjectA" --datasource "my-datasource"
Note that this refreshes the expected data source: MyProjects/ProjectA/Cats/my-datasource
Run:
tabcmd refreshextracts --project "Cats" --parent-project-path "MyProjects/ProjectB" --datasource "my-datasource"
Note that this ALSO refreshes the data source: MyProjects/ProjectA/Cats/my-datasource
Run:
tabcmd refreshextracts --project "Cats" --parent-project-path "MyProjects" --datasource "my-datasource" --no-certcheck
Note that this ALSO refreshes the data source: MyProjects/ProjectA/Cats/my-datasource

dependabot Bot and others added 6 commits August 26, 2025 17:22
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This test more explicitly documents the expected behavior

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes refreshextracts selecting the wrong extract when multiple projects share the same leaf project name and datasource name by ensuring item lookup is disambiguated by the container project’s id (not just name).

Changes:

  • Add client-side post-filtering in Server.get_items_by_name to only keep non-project items whose project_id matches the provided container’s id.
  • Add early-exit and “not found after disambiguation” behavior for container-scoped lookups.
  • Add unit tests covering ambiguous nested-project scenarios with identically named datasources.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
tabcmd/commands/server.py Adds project-id-based disambiguation logic to prevent selecting same-named items from sibling projects.
tests/commands/test_server_item_selection.py Adds tests that reproduce/guard against selecting the wrong datasource when project names collide across paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tabcmd/commands/server.py
Comment thread tests/commands/test_server_item_selection.py
Comment thread tests/commands/test_server_item_selection.py
Comment thread tabcmd/commands/server.py Outdated
@jacalata
jacalata changed the base branch from main to development February 13, 2026 06:44

@mattcfilbert mattcfilbert left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattcfilbert mattcfilbert left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jacalata
jacalata requested a review from bcantoni February 13, 2026 20:10
@jacalata
jacalata merged commit 07b4aa9 into development Feb 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants