AE-2166: Resolving API Bugs in AMP4

Review Request #1093 — Created Oct. 13, 2025 and submitted

apoorva.sn
AMP
amp_4_0
AE-2166
mmiriam, ngurunathan, pmurugaiyan, pradeep, shuinvy

Problem

While testing API's in AMP4 setup with latest code changes there was circular dependency issues and there was issue with some of the API's.

Solution

Have organized imports such that there will be no circular dependency. Also there was issue in CLI side because of which some the API's were not working fine.

Have tested in the local setup. Will commit the changes and test again in the latest setup

Description From Last Updated

duplicate imports. Can you optimize the imports.

pmurugaiyanpmurugaiyan

if actual imports, can we place it at the begining of the file!

pmurugaiyanpmurugaiyan

avoid duplicate imports.

pmurugaiyanpmurugaiyan

are we using this configuration?

pmurugaiyanpmurugaiyan
pmurugaiyan
  1. 
      
  2. duplicate imports. Can you optimize the imports.

  3. if actual imports, can we place it at the begining of the file!

    1. to avoid circular dependency am importing this at the end. This is intentional

    2. I did't get it. How importing at the end of the file solves the circular dependency? Can you recheck the import packages?

    3. This ensures all submodules are imported after the base VsiteConfig class is defined. So that when we load the submodules which has reference to the parent module the parent is loaded in memory.
      This breaks the circular dependency issue.

    4. No, I mean this is not a clean a solution right. The circular dependency shouldn't occur whereever we import a package within the python file. I think there is still unresolved issues are there in this file.

    5. As per the existing changes we already had this circular dependency. When might have to revisit the framework changes later to resolve this and other things including applying migration.

  4. are we using this configuration?

    1. Have added default config. We can make use of this once we revisit framework changes

    2. This will create issues to the exiting tables if someone uses migration commands. We can remove it if not used.

    3. Standard Python Practice dictates imports belong at the very top of the file (PEP 8 - https://peps.python.org/pep-0008/

    4. We are not using migration as of now, once we use we can make use of this since this is the default DB config we are using. As of now this will not impact anything.

  5. 
      
apoorva.sn
shuinvy
  1. Ship It!
  2. 
      
apoorva.sn
Review request changed

Status: Closed (submitted)

Loading...