mage-ai
mage-ai copied to clipboard
[BUG] file_contents access error on subfolder
Mage version
0.9.63
Describe the bug
When trying to open a file (in the general files section or inside a particular pipeline) that it's on the root of the project folder, it opens fine it can be edited. But if the file is inside a folder, any kind of folder, it prompts an error: No module named 'mage_ai.api.resources.FOLDER_NAMEResource' where FOLDER_NAME is the name of the actual folder. Also If inside a folder that it's giving the error, another folder is created, a file inside it can be opened without any problem.
To reproduce
With the following folder structure:
> Root folder
--> testFile (opens fine)
--> TestFolder
--> testFile (Gives error)
--> SecondLevelFolder
--> TestFile (opensFine)
Expected behavior
Files can be opened at any folder level.
Screenshots
Operating system
The mage instance is deployed on a Azure Container App using the oficial Docker image. It's published with a bicep script using the az cli.
resource environment 'Microsoft.App/managedEnvironments@2022-03-01' = {
location: location
name: az_environment_name
properties: {}
}
resource resourceName 'Microsoft.App/containerApps@2022-03-01' = {
name: resourceName
location: location
properties: {
managedEnvironmentId: environment.id
configuration: {
ingress: {
external: true
targetPort: 6789
customDomains: [
{
bindingType: 'SniEnabled'
certificateId: '${certificateId}'
name: customDomain
}
]
}
}
template: {
containers: [
{
image: 'mageai/mageai:latest'
name: resourceName
env: [
{
name: 'REQUIRE_USER_AUTHENTICATION'
value: '1'
}
{
name: 'ACTIVE_DIRECTORY_DIRECTORY_ID'
value: activeDirectoryId
}
{
name: 'MAGE_DATABASE_CONNECTION_URL'
value: 'postgresql+psycopg2://${dbUser}:${dbPass}@${dbHost}/${dbName}'
}
{
name: 'USER_CODE_PATH'
value: '/home/src/${projectName}'
}
]
volumeMounts: [
{
mountPath: '/home/src'
volumeName: 'mageaidata'
}
]
resources: {
cpu: 2
memory: '4Gi'
}
}
]
scale: {
minReplicas: 1
maxReplicas: 1
}
volumes: [
{
name: 'mageaidata'
storageName: storageName
}
]
}
}
}
Additional context
No response
It would possibly help to resolve the issue:
https://mageai.slack.com/archives/C03HTTWFEKE/p1708098053258839?thread_ts=1708090909.202009&cid=C03HTTWFEKE
Seems like there is no way to modify the behaviour of Ingress on Azure Container Apps. So that isn't a valid solution for an ACA environment.
Facing the same issue here, also on Azure Container App. :( As mentioned, files can be opened at project root and from 2nd level folders