Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Describe your changes

Adds .github/workflows/docker_build_test.yml to prototype testing the make release Docker-based build process using a Docker-in-Docker (DinD) approach.

  • Uses docker:dind service with --privileged flag for proper nested Docker operations
  • Sets DOCKER_HOST=tcp://localhost:2375 to connect workflow steps to the DinD service
  • Runs on ubuntu-latest
  • Targets rocky-8 OS target
  • Overrides DOCKER_RUN_OPTS to remove -it flags for non-interactive CI
  • Includes explicit permissions: contents: read for security
  • Triggers on push to main and PRs

Each step from the make release target runs as a separate workflow step for better visibility:

  1. Clean all
  2. Build epmt-dash
  3. Build papiex-dist
  4. Build docker-dist
  5. Build epmt-full-release
  6. Build check-release image
  7. Run check-release tests

If any step fails (including Docker builds), the workflow will fail at that specific step, making it easier to diagnose issues.

Docker-in-Docker (DinD) Approach

The workflow uses a proper DinD approach with a privileged Docker service:

  • Added docker:dind service with --privileged flag to run a Docker daemon in a privileged container
  • This allows nested Docker operations to work correctly with full permissions
  • Includes a Docker daemon readiness check with proper error handling

Makefile Fixes

  • Fixed typo on line 291: added missing space between CONFIG_PAPIEX_DEBUG=$(CONFIG_PAPIEX_DEBUG) and OS_TARGET=$(OS_TARGET)
  • Pass DOCKER_RUN_OPTS to the papiex make command to support non-interactive Docker runs in CI

Issue ticket number, link (if applicable)

Checklist

A loose guide to provide structure for contributions

  • the code runs
  • the code is readable
  • the code is commented
  • there are no additional failures in GUARDED pipeline tasks
  • a new test was written (if applicable)
  • new instructions/doc was written (if applicable)
  • I ran pylint and attempted to implement some of it's feedback
Original prompt

This section details on the original issue you should resolve

<issue_title>prototype separate workflow for testing docker build</issue_title>
<issue_description>- requires docker specifically to work

  • should test the make release-all approach to building + testing epmt.
    • consulting the Makefile in the base directory of this repo should yield most of the details.
  • stick to rocky-8 for now.
  • don't try to make the whole thing work perfectly, just try to get </issue_description>

<agent_instructions>CI workflows are basically already some kind of running container. the prototype workflow is likely to suffer from any issues that come up when working with already-containerized containers, but worry about that after the basics are covered. </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add prototype workflow for testing docker build Prototype separate workflow for testing Docker build Feb 4, 2026
Copilot AI requested a review from ilaflott February 4, 2026 20:05
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.80%. Comparing base (2abec3d) to head (92eff25).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   64.80%   64.80%           
=======================================
  Files          28       28           
  Lines        6469     6469           
=======================================
  Hits         4192     4192           
  Misses       2277     2277           
Flag Coverage Δ
unittests 64.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
@ilaflott ilaflott force-pushed the copilot/prototype-docker-build-workflow branch from 7aebee7 to 8d92e5e Compare February 4, 2026 20:42
Removed redundant pull_request trigger and workflow_dispatch from the GitHub Actions configuration.
@ilaflott
Copy link
Member

ilaflott commented Feb 4, 2026

@copilot

  • can we make each step in the following lines execute in it's own task? if so, please arrange the workflow this way. if not, move on.
  • this first attempt was pretty good- examine the specific failure and diagnose the problem
  • make sure the pipeline task fails in the docker build does not work

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot

  • can we make each step in the following lines execute in it's own task? if so, please arrange the workflow this way. if not, move on.
  • this first attempt was pretty good- examine the spe...

Split the make release steps into separate workflow tasks in commit bdbe4d5. Each step now runs as its own task:

  1. Clean all
  2. Build epmt-dash
  3. Build papiex-dist (uses Docker internally)
  4. Build docker-dist
  5. Build epmt-full-release
  6. Build check-release image
  7. Run check-release tests

DOCKER_RUN_OPTS is now set as a job-level env var and passed consistently to steps that use Docker run. If any step fails (including Docker builds), the workflow will fail at that specific step, making it easier to diagnose issues.

@ilaflott
Copy link
Member

ilaflott commented Feb 4, 2026

@copilot
the failling line in the docker_build_test workflow is here:

docker run --rm -it -v `pwd`:/build -w /build rocky-8-papiex-build make OS_TARGET=rocky-8 CONFIG_PAPIEX_PAPI=y CONFIG_PAPIEX_DEBUG=yOS_TARGET=rocky-8  distclean install dist dist-test
the input device is not a TTY
make[1]: *** [Makefile:139: docker-dist] Error 1
make[1]: Leaving directory '/home/runner/work/epmt/epmt/papiex'
make: *** [Makefile:273: papiex/papiex-epmt-2.3.15-rocky-8.tgz] Error 2

note that there's a typo in the docker run line, there needs to be a space between CONFIG_PAPIEX_DEBUG=y and OS_TARGET=rocky-8, figure out the origin of this and fix it. then try to understand if it will have any affect on the error message, the input device is not a TTY

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot
the failling line in the docker_build_test workflow is here:

...

Fixed in commit 36a4dff:

  1. Typo fix: Added the missing space between CONFIG_PAPIEX_DEBUG=$(CONFIG_PAPIEX_DEBUG) and OS_TARGET=$(OS_TARGET) on line 291 of the Makefile.

  2. TTY error fix: The "input device is not a TTY" error occurs because the papiex Makefile uses -it flags in its docker run command. I've now passed DOCKER_RUN_OPTS="$(DOCKER_RUN_OPTS)" to the papiex make command so it can use the non-interactive flags when called from CI. This should allow the --rm value (without -it) to propagate to the papiex docker-dist target.

@ilaflott
Copy link
Member

ilaflott commented Feb 4, 2026

@copilot

  • the build papiex-dist step generally is supposed to create a pre-req for the epmt-full-release target, and it seems to work
  • when we get to the epmt-full-release target, it cannot seem to find the products of the build papiex-dist step

@ilaflott ilaflott marked this pull request as ready for review February 4, 2026 22:10
… -it

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot

  • the build papiex-dist step generally is supposed to create a pre-req for the epmt-full-release target, and it seems to work
  • when we get to the epmt-full-release target, it cannot...

Fixed in commit 92eff25.

The issue was that epmt-full-release depends on $(PAPIEX_RELEASE) through make dependencies, triggering a rebuild of papiex. The papiex Makefile has hardcoded -it flags in its Docker run command, causing the TTY error.

Added OUTSIDE_DOCKER=YUP as a job-level env var. This tells the epmt Makefile to skip papiex's internal Docker build and build papiex directly, avoiding the hardcoded -it flags. The epmt Docker-based builds (docker-dist, build-check-release) still use Docker as intended since they respect DOCKER_RUN_OPTS.

@ilaflott
Copy link
Member

ilaflott commented Feb 4, 2026

@copilot you need a --privileged flag somewhere

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot you need a --privileged flag somewhere

Added in commit 3b5501c.

The error was Permission level does not permit operation when papiex tried to access performance counters. Since we're running with OUTSIDE_DOCKER=YUP (directly on the runner, not in Docker with --privileged), I added a step to set perf_event_paranoid to 2, which allows non-root users to access performance counters for CPU-wide monitoring.

@ilaflott
Copy link
Member

ilaflott commented Feb 4, 2026

@copilot

  • this isn't working, we are missing something
  • explore "docker-in-docker" approaches for github pipelines and see if you can implement that
  • when you do that, you may have to re-evaluate some of the decisions we made in this back/forth

Co-authored-by: ilaflott <6273252+ilaflott@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot

  • this isn't working, we are missing something
  • explore "docker-in-docker" approaches for github pipelines and see if you can implement that
    ...

Implemented Docker-in-Docker approach in commit 273f924.

Changes:

  1. Added docker:dind service with --privileged flag
  2. Set DOCKER_HOST=tcp://localhost:2375 to connect to the DinD service
  3. Removed the OUTSIDE_DOCKER=YUP workaround - now builds run through the privileged DinD service
  4. Removed the perf_event_paranoid kernel config - the privileged container should have proper permissions
  5. Added a Docker daemon readiness check with error handling
  6. Pass DOCKER_RUN_OPTS to steps that need Docker run (papiex-dist, docker-dist, check-release)

This follows the standard DinD pattern for GitHub Actions where nested Docker operations need --privileged access.

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.

prototype separate workflow for testing docker build

2 participants