Skip to content

Refactored types for module for project, variableset#29

Closed
KshitijaChoudhari wants to merge 5 commits into
mainfrom
models_variableset_project
Closed

Refactored types for module for project, variableset#29
KshitijaChoudhari wants to merge 5 commits into
mainfrom
models_variableset_project

Conversation

@KshitijaChoudhari

Copy link
Copy Markdown
Contributor

Description

Testing plan

External links

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

Rollback Plan

Changes to Security Controls

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

If you have any questions, please contact your direct supervisor, GRC (#team-grc), or the PCI working group (#proj-pci-reboot). You can also find more information at PCI Compliance.

@KshitijaChoudhari KshitijaChoudhari requested a review from a team as a code owner September 23, 2025 06:15
Comment thread src/tfe/models/variable_set.py Outdated


# Model rebuild functionality for runtime
def _rebuild_models() -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the purpose of this forward reference method ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yovariable set models are using [TYPE_CHECKING]imports for Organization, Workspace, and Project types. Turns out
No circular imports exist: Organization and Project models don't reference VariableSet back
The types DO exist: Organization, Workspace, and Project are real classes in your codebase
No actual need for TYPE_CHECKING: Since there are no circular imports, you can use direct imports hence removing rebuild_models

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed type_checking and are now using direct imports

@iam404

iam404 commented Oct 13, 2025

Copy link
Copy Markdown
Member

Not merging this PR as the changes was done seperately for the whole repo.

@iam404 iam404 closed this Oct 13, 2025
@iam404 iam404 deleted the models_variableset_project branch October 28, 2025 06:38
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.

2 participants