Code Monkey home page Code Monkey logo

enkit's Introduction

Enkit (engineering toolkit)

Importing into a downstream Bazel workspace

When using enkit in a downstream workspace, there are two options for loading Go dependencies:

  • Call only //bazel:go_repositories%go_repositories from this repo, and use only those dependencies in the downstream repo. This works if Golang binaries only need to be built from this repo and not the downstream repo.

  • Call //bazel:go_repositories%go_repositories after loading Golang dependencies in the downstream repo. This would ensure that:

    1. Go dependencies in the downstream repo obey that repo's go.mod version selection, rather than enkit's, for minimal surprises.

    2. enkit dependencies are loaded, for processes that require a complete dependency graph

    Note that building binaries from enkit loaded in a downstream repo in this manner will not necessarily match those built from this repo directly, as the downstream repo may be loading different versions of enkit's dependencies. This may cause build divergence and/or failures.

Testing

Setting up for tests

Install non-bazel managed dependencies

  1. google-cloud-sdk

    • Install here https://cloud.google.com/sdk/docs/install

      PLEASE NOTE: do not install using snap/brew/apt-get etc., as emulators do not work.

    • Run the following command to get access to the emulators:

      gcloud components install beta
      
    • Add the gcloud binary to the local binaries directory with the following symlink:

      ln -s $(which gcloud) /usr/local/bin
      
  2. Get a service account from <x, Y, Z person>

    • Put it in //astore/testdata/credentials.json

Examples of Running Tests

  • Running a specific go test target

    bazel test //astore:go_default_test
    
  • Running specific test of a test file

    bazel test //astore:go_default_test --test_filter=^TestServer$
    
  • Running Everything

    bazel test //...
    
  • Remove all emulator spawned processes

    Sometimes emulator processes can be left behind after a test run. These can be cleaned up with:

    ps aux | grep gcloud/emulators/datastore | awk '{print $2}' | xargs kill
    

Adding Tests

  1. Create the test in * \_test.go

  2. Run Gazelle:

    bazel run //:gazelle
    
  3. If your test needs server dependencies, such as astore or minio, add the attribute local = True to the test rule.

enkit's People

Contributors

aaahrens avatar ahungrynacho avatar amichalol avatar cbrune avatar ccontavalli avatar dependabot[bot] avatar espeer-enfabrica avatar george-enf avatar gpaussaenf avatar jacob-adelmann avatar jonathan-enf avatar jrp-enf avatar jungleraptor avatar kjw-enf avatar marcelo-enf avatar mhallmark avatar minor-fixes avatar naveenaketi-enf avatar nzmsv avatar pete-enf avatar rajachan avatar renovate[bot] avatar rolf-enf avatar screech avatar skarat-enf avatar stefanoen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enkit's Issues

go install faketree fails @latest

Hi,

The install command from the docs fails on latest:

โฏ go install -v github.com/enfabrica/enkit/faketree@latest
go: github.com/enfabrica/enkit/faketree@latest (in github.com/enfabrica/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

This is caused by the replace directives in the go.mod file, see this issue for details: golang/go#44840

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency uc-micro-py to v1.0.2
  • fix(deps): update module cloud.google.com/go/bigquery to v1.51.2
  • fix(deps): update module cloud.google.com/go/cloudbuild to v1.9.1
  • fix(deps): update module cloud.google.com/go/pubsub to v1.30.1
  • fix(deps): update module github.com/docker/docker to v23.0.6+incompatible
  • fix(deps): update module github.com/itchyny/gojq to v0.12.12
  • fix(deps): update module github.com/jackpal/gateway to v1.0.10
  • fix(deps): update module github.com/masterminds/sprig/v3 to v3.2.3
  • fix(deps): update module github.com/miekg/dns to v1.1.54
  • chore(deps): update dependency pyrsistent to v0.19.3
  • chore(deps): update dependency zipp to v3.15.0
  • fix(deps): update module github.com/bazelbuild/rules_go to v0.39.1
  • fix(deps): update module github.com/go-git/go-git/v5 to v5.6.1
  • fix(deps): update module github.com/improbable-eng/grpc-web to v0.15.0
  • fix(deps): update module github.com/josephburnett/jd to v1.7.1
  • fix(deps): update module github.com/mitchellh/mapstructure to v1.5.0
  • fix(deps): update module github.com/pelletier/go-toml to v1.9.5
  • fix(deps): update module github.com/prashantv/gostub to v1.1.0
  • fix(deps): update module github.com/prometheus/client_golang to v1.15.1
  • fix(deps): update module github.com/rs/cors to v1.9.0
  • fix(deps): update module github.com/spf13/cobra to v1.7.0
  • fix(deps): update module go.uber.org/goleak to v1.2.1
  • fix(deps): update module go.uber.org/zap to v1.24.0
  • fix(deps): update module golang.org/x/crypto to v0.9.0
  • fix(deps): update module golang.org/x/net to v0.10.0
  • fix(deps): update module golang.org/x/oauth2 to v0.8.0
  • fix(deps): update module google.golang.org/api to v0.122.0
  • fix(deps): update module google.golang.org/grpc to v1.55.0
  • chore(deps): update dependency attrs to v23
  • chore(deps): update dependency importlib-metadata to v6
  • chore(deps): update dependency linkify-it-py to v2
  • fix(deps): update module github.com/bazelbuild/buildtools to v6
  • fix(deps): update module github.com/pelletier/go-toml to v2
  • fix(deps): update module github.com/tchap/zapext to v2
  • fix(deps): update module gopkg.in/yaml.v2 to v3
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

bazelisk
.bazelversion
  • bazel 6.0.0
docker-compose
machinist/example/deployment/docker-compose.yml
monitor/docker-compose.yml
gomod
go.mod
  • go 1.20
  • github.com/minor-fixes/cloud-build-notifiers v0.0.0-20230424124639-02281bcdd3d5@02281bcdd3d5
  • cloud.google.com/go/bigquery v1.51.0
  • cloud.google.com/go/cloudbuild v1.9.0
  • cloud.google.com/go/datastore v1.11.0
  • cloud.google.com/go/pubsub v1.30.0
  • cloud.google.com/go/storage v1.30.1
  • github.com/bazelbuild/buildtools v0.0.0-20211007154642-8dd79e56e98e@8dd79e56e98e
  • github.com/bazelbuild/rules_go v0.32.0
  • github.com/cheggaaa/pb/v3 v3.0.5
  • github.com/coreos/go-oidc v2.2.1+incompatible
  • github.com/cybozu-go/aptutil v1.4.2-0.20200413001041-3f82d8384481@3f82d8384481
  • github.com/docker/docker v23.0.4+incompatible
  • github.com/dustin/go-humanize v1.0.0
  • github.com/fatih/color v1.12.0
  • github.com/go-git/go-git/v5 v5.1.0
  • github.com/golang/glog v1.1.1
  • github.com/golang/protobuf v1.5.3
  • github.com/google/go-cmp v0.5.9
  • github.com/google/go-github v17.0.0+incompatible
  • github.com/google/uuid v1.3.0
  • github.com/gorilla/websocket v1.5.0
  • github.com/improbable-eng/grpc-web v0.13.0
  • github.com/josephburnett/jd v1.6.1
  • github.com/kataras/muxie v1.1.1
  • github.com/kirsle/configdir v0.0.0-20170128060238-e45d2f54772f@e45d2f54772f
  • github.com/miekg/dns v1.1.43
  • github.com/mitchellh/go-homedir v1.1.0
  • github.com/mitchellh/go-ps v1.0.0
  • github.com/mitchellh/mapstructure v1.4.2
  • github.com/pelletier/go-toml v1.8.1
  • github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4@0a3d74bf9ce4
  • github.com/prashantv/gostub v1.0.0
  • github.com/prometheus/client_golang v1.14.0
  • github.com/psanford/memfs v0.0.0-20210214183328-a001468d78ef@a001468d78ef
  • github.com/sirupsen/logrus v1.9.0
  • github.com/soheilhy/cmux v0.1.4
  • github.com/spf13/cobra v1.6.1
  • github.com/spf13/pflag v1.0.5
  • github.com/stretchr/testify v1.8.2
  • github.com/tchap/zapext v1.0.0
  • github.com/ulikunitz/xz v0.5.8
  • github.com/xor-gate/ar v0.0.0-20170530204233-5c72ae81e2b7@5c72ae81e2b7
  • go.uber.org/goleak v1.1.11-0.20210813005559-691160354723@691160354723
  • go.uber.org/zap v1.19.1
  • golang.org/x/crypto v0.8.0
  • golang.org/x/net v0.9.0
  • golang.org/x/oauth2 v0.7.0
  • google.golang.org/api v0.119.0
  • google.golang.org/grpc v1.54.0
  • google.golang.org/protobuf v1.30.0
  • gopkg.in/yaml.v2 v2.4.0
  • github.com/GoogleCloudPlatform/cloud-build-notifiers v0.0.0-20230123211209-f695cd1064aa@f695cd1064aa
  • github.com/Masterminds/sprig/v3 v3.2.2
  • github.com/itchyny/gojq v0.12.9
  • github.com/jackpal/gateway v1.0.7
  • github.com/rs/cors v1.7.0
  • github.com/xenking/zipstream v1.0.1
  • google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1@daa745c078e1
  • gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df@81ebce5c23df
pip_requirements
requirements.txt
  • absl-py ==1.4.0
  • attrs ==22.2.0
  • click ==8.1.3
  • click-logging ==1.0.1
  • importlib-metadata ==4.11.3
  • importlib-resources ==5.7.1
  • jinja2 ==3.1.1
  • jinja2-strcase ==0.0.2
  • jsonschema ==4.4.0
  • linkify-it-py ==1.0.3
  • markdown-it-py ==2.1.0
  • markupsafe ==2.1.1
  • mdformat ==0.7.14
  • mdformat-gfm ==0.3.5
  • mdformat-tables ==0.4.1
  • mdit-py-plugins ==0.3.0
  • mdurl ==0.1.1
  • pyrsistent ==0.18.1
  • pyyaml ==6.0
  • six ==1.16.0
  • tomli ==2.0.1
  • uc-micro-py ==1.0.1
  • zipp ==3.8.0
terraform
infra/cloudbuild_staging/enkit_postsubmit.tf

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.