Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata-check: support metadata search path #2806

Open
2 tasks
oliver-sanders opened this issue Sep 5, 2024 · 1 comment
Open
2 tasks

metadata-check: support metadata search path #2806

oliver-sanders opened this issue Sep 5, 2024 · 1 comment
Milestone

Comments

@oliver-sanders
Copy link
Member

The Problem

The rose metadata-check command supports specifying the metadata directory.

However, it does not support configuring the metadata search path as other Rose commands do, using the -M option or the ROSE_META_PATH environment variable.

Example

.
|-- here
|   |-- grav
|   |   `-- rose-meta.conf
|   `-- mesh
|       `-- rose-meta.conf
`-- some-meta
    `-- rose-meta.conf
# ./some-meta/rose-meta.conf
[env=FOO]
# ./here/grav/rose-meta.conf
import=some-meta
# ./here/mesh/rose-meta.conf
[env=TYPE]

Running the metadata-check command on the mesh config works fine:

$ rose metadata-check -v -C ./here/mesh
[INFO] Configurations OK

However, the grav config fails with a cryptic error:

$ rose metadata-check -v -C ./here/grav
/var/tmp/tmp.80X2llkvnr/here/grav: not a configuration metadata directory.

Which is actually masking an OS error:

FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/tmp.80X2llkvnr/here/some-meta/rose-meta.conf'

Which we cannot circumnavigate, as we cannot configure the metadata search path to make Rose look up one directory.

TODO:

  • Make the metadata search path configurable as for other Rose commands.
  • Improve the error message for "import not found" use cases.
@oliver-sanders oliver-sanders added this to the 2.3.x milestone Sep 5, 2024
@oliver-sanders
Copy link
Member Author

The example may behave differently with/without the ./ after the -C?

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

No branches or pull requests

1 participant