Skip to content
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

Support searching in ODF repos #522

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

sergiimk
Copy link
Member

@sergiimk sergiimk commented Feb 27, 2024

Description

Closes: #508

  • Search service now supports odf+http[s] protocol
  • As with other protocols the implementation is very crude - it's not using some established interfaces but reaches directly to GQL API
  • Search results now include more details (number of blocks, records, estimated size)
  • Search command output updated to avoid boilerplate

Checklist before requesting a review

  • CHANGELOG.md updated
  • API changes are backwards-compatible
  • Workspace layout changes include a migration
  • Documentation update PR: N/A
  • Dataset pipelines update scheduled if needed

@sergiimk sergiimk force-pushed the feature/search-in-odf-repos branch from cce15e3 to 731fe60 Compare February 27, 2024 02:59
@sergiimk sergiimk merged commit 731fe60 into master Feb 27, 2024
6 checks passed
@sergiimk sergiimk deleted the feature/search-in-odf-repos branch February 27, 2024 03:09
@@ -139,7 +139,7 @@ impl PullServiceImpl {
Some(
DatasetRefRemote::Alias(alias)
| DatasetRefRemote::Handle(DatasetHandleRemote { alias, .. }),
) => DatasetAlias::new(alias.account_name.clone(), alias.dataset_name.clone()),
) => DatasetAlias::new(None, alias.dataset_name.clone()),
Copy link
Member Author

Choose a reason for hiding this comment

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

kamu pull repo/account/dataset was inferring destination alias as account/dataset which was of course confusing the single-tenant repo (panic). In case of a multi-tenant local repo I think it's still correct to default to current user (account=None)

let http_url = Url::parse(url.as_str().strip_prefix("odf+").unwrap()).unwrap();
let ds = Self::get_http(
&http_url,
self.build_header_map(&http_url),
Copy link
Member Author

Choose a reason for hiding this comment

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

Per #521 kamu pull repo/account/dataset was resulting in using SimpleTP with odf+http protocol and the build_header_map here was crashing when accessing .kamutokenstore as it expected raw http/https URL. So I'm stripping off odf+ schema here.

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.

Support ODF repositories in kamu search command
1 participant