Skip to content

Fix: Github Module #241#248

Merged
ArthurCRodrigues merged 17 commits intomainfrom
bufix/241-GitHub_Module
Mar 25, 2026
Merged

Fix: Github Module #241#248
ArthurCRodrigues merged 17 commits intomainfrom
bufix/241-GitHub_Module

Conversation

@Sl3nc
Copy link
Copy Markdown
Collaborator

@Sl3nc Sl3nc commented Mar 24, 2026

Dockerfile.actions

Simplified steps and changing the file location to the project's root folder.

Action.yml

Refactor in inputs names

Repository used for testing the GitHub Classroom action

Copilot AI review requested due to automatic review settings March 24, 2026 00:10
@Sl3nc Sl3nc added the bug Something isn't working label Mar 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the GitHub Action packaging for the autograder by moving the Dockerfile to the repository root, simplifying the Docker build, and renaming Action inputs to kebab-case.

Changes:

  • Refactored action.yml inputs (snake_case → kebab-case) and updated env mappings accordingly.
  • Simplified Dockerfile.actions by installing requirements after copying the repository and pointing ENTRYPOINT directly to the repo script.
  • Cleaned up github_action/entrypoint.sh by removing a duplicate OPENAI_KEY check (but introduced a misleading log message).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
github_action/entrypoint.sh Tweaks env var validation/logging and removes duplicate OPENAI_KEY check.
Dockerfile.actions Moves Dockerfile to root usage, changes install layering, and updates ENTRYPOINT to repo script.
action.yml Renames inputs to kebab-case and updates docker image path/env wiring.
Comments suppressed due to low confidence (2)

Dockerfile.actions:21

  • Installing Python dependencies after COPY . . prevents Docker layer caching for dependencies (any source change forces a full pip install). Consider restoring the pattern of copying only requirements first, installing, then copying the rest of the repo.
    Dockerfile.actions:26
  • ENTRYPOINT uses a relative path ("github_action/entrypoint.sh"), which depends on WORKDIR being /app. Using an absolute path (e.g., /app/github_action/entrypoint.sh) is more robust if WORKDIR changes in the future.

Sl3nc and others added 3 commits March 23, 2026 21:16
Copy link
Copy Markdown
Member

@ArthurCRodrigues ArthurCRodrigues left a comment

Choose a reason for hiding this comment

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

Hey, @Sl3nc ! After testing it here in this repo it still did not work because of this:

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "github_action/entrypoint.sh": stat github_action/entrypoint.sh: no such file or directory

Also, you should be testing things by actually calling the autograder action, like this:

name: Autograder
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
  workflow_dispatch:

jobs:
  grading:
    permissions: write-all
    runs-on: ubuntu-latest
    if: github.actor != 'github-classroom[bot]' 
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
           path: submission

      - name: Run Autograder
        uses: webtech-network/autograder@bufix/241-GitHub_Module
        with: 
          template_preset : "webdev"
          feedback-type: "default"
          openai_key: ${{ secrets.ENGINE }}
          redis_url: ${{ secrets.REDIS_URL }}
          
          redis_token: ${{ secrets.REDIS_NAME }}
  • Make sure Dockerfile.action is at project root (look at fix-build-context branch)

@Sl3nc
Copy link
Copy Markdown
Collaborator Author

Sl3nc commented Mar 24, 2026

Hey, @Sl3nc ! After testing it here in this repo it still did not work because of this:

Hi! Thanks for your reply, that's behavior is strange because when I test this Classroom action in my testing repo, everything works fine (BTW without submission file).

Please, invite me for yours test-diw-3 (it's private), because it should present something different from what I expected.

Warning

In Action.yml I have changed the snake_case (used in arguments names) to kebab-case, soo is needed to update this "with" fields: e.g.: use "template-preset" instead "template_preset"

@ArthurCRodrigues
Copy link
Copy Markdown
Member

ArthurCRodrigues commented Mar 24, 2026

@Sl3nc done. You should be able to see it now.

@Sl3nc Sl3nc self-assigned this Mar 24, 2026
@Sl3nc Sl3nc requested a review from ArthurCRodrigues March 25, 2026 10:15
@Sl3nc
Copy link
Copy Markdown
Collaborator Author

Sl3nc commented Mar 25, 2026

The new wave of tests has executed in this repo @ArthurCRodrigues

There's a problem in "criteria.json" content, but it's not about the GitHub Module itself

Copy link
Copy Markdown
Member

@ArthurCRodrigues ArthurCRodrigues left a comment

Choose a reason for hiding this comment

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

Thanks! I'll look at this problem later today

@ArthurCRodrigues ArthurCRodrigues merged commit 5cd125e into main Mar 25, 2026
2 checks passed
@ArthurCRodrigues ArthurCRodrigues deleted the bufix/241-GitHub_Module branch March 25, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants