Closed ehmatthes closed 11 months ago
build_dev_env.py
, create fresh dev env. Use sys.exit()
calls to ensure each step is being logged appropriately.build_dev_env.py
should write reset_project.py
.
git reset
as well.platformsh.confirm_preliminary()
fly_io.confirm_prelminiary()
inspect_system()
inspect_project()
_check_git_status()
should not flag simple_deploy_logs/
being in uncommitted changes._confirm_automate_all()
platform_deployer.validate_platform()
CommandError
to log each error and then reraise.log_info()
method in simple_deploy.py.prep_automate_all()
_add_simple_deploy_req()
deploy()
skip_logging=True
.raise CommandError
. Should be any left.git status
notes_check_git_diff()
may need output of git status
.
git diff
has no output, should only find simple_deploy_logs/
in output?git status --porcelain
is fantastic! Is that flag available on all commands? No, see Git - Plumbing and Porcelain.git status
?_validate_cli()
work?_create_db()
; should we log the output of fly postgres create
? Probably not, because I believe it shows db crews. Maybe scrub them with fly apps create --generate-name
as well as output of that command. This is clear in logs, but should be just as clear on CLI output?execute_command()
, or execute_subp_run()
. Would probably need skip_logging
parameter.Start with integration tests first, because they are most important and don't check log output. If those pass, unit tests should be mostly updating log assertions?
Make sure integration tests pass, and skim through log after each deployment to address any glaring issues.
conftest.py.check_valid_call()
.platform project:info --yes
. It includes a bunch of identifying information, and the repository client ssh key.2023-11-04 01:32:11,742 INFO: Looking for Fly.io app to deploy against...
2023-11-04 01:32:12,552 INFO: fly apps list
2023-11-04 01:32:12,552 INFO: NAME OWNER STATUS PLATFORM LATEST DEPLOY
2023-11-04 01:32:12,552 INFO: fly-builder-wild-thunder-9106 personal suspended machines
2023-11-04 01:32:12,553 INFO: snowy-sea-2928 personal pending machines
2023-11-04 01:32:12,553 INFO:
2023-11-04 01:32:12,553 INFO: Found Fly.io app: snowy-sea-2928
2023-11-04 01:32:12,553 INFO: Looking for Fly.io region...
subprocess.run()
needs to use cmd
, not cmd.parts()
.-a
issue.git status
shows .platform/ directory.
platform create
creates a .platform/local/
directory, with .gitignore, project.yaml, and README.txt files.Moving remaining platform.sh issues to #265.
Originally, I didn't want to start writing a log file until we knew that the deployment was going to work. In retrospect, this was an unnecessary complexity. We're taking significant steps such as creating a project, and creating a db before we start logging. These are really important things to have a record of, especially for troubleshooting.
It's perfectly reasonable to create a log file as soon as we have something to log. People can pass the
--no-logging
arg if they need, and they can delete log files or directories before making a commit to their project if needed.