Closed ehmatthes closed 4 months ago
input()
in pytest. Add flags for anything I was using prompting for.-s
flag, so you see the output of deployment runs.-s
flag.build_dev_env.sh
script, that will become a --build-dev-env
flag. It creates a sample project in an active venv, ready for dev work. (This is really helpful!)--open-test-project-dir
in this set of tests as well.platform push
runs manually in terminal, but is not running from script: subprocess.CalledProcessError: Command '['platform', 'url', '--yes']' returned non-zero exit status 1.
platform push --yes
from terminal.subprocess.run(cmd_parts, capture_output=True)
?msp.setup_project()
needs to check for --pypi
.--automate-all
.my_blog_project
does not already exist in user's Platform.sh projects. (Not now.)__init__.py
files do I really need? Provisioning certificates
Validating 1 new domain
E: Error validating domain main-bvxea6i-riad2wf5ov7ek.us-3.platformsh.site: Couldn't complete challenge [HTTP01: The client lacks sufficient authorization]
Unable to validate domains main-bvxea6i-riad2wf5ov7ek.us-3.platformsh.site, will retry in the background.
(Next refresh will be at 2023-06-25 05:54:59.392156+00:00.)
simple_deploy.py/_add_simple_deploy_req()
.yield
in the tmp project fixture, and put the destroy confirmation after the yield? Or, consider generating my own summary of what worked and what didn't, rather than the pass/fail nature of most tests?From an integration test of local dsd install:
--- Your project is now configured for deployment on Platform.sh. ---
To deploy your project, you will need to:
- Commit the changes made in the configuration process.
$ git status
$ git add .
$ git commit -am "Configured project for deployment."
- Push your project to Platform.sh' servers:
$ platform push
- Open your project:
$ platform url
- As you develop your project further:
- Make local changes
- Commit your local changes
- Run `platform push`
- You can find a full record of this configuration in the simple_deploy_logs directory.
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
⠼ Locking...
ERROR:pip.subprocessor:[present-rich] Getting requirements to build wheel exited with 1
[ResolutionFailure]: File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/resolver.py", line 811, in _main
[ResolutionFailure]: resolve_packages(
[ResolutionFailure]: File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/resolver.py", line 759, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: ^^^^^^^^
[ResolutionFailure]: File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/resolver.py", line 738, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^
[ResolutionFailure]: File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 1165, in resolve_deps
[ResolutionFailure]: results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]: File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 964, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 701, in resolve
[ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Getting requirements to build wheel exited with 1
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/__main__.py", line 4, in <module>
cli()
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/cli/options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/cli/command.py", line 369, in lock
do_lock(
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/routines/lock.py", line 79, in do_lock
venv_resolve_deps(
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 1107, in venv_resolve_deps
c = resolve(cmd, st, project=project)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/gk/y2n2jsfj23g864pdr38rv4ch0000gn/T/pytest-of-eric/pytest-316/blog_project0/b_env/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 1001, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
Committing changes...
[main 95dd4d9] Configured for deployment.
5 files changed, 115 insertions(+), 1 deletion(-)
I believe this was related to psycopg2
. That package requires pg_config
being on the path. If it's not on the path, Pipenv can't resolve the psycopg2 dependencies.
Fix: Install Postgres, and make sure pg_config is on PATH.
simple_deploy
output.
app_name
and project_url
.integration_tests/
and make sure flyctl
is not used anywhere; Fly.io is standardizing on fly
over flyctl
.fly info
works if the user has more than one project, or specify the name to be sure we're using the right project. (This is a Fly-specific task, not critical to this issue.)--automate-all
--pypi
(Getting this to pass may require a new release.)flyio_utils
-> platform_utils
, so that name is used across all platform-specific integration tests.commit_configuration_changes()
to platform-agnostic utils.flyctl
-> fly
This will allow destruction of the project even if there is a breaking failure.
--automate-all
Note: This took about 20 minutes after all the work on the other two platforms.
Now that unit tests are passing on Windows, make sure integration tests pass on Windows. There's really no way to get to 1.0 without taking this step.
unit_tests
orintegration_tests
argument.