Skip to content

Conversation

@andrey-canon
Copy link
Contributor

Description

This PR extends the Open edX Plugin Integration Tests with Tutor GitHub Action to support installing private requirements from SSH-based Git repositories inside the Tutor LMS and CMS environments.

Key Changes

  • New Inputs

    • ssh_private_key: Optional service user SSH key for repository checkout.
    • openedx_private_requirements: Optional list of private SSH Git repositories to be cloned and installed in Open edX (format: [email protected]:org/repo.git@branch_or_tag).
  • New Steps

    • Setup of SSH agent (webfactory/[email protected]) when a private key is provided.
    • Add GitHub to known SSH hosts to allow secure cloning.
    • Clone private repositories into a private_requirements directory with proper permissions.
    • Mount private_requirements into LMS and CMS containers.
    • Install cloned private requirements inside both LMS and CMS environments.

Purpose

These additions allow the action to handle private Python package dependencies that are not available on PyPI, ensuring that plugins depending on private repositories can be fully tested within the Tutor environment.

@andrey-canon andrey-canon requested a review from a team as a code owner August 26, 2025 21:13
@andrey-canon andrey-canon requested a review from magajh August 26, 2025 21:15
Copy link
Contributor

@magajh magajh left a comment

Choose a reason for hiding this comment

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

Thank you for this, @andrey-canon! Just a couple of comments

openedx_imports_test_file_path:
description: 'Path to the file that contains the test function for validating Open edX imports. This should be a Python file within your project.'
required: false
ssh_private_key:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's please make this a secret instead of a regular input

shell: bash

- name: Setup SSH agent for private repositories cloning
if: ${{ inputs.ssh_private_key }}
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be a secret

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tutor local start -d lms cms
shell: bash

- name: Pip install private requirements inside LMS and CMS
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please move this step to before or after the step where we install the extra requirements

- name: Install extra requirements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why? anyway, that will make that some implementations fail, there are two options

  1. you need a private requirement that is not an app requirement, this will work with your suggestion
  2. you need a private requirement that is an app requirement, when the app(plugin) is installed in the next step the installation will fail since that won't be able to install the private dependency


**Optional**
A private SSH key (usually stored as a GitHub Secret) that allows cloning of private repositories containing additional Open edX requirements.
* *Example*: `${{ secrets.SERVICE_USER_SSH_KEY }}`
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remember to update this with the correct secret name

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