This is ready for review <https://github.com/cloud...
# atmos-dev
e
This is ready for review https://github.com/cloudposse/atmos/pull/891 Definitely should be tested on Windows. Tests are passing now. One minor command remains. @Dan Miller (Cloud Posse) is going to update some of the
example/demos-*
to use relative paths.
d
@Erik Osterman (Cloud Posse) I'm still having trouble when I remove atmos schema
even though this PR doesnt add anything new to the schema
Is this supposed to work?
Copy code
$ atmos version

 █████  ████████ ███    ███  ██████  ███████
██   ██    ██    ████  ████ ██    ██ ██
███████    ██    ██ ████ ██ ██    ██ ███████
██   ██    ██    ██  ██  ██ ██    ██      ██
██   ██    ██    ██      ██  ██████  ███████


👽 Atmos 1.142.0 on darwin/arm64


examples/quick-start-simple$ tree
.
├── .gitignore
├── atmos.yaml
├── components
│   └── terraform
└── stacks
    ├── catalog
    └── deploy

6 directories, 2 files


examples/quick-start-simple$ atmos validate stacks

Schema file 'stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json' not found. Configure via:
1. 'schemas.atmos.manifest' in atmos.yaml
2. ATMOS_SCHEMAS_ATMOS_MANIFEST env var
3. --schemas-atmos-manifest flag

Accepts: absolute path, paths relative to base_path, or URL
e
jumping on a call
👍 1
Sounds like a regression
nothing is configured to point to
stacks/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
?
can you grep for
atmos-manifest
d
Yes when nothing is specified
I thought it was supposed to use some remote source
e
yep
d
I'm just using the latest version of Atmos. Not a local build
But it's the same either way
here's the issue:
Copy code
if u.FileExists(atmosConfig.Schemas.Atmos.Manifest) {
		atmosManifestJsonSchemaFilePath = atmosConfig.Schemas.Atmos.Manifest
	} else if u.FileExists(atmosManifestJsonSchemaFileAbsPath) {
		atmosManifestJsonSchemaFilePath = atmosManifestJsonSchemaFileAbsPath
	} else if u.IsURL(atmosConfig.Schemas.Atmos.Manifest) {
		atmosManifestJsonSchemaFilePath, err = downloadSchemaFromURL(atmosConfig.Schemas.Atmos.Manifest)
		if err != nil {
			return err
		}
	} else {
		return fmt.Errorf("Schema file '%s' not found. Configure via:\n"+
			"1. 'schemas.atmos.manifest' in atmos.yaml\n"+
			"2. ATMOS_SCHEMAS_ATMOS_MANIFEST env var\n"+
			"3. --schemas-atmos-manifest flag\n\n"+
			"Accepts: absolute path, paths relative to base_path, or URL",
			atmosConfig.Schemas.Atmos.Manifest)
	}
TLDR if no option is specified for schema, it fails
the default should alternatively be to use our own remote URL schema
(or go.embed. it should behave the same as atmos.yaml)
cc @Andriy Knysh (Cloud Posse)
a
we will have
go:embed
today
d
can you add the same functionality for schema as atmos config too?
a
please provide more details
e
Not to config.
That’s a separate task.
d
oh I see. As far as I can tell, there is no default fallback if schema isnt provided - remote URL or otherwise
e
@Haitham is working on that. See diagrams in PR description. Under 3 stages, you will see the first step is to add go:embed for atmos
d
ah okay this is a bug. I'll fix it
this was a red-herring on my part. It's because I had an old atmos config locally that had an explicit path for schema
with that, now this PR is ready for a final review: https://github.com/cloudposse/atmos/pull/891
a
Dan, I'm fixing it (JSON schema) in my PR, there are more issues there
d
ah okay thanks. But this PR is ready for a review either way -- tests are passing now
👍 1
e
LGTM