Skip to content

Commit

Permalink
Merge pull request #3775 from smartcontractkit/release/0.9.7
Browse files Browse the repository at this point in the history
Release 0.9.7
  • Loading branch information
tyrion70 authored Dec 14, 2020
2 parents ba2521c + 3eebb2a commit 24a90fc
Show file tree
Hide file tree
Showing 384 changed files with 15,546 additions and 3,217 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
- run:
name: Docker build
command: DOCKER_TAG=circleci make docker
- run:
name: Docker build non-root
command: DOCKER_TAG=circleci-nonroot CHAINLINK_USER=chainlink make docker
- run:
name: Docker push, if applicable
command: |
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/cleanup-selfhosted-gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cleanup Selfhosted Runners
on:
workflow_dispatch:
inputs:
githubToken:
description: 'This token should have access for modifying and listing github runners respective github repository'
required: true
dummyRunner:
description: 'A "dummy runner" in the context of https://github.com/philips-labs/terraform-aws-github-runner#usages Specifically, "This offline runner will ensure your builds will not fail immediately and stay queued until there is a runner to pick it up."'
required: false
jobs:
cleanup:
name: Cleanup
runs-on: ubuntu-latest
steps:
- name: Run GHA self hosted runner cleanup
uses: smartcontractkit/[email protected]
with:
githubRepository: smartcontractkit/chainlink
githubToken: ${{ github.event.inputs.githubToken }}
dummyRunner: ${{ github.event.inputs.dummyRunner }}
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
integration:
name: Integration tests running ./compose ${{ matrix.test }} against ${{ matrix.node }}
runs-on: [self-hosted, sdlc-ghr-prod]
timeout-minutes: 17
strategy:
matrix:
test: ['test', 'test:ts']
Expand Down
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GO_LDFLAGS := $(shell tools/bin/ldflags)
GOFLAGS = -ldflags "$(GO_LDFLAGS)"
DOCKERFILE := core/chainlink.Dockerfile
DOCKER_TAG ?= latest
CHAINLINK_USER ?= root

TAGGED_REPO := $(REPO):$(DOCKER_TAG)
ECR_REPO := "$(AWS_ECR_URL)/chainlink:$(DOCKER_TAG)"
Expand Down Expand Up @@ -93,12 +94,14 @@ docker: ## Build the docker image.
--build-arg BUILDER=$(BUILDER) \
--build-arg ENVIRONMENT=$(ENVIRONMENT) \
--build-arg COMMIT_SHA=$(COMMIT_SHA) \
--build-arg CHAINLINK_USER=$(CHAINLINK_USER) \
-t $(TAGGED_REPO) \
.

.PHONY: dockerpush
dockerpush: ## Push the docker image to ecr
docker push $(ECR_REPO)
docker push $(ECR_REPO)-nonroot

help:
@echo ""
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ By default this will start on port 6688, where it exposes a [REST API](https://g
Once your node has started, you can view your current jobs with:

```bash
chainlink jobs list
chainlink job_specs list # v1 jobs
chainlink jobs list # v2 jobs
```

View details of a specific job with:

```bash
chainlink jobs show "$JOB_ID"
chainlink job_specs show "$JOB_ID # v1 jobs"
```

To find out more about the Chainlink CLI, you can always run `chainlink help`.
Expand Down Expand Up @@ -176,14 +177,15 @@ go test -parallel=1 ./...
2. Install the dependencies:

```bash
cd evm
yarn install
yarn
yarn setup:contracts
```

3. Run tests:

```bash
yarn run test-sol
cd evm-contracts
yarn test
```

### Use of Go Generate
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.6
0.9.7
4 changes: 4 additions & 0 deletions core/adapters/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ var (
TaskTypeCompare = models.MustNewTaskType("compare")
// TaskTypeQuotient is the identifier for the Quotient adapter.
TaskTypeQuotient = models.MustNewTaskType("quotient")
// TaskTypeResultCollect is the identifier for the ResultCollect adapter.
TaskTypeResultCollect = models.MustNewTaskType("resultcollect")
)

// BaseAdapter is the minimum interface required to create an adapter. Only core
Expand Down Expand Up @@ -145,6 +147,8 @@ func FindNativeAdapterFor(task models.TaskSpec) BaseAdapter {
return &Compare{}
case TaskTypeQuotient:
return &Quotient{}
case TaskTypeResultCollect:
return &ResultCollect{}
default:
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion core/adapters/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (ba *Bridge) responseToRunResult(body []byte, input models.RunInput) models
return models.NewRunOutputComplete(data)
}

return models.NewRunOutputCompleteWithResult(brr.Data.String())
return models.NewRunOutputCompleteWithResult(brr.Data.String(), input.ResultCollection())
}

func (ba *Bridge) postToExternalAdapter(
Expand Down
12 changes: 6 additions & 6 deletions core/adapters/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,33 @@ func (c *Compare) Perform(input models.RunInput, _ *store.Store) models.RunOutpu

switch c.Operator {
case "eq":
return models.NewRunOutputCompleteWithResult(c.Value == prevResult)
return models.NewRunOutputCompleteWithResult(c.Value == prevResult, input.ResultCollection())
case "neq":
return models.NewRunOutputCompleteWithResult(c.Value != prevResult)
return models.NewRunOutputCompleteWithResult(c.Value != prevResult, input.ResultCollection())
case "gt":
value, desired, err := getValues(prevResult, c.Value)
if err != nil {
return models.NewRunOutputError(err)
}
return models.NewRunOutputCompleteWithResult(desired < value)
return models.NewRunOutputCompleteWithResult(desired < value, input.ResultCollection())
case "gte":
value, desired, err := getValues(prevResult, c.Value)
if err != nil {
return models.NewRunOutputError(err)
}
return models.NewRunOutputCompleteWithResult(desired <= value)
return models.NewRunOutputCompleteWithResult(desired <= value, input.ResultCollection())
case "lt":
value, desired, err := getValues(prevResult, c.Value)
if err != nil {
return models.NewRunOutputError(err)
}
return models.NewRunOutputCompleteWithResult(desired > value)
return models.NewRunOutputCompleteWithResult(desired > value, input.ResultCollection())
case "lte":
value, desired, err := getValues(prevResult, c.Value)
if err != nil {
return models.NewRunOutputError(err)
}
return models.NewRunOutputCompleteWithResult(desired >= value)
return models.NewRunOutputCompleteWithResult(desired >= value, input.ResultCollection())
default:
return models.NewRunOutputError(ErrOperatorNotSpecified)
}
Expand Down
4 changes: 2 additions & 2 deletions core/adapters/eth_bool.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func (e *EthBool) TaskType() models.TaskType {
// "0x0000000000000000000000000000000000000000000000000000000000000000"
func (*EthBool) Perform(input models.RunInput, _ *store.Store) models.RunOutput {
if boolean(input.Result().Type) {
return models.NewRunOutputCompleteWithResult(evmTrue)
return models.NewRunOutputCompleteWithResult(evmTrue, input.ResultCollection())
}

return models.NewRunOutputCompleteWithResult(evmFalse)
return models.NewRunOutputCompleteWithResult(evmFalse, input.ResultCollection())
}

func boolean(t gjson.Type) bool {
Expand Down
6 changes: 3 additions & 3 deletions core/adapters/eth_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (*EthBytes32) Perform(input models.RunInput, _ *store.Store) models.RunOutp
hex = hex[:utils.EVMWordHexLen]
}

return models.NewRunOutputCompleteWithResult(utils.AddHexPrefix(hex))
return models.NewRunOutputCompleteWithResult(utils.AddHexPrefix(hex), input.ResultCollection())
}

// EthInt256 holds no fields
Expand All @@ -55,7 +55,7 @@ func (*EthInt256) Perform(input models.RunInput, _ *store.Store) models.RunOutpu
return models.NewRunOutputError(err)
}

return models.NewRunOutputCompleteWithResult(hexutil.Encode(value))
return models.NewRunOutputCompleteWithResult(hexutil.Encode(value), input.ResultCollection())
}

// EthUint256 holds no fields.
Expand All @@ -78,5 +78,5 @@ func (*EthUint256) Perform(input models.RunInput, _ *store.Store) models.RunOutp
return models.NewRunOutputError(err)
}

return models.NewRunOutputCompleteWithResult(hexutil.Encode(value))
return models.NewRunOutputCompleteWithResult(hexutil.Encode(value), input.ResultCollection())
}
Loading

0 comments on commit 24a90fc

Please sign in to comment.