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-30710 Refactor Smoketest GH Action #18007

Conversation

GordonSmith
Copy link
Member

@GordonSmith GordonSmith commented Nov 8, 2023

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 Nov 8, 2023

Copy link
Member Author

@GordonSmith GordonSmith left a comment

Choose a reason for hiding this comment

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

Also need to finalize the push / read cache logic (all in vcpkg-build):

  1. Add schedule to all triggers
  2. Enable push when trigger == schedule

.github/workflows/build-vcpkg.yml Outdated Show resolved Hide resolved
secrets: inherit

build-docker-ubuntu-23_10:
if: ${{ contains('pull_request,push', github.event_name) }}
Copy link
Member Author

@GordonSmith GordonSmith Nov 8, 2023

Choose a reason for hiding this comment

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

Remove ,push from this entire file (was only used for testing on my forked repo)

Copy link
Member Author

Choose a reason for hiding this comment

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

Can leave the ",push" and remove the global push trigger (as its handy for local testing)

Copy link
Member Author

Choose a reason for hiding this comment

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

TODO

.github/workflows/build-vcpkg.yml Outdated Show resolved Hide resolved
.github/workflows/build-vcpkg.yml Outdated Show resolved Hide resolved
.github/workflows/build-vcpkg.yml Outdated Show resolved Hide resolved
.github/workflows/test-smoke-gh_runner.yml Outdated Show resolved Hide resolved
dockerfiles/vcpkg/build.sh Show resolved Hide resolved
@GordonSmith
Copy link
Member Author

Also remove all other instances of "GH Action Caching" in other workflows (and remove obsolete workflows)

@GordonSmith
Copy link
Member Author

Maybe we should report to GitHub that PRs can write to the cache, which would be a security risk?

dockerfiles/vcpkg/centos-7.dockerfile Outdated Show resolved Hide resolved
dockerfiles/vcpkg/centos-8.dockerfile Outdated Show resolved Hide resolved
dockerfiles/vcpkg/ubuntu-20.04.dockerfile Outdated Show resolved Hide resolved
dockerfiles/vcpkg/ubuntu-22.04.dockerfile Outdated Show resolved Hide resolved
dockerfiles/vcpkg/ubuntu-23.10.dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@ghalliday ghalliday left a comment

Choose a reason for hiding this comment

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

I scanned through it, and it all looks clean and easy to understand. Likely to make it much easier for other people to be able to extend and pick up.
A couple of trivial comments from me, and your own comments about removing push and unneeded files.

default: false
strip-files:
type: boolean
description: 'Single Package'
Copy link
Member

Choose a reason for hiding this comment

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

update the description?

default: false
strip-files:
type: boolean
description: 'Single Package'
Copy link
Member

Choose a reason for hiding this comment

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

trivial: out of date description

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.

@GordonSmith - looks like a very good improvement.

I didn't spot any problems, but a few questions about need for some runs, e.g. same package target type build (and tested) in docker framework and runner framework.
With 10GB of cache, anything we can do to reduce the cache usage, will result in increased cache hits, and should therefore result in faster builds (particularly when there's a lot of concurrent PR or tags in flight).

It would be good if there was a readme.md in .github/workflows describing what, why and when each action/workflow_call was used.

.github/workflows/build-vcpkg.yml Outdated Show resolved Hide resolved
.github/workflows/build-vcpkg.yml Show resolved Hide resolved

build-gh_runner-ubuntu-22_04:
if: ${{ contains('pull_request,push', github.event_name) }}
uses: ./.github/workflows/build-gh_runner.yml
Copy link
Member

Choose a reason for hiding this comment

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

I'm not clear why ubuntu-22.04 is being built by build-docker-ubuntu-22_04: and this ?
Shouldn't a target be either built by build-gh_runner.yml or build-docker.yml? e.g. if windows or macos, no choice but to build under runner..

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a sanity check for myself - annoyingly it is failing a bunch of regression tests, but I havn't dug into why that is the case yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed now (gh-runner and docker both pass all tests)

Copy link
Member

Choose a reason for hiding this comment

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

but shouldn't it be changed so a particular target either builds under runner or docker before this is merged?
( to reduce the # of jobs/runners in flight etc. )

.github/workflows/build-vcpkg.yml Outdated Show resolved Hide resolved
asset-name: 'gh_runner-package'
secrets: inherit

build-gh_runner-ubuntu-20_04:
Copy link
Member

Choose a reason for hiding this comment

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

as per previous questions, why build packages via docker ('build-docker-ubuntu-20_04:'), and here under runner ?

dockerfiles/vcpkg/build.sh Show resolved Hide resolved
@GordonSmith GordonSmith force-pushed the HPCC-30710-REFACTOR_SMOKETEST_9_4_B branch 3 times, most recently from fb4fb59 to 012b7b1 Compare November 12, 2023 09:00
@GordonSmith GordonSmith force-pushed the HPCC-30710-REFACTOR_SMOKETEST_9_4_B branch from 012b7b1 to bc3249a Compare November 12, 2023 10:55
Signed-off-by: Gordon Smith <[email protected]>

WIP

WIP

WIP
@GordonSmith GordonSmith force-pushed the HPCC-30710-REFACTOR_SMOKETEST_9_4_B branch from ed00b3e to 5f49b7f Compare November 13, 2023 07:44
export CLASSPATH=".:$(realpath selenium-server-standalone-3.141.59.jar):$(realpath testng-6.8.7.jar)"
pushd ${{ inputs.asset-name }}-ui_test-files
./run.sh tests http://localhost:8010 > eclWatchUiTest.log 2>&1
sudo ./run.sh tests http://localhost:8010 > eclWatchUiTest.log 2>&1
Copy link
Member

Choose a reason for hiding this comment

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

question: curious why new sudo now needed?

.github/workflows/build-vcpkg.yml Show resolved Hide resolved
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.

@GordonSmith - 1 minor question, and a followup q. from previous conv. re. building package targets under both docker and runner

@ghalliday ghalliday merged commit f60821d into hpcc-systems:candidate-9.4.x Nov 15, 2023
42 of 44 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.

3 participants