Skip to content

[CI/Infra] E2E tests on Argo Workflows#737

Merged
okdas merged 35 commits intomainfrom
e2e-automation
May 19, 2023
Merged

[CI/Infra] E2E tests on Argo Workflows#737
okdas merged 35 commits intomainfrom
e2e-automation

Conversation

@okdas
Copy link
Copy Markdown
Contributor

@okdas okdas commented May 10, 2023

Description

We've identified a need in argo workflow to allow to run e2e jobs in cluster, but as a part of GitHub CI jobs.

Issue

Fixes #718

Type of change

Please mark the relevant option(s):

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • Infrastructure
  • CI/CD

List of changes

  • E2E tests to ensure the version of containers they run against prior to executing the test (done in protocol-infra repo)
  • Cluster manager cleans up the Pods managed by StatefulSets, if Pods are unhealthy and there is a new-er version of the software present.
  • Dedicated CI job to run E2E tests. That allows us to start the test from the GitHub UI, no need to push the new commit.

Testing

  • make develop_test; if any code changes were made
  • Docker Compose LocalNet; if any major functionality was changed or introduced
  • k8s LocalNet; if any infrastructure
    or configuration changes were made
  • Remote DevNets

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added, or updated, godoc format comments on touched members (see: tip.golang.org/doc/comment)
  • I have tested my changes using the available tooling
  • I have updated the corresponding CHANGELOG

If Applicable Checklist

  • I have updated the corresponding README(s); local and/or global
  • I have added tests that prove my fix is effective or that my feature works
  • I have added, or updated, mermaid.js diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

@okdas okdas added the infra Core infrastructure - not protocol related label May 10, 2023
@okdas okdas self-assigned this May 10, 2023
@reviewpad reviewpad bot added the medium label May 10, 2023
@reviewpad reviewpad bot added large and removed medium labels May 10, 2023
@reviewpad reviewpad bot added medium and removed large labels May 10, 2023
@okdas okdas added the push-image Build and push a container image on non-main builds label May 11, 2023
@reviewpad reviewpad bot added large and removed medium labels May 11, 2023
@okdas okdas added the e2e-devnet-test Runs E2E tests on devnet label May 12, 2023
@reviewpad reviewpad bot removed the large label May 12, 2023
@github-actions github-actions bot dismissed stale reviews from themself May 17, 2023 23:44

The check succeeded, dismissing the review comment.

@okdas okdas requested a review from Olshansk May 17, 2023 23:46
@okdas
Copy link
Copy Markdown
Contributor Author

okdas commented May 17, 2023

@Olshansk I appreciate the feedback, the code is more readable now. I kept all comments related to rangeValCopy gocritic check open in case you'll want me to change the code in these places.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog validation failed with the following output:
Latest date in build/docs/CHANGELOG.md is incorrect.
Latest: 2023-05-17, Current: 2023-05-18

Changelog verification failed. See error messages for more detail.

Please update the relevant CHANGELOG.md files and ensure they follow the correct format.

Copy link
Copy Markdown
Collaborator

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple more small NITS. Let's get it done and merge!

containerStatus := &pod.Status.ContainerStatuses[si]

// Only proceed if container is in some sort of Err status
if containerErroneousStatus(containerStatus) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if !containerErroneousStatus(containerStatus) {
continue
}
// reduce the indent of everywhthing else

Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog validation failed with the following output:
Missing changelog in module: app/

Missing changelog in module: consensus/

Missing changelog in module: persistence/

Missing changelog in module: shared/

Latest date in build/docs/CHANGELOG.md is incorrect.
Latest: 2023-05-17, Current: 2023-05-18

Changelog verification failed. See error messages for more detail.

Please update the relevant CHANGELOG.md files and ensure they follow the correct format.

okdas and others added 3 commits May 18, 2023 17:43
## Description

Enhances the linter for inline error checks and alters existing error
checks to be inline.

## Type of change

Please mark the relevant option(s):

- [x] Code health or cleanup

## List of changes

- Introduces new custom linter
- Changes existing code to be compliant with new linter rule

## Testing

- [x] `make develop_test`; if any code changes were made
- [ ] `make test_e2e` on [k8s
LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md);
if any code changes were made
- [ ] `e2e-devnet-test` passes tests on
[DevNet](https://pocketnetwork.notion.site/How-to-DevNet-ff1598f27efe44c09f34e2aa0051f0dd);
if any code was changed
- [ ] [Docker Compose
LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md);
if any major functionality was changed or introduced
- [ ] [k8s
LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md);
if any infrastructure or configuration changes were made

## Required Checklist

- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added, or updated, [`godoc` format
comments](https://go.dev/blog/godoc) on touched members (see:
[tip.golang.org/doc/comment](https://tip.golang.org/doc/comment))
- [ ] I have tested my changes using the available tooling
- [ ] I have updated the corresponding CHANGELOG

### If Applicable Checklist

- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added, or updated,
[mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding
README(s)
- [ ] I have added, or updated, documentation and
[mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*`
if I updated `shared/*`README(s)
@reviewpad reviewpad bot added large Pull request is large and removed medium Pull request is medium labels May 19, 2023
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog validation failed with the following output:
Missing changelog in module: app/

Missing changelog in module: consensus/

Missing changelog in module: persistence/

Missing changelog in module: shared/

Latest date in build/docs/CHANGELOG.md is incorrect.
Latest: 2023-05-18, Current: 2023-05-19

Changelog verification failed. See error messages for more detail.

Please update the relevant CHANGELOG.md files and ensure they follow the correct format.

@reviewpad reviewpad bot added medium Pull request is medium and removed large Pull request is large labels May 19, 2023
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changelog validation failed with the following output:
Latest date in build/docs/CHANGELOG.md is incorrect.
Latest: 2023-05-18, Current: 2023-05-19

Changelog verification failed. See error messages for more detail.

Please update the relevant CHANGELOG.md files and ensure they follow the correct format.

@okdas okdas requested a review from Olshansk May 19, 2023 00:45
Copy link
Copy Markdown
Collaborator

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job and quick turnaround. Thanks @okdas!

Cc @h5law who should be unblocked once this merges in.

@okdas okdas merged commit 470f4fe into main May 19, 2023
@okdas okdas deleted the e2e-automation branch May 19, 2023 18:12
bryanchriswhite added a commit that referenced this pull request May 23, 2023
* pokt/main:
  [Helm] Add ServiceMonitor to the helm chart (#767)
  Update PULL_REQUEST_TEMPLATE.md (#772)
  [CI/Infra] E2E tests on Argo Workflows (#737)
Olshansk added a commit that referenced this pull request May 24, 2023
## Description

We've identified a need in argo workflow to allow to run e2e jobs in
cluster, but as a part of GitHub CI jobs.

## Issue

Fixes #718 

## Type of change

Please mark the relevant option(s):

- [ ] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [x] Infrastructure
- [x] CI/CD

## List of changes

- [x] E2E tests to ensure the version of containers they run against
prior to executing the test (done in [protocol-infra
repo](https://github.com/pokt-network/protocol-infra/blob/main/charts/v1-network-base/templates/e2e-tests.yaml#L30))
- [x] Cluster manager cleans up the Pods managed by StatefulSets, if
Pods are unhealthy and there is a new-er version of the software
present.
- [x] Dedicated CI job to run E2E tests. That allows us to start the
test from the GitHub UI, no need to push the new commit.

## Testing

- [x] `make develop_test`; if any code changes were made
- [ ] [Docker Compose
LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md);
if any major functionality was changed or introduced
- [x] [k8s
LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md);
if any infrastructure
or configuration changes were made
- [x] Remote DevNets

## Required Checklist

- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added, or updated, [`godoc` format
comments](https://go.dev/blog/godoc) on touched members (see:
[tip.golang.org/doc/comment](https://tip.golang.org/doc/comment))
- [ ] I have tested my changes using the available tooling
- [ ] I have updated the corresponding CHANGELOG

### If Applicable Checklist

- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added, or updated,
[mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding
README(s)
- [ ] I have added, or updated, documentation and
[mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*`
if I updated `shared/*`README(s)

---------

Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
bryanchriswhite added a commit that referenced this pull request May 26, 2023
* refactor/message-handling:
  Update client to p1 in makefile
  change gitsha of private-keys.yaml (#787)
  Fix places where we request a password and don't check the nonInterac… (#788)
  [Testing] [Tooling] chore: replace `gocuke` & `go-mockdns` in go.mod (#782)
  [k8s] Rename `client` to `p1` in k8s localnet (#764)
  [Persistence] Refactors BlockStore Interface (#774)
  [BUG] Int casting issue when sending tx (#783)
  fix: add  missing space to makefile
  add public keys to private-keys.yaml (#779)
  chore: update changelog
  chore: comment improvements
  fix: logger levels
  chore: improve func & var names'
  [Helm] Add ServiceMonitor to the helm chart (#767)
  Update PULL_REQUEST_TEMPLATE.md (#772)
  [CI/Infra] E2E tests on Argo Workflows (#737)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cl validate Run the changelog validation workflow e2e-devnet-test Runs E2E tests on devnet infra Core infrastructure - not protocol related medium Pull request is medium push-image Build and push a container image on non-main builds waiting-for-review

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Infrastructure] Automate e2e tests with CI integration

2 participants