Skip to content
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

HPCC-29584 Add github action to test helm/k8s #18186

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

jpmcmu
Copy link
Contributor

@jpmcmu jpmcmu commented Jan 4, 2024

  • Added a new action to install an HPCC cluster on K8s via Helm
  • Added a new base regression suite on top of K8s to build-vcpkg

Signed-off-by: James McMullan [email protected]

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Cloud-compatibility
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Smoketest:

  • Send notifications about my Pull Request position in Smoketest queue.
  • Test my draft Pull Request.

Testing:

Copy link

github-actions bot commented Jan 4, 2024

Copy link
Member

@jakesmith jakesmith left a comment

Choose a reason for hiding this comment

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

@jpmcmu - looks great, a few minor questions, and I'd like @GordonSmith to look it over too.

run: |
k8s_pkg_path=$(ls -t ./${{ inputs.asset-name }}/*.deb 2>/dev/null | head -1)
k8s_pkg_file=$(basename "$k8s_pkg_path")
mv ${k8s_pkg_path} ${{ inputs.platform-folder }}/${k8s_pkg_file}
Copy link
Member

Choose a reason for hiding this comment

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

curious why package needs to be moved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, I believe I was doing that to debug an issue and can probably just reference the original path directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jakesmith Turns out this was required. The Dockerfile looks for the pkg file in the platform directory. I added a comment noting why it was required.

sleep 10
echo "Waiting for ECLWatch startup" && kubectl wait --for=condition=ready pod --timeout=180s -l app=eclwatch
echo "Waiting for Rowservice startup" && kubectl wait --for=condition=ready pod --timeout=180s -l server=rowservice
echo "Waiting for SQL2ECL startup" && kubectl wait --for=condition=ready pod --timeout=180s -l app=sql2ecl
Copy link
Member

Choose a reason for hiding this comment

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

was there a particular reason to wait for this ? and/or not wait for other pods to be ready?
perhaps should be waiting on the deployments rather than individual pods?

Would it be better to wait on the svc ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have some tests that I will be adding in a subsequent PR that utilize those services, but it would be better to wait on all deployments to finish. I will make that change.

steps:
- shell: "bash"
run: |
echo "...all tests passed..."
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is just a placeholder in this 'test-regression-suite-k8s' action - and some actual regression suite tests will be run from here in next changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I am planning on adding the HPCC4j unit tests as a regression suite for ESP, but hope this can provide a base for other tests against K8s as well.

Copy link
Member

Choose a reason for hiding this comment

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

Right, it will be good to get this foundation merged, which will test k8s startup etc, then we can start to expand to add regression tests.

default: 'docker-ubuntu-22_04-containerized'

jobs:
build-docker-ubuntu-22_04:
Copy link
Member

Choose a reason for hiding this comment

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

If we are supporting other "os"s then I would change to something like this:

jobs:
  build-docker:
    name:  build-docker-${{ inputs.os }}:
    if: ${{ contains('pull_request,push', github.event_name) }}
    uses: ./.github/workflows/build-docker.yml
    ...


main:
name: K8s Regression Suite
needs: build-docker-ubuntu-22_04
Copy link
Member

Choose a reason for hiding this comment

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

See above comment

@jpmcmu jpmcmu requested a review from GordonSmith January 19, 2024 22:00
@jpmcmu
Copy link
Contributor Author

jpmcmu commented Jan 22, 2024

@GordonSmith implemented code review changes, please take a look when you get a chance.

@jpmcmu
Copy link
Contributor Author

jpmcmu commented Jan 23, 2024

@jakesmith Implemented code review changes, please review

@jpmcmu jpmcmu requested a review from jakesmith January 24, 2024 14:46
Copy link
Member

@jakesmith jakesmith left a comment

Choose a reason for hiding this comment

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

@jpmcmu - looks good.
The "Check that eclhelper interface has not changed / Check eclhelper interface (pull_request)" step is failing, but no idea why, that file hasn't changed, despite what the step details suggest. Could it have accidentally in a push version of this PR?

I'll force a rerun to see if it clears.

- Added a new action to install an HPCC cluster on K8s via Helm
- Added a new base regression suite on top of K8s to build-vcpkg

Signed-off-by: James McMullan [email protected]
@ghalliday ghalliday merged commit 7005a3a into hpcc-systems:candidate-9.4.x Jan 25, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants