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

search via swp cli not working, even after adding a repo was confirmed. #30

Open
gedw99 opened this issue Mar 4, 2021 · 3 comments
Open
Labels
answered The issue has been answered documentation Improvements or additions to documentation enhancement New feature or request ux User Experience issue
Milestone

Comments

@gedw99
Copy link

gedw99 commented Mar 4, 2021

I get "Returns: "swamp CLI doesn't currently support indexing repositories. Run the swamp app first..""

Looks like its failing here in that it cant find the repo that was added in Step 1 ?
https://github.com/swampapp/swamp/blob/master/cmd/swp/main.go#L215

reproduction:

# Step 1: add a restic repo 
swp add-repo --preferred ./swamp/_data/restic-repo
Repository Name: test
✔ Local/Rest
✔ Repository URI:  ./swamp/_data/restic-repo
Repository Password: *
Testing repository access...✅
Added!
Now you should open swamp, select the repository and manually index it.


# Step 2: search therestic repo 
swp search --repo ./swamp/_data/restic-repo 

🛑 swamp CLI doesn't currently support indexing repositories.
Run the swamp app first..

@gedw99
Copy link
Author

gedw99 commented Mar 4, 2021

seems it records the added repo here:
https://github.com/swampapp/swamp/blob/master/internal/paths/paths.go#L11

No sign of the repo being added though

Mine is:

ls -al  /Users/apple/.local/share/com.github.swampapp
total 0
drwxr-xr-x   3 apple  staff   96  4 Mar 16:04 .
drwxr-xr-x  12 apple  staff  384  4 Mar 15:12 ..
drwxr-xr-x   3 apple  staff   96  4 Mar 15:12 logs

log:


{"level":"info","time":"2021-03-04T15:12:31+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:13:21+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"warn","time":"2021-03-04T15:16:47+01:00","message":"socket file found in /Users/apple/.local/share/com.github.swampapp/indexing.sock, but looks stale, removing"}
{"level":"info","time":"2021-03-04T15:16:47+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:18:25+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:25:50+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 4 seconds.\n"}
{"level":"warn","time":"2021-03-04T15:27:02+01:00","message":"socket file found in /Users/apple/.local/share/com.github.swampapp/indexing.sock, but looks stale, removing"}
{"level":"warn","time":"2021-03-04T15:27:28+01:00","message":"socket file found in /Users/apple/.local/share/com.github.swampapp/indexing.sock, but looks stale, removing"}
{"level":"info","time":"2021-03-04T15:27:28+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:29:06+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:29:10+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:29:12+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"warn","time":"2021-03-04T15:29:14+01:00","message":"socket file found in /Users/apple/.local/share/com.github.swampapp/indexing.sock, but looks stale, removing"}
{"level":"info","time":"2021-03-04T15:29:14+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:29:16+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"warn","time":"2021-03-04T15:29:17+01:00","message":"socket file found in /Users/apple/.local/share/com.github.swampapp/indexing.sock, but looks stale, removing"}
{"level":"info","time":"2021-03-04T15:29:17+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:29:19+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:29:20+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 0 seconds.\n"}
{"level":"info","time":"2021-03-04T15:53:39+01:00","message":"6 indexed, 23 already present. 16 new snapshots. Took 4 seconds.\n"}
{"level":"info","time":"2021-03-04T16:04:11+01:00","message":"0 indexed, 0 already present. 0 new snapshots. Took 3 seconds.\n"}

@rubiojr
Copy link
Contributor

rubiojr commented Aug 31, 2021

@gedw99 having a look at this.

@rubiojr
Copy link
Contributor

rubiojr commented Aug 31, 2021

There are a couple of issues, mostly related to swp errors and help being a bit confusing currently.

The first one is that you need to use the repository name as the argument to --repo, test in this particular case. So:

swp search --repo test foo

Note: if there's only one repo that will be the default repo, and using --repo isn't required.

The second issue is that you need to open the swamp GUI first to index the repository before being able to search for things. This will be fixed in the near future.

Does that help?

Leaving the issue open so I don't forget about it.

@rubiojr rubiojr added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 31, 2021
@rubiojr rubiojr added this to the Swamp 1.0 milestone Aug 31, 2021
@rubiojr rubiojr added answered The issue has been answered ux User Experience issue labels Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered The issue has been answered documentation Improvements or additions to documentation enhancement New feature or request ux User Experience issue
Projects
None yet
Development

No branches or pull requests

2 participants