-
Notifications
You must be signed in to change notification settings - Fork 2k
Devenv: Cron, Direct Request, Flux products #21205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
73cf1e2
move cron/dr/flux tests to devenv
skudasov 79663c3
Merge branch 'develop' into cron-flux-runlog-env
skudasov 1cf6dbb
use image without plugins
skudasov 25a770a
update module name
skudasov f37d90f
rollback ocr2 trigger
skudasov 32dd7b7
fix directrequest
skudasov d4e57e3
fix directrequest
skudasov 0249893
rollback go mod
skudasov 8d37ca6
lint and naming
skudasov 32926d7
fix modgraph
skudasov 437f942
common config
skudasov 23aaa8b
Merge branch 'develop' into cron-flux-runlog-env
skudasov a121a5b
remove push triggers
skudasov 890afa5
Merge branch 'develop' into cron-flux-runlog-env
skudasov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Cron Smoke Test | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 6 * * *" # Run daily at 6 AM | ||
| workflow_dispatch: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: devenv | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| smoke: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: write | ||
| runs-on: ubuntu24.04-16cores-64GB # ghv-ignore! | ||
|
Check failure on line 22 in .github/workflows/devenv-cron.yml
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
|
|
||
| - name: Install Just | ||
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | ||
| with: | ||
| just-version: "1.40.0" | ||
|
|
||
| - name: Configure AWS credentials using OIDC | ||
| uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_SDLC_ECR_READONLY_ARN }} | ||
| aws-region: us-west-2 | ||
|
|
||
| - name: Authenticate to ECR | ||
| id: login-ecr | ||
| uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 # v6 | ||
| with: | ||
| cache: true | ||
| go-version-file: devenv/go.mod | ||
| cache-dependency-path: devenv/go.sum | ||
|
|
||
| - name: Download Go dependencies | ||
| run: | | ||
| go mod download | ||
|
|
||
| - name: Set environment variables | ||
| id: set-env | ||
| run: | | ||
| echo "CHAINLINK_IMAGE=${{ secrets.REGISTRY_SDLC }}/chainlink:nightly-$(date +%Y%m%d)" >> $GITHUB_ENV | ||
|
|
||
| - name: Run Cron environment | ||
| env: | ||
| FAKE_SERVER_IMAGE: ${{ secrets.FAKE_SERVER_IMAGE }} | ||
| run: | | ||
| cd cmd/cl && go install . && cd - | ||
| cl u env.toml,products/cron/basic.toml | ||
|
|
||
| - name: Run tests | ||
| working-directory: devenv/tests/cron | ||
| run: | | ||
| echo "Running tests for: $CHAINLINK_IMAGE, product: Cron" | ||
| go test -v -run TestSmoke | ||
|
|
||
| - name: Upload Logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: container-logs-smoke | ||
| path: devenv/tests/cron/logs | ||
| retention-days: 3 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Direct Request Smoke Test | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 6 * * *" # Run daily at 6 AM | ||
| workflow_dispatch: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: devenv | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| smoke: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: write | ||
| runs-on: ubuntu24.04-16cores-64GB # ghv-ignore! | ||
|
Check failure on line 22 in .github/workflows/devenv-direct-request.yml
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
|
|
||
| - name: Install Just | ||
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | ||
| with: | ||
| just-version: "1.40.0" | ||
|
|
||
| - name: Configure AWS credentials using OIDC | ||
| uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_SDLC_ECR_READONLY_ARN }} | ||
| aws-region: us-west-2 | ||
|
|
||
| - name: Authenticate to ECR | ||
| id: login-ecr | ||
| uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 # v6 | ||
| with: | ||
| cache: true | ||
| go-version-file: devenv/go.mod | ||
| cache-dependency-path: devenv/go.sum | ||
|
|
||
| - name: Download Go dependencies | ||
| run: | | ||
| go mod download | ||
|
|
||
| - name: Set environment variables | ||
| id: set-env | ||
| run: | | ||
| echo "CHAINLINK_IMAGE=${{ secrets.REGISTRY_SDLC }}/chainlink:nightly-$(date +%Y%m%d)" >> $GITHUB_ENV | ||
|
|
||
| - name: Run Direct Request environment | ||
| env: | ||
| FAKE_SERVER_IMAGE: ${{ secrets.FAKE_SERVER_IMAGE }} | ||
| run: | | ||
| cd cmd/cl && go install . && cd - | ||
| cl u env.toml,products/directrequest/basic.toml | ||
|
|
||
| - name: Run tests | ||
| working-directory: devenv/tests/directrequest | ||
| run: | | ||
| echo "Running tests for: $CHAINLINK_IMAGE, product: Direct Request" | ||
| go test -v -run TestSmoke | ||
|
|
||
| - name: Upload Logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: container-logs-smoke | ||
| path: devenv/tests/directrequest/logs | ||
| retention-days: 3 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Flux Smoke Test | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 6 * * *" # Run daily at 6 AM | ||
| workflow_dispatch: | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: devenv | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| smoke: | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| pull-requests: write | ||
| runs-on: ubuntu24.04-16cores-64GB # ghv-ignore! | ||
|
Check failure on line 22 in .github/workflows/devenv-flux.yml
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
|
|
||
| - name: Install Just | ||
| uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | ||
| with: | ||
| just-version: "1.40.0" | ||
|
|
||
| - name: Configure AWS credentials using OIDC | ||
| uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_OIDC_IAM_ROLE_SDLC_ECR_READONLY_ARN }} | ||
| aws-region: us-west-2 | ||
|
|
||
| - name: Authenticate to ECR | ||
| id: login-ecr | ||
| uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 # v6 | ||
| with: | ||
| cache: true | ||
| go-version-file: devenv/go.mod | ||
| cache-dependency-path: devenv/go.sum | ||
|
|
||
| - name: Download Go dependencies | ||
| run: | | ||
| go mod download | ||
|
|
||
| - name: Set environment variables | ||
| id: set-env | ||
| run: | | ||
| echo "CHAINLINK_IMAGE=${{ secrets.REGISTRY_SDLC }}/chainlink:nightly-$(date +%Y%m%d)" >> $GITHUB_ENV | ||
|
|
||
| - name: Run Flux environment | ||
| env: | ||
| FAKE_SERVER_IMAGE: ${{ secrets.FAKE_SERVER_IMAGE }} | ||
| run: | | ||
| cd cmd/cl && go install . && cd - | ||
| cl u env.toml,products/flux/basic.toml | ||
|
|
||
| - name: Run tests | ||
| working-directory: devenv/tests/flux | ||
| run: | | ||
| echo "Running tests for: $CHAINLINK_IMAGE, product: Flux" | ||
| go test -v -run TestSmoke | ||
|
|
||
| - name: Upload Logs | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: container-logs-smoke | ||
| path: devenv/tests/flux/logs | ||
| retention-days: 3 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.24 AS builder | ||
| FROM golang:1.25 AS builder | ||
|
|
||
| ENV GOPRIVATE=github.com/smartcontractkit/* | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package cron | ||
|
|
||
| import ( | ||
| "os" | ||
|
|
||
| "github.com/gin-gonic/gin" | ||
| "github.com/rs/zerolog" | ||
| "github.com/rs/zerolog/log" | ||
|
|
||
| "github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake" | ||
| ) | ||
|
|
||
| var L = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).Level(zerolog.DebugLevel).With().Fields(map[string]any{"component": "fake-cron"}).Logger() | ||
|
|
||
| var result = 200 | ||
|
|
||
| func RegisterRoutes() error { | ||
| return fake.Func("POST", "/cron_response", func(ctx *gin.Context) { | ||
| L.Info().Int("Result", result).Msg("Returning feed value result") | ||
| ctx.JSON(200, gin.H{ | ||
| "data": map[string]any{ | ||
| "result": result, | ||
| }, | ||
| }) | ||
| }) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package directrequest | ||
|
|
||
| import ( | ||
| "os" | ||
|
|
||
| "github.com/gin-gonic/gin" | ||
| "github.com/rs/zerolog" | ||
| "github.com/rs/zerolog/log" | ||
|
|
||
| "github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake" | ||
| ) | ||
|
|
||
| var L = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}).Level(zerolog.DebugLevel).With().Fields(map[string]any{"component": "fake-cron"}).Logger() | ||
|
|
||
| var result = 200 | ||
|
|
||
| func RegisterRoutes() error { | ||
| return fake.Func("POST", "/direct_request_response", func(ctx *gin.Context) { | ||
| L.Info().Int("Result", result).Msg("Returning feed value result") | ||
| ctx.JSON(200, gin.H{ | ||
| "data": map[string]any{ | ||
| "result": result, | ||
| }, | ||
| }) | ||
| }) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.