Skip to content

feat: add skip_reference_validation parameter to project import#6

Merged
privateip merged 1 commit intoitential:develfrom
jennlu330:feature/skip-project-reference
Feb 6, 2026
Merged

feat: add skip_reference_validation parameter to project import#6
privateip merged 1 commit intoitential:develfrom
jennlu330:feature/skip-project-reference

Conversation

@jennlu330
Copy link
Contributor

Summary

Add skip_reference_validation parameter to project import functions to allow skipping reference validation during project imports.

Motivation

When importing projects across environments, reference validation can fail if referenced resources (Automations, Studio Global Assets, and others.) don't exist yet. This parameter allows users to skip validation in scenarios where:

  • Projects are being imported with references that will be resolved later
  • References are known to be valid but not yet present in the target environment

Changes

Code Changes

  • automation_studio.py: Added skip_reference_validation parameter to import_project() method

    • Parameter is passed to the API endpoint as skipReferenceValidation in the JSON payload
    • Defaults to False to maintain backward compatibility
  • projects.py: Added skip_reference_validation parameter to importer() resource method

    • Parameter is passed through to the import_project() service call
    • Defaults to False to maintain backward compatibility
  • test_resources_projects.py: Updated test assertions to account for new parameter

Documentation Changes

  • README.md: Added example showing skip_reference_validation usage
  • docs/examples.md:
    • Added new "Import Project Across Environments" section with example
    • Updated import_project() function example to include skip_validation parameter
    • Added usage example for cross-environment imports with the new parameter

Testing Performed

  • ✅ All 506 unit tests passing
  • ✅ Code formatting validation with ruff format
  • ✅ Linting validation with ruff check
  • ✅ Updated existing test to verify parameter is correctly passed through

Backward Compatibility

No breaking changes - parameter defaults to False, maintaining existing behavior

API Usage Example

from asyncplatform.models.projects import ProjectMember

async with asyncplatform.client(**config) as client:
    projects_resource = client.resource("projects")
    
    # Skip reference validation during import
    result = await projects_resource.importer(
        project_data,
        members=members,
        overwrite=True,
        skip_reference_validation=True  # New parameter
    )
    
    print(f"Imported project: {result['name']}")
Use Case Example
Importing a project from development to staging or production where some referenced assets don't exist yet:


# In production environment where some assets are missing
result = await projects_resource.importer(
    development_project,
    skip_reference_validation=True  # Skip validation for missing assets
)

Checklist

  • Code follows project style guidelines
  • All tests pass
  • Documentation updated (docstrings and examples)
  • No breaking changes
  • Backward compatible (defaults to False)
  • Conventional commit format used

Add new skip_reference_validation parameter to import_project and importer
functions to allow skipping reference validation during project imports.

Changes:
- Added skip_reference_validation parameter to import_project in automation_studio.py
- Added skip_reference_validation parameter to importer in projects.py
- Updated test to account for new parameter
- Parameter defaults to False to maintain backward compatibility
@privateip privateip merged commit fd0e087 into itential:devel Feb 6, 2026
3 checks passed
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