aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-05-16Bump github.com/mgechev/revive from 1.3.1 to 1.3.2 in /tools (#95)Gravatar dependabot[bot] 2-13/+13
Bumps [github.com/mgechev/revive](https://github.com/mgechev/revive) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/mgechev/revive/releases) - [Changelog](https://github.com/mgechev/revive/blob/master/.goreleaser.yml) - [Commits](https://github.com/mgechev/revive/compare/v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: github.com/mgechev/revive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09Remove branch from PackageConfig struct (#93)Gravatar Sung Yoon Whang 4-51/+6
* Remove branch from PackageConfig struct With #92, branch is no longer necessary from PackageConfig struct since go-source tag was removed. This removes Branch field from PackageConfig. * update README
2023-05-07Removing redundant go-source tag (#92)Gravatar Anurag Bandyopadhyay 4-9/+2
* update: removing redundant go-source tag * fix: removing /.idea and adding dir to gitignore * fix: removing /.idea and removing branch field from from templateData * fix: pkgHndler defaultBranch rem revert * fix: minor typo * fix: removing assertion of template responses * fix: tabs * Update handler_test.go * Update handler_test.go * Update handler_test.go --------- Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
2023-04-29ci: gofmt, golint => revive, update tools and actions (#87)Gravatar Abhinav Gupta 7-31/+95
Fixes up the `make lint` target to also check that all files are properly gofmt-ed, replaces the deprecated `golint` check with `revive`, and sets up dependabot to also update tools and actions regularly.
2023-04-29refactor(indexHandler): Don't retain configuration (#86)Gravatar Abhinav Gupta 2-12/+30
Similar to the previous patch, this patch removes knowledge of the configuration from the index handler. Instead, the index handler is now passed a list of packageInfo structs each containing just the information needed to render the index page. This also obviates the need to duplicate the logic to compute the package import path in the index.html template.
2023-04-28refactor(packageHandler): Don't retain configuration (#85)Gravatar Abhinav Gupta 1-20/+40
This patch removes the need to retain the configuration in the packageHandler struct. Instead, it retains only the fields that are required for the handler to function. This also allows us to pre-compute the canonical import path rather than calculating it on the request path.
2023-04-28config: Rename Package to PackageConfig, add docs (#84)Gravatar Abhinav Gupta 4-16/+45
Renames the Package struct to PackageConfig to make it clear that it is a configuration struct. This differentiation will help disconnect the configuration-level representation from the runtime representation of this information. This patch also adds documentation to the config package that was previously missing.
2023-04-27Bump golang.org/x/net from 0.8.0 to 0.9.0 (#81)Gravatar dependabot[bot] 2-3/+3
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21ci: Publish Docker image to ghcr.io on release (#82)Gravatar Abhinav Gupta 3-0/+70
Adds a workflow that builds and publishes a Docker image to ghcr.io based on the Dockerfile in the root of the repository. This will become available at https://github.com/uber-go/sally/pkgs/container/sally. Users will be able to import it by using `ghcr.io/uber-go/sally:$tag` with `docker pull` or in the `FROM` clause of their own Docker file. As a test for this, I published it manually to my own fork. The image is at https://github.com/abhinav/sally/pkgs/container/sally. With that, I ran the following Dockerfile: FROM ghcr.io/abhinav/sally:master COPY sally.yaml / And it worked as expected.
2023-03-05Bump golang.org/x/net from 0.7.0 to 0.8.0 (#80)Gravatar dependabot[bot] 2-3/+3
2023-02-26Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#79)Gravatar dependabot[bot] 2-3/+3
2023-02-14Bump golang.org/x/net from 0.6.0 to 0.7.0 (#78)Gravatar dependabot[bot] 2-3/+3
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08Bump golang.org/x/net from 0.5.0 to 0.6.0 (#77)Gravatar dependabot[bot] 2-3/+3
2023-02-04ci: Build against Go 1.20 (#76)Gravatar Abhinav Gupta 3-19/+20
Upgrades to latest release of Go for CI. This requires switching staticcheck to the latest release as well.
2023-01-30Back to development (#75)Gravatar Sung Yoon Whang 1-0/+5
2023-01-23Fix typo on release notes (#74)Gravatar Sung Yoon Whang 1-1/+1
Release notes for v1.3.0 had an incorrect link for changes included in v1.3.0; fixing this before we actually tag a release with this.
2023-01-23v1.3.0 release (#73)Gravatar Sung Yoon Whang 1-2/+4
2023-01-23Add minimal Dockerfile (#72)Gravatar Abhinav Gupta 1-0/+15
Adds a Dockerfile that builds sally using a phased Docker build. The first phase builds sally, and the second phase publishes a scratch image with just sally. If Uber publishes this to a container registry, a user can use it like so: % vim sally.yaml # create a sally yaml % cat > Dockerfile FROM sally:latest COPY sally.yaml /sally.yaml % docker build . Even without publishing, this provides an example of how to build sally for deployment. Testing: I verified the instructions above locally by tagging locally with: % docker build -t sally:latest I'm also using a variation of this Dockerfile in production right now for my own hosted instance of sally.
2023-01-23Upgrade to yaml.v3 (#69)Gravatar Abhinav Gupta 3-5/+2
* config: Don't require packages to be alphabetical The configuration parser requries that entries in the 'packages' section are in alphabetical order. It will fail parsing if that's not the case, even if the configuration is otherwise valid. This seems like an unnecessary artificial limitation. Enforcing such a convention should be the user's choice. This change deletes this limitation. * Upgrade to yaml.v3 * template: Use a more fluid layout (#67) Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top. * Add support for package descriptions (#68) * template: Use a more fluid layout Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top. * Add support for package descrpitions Packages may now optionally specify a description. If specified, this is printed below the package information, indented one column to make it stand out. Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com> Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com>
2023-01-23Drop httprouter dependency (#71)Gravatar Abhinav Gupta 4-15/+75
This drops the third-party HTTP router dependency. This dependency wasn't strictly necessary since our routing needs are quite basic: - `/$name` and `/$name/*` for all registered packages - `/` for root This is easily accomplished with `http.ServeMux`: - register `/$name` and `/$name/`. The latter will receive all subpackage requests. - register `/` and reject anything that isn't for exactly `/`.
2023-01-23Drop gohtml dependency (#70)Gravatar Abhinav Gupta 3-8/+17
This dependency is used to format and compare HTML. An additional dependency isn't needed; we can use the existing (previously transitive) x/net package to reformat and compare the HTML.
2023-01-23Add support for package descriptions (#68)Gravatar Abhinav Gupta 6-1/+21
* template: Use a more fluid layout Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top. * Add support for package descrpitions Packages may now optionally specify a description. If specified, this is printed below the package information, indented one column to make it stand out. Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com>
2023-01-23template: Use a more fluid layout (#67)Gravatar Abhinav Gupta 2-30/+42
Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top.
2023-01-23config: Don't require packages to be alphabetical (#66)Gravatar Abhinav Gupta 2-50/+4
The configuration parser requries that entries in the 'packages' section are in alphabetical order. It will fail parsing if that's not the case, even if the configuration is otherwise valid. This seems like an unnecessary artificial limitation. Enforcing such a convention should be the user's choice. This change deletes this limitation.
2022-12-21Bump github.com/stretchr/testify from 1.2.2 to 1.8.1 (#63)Gravatar dependabot[bot] 2-3/+13
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.2.2 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.2.2...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19Fix lint error issues (#65)Gravatar Sung Yoon Whang 1-2/+1
Since upgrading to Go 1.19 we are seeing linter error due to usage of the deprecated io/ioutil package. This removes the usage of io/ioutil package.
2022-12-18Makefile: Simplify (#62)Gravatar Abhinav Gupta 8-58/+74
This simplifies the Makefile significantly, borrowing patterns we've used in other projects. Namely: - Set GOBIN to a bin subdirectory so that we can `go install` dependencies into it. - Use a shared TEST_FLAGS for `make test` and `make cover`. Without this, we're not running with data race detection in CI. - Build lint step out of separate golint and staticcheck steps. In the future, a gofmt step may also be added. - Move tools dependencies into an unpublished subpackage. Note: I didn't mess with the 'clean' and 'run' targets at the bottom of the file even though they're not necessary to avoid a merge conflict with #60.
2022-12-18README: Document configuration further (#61)Gravatar Abhinav Gupta 1-8/+49
Adds more details on how to configure sally and what the required and optional fields are. Also updates the installation instructions since you can't `go get` the binary anymore.
2022-12-18Delete unused Docker infrastructure (#60)Gravatar Abhinav Gupta 4-46/+0
This was all added back when these tests were running on Travis CI and attempted to create an isolated build of sally. This is all no longer necessary because GitHub Actions and Go modules provide enough isolation.
2022-12-18Set up dependabot (#59)Gravatar Abhinav Gupta 1-0/+6
sally is a binary, not a library so it's okay to keep it on the latest dependencies. This sets up dependabot updates for Go modules used by sally.
2022-12-18ci: Use Go 1.19 and update GH actions (#58)Gravatar Abhinav Gupta 3-13/+9
This updates sally to build and test against Go 1.19. Additionally, this upgrades the GitHub Action versions for checkout and setup-go. One of the features in setup-go v3 is that caching is built-in and opted-into with `cache: true`. Non-CI changes: gofmt, drop ioutil
2022-05-17Back to development (#57)Gravatar Abhinav Gupta 1-0/+5
2022-05-17Release v1.2.0 (#56)Gravatar Abhinav Gupta 1-7/+20
This releases Sally v1.2.0 with several changes and a couple community contributions. In updating the changelog, I moved the reference links from the bottom to the section for each version because otherwise it's easy to forget to add these.
2022-05-17badge: Use pkg.go.dev badge (#55)Gravatar Abhinav Gupta 1-1/+1
When we originally switched to pkg.go.dev (#40), it did not offer documentation badges so we relied on a third-party service. That's no longer true (https://pkg.go.dev/badge) so we can use pkg.go.dev's more "on-brand" badges for this.
2022-05-17Update dependencies (#54)Gravatar Abhinav Gupta 8-40/+55
Update all dependencies, use Go 1.18 to build and test, and delete outdated `bindata` clause in Makefile (we switched to `go:embed` in #50). Other minor changes: - Fix the golint import path (it switched to golang.org/x/lint long before it was deprecated) and fix the failing lint check. (Switching from golint to revive is out of scope for this PR.) - Delete .envrc -- this was transitional for when Go modules were optional.
2022-01-03Support package-level overrides for URLs (#52)Gravatar Tyler Sullivan 5-1/+49
Sally accepts the base vanity URL (e.g. `go.uber.org`) in a top-level `url` key. This applies to all packages listed in the configuration. Add support for overriding the `url` on a per-package basis. This will provide for an easier transition period when migrating Go packages of an organization between hosts, for example from BitBucket to GitHub. With this, source code can be modified across the various repositories over time to use the new vanity URL. For example, some packages will use a URL of bitbucketurl.org and some will use mycoolgoimportvanity.org in their source code imports. Other than the use-case outlined above, this feature adds flexibility to the vanity server to support more than one vanity URL when used behind an ingress controller.
2021-09-10Use go embed for templates (#50)Gravatar Luciano Nooijen 6-265/+14
Go 1.16 includes a `//go:embed` directive that obviates the need for bindata. Use `//go:embed` instead of bindata for templates used in sally. Signed-off-by: Luciano Nooijen <luciano@bytecode.nl> Co-authored-by: Abhinav Gupta <abg@uber.com>
2021-09-08Use Go 1.17 to test and build (#51)Gravatar Abhinav Gupta 2-9/+4
sally is not a library, so there's no reason to test it with two versions of Go. Use the latest version of Go to build and test it.
2021-05-25Merge pull request #48 from uber-go/fossaGravatar Manjari Akella 2-5/+17
fossa: Run separately, only on push
2021-05-25fossa: Run separately, only on pushGravatar Abhinav Gupta 2-5/+17
FOSSA analysis currently blocks CI on pull requests because they are denied access to secrets. Run FOSSA as a separate job only when we push to a branch of the project.
2021-05-25Integrate FOSSA (#47)Gravatar Manjari Akella 1-0/+5
Add a FOSSA check to the build steps. Resolves: GO-468
2021-05-18Allow setting branch (#46)Gravatar Jan-Philipp Benecke 5-10/+42
Support specifying the branch from which source will be served in the YAML configuration.
2021-05-17Set up CI (#45)Gravatar Dmitriy Shirchenko 3-0/+64
Set up CI with GitHub actions.
2020-03-02Back to developmentGravatar Abhinav Gupta 1-0/+4
2020-03-02Preparing release v1.1.1 (#44)Gravatar Abhinav Gupta 1-2/+2
2020-03-02Fix godoc badge image (#43)Gravatar Abhinav Gupta 4-5/+10
pkg.go.dev does not serve a badge like godoc.org. This change switches the image over to one provided by shields.io. Note that this uses the style "for-the-badge" from shields.io.
2020-02-18Release v1.1.0 (#41)Gravatar SyrieBianco 1-2/+2
* Release v1.1.0
2020-02-12Update Godoc server to pkg.go.dev (#40)Gravatar SyrieBianco 5-15/+17
Update our default Godoc server from `` to the shiny, new `https://pkg.go.dev/` See https://github.com/uber-go/sally/issues/39, T4832833
2019-03-05CHANGELOG: Add entry for #38Gravatar Abhinav Gupta 1-0/+6
2019-03-05Support changing godoc instance (#38)Gravatar Diego Bernardes 6-6/+66
This adds the ability to change the godoc.org instance used by Sally to link to documentation by providing a new `godoc` section in the configuration.