profile
viewpoint
Will Norris willnorris @Google Half Moon Bay, CA https://willnorris.com/ Formerly open source at @google. Most of my active personal projects are @indieweb related, using @golang.

github/opensource.guide 7324

📚 Community guides for open source creators

willnorris/imageproxy 2166

A caching, resizing image proxy written in Go

shurcooL/githubv4 695

Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://developer.github.com/v4/).

gregjones/httpcache 541

A Transport for http.Client that will cache responses according to the HTTP RFC

willnorris/microformats 34

Go library for parsing microformats

mitcho/shibboleth 24

WordPress Shibboleth plugin

willnorris/dotfiles 22

My personal ~/.dotfiles

willnorris/gifresize 9

Simple go package for transforming animated GIFs

willnorris/gum 9

Personal short URL resolver

willnorris/newbase60 7

Go implementation of NewBase60 encoding algorithm

pull request commentperkeep/perkeep

Fix CI tests for windows

@mpl are you suggesting dropping gopherjs entirely? What would that entail? I haven't been involved in any of the frontend development. Does that basically involve rewriting the frontend code in vanilla JS? How much is there? (Though I guess according to https://github.com/perkeep/perkeep/commit/f127d47e it looks like you were already moving away from GopherJS anyway)

willnorris

comment created time in 2 days

Pull request review commentperkeep/perkeep

Fix CI tests for windows

 func fileInfoToFingerprint(fi os.FileInfo) statFingerprint { 		if clean := cleanSysStat; clean != nil { 			// TODO: don't clean bad fields, but provide a 			// portable way to extract all good fields.-			// This is a Linux+Mac-specific hack for now.+			// This is a Linux+Mac+Windows-specific hack for now.

apparently, this seems to work fine on FreeBSD already (tested on FreeBSD 12.1), so I've updated this commit to just remove this "hack" comment entirely. I've left the TODO in place however, since it does still seem like a good idea to extract good fields rather than clean bad fields.

willnorris

comment created time in 2 days

PullRequestReviewEvent

push eventwillnorris/perkeep

Will Norris

commit sha 37c1998f2729431722d1ae57310d63cc14f3745f

add windows implementation for cleanSysStat this allows pk-put's havecache to properly function on Windows, fixing the camput integration test failure.

view details

Will Norris

commit sha 73f29186a03673ec5ace8903333e5fcd0d7308b9

update dependencies update github.com/bradfitz/latlong in order to include https://github.com/bradfitz/latlong/commit/afb97c1f9 which updates the import path of freetype-go. The old path no longer exists and was causing problems with go mod. update github.com/pkg/sftp to include https://github.com/pkg/sftp/pull/382 which resolves CI test failures for Windows.

view details

Will Norris

commit sha a53d9d364ee70f75359fe533ba14db6ae7ecd355

test: use filepath.Join for filenames

view details

Will Norris

commit sha 8d01945f09b8c9bb071791fa57317a326e9637f7

tests: further exclude windows from symlink tests os.Symlink returns a nil error in some cases (when permissions allow), but still does not behave as expected. Skip Windows altogether from some of these tests for the time being.

view details

Will Norris

commit sha 8a4e81681129f07bb274634c754747a3289b30f5

blobserver: use MkdirAll from sftp library the perkeep MkdirAll never worked on Windows anyway, since it was calling path.Dir rather than filepath.Dir. But now that the sftp client supports MkdirAll, let's use it.

view details

push time in 2 days

push eventwillnorris/perkeep

Niklas Merz

commit sha dab9bb34199d45af647d8a6753fc85fcbcb2725d

doc: remove cloud launcher mentions Cloud launcher was removed in c9f78d02adf9740f3b8d403a1418554293cc9f41 Signed-off-by: Niklas Merz <niklasmerz@linux.com>

view details

mpl

commit sha 16af01dfccece0270f0c466e1225111301797741

doc/todo: fix link, now on github Fixes #1298

view details

mpl

commit sha 53b60fb65a167baf518639c8e358afbbfea76ca7

misc: update release tools Various fixes to bring them up to date, and to make them work on MacOS.

view details

Will Norris

commit sha f2e7add71bf7d7fdc0d8d8060171e41c238e166a

Ci: move continuous integration tests to GitHub Actions And remove the Travis CI ones.

view details

push time in 2 days

push eventwillnorris/dotfiles

Will Norris

commit sha b69708cd6462b8f480a9910ad02f9114b726126b

use custom dark colors for hterm

view details

push time in 2 days

pull request commentperkeep/perkeep

Fix CI tests for windows

rebased, and should be ready to go once CI tests finish running.

willnorris

comment created time in 4 days

push eventwillnorris/perkeep

Niklas Merz

commit sha dab9bb34199d45af647d8a6753fc85fcbcb2725d

doc: remove cloud launcher mentions Cloud launcher was removed in c9f78d02adf9740f3b8d403a1418554293cc9f41 Signed-off-by: Niklas Merz <niklasmerz@linux.com>

view details

mpl

commit sha 16af01dfccece0270f0c466e1225111301797741

doc/todo: fix link, now on github Fixes #1298

view details

mpl

commit sha 53b60fb65a167baf518639c8e358afbbfea76ca7

misc: update release tools Various fixes to bring them up to date, and to make them work on MacOS.

view details

Will Norris

commit sha f2e7add71bf7d7fdc0d8d8060171e41c238e166a

Ci: move continuous integration tests to GitHub Actions And remove the Travis CI ones.

view details

Will Norris

commit sha a0c5f726ea97f36ba2c81b811e1d81852d71e5ff

add windows implementation for cleanSysStat this allows pk-put's havecache to properly function on Windows, fixing the camput integration test failure.

view details

Will Norris

commit sha 7e2b64972cd8fe82c99f62246b930e6c6fc53835

update dependencies update github.com/bradfitz/latlong in order to include https://github.com/bradfitz/latlong/commit/afb97c1f9 which updates the import path of freetype-go. The old path no longer exists and was causing problems with go mod. update github.com/pkg/sftp to include https://github.com/pkg/sftp/pull/382 which resolves CI test failures for Windows.

view details

Will Norris

commit sha 9dfa6b664426e7e6ab74a6ea57cb137c8709b042

test: use filepath.Join for filenames

view details

Will Norris

commit sha 1f9389ca693c09fef3ca1dcaf6ef78385b3a8152

tests: further exclude windows from symlink tests os.Symlink returns a nil error in some cases (when permissions allow), but still does not behave as expected. Skip Windows altogether from some of these tests for the time being.

view details

Will Norris

commit sha 188e4245cd49cae255efa1097741f5a4657a2627

blobserver: use MkdirAll from sftp library the perkeep MkdirAll never worked on Windows anyway, since it was calling path.Dir rather than filepath.Dir. But now that the sftp client supports MkdirAll, let's use it.

view details

push time in 4 days

issue commentwillnorris/imageproxy

Cache consistency problem after partial cache clean-up with Apache httpd as upstream

Wow, this is a phenomenally detailed bug report! Thanks, that super useful.

What you're doing is basically what I would have done if I ever got around to adding size limits for the on-disk cache. So I wouldn't necessarily categorize this as something you shouldn't be doing. You just seem to have found an interesting bug in the current implementation.

I'll have to play with this a bit more to trace through things and better understand exactly what is going on. Realistically, it's probably not something I'll get to super soon, but I'll take a look when I can.

fknittel

comment created time in 5 days

push eventwillnorris/willnorris.com

Will Norris

commit sha 43ecf136edcf720b677c2fd6368edd8a1bfdb4af

rename master branch to main, update references

view details

Will Norris

commit sha 3180f634cb1b31a218b9548019580a216c759950

fix broken links links found using: docker run --rm -it linkchecker/linkchecker --check-extern -v https://willnorris.com

view details

push time in 8 days

push eventtodogroup/todogroup.github.io

Amye Scavarda Perrin

commit sha 71069a6fd14df1334409cf438fb18636fa7152a1

Replacing Juniper (#171)

view details

push time in 9 days

Pull request review commentperkeep/perkeep

Fix CI tests for windows

 func fileInfoToFingerprint(fi os.FileInfo) statFingerprint { 		if clean := cleanSysStat; clean != nil { 			// TODO: don't clean bad fields, but provide a 			// portable way to extract all good fields.-			// This is a Linux+Mac-specific hack for now.+			// This is a Linux+Mac+Windows-specific hack for now.

sure. Do we have an official list of platforms that Perkeep supports? Because we could also just work on adding support for those platforms.

willnorris

comment created time in 9 days

PullRequestReviewEvent

pull request commentperkeep/perkeep

move continuous integration tests to GitHub Actions

I don't really think we need to keep it around. And if GitHub really does fall down in some terrible way, we can always bring back the travis config.

willnorris

comment created time in 10 days

delete branch willnorris/imageproxy

delete branch : codescanning

delete time in 10 days

push eventwillnorris/imageproxy

Will Norris

commit sha 66c549e07b70c12fcd7bf13ebf8f234524dc47bc

Setup GitHub Action for code scanning (#247)

view details

push time in 10 days

PR opened willnorris/imageproxy

Setup GitHub Action for code scanning
+66 -0

0 comment

1 changed file

pr created time in 11 days

create barnchwillnorris/imageproxy

branch : codescanning

created branch time in 11 days

PullRequestReviewEvent

startedgithub/codeql

started time in 11 days

push eventwillnorris/perkeep

Will Norris

commit sha c7dd09174bba1b57f492d0c922f637ea570b1499

blobserver: use MkdirAll from sftp library the perkeep MkdirAll never worked on Windows anyway, since it was calling path.Dir rather than filepath.Dir. But now that the sftp client supports MkdirAll, let's use it.

view details

push time in 12 days

PR opened perkeep/perkeep

Fix CI tests for windows

This also includes the changes from #1317, just so I can test GitHub Actions. Once, #1317 is merged, I'll rebase this PR.

Test runs:

tests/linux tests/windows

+113 -68

0 comment

12 changed files

pr created time in 12 days

push eventwillnorris/perkeep

Will Norris

commit sha b00b3d7d116ef8e0517654689de3316540516896

move continuous integration tests to GitHub Actions

view details

Will Norris

commit sha c7d11848c714201b893cdc070b4e7a63a28209b6

add windows implementation for cleanSysStat this allows pk-put's havecache to properly function on Windows, fixing the camput integration test failure.

view details

Will Norris

commit sha 478d18fa9c36c4b0569bb7213cca40a5d4f333a5

update dependencies update github.com/bradfitz/latlong in order to include https://github.com/bradfitz/latlong/commit/afb97c1f9 which updates the import path of freetype-go. The old path no longer exists and was causing problems with go mod. update github.com/pkg/sftp to include https://github.com/pkg/sftp/pull/382 which resolves CI test failures for Windows.

view details

Will Norris

commit sha b66f69a382b3eeede56c61bd5462d9122fec7f50

test: use filepath.Join for filenames

view details

Will Norris

commit sha 6e615f4c147271093d0e78a670e720168114e1be

tests: further exclude windows from symlink tests os.Symlink returns a nil error in some cases (when permissions allow), but still does not behave as expected. Skip Windows altogether from some of these tests for the time being.

view details

push time in 12 days

push eventwillnorris/perkeep

Will Norris

commit sha fd5d278df59a0e47c2d68f409720b7cf1b5df232

test: use filepath.Join for filenames

view details

Will Norris

commit sha 9634a93110aceda230a2c662df57b4da9d5a706a

tests: further exclude windows from symlink tests os.Symlink returns a nil error in some cases (when permissions allow), but still does not behave as expected. Skip Windows altogether from some of these tests for the time being.

view details

push time in 12 days

push eventwillnorris/perkeep

Will Norris

commit sha bc5f9bf452376e8774660fbd858172804280df1c

update dependencies update github.com/bradfitz/latlong in order to include https://github.com/bradfitz/latlong/commit/afb97c1f9 which updates the import path of freetype-go. The old path no longer exists and was causing problems with go mod. update github.com/pkg/sftp to include https://github.com/pkg/sftp/pull/382 which resolves CI test failures for Windows.

view details

Will Norris

commit sha d0f71eb7d75bc7f2fc8a60cf3acac8503f7ece8c

blobserver: use MkdirAll from sftp library

view details

Will Norris

commit sha 3f048331e61c58825f59ef4e96f66693b49efc38

test: use filepath.Join for filenames

view details

Will Norris

commit sha 760cf5d81e2c4016373f292f141c20d8e71a5931

tests: further exclude windows from symlink tests os.Symlink returns a nil error in some cases (when permissions allow), but still does not behave as expected. Skip Windows altogether from some of these tests for the time being.

view details

push time in 12 days

issue closedperkeep/perkeep

pk-web: make it sync all branches to github, not just master

Well, maybe not all, but at least the releases branches.

closed time in 12 days

mpl

issue commentperkeep/perkeep

pk-web: make it sync all branches to github, not just master

GitHub syncing code was removed when all development moved to GitHub in 41f5d4a190

mpl

comment created time in 12 days

issue closedperkeep/perkeep

"inconsistent vendoring" build error with go1.14rc1

$ go build -mod=vendor ./cmd/pk
go: inconsistent vendoring in <redacted>/perkeep:
        github.com/gopherjs/gopherjs@v0.0.0-20181017120253-0766667cb4d1: is explicitly required in go.mod, but vendor/modules.txt indicates github.com/gopherjs/gopherjs@v0.0.0-20190430165422-3e4dfb77656c

run 'go mod vendor' to sync, or use -mod=mod or -mod=readonly to ignore the vendor directory

closed time in 12 days

dmgk

issue commentperkeep/perkeep

"inconsistent vendoring" build error with go1.14rc1

the only supported way of building perkeep is with go run make.go. Cleaning up perkeep's use of modules and the vendor directory is being tracked in #1231

dmgk

comment created time in 12 days

issue commentperkeep/perkeep

Perkeep's gerrit instance should have CI

Since this issue was filed, perkeep no longer uses Gerrit. All development is on GitHub, and CI is moving over to GitHub Actions (#1317).

The point about needing a system for manually kicking off a test that requires credentials is still a good point though. That is possible with GitHub Actions's workflow_dispatch event, which might be an option. Renaming issue to continue tracking that.

euank

comment created time in 12 days

issue closedperkeep/perkeep

The donations URL on perkeep.org is invalid

The current donations URL on perkeep.org website is invalid due to deprecated format. Coinbase donations are via newer commerce.coinbase.com methods.

The updated donations URL on perkeep.org website would need to be of the form:

https://commerce.coinbase.com/checkout/[unique id]

closed time in 12 days

JayCuthrell

issue commentperkeep/perkeep

The donations URL on perkeep.org is invalid

donation links removed in 0683145d61

JayCuthrell

comment created time in 12 days

issue closedperkeep/perkeep

https://opencollective.com/perkeep: change About text

Given that the About text there does not reflect the current situation anymore, it should be changed.

closed time in 12 days

mpl

issue commentperkeep/perkeep

https://opencollective.com/perkeep: change About text

Looks like this was fixed with https://opencollective.com/perkeep/updates/update-on-perkeep-brad-mathieu-open-collective-donations

mpl

comment created time in 12 days

issue closedperkeep/perkeep

AMI - Amazon image

<pre>We should have an AMI image for people to run their own Camlistore instance of.

It should contain:

-- minimal Linux (Debian, Ubuntu, whatever) with barely any tools, services.

-- MySQL running locally. for now to be lazy we can just say the whole AMI is EBS-root, and use the same EBS volume for the OS and MySQL's state, but in the future we'll want a tiny EBS root for the OS (like 1GB) and have MySQL on its own resizable EBS volume, but that can come later.

-- the setup wizard (<a href="https://camlistore.org/issue/14">issue #14</a>), with basically just S3 storage support.

-- TLS: self-signed cert on boot, with the first user to hit it setting the admin password for the UI. option to set the cert later, from the web UI.</pre>

closed time in 12 days

bradfitz

issue commentperkeep/perkeep

AMI - Amazon image

closing this, since docker definitely turned out to be the way to go.

bradfitz

comment created time in 12 days

issue closedperkeep/perkeep

Add TODOs Badge to Readme

Hi there! I wanted to propose adding the following badge to the README to indicate how many // TODO comments are in this codebase:

TODOs

The badge links to tickgit.com which is a free service that indexes and displays TODO comments in public github repos. It can help surface latent work and be a way for new contributors to find areas of code to improve.

The markdown is:

[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=github.com/src-d/go-git)](https://www.tickgit.com/browse?repo=github.com/perkeep/perkeep)

Thanks for considering, feel free to close this issue if it's not appropriate or you prefer not to!

closed time in 12 days

patrickdevivo

issue commentperkeep/perkeep

Add TODOs Badge to Readme

surfacing latent work isn't really perkeep's biggest problem right now. Once some more basic triage has been done, this might be helpful, but probably not right now. Thanks, though. Looks like a neat service.

patrickdevivo

comment created time in 12 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventwillnorris/willnorris.com

Will Norris

commit sha 47660340abd380468fae2ba7847eb69a25d9d827

wiki/windows: invert mouse scroll direction

view details

push time in 12 days

pull request commentpkg/sftp

server: use os.IsNotExist to map sshFxNoSuchFile

yeah, I think probably leave it in. 👍

willnorris

comment created time in 12 days

push eventwillnorris/perkeep

Will Norris

commit sha b00b3d7d116ef8e0517654689de3316540516896

move continuous integration tests to GitHub Actions

view details

push time in 13 days

PullRequestReviewEvent

Pull request review commentperkeep/perkeep

move continuous integration tests to GitHub Actions

+on: [push, pull_request]+name: "tests/linux"++jobs:+  test:+    strategy:+      matrix:+        go-version: [1.x, 1.13.x]

still says 13 here: https://github.com/perkeep/perkeep/blob/7321b90b6e112e7847cb6f3f9683c74d545d5059/make.go#L901

willnorris

comment created time in 13 days

pull request commentpkg/sftp

server: use os.IsNotExist to map sshFxNoSuchFile

technically, this means we could also remove the syscall.ENOENT case from inside of translateError, since that is only ever called from statusFromError. I think it could still be reasonable to leave it there, but happy to remove it if you'd like.

willnorris

comment created time in 13 days

PullRequestReviewEvent

Pull request review commentpkg/sftp

server: use os.IsNotExist to map sshFxNoSuchFile

 func TestOpenStatRace(t *testing.T) { 	os.Remove(tmppath) 	checkServerAllocator(t, server) }++// Ensure that proper error codes are returned for non existent files, such+// that they are mapped back to a 'not exists' error on the client side.+func TestStatNonExistent(t *testing.T) {+	client, server := clientServerPair(t)+	defer client.Close()+	defer server.Close()++	for _, file := range []string{"/doesnotexist", "/doesnotexist/a/b"} {+		_, err := client.Stat(file)+		if err == nil || !os.IsNotExist(err) {

done

willnorris

comment created time in 13 days

Pull request review commentpkg/sftp

server: use os.IsNotExist to map sshFxNoSuchFile

 func statusFromError(p ider, err error) sshFxpStatusPacket { 		ret.StatusError.Code = translateErrno(e) 	case *os.PathError: 		debug("statusFromError,pathError: error is %T %#v", e.Err, e.Err)-		if errno, ok := e.Err.(syscall.Errno); ok {+		if os.IsNotExist(err) {

done. I went ahead and simplified the final switch statement since it now only has a single case.

willnorris

comment created time in 13 days

PullRequestReviewEvent

push eventwillnorris/sftp

Will Norris

commit sha 8df2eb9876cf1bd659f9183f8cad23f387776ac4

server: better handle IsNotExist errors Return early from statusFromError if os.IsNotExist is true.

view details

push time in 13 days

pull request commentperkeep/perkeep

move continuous integration tests to GitHub Actions

Example test results can be seen at https://github.com/willnorris/perkeep/actions

willnorris

comment created time in 13 days

PR opened perkeep/perkeep

Reviewers
move continuous integration tests to GitHub Actions

This allows bringing both linux and windows CI tests into a single platform, and sharing accounts/permissions with the rest of the repo rather than separated out on Travis and AppVeyor. If we also use GitHub Actions for future automations like release scripts, updating the website, etc, then having CI here as well means only a single system to learn.

Performance is about the same as Travis and AppVeyor... about 5-6 minutes for linux tests to complete, about 8 minute for Windows. The failing Windows tests here are the same ones that were already failing. I have a set of changes queued up that will address all of those.

+66 -39

0 comment

5 changed files

pr created time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha b8bd3c2d39b437526a0fde624afa6ddd2ae7ece6

tests: further exclude windows from symlink tests os.Symlink returns a nil error in some cases (when permissions allow), but still does not behave as expected. Skip Windows altogether from some of these tests for the time being.

view details

push time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha f4bdf18a7b4df277ea629363e16f3bfdb1fca22a

tests: add more debugging info

view details

push time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha 8a8c80a4d001bc3b04017b998d5a2b97311137d4

tests: add more debugging info

view details

push time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha 5023f331ae360d6d6523f4b65ae39c8ecc1c50d8

tests: add more debugging info

view details

push time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha 08f4954cb1f733beb252bdfc3b9d0e7a7830c14b

tests: add more debugging info

view details

push time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha 7b9591d34b1444028bf48287ab5aa584b965e513

test: use filepath.Join for filenames

view details

Will Norris

commit sha 30a3201769ed3d2aaff2a08a466857d312139c0f

wip: add more debugging info

view details

push time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha ab88460ca060df0e639de78208a2da58fd358259

move continuous integration tests to GitHub Actions

view details

Will Norris

commit sha 3198d11685c75a91afc099c0f3580275344597e9

add windows implementation for cleanSysStat this allows pk-put's havecache to properly function on Windows, fixing the camput integration test failure.

view details

Will Norris

commit sha 1d24d17731477c88ceeac6ce5d471b9eeaf1550c

update dependencies update github.com/bradfitz/latlong in order to pick up https://github.com/bradfitz/latlong/commit/afb97c1f9 which updates the import path of freetype-go. The old path no longer exists and was causing problems with go mod. update github.com/pkg/sftp for https://github.com/pkg/sftp/pull/382 which resolves CI test failures for Windows.

view details

Will Norris

commit sha e1ef3a5e4563a0abad57b8a1d46ccec8aeed05b9

blobserver: use MkdirAll from sftp library

view details

push time in 13 days

create barnchwillnorris/perkeep

branch : fix-windows

created branch time in 13 days

PR opened pkg/sftp

server: use os.IsNotExist to map sshFxNoSuchFile

Always use os.IsNotExist to identify any OS specific error types that represent missing files or directories. This resolves an issue on Windows where some system errors (ENOTDIR) were not being identified as 'not found' errors and mapped to sshFxNoSuchFile.

fixes #381

+18 -1

0 comment

2 changed files

pr created time in 13 days

create barnchwillnorris/sftp

branch : enotdir

created branch time in 13 days

fork willnorris/sftp

SFTP support for the go.crypto/ssh package

fork in 13 days

issue openedpkg/sftp

server Stat call returns incorrect error for some non-existent Windows file paths

(Apologies if I get some of the details wrong here, as I'm just digging into filesystem syscalls as a result of this bug. This is all foreign territory for me. But I do feel pretty confident about the fix I have)


os.Stat on Windows returns ENOENT if the requested file or directory does not exist, but ENOTDIR if the requested file is a child of a non-existent directory. For example, given the code:

_, err1 := os.Stat("/doesnotexist")
fmt.Printf("%#v\n", err1)
_, err2 := os.Stat("/doesnotexist/a/b")
fmt.Printf("%#v\n", err2)

On windows, this prints:

&os.PathError{Op:"CreateFile", Path:"/doesnotexist", Err:0x2}      // ENOENT
&os.PathError{Op:"CreateFile", Path:"/doesnotexist/a/b", Err:0x3}  // ENOTDIR

Compared to linux, which treats these both the same:

&os.PathError{Op:"stat", Path:"/doesnotexist", Err:0x2}      // ENOENT
&os.PathError{Op:"stat", Path:"/doesnotexist/a/b", Err:0x2}  // ENOENT

sftp's server implementation maps these errors to ssh status codes in statusFromError. In the case of os.PathError, this calls translateErrno which properly translates the ENOENT to sshFxNoSuchFile, but the ENOTDIR gets left as a generic sshFxFailure.

This means that when the response gets converted back into an error in an sftp client, it is not seen as a not exists error. Here is a simple reproduction case:

func TestStatNonExistent(t *testing.T) {
	cPipe, sPipe := net.Pipe()
	srv, _ := sftp.NewServer(sPipe)
	go srv.Serve()
	client, _ := sftp.NewClientPipe(cPipe, cPipe)

	for _, file := range []string{"/doesnotexist", "/doesnotexist/a/b"} {
		_, err := client.Stat(file)
		if err == nil || !os.IsNotExist(err) {
			t.Errorf("expected 'does not exist' err for file %q.  got: %v", file, err)
		}
	}

This works fine on Linux, but on Windows returns:

--- FAIL: TestStatNonExistent (0.00s)
    c:\Users\willnorris\src\sftptest\sftp_test.go:30: expected 'does not exist' err for file "/doesnotexist/a/b".  
got: sftp: "CreateFile /doesnotexist/a/b: The system cannot find the path specified." (SSH_FX_FAILURE)

It's tempting to just have translateErrno handle ENOTDIR as well, but golang/go#18974 suggests that is not always a good idea. I'm not 100% sure if the use cases Ian talks about in that bug apply here, but it's not necessary anyway. As of a919b76, os.IsNotExist properly identifies ENOTDIR on windows, so it's as simple as checking os.IsNotExist inside of statusFromError, and mapping it to sshFxNoSuchFile. I've verified this resolves the reproduction case above, and will followup with that in a PR shortly.

(For what it's worth, I found this while trying to debug this Windows test failure in Perkeep)

created time in 13 days

push eventwillnorris/perkeep

Will Norris

commit sha 5947adc1bbbbe887b5bf9c8817087d155b49fece

add windows implementation for cleanSysStat this allows pk-put's havecache to properly function on Windows, fixing the camput integration test failure.

view details

push time in 14 days

create barnchwillnorris/perkeep

branch : kvcache-win

created branch time in 14 days

push eventwillnorris/perkeep

Will Norris

commit sha ab88460ca060df0e639de78208a2da58fd358259

move continuous integration tests to GitHub Actions

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 816fe1522439bd21ad410468348f7517009b66d4

move continuous integration tests to GitHub Actions

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 6bf68c0c8acdf24bf1cca9c80114921c70b55ade

move continuous integration tests to GitHub Actions

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 1ae676b629632b0ad605a61dc5de198e2e111001

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha ce97f2feff6c6f73ce42614de73fb886f2a9245b

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha f2525ef74a7b99f4af73cc124d291fa8bc546500

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha b25a10ed1c865dd8f43de60780179b76be427d0d

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 5e46989347df391512efce1e13c47538708d41ee

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 60ef835d1e50d709c86eeae9308a37c92375aed6

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 70b146e378983e74f46e5ac0b6eca5aff4b80baf

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha cb4a77eea04ea95e101a573a9251c3c8f312042b

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 356695e7a16a19714e781ee326dd869584d48d10

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha e90cbc41e3385fb864bb16d5223c3d50b71204b3

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha fa08cb4b9cd395a4baf0bb8ebdfb9a2e2235965b

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha cf702245871bcfda6e6add8b954fd3c8068ccdaf

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 13945495d26039af7e9f5f642038632f27a55a49

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 7a118d8e4bd9936067c0db479fcdfb39ee27240f

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 696502573b05f035bd711825bd78ee4902354eea

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 5236402f8819838a9f9f9093c4f9a049db2d3175

add GitHub Actions config for tests

view details

push time in 15 days

issue commentperkeep/perkeep

New release?

I'd also be happy to learn how, so that it doesn't always fall on you.

jpvlsmv

comment created time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 8714e92374043e7edbb9433253475c2ec4d90d03

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 964311bf31bdb3e70edbef0aff535ba3d8f3399a

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 5aba6c5152bdce4a686c7073cc5b5881aaa35099

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 0fec1fbbe338f914ff986c6c5256af642f372b66

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha e376d206f31871efdc0a1c1213a2c9e9c174726b

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha e201a5364cfee371f8fbf49e465fcd9cc7f93b95

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 0ac0dd87530a5fbdbc57988eab2505942ef96db6

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha c36c26f77b96770be83b4cf58cf357a575b4d6ff

add GitHub Actions config for tests

view details

push time in 15 days

push eventwillnorris/perkeep

Will Norris

commit sha 0f9ad8701b9af0f8ea6c05fbf3c59e05b7c67046

add GitHub Actions config for tests

view details

push time in 15 days

create barnchwillnorris/perkeep

branch : actions

created branch time in 15 days

issue commentwillnorris/imageproxy

WebP output - killer feature

There's also github.com/imgproxy/imgproxy if you want to stick with something written in (mostly) go. They use cgo, which allows them to add webp support, use vips for faster transformations and encoding, etc.

slav123

comment created time in 16 days

more