Skip to content

Commit

Permalink
Merge branch 'release/2.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
onetechnical committed Apr 12, 2021
2 parents 25a5c07 + 68f8331 commit f6ba02c
Show file tree
Hide file tree
Showing 85 changed files with 13,631 additions and 2,402 deletions.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/algorand-engineering-team-issue-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Algorand Engineering Team Issue Template
about: This is the template that Algorand internal team members use in conjunction
with their task management process. Feel free to use if you're an external contributor.
title: ''
labels: ''
assignees: ''

---

## Summary
*Describe the problem identified or the general goal of this issue*

## Scope/Requirements
*What's involved in this issue? What's required to achieve the goal?*

## Urgency/Relative Priority
*How urgent is this issue? What are the timing considerations to take into account?*
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
Thanks for submitting a pull request! We appreciate the time and effort you spent to get this far.
If you haven't already, please make sure that you've reviewed the CONTRIBUTING guide:
https://github.com/algorand/go-algorand/blob/master/CONTRIBUTING.md#code-guidelines
-->

## Summary

Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged.

## Test Plan

How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale.
47 changes: 28 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
language: go
go:
- 1.13.x
- 1.14.x

dist: bionic

- 1.14.x
- 1.15.x
dist: focal
services:
- docker

- docker
install:
- go get -u golang.org/x/lint/golint
- pip3 install -r misc/requirements.txt
- if [ -n "$DOCKER_PASSWORD" ]; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ; fi
addons:
apt:
packages:
- python3-pip
- python3-setuptools
- python3-wheel

install:
- pip3 install boto3 markdown2

- python3
- python3-pip
- python3-setuptools
- python3-wheel
script:
- make
- go test ./...
- make fakepackage
- docker build -t e2e_tests -f docker/Dockerfile.mule .
- docker run --rm -t e2e_tests mule/e2e.sh
- make lint
- make
- make integration
- make test
# e2e tests can't run without installing algod.
#- make e2e
#- ./test/perf.sh "$TEST_CONNECTION_STRING_1" && ./test/perf.sh "$TEST_CONNECTION_STRING_2"
- make fakepackage
# TODO: Remove mule stuff after getting 'make e2e' to run.
- docker build -t e2e_tests -f docker/Dockerfile.mule .
- docker run --rm -t e2e_tests mule/e2e.sh

env:
global:
- secure: TM7M7vD5G9Ms7Z60xszC0JEhM9Y9UjCd5bZsLvES0KRD5vOBVALnIc3Y2QzaRmVGatd3sAyg2DYAXPOHbvcMVUX+VLoDwkpMLttgLHONqZbYGB9Z8Cqso9y5NZJe7EYy97uVoWjmLehY4b/v8NY9neNZarT7bwBP8OvdT8JFh3iwNL+w9p7mNm7XPdpY8GHAy5TpGsQfv9p5KZAPiAiTj47EPCZLSdWxlxb4jbeynczTgKu8wo3wRCPAgsmFZv0sVJtzo2c9HE/sz2ypMv++3wF8qCzWt174YBBcHkXCsgUpCL9FlTlwy6B2qW8B1oQxylpot7gce2FE5IpqtBm6ry7n+pFKdgCAKnf69WcHSrFGRVrjfIECxjHzMV4eLEfgHKoMOpfuLWLocQVIc38ii/nrT4I6M2qc79qHfbuC/BW9I+bg5d3cVYg9Wgdt94BhNDcS/b4z+pk7eEsCwPBDau8Nteox20pDTFyHYhK4r4c2dp1kqGGmeqLXzSSfqc81Le+5MUTa4Sn0nI8zfl9x4JCeD+bWL9fC/wwxyU2rYS2chWw1hOAH/nXmUkRTBPYXwyCgW7WPDu2Id2k5ghUh+IRgBxv5v3bOPw1BEPInJqbEwCIIJHICb/jnlg34iWwcSYKmk1TDO4vQVT4AFJq5VzxpvgKnOZSfiCGNMESa3kM=
- secure: P4HlEYrJ8itstmhK4hDDJojq1zdrv3DzTg7AL9U7FP1qqKq+irIhjRLJGJA3JWyCZfVGIWrf4Ak0LwBwzfBTBA+LZ9HlqfNljrFe3EJzSHd6Ly7RuFYEeslYbDV5BlYv590YivVOB8MzQl5nn6JdqrbKPGKWBvyVLqhL1R87CNvQIA122dVjNz9nqv4G21tOZgx7/PzeUHPSkAImlWg7j3vd2P4IikQr/1vOqnroN1zRXAqMVr3e42wCE0qMeqQ+tFq37Juux2JT9aKZv/wCapwLd1G4FDpbc/wes89dgMp1xGvbpPoltkdP+zbPL0UPdbOGPrW33gVMT4kXkDXZjmHBFyM9xX74gIYcsC+ekzrp9zIRqpXGiCsoW5ZJtjoM4U2fyX427yzceSKDMv7giEEfONnMD1NTYFNpREkrN5zbjMtEi4DgEnNb4e6rVA7CROVXMG8p0WdouM0cvA5j25bE88zW64eqOHtv+hG+RlrROwlM1jKt4CvSlWX5+yaBUdYvl7qCHSP7UlX2JMk0AXGIEfFvO8w4CW3Gyr36DHWedsbU5yawyB/fjX7v9BGAmG1SZThAyf1cwtHN28t4CpoaaCH18spHn+LcrH69ADTFVgsZ5AqULlKCJQCMfa4v5oqaOlmtqSNYTVllXOI+8AqSyHsCYGFPns3RyRfsEhI=
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.2
2.3.2
36 changes: 28 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GOLDFLAGS += -X github.com/algorand/indexer/version.GitDecorateBase64=$(shell gi
GOLDFLAGS += -X github.com/algorand/indexer/version.ReleaseVersion=$(shell cat .version)

# This is the default target, build the indexer:
cmd/algorand-indexer/algorand-indexer: idb/postgres/setup_postgres_sql.go types/protocols_json.go .PHONY
cmd/algorand-indexer/algorand-indexer: idb/postgres/setup_postgres_sql.go types/protocols_json.go
cd cmd/algorand-indexer && CGO_ENABLED=0 go build -ldflags="${GOLDFLAGS}"

idb/postgres/setup_postgres_sql.go: idb/postgres/setup_postgres.sql
Expand All @@ -25,9 +25,6 @@ idb/mocks/IndexerDb.go: idb/dummy.go
go get github.com/vektra/mockery/.../
cd idb && mockery -name=IndexerDb

deploy:
mule/deploy.sh

package:
rm -rf $(PKG_DIR)
mkdir -p $(PKG_DIR)
Expand All @@ -39,13 +36,36 @@ fakepackage:
mkdir -p $(PKG_DIR)
misc/release.py --outdir $(PKG_DIR) --fake-release

test: idb/mocks/IndexerDb.go cmd/algorand-indexer/algorand-indexer
go test ./...

lint:
golint -set_exit_status ./...
go vet ./...

fmt:
go fmt ./...

integration: cmd/algorand-indexer/algorand-indexer
mkdir -p test/blockdata
mkdir -p test/migrations
curl -s https://algorand-testdata.s3.amazonaws.com/indexer/test_blockdata/create_destroy.tar.bz2 -o test/blockdata/create_destroy.tar.bz2
test/postgres_migration_test.sh
test/postgres_integration_test.sh

e2e: cmd/algorand-indexer/algorand-indexer
docker kill some-postgres || docker rm some-postgres || true
docker run -it --rm --name some-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
python3 misc/e2elive.py --connection-string 'host=localhost port=5432 dbname=postgres sslmode=disable user=postgres password=postgres' --indexer-bin cmd/algorand-indexer/algorand-indexer --indexer-port 9890
docker kill some-postgres || docker rm some-postgres

deploy:
mule/deploy.sh

sign:
mule/sign.sh

test: idb/mocks/IndexerDb.go
go test ./...

test-package:
mule/e2e.sh

.PHONY:
.PHONY: test e2e integration fmt lint deploy sign test-package package fakepackage cmd/algorand-indexer/algorand-indexer
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ The command line arguments always take priority over the config file and environ
## configuration file
Default values are placed in the configuration file. They can be overridden with environment variables and command line arguments.

The configuration file must named **algorand-indexer**, **algorand-indexer.yml**, or **algorand-indexer.yaml**. It must also be in the correct location. Only one configuration file is loaded, the path is searched in the following order:
The configuration file must named **indexer**, **indexer.yml**, or **indexer.yaml**. It must also be in the correct location. Only one configuration file is loaded, the path is searched in the following order:
* `./` (current working directory)
* `$HOME`
* `$HOME/.algorand-indexer`
* `$HOME/.config/algorand-indexer`
* `/etc/algorand-indexer/`

Here is an example **algorand-indexer.yml** file:
Here is an example **indexer.yml** file:
```
postgres-connection-string: "host=mydb.mycloud.com user=postgres password=password dbname=mainnet"
pidfile: "/var/lib/algorand/algorand-indexer.pid"
Expand Down Expand Up @@ -202,3 +202,9 @@ If you wish to run multiple indexers on one server under systemd, see the commen

Indexer v1 was built into the algod v1 REST API. It has been removed with the algod v2 REST API, all of the old functionality is now part of this project. The API endpoints, parameters, and response objects have all been modified and extended. Any projects depending on the old endpoints will need to be updated accordingly.

# Building

Indexer is built using an in-house task framework called [`mule`](https://pypi.org/project/mulecli/) (it has since been open-sourced).

Please refer to the [build docs](mule/README.md) in the `mule/` directory.

Loading

0 comments on commit f6ba02c

Please sign in to comment.