Skip to content

No registry lookup in cli#2755

Open
butonic wants to merge 4 commits into
mainfrom
no-registry-lookup-in-cli
Open

No registry lookup in cli#2755
butonic wants to merge 4 commits into
mainfrom
no-registry-lookup-in-cli

Conversation

@butonic
Copy link
Copy Markdown
Member

@butonic butonic commented May 13, 2026

I changed the index command to use a go grpc client instead of a go micro client. It now has a grpc-addr that defaults to 127.0.0.1:9220, the search service grpc port.

It also allows using the index command when the micro service registry is set to memory.

I added the grpc client stubs to the protobuf generation in a separate commit. The change itself is small.

The only question I have is: what is a better name for the cli grpc-addr flag. maybe endpoint? we might be using unix:/path/to/socket at some point.

Related: #2715.

@butonic butonic requested a review from aduffeck May 13, 2026 09:03
@butonic butonic self-assigned this May 13, 2026
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board May 13, 2026
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 13, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 264 complexity · 3 duplication

Metric Results
Complexity 264
Duplication 3

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown
Member

@aduffeck aduffeck left a comment

Choose a reason for hiding this comment

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

+1 for "endpoint".

Tests are still failing, but the change itself looks good to me.

@butonic butonic force-pushed the no-registry-lookup-in-cli branch from 003db32 to d20685e Compare May 13, 2026 09:34
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic force-pushed the no-registry-lookup-in-cli branch from d20685e to 38fa1d5 Compare May 13, 2026 10:05
@butonic
Copy link
Copy Markdown
Member Author

butonic commented May 13, 2026

meh, the tests actually execute the command ...

  Scenario: reindex all spaces                                               # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/cliCommands/searchReIndex.feature:15
    When the administrator reindexes all spaces using the CLI                # CliContext::theAdministratorReindexesAllSpacesUsingTheCli()
    Then the command should be successful                                    # CliContext::theCommandShouldBeSuccessful()
      Failed asserting that two strings are identical.
      --- Expected
      +++ Actual
      @@ @@
      -'OK'
      +'ERROR'
    When user "Alice" searches for "textfile.txt" using the WebDAV API       # SearchContext::userSearchesUsingWebDavAPI()
    Then the HTTP status code should be "207"                                # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the search result of user "Alice" should contain only these entries: # FeatureContext::thePropfindResultShouldContainOnlyEntries()
      | textfile.txt |

  Scenario: reindex a space                                                                           # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/cliCommands/searchReIndex.feature:24
    Given using spaces DAV path                                                                       # FeatureContext::usingOldOrNewOrSpacesDavPath()
    And user "Alice" has created the following tags for file "textfile.txt" of the space "new-space": # TagContext::theUserHasCreatedFollowingTags()
      | tag1 |
    And user "Alice" has removed the following tags for file "textfile.txt" of space "new-space":     # TagContext::userHAsRemovedTheFollowingTagsForFileOfSpace()
      | tag1 |
    When the administrator reindexes a space "new-space" using the CLI                                # CliContext::theAdministratorReindexesASpaceUsingTheCli()
    Then the command should be successful                                                             # CliContext::theCommandShouldBeSuccessful()
      Failed asserting that two strings are identical.
      --- Expected
      +++ Actual
      @@ @@
      -'OK'
      +'ERROR'
  Scenario: reindex all spaces                                               # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/cliCommands/searchReIndex.feature:15
    When the administrator reindexes all spaces using the CLI                # CliContext::theAdministratorReindexesAllSpacesUsingTheCli()
    Then the command should be successful                                    # CliContext::theCommandShouldBeSuccessful()
      Failed asserting that two strings are identical.
      --- Expected
      +++ Actual
      @@ @@
      -'OK'
      +'ERROR'
    When user "Alice" searches for "textfile.txt" using the WebDAV API       # SearchContext::userSearchesUsingWebDavAPI()
    Then the HTTP status code should be "207"                                # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the search result of user "Alice" should contain only these entries: # FeatureContext::thePropfindResultShouldContainOnlyEntries()
      | textfile.txt |

  Scenario: reindex a space                                                                           # /woodpecker/src/github.com/opencloud-eu/opencloud/tests/acceptance/features/cliCommands/searchReIndex.feature:24
    Given using spaces DAV path                                                                       # FeatureContext::usingOldOrNewOrSpacesDavPath()
    And user "Alice" has created the following tags for file "textfile.txt" of the space "new-space": # TagContext::theUserHasCreatedFollowingTags()
      | tag1 |
    And user "Alice" has removed the following tags for file "textfile.txt" of space "new-space":     # TagContext::userHAsRemovedTheFollowingTagsForFileOfSpace()
      | tag1 |
    When the administrator reindexes a space "new-space" using the CLI                                # CliContext::theAdministratorReindexesASpaceUsingTheCli()
    Then the command should be successful                                                             # CliContext::theCommandShouldBeSuccessful()
      Failed asserting that two strings are identical.
      --- Expected
      +++ Actual
      @@ @@
      -'OK'
      +'ERROR'

@butonic butonic force-pushed the no-registry-lookup-in-cli branch 3 times, most recently from 315eb4e to 15ed9a0 Compare May 13, 2026 11:34
butonic added 2 commits May 13, 2026 13:52
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic force-pushed the no-registry-lookup-in-cli branch from 15ed9a0 to 2b1c4fe Compare May 13, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Qualification

Development

Successfully merging this pull request may close these issues.

2 participants