Skip to content

Upstream 16013 - Remove deprecated custom virtual environment feature#256

Merged
cigamit merged 9 commits intomainfrom
custom_venv
Apr 3, 2026
Merged

Upstream 16013 - Remove deprecated custom virtual environment feature#256
cigamit merged 9 commits intomainfrom
custom_venv

Conversation

@cigamit
Copy link
Copy Markdown
Contributor

@cigamit cigamit commented Feb 28, 2026

Upstream Notes

Remove the deprecated custom virtual environment feature from AWX. This feature has been superseded by execution environments and is no longer needed. The removal includes all related models, API endpoints, management commands, configuration settings, and documentation references.

This change modernizes the codebase by eliminating legacy virtual environment management in favor of the standardized execution environment approach for job isolation and dependency management.

[WIP] - Still ensuring its fully removed from the UI

@cigamit cigamit self-assigned this Feb 28, 2026
@cigamit cigamit added the python Pull requests that update python code label Feb 28, 2026
Copilot AI review requested due to automatic review settings February 28, 2026 07:36
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

Removes the deprecated “custom virtual environment” feature across the AWX backend and collection modules, aligning job isolation and dependency management exclusively with execution environments (EEs).

Changes:

  • Removes custom_virtualenv model fields/mixins, related API serialization/config exposure, and adds a migration to drop the DB columns.
  • Removes legacy management commands and settings (CUSTOM_VENV_PATHS, BASE_VENV_PATH) plus associated UI settings metadata.
  • Updates AWX collection modules and docs to drop the deprecated custom venv options/migration guidance.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/execution_environments.md Removes custom-venv migration section from EE documentation.
awx_collection/plugins/modules/project.py Drops custom_virtualenv option/parameter handling from the project module.
awx_collection/plugins/modules/organization.py Drops custom_virtualenv option/parameter handling from the organization module.
awx_collection/plugins/modules/job_template.py Drops custom_virtualenv option/parameter handling from the job_template module.
awx_collection/plugins/modules/inventory_source.py Drops custom_virtualenv option/parameter handling from the inventory_source module.
awx/ui/src/screens/Setting/shared/data.allSettings.json Removes CUSTOM_VENV_PATHS from UI settings fixture data.
awx/ui/src/screens/Setting/shared/data.allSettingOptions.json Removes CUSTOM_VENV_PATHS from UI settings options metadata.
awx/ui/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.js Updates UI test fixture to no longer include CUSTOM_VENV_PATHS.
awx/settings/production.py Removes deprecated BASE_VENV_PATH setting.
awx/settings/development.py Removes deprecated BASE_VENV_PATH setting.
awx/settings/defaults.py Removes deprecated CUSTOM_VENV_PATHS default setting.
awx/main/utils/common.py Removes custom-venv discovery/freeze helpers and related imports/exports.
awx/main/tests/functional/models/test_notifications.py Updates notification context expectations to remove custom_virtualenv.
awx/main/models/projects.py Removes CustomVirtualEnvMixin from Project.
awx/main/models/organization.py Removes CustomVirtualEnvMixin from Organization.
awx/main/models/notifications.py Removes custom_virtualenv from notification allowed fields/stub.
awx/main/models/mixins.py Removes CustomVirtualEnvMixin implementation and related imports.
awx/main/models/jobs.py Removes CustomVirtualEnvMixin from JobTemplate and Job.
awx/main/models/inventory.py Removes CustomVirtualEnvMixin from InventorySource and InventoryUpdate.
awx/main/models/init.py Stops re-exporting CustomVirtualEnvMixin.
awx/main/migrations/0195_remove_custom_virtualenv.py Adds migration to remove custom_virtualenv DB fields from relevant models.
awx/main/management/commands/list_custom_venvs.py Removes deprecated management command.
awx/main/management/commands/export_custom_venv.py Removes deprecated management command.
awx/main/management/commands/custom_venv_associations.py Removes deprecated management command.
awx/main/conf.py Unregisters CUSTOM_VENV_PATHS setting.
awx/main/access.py Removes custom_virtualenv from the “non-sensitive changes” allowlist.
awx/api/views/root.py Removes custom_virtualenvs from /api/v2/config/ output and related imports.
awx/api/templates/api/api_v2_config_view.md Removes docs mention of custom_virtualenvs from config endpoint docs.
awx/api/serializers.py Removes custom_virtualenv fields/read-only declarations across serializers.
awx/api/metadata.py Removes custom_virtualenv from field type metadata handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx/api/views/root.py
Comment thread awx/api/serializers.py
Comment thread awx/main/models/notifications.py
Comment thread awx_collection/plugins/modules/organization.py Outdated
Comment thread docs/execution_environments.md
@cigamit cigamit changed the title [WIP] Upstream 16013 = Remove deprecated custom virtual environment feature [WIP] Upstream 16013 - Remove deprecated custom virtual environment feature Feb 28, 2026
Copilot AI review requested due to automatic review settings April 3, 2026 05:56
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

Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

awx/ui/src/components/ExecutionEnvironmentDetail/ExecutionEnvironmentDetail.test.js:53

  • The "missing execution environment" warning test was removed, but ExecutionEnvironmentDetail still contains a virtualEnvironment/verifyMissingVirtualEnv code path that renders a popover referencing “Custom virtual environment … must be replaced…”. Since custom virtualenv support is being removed, this branch is now legacy and untested. Either remove that branch/props from ExecutionEnvironmentDetail, or keep it and add a focused test that covers the popover behavior.
  test('should display warning deleted execution environment', async () => {
    const wrapper = mountWithContexts(
      <ExecutionEnvironmentDetail verifyMissingVirtualEnv={false} />
    );

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx/ui/src/components/TemplateList/TemplateListItem.js
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

Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx/ui/CONTRIBUTING.md
@cigamit cigamit marked this pull request as ready for review April 3, 2026 14:08
Copilot AI review requested due to automatic review settings April 3, 2026 14:08
@cigamit cigamit changed the title [WIP] Upstream 16013 - Remove deprecated custom virtual environment feature Upstream 16013 - Remove deprecated custom virtual environment feature Apr 3, 2026
@cigamit cigamit requested a review from TheWitness April 3, 2026 14:09
@cigamit cigamit added the javascript Pull requests that update javascript code label Apr 3, 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

Copilot reviewed 67 out of 67 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

awx/ui/src/components/ExecutionEnvironmentDetail/ExecutionEnvironmentDetail.test.js:63

  • This change removes the test coverage for the virtualEnvironment-based "missing execution environment" warning path, but the component (and at least one remaining test) still supports virtualEnvironment. To fully remove the deprecated custom virtualenv feature, either delete the virtualEnvironment branch/props from ExecutionEnvironmentDetail (and then remove the remaining virtualEnvironment test/fixture), or keep an explicit test covering the warning branch so it doesn’t become an untested leftover.
  test('should display warning deleted execution environment', async () => {
    const wrapper = mountWithContexts(
      <ExecutionEnvironmentDetail verifyMissingVirtualEnv={false} />
    );
    const executionEnvironment = wrapper.find('ExecutionEnvironmentDetail');
    expect(executionEnvironment).toHaveLength(1);
    expect(executionEnvironment.find('dt').text()).toEqual(
      'Execution Environment'
    );
    expect(executionEnvironment.find('dd').text()).toEqual('Missing resource');
    expect(wrapper.find('Tooltip').prop('content')).toEqual(
      `Execution environment is missing or deleted.`
    );
  });

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings April 3, 2026 14:44
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx_collection/plugins/modules/project.py
Comment thread awx/ui/CONTRIBUTING.md
Comment thread awx/ui/testUtils/enzymeHelpers.js
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

Copilot reviewed 67 out of 67 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

awx/ui/CONTRIBUTING.md:326

  • This second mountWithContexts example has the same malformed syntax (<Organization />< {). Please correct it so the snippet is runnable as written.
```javascript
mountWithContexts(<Organization />< {
  context: {
    dialog: false,
  }
});

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread awx/ui/CONTRIBUTING.md
@cigamit cigamit merged commit 110364f into main Apr 3, 2026
@cigamit cigamit deleted the custom_venv branch April 3, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup javascript Pull requests that update javascript code python Pull requests that update python code

Development

Successfully merging this pull request may close these issues.

3 participants