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

crashing on migrate when there is no environments folder #461

Open
frlan opened this issue Jun 11, 2024 · 0 comments
Open

crashing on migrate when there is no environments folder #461

frlan opened this issue Jun 11, 2024 · 0 comments

Comments

@frlan
Copy link
Member

frlan commented Jun 11, 2024

Fresh deployment without any configured environments. Running a ./batou migrate causes a crash. experienced with 2.5b2

 ./batou migrate
Current version: 0
Version: 2300

🔧 Colliding attributes in environment and secrets

batou will now fail explicitly if an attribute exists both as an environment
override as well as a secret.

You will usually want to delete it from the environment config as that was
being used previously.

Version: 2301

✅ Environments have separate directories now

Each environment has been turned into a separate directory containing all the
configuration files:

* unencrypted configuration is now stored in
  `environments/<env>/environment.cfg`
* encrypted configuration is now stored in `environments/<env>/secrets.cfg`
* additional encrypted files are stored in `environments/<env>/secret-*`

The old `secrets` directory is now gone.

All data was migrated automatically for you, but you will need to commit those
changes manually.

Traceback (most recent call last):
  File "/mein/projekt.batou/./.appenv/76c7e883/bin/batou", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/mein/projekt.batou/.appenv/76c7e883/lib/python3.11/site-packages/batou/main.py", line 225, in main
    return args.func(**func_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/mein/projekt.batou/.appenv/76c7e883/lib/python3.11/site-packages/batou/migrate/__init__.py", line 117, in main
    new_version = migrate(base_version)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/mein/projekt.batou/.appenv/76c7e883/lib/python3.11/site-packages/batou/migrate/__init__.py", line 71, in migrate
    module.migrate(output_migration_step)
  File "/mein/projekt.batou/.appenv/76c7e883/lib/python3.11/site-packages/batou/migrate/migrations/2301.py", line 26, in migrate
    environments = _get_environment_names()
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mein/projekt.batou/.appenv/76c7e883/lib/python3.11/site-packages/batou/migrate/migrations/2301.py", line 35, in _get_environment_names
    return [
           ^
  File "/mein/projekt.batou/.appenv/76c7e883/lib/python3.11/site-packages/batou/migrate/migrations/2301.py", line 35, in <listcomp>
    return [
           ^
  File "/Users/flanitz/.nix-profile/lib/python3.11/pathlib.py", line 931, in iterdir
    for name in os.listdir(self):
                ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/mein/projekt.batou/environments'
@frlan frlan changed the title crasing on migrate when there is no environments folder crashing on migrate when there is no environments folder Jun 11, 2024
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