Skip to content

Test development setup with GitHub Actions #10052

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

Closed
wants to merge 2 commits into from

Conversation

abitrolly
Copy link
Contributor

This adds a new workflow that sets up development environment and runs tests with docker-compose as described in getting started docs. This could be used to improve the setup time, which takes more than 10 minutes right now.

https://github.com/abitrolly/warehouse/runs/3640554285?check_suite_focus=true

@abitrolly
Copy link
Contributor Author

Please approve the workflow, somebody.

@abitrolly
Copy link
Contributor Author

@di @ewdurbin @ewjoachim guys, can you approve tests and give this PR some reviews?

@ewjoachim
Copy link
Contributor

ewjoachim commented Oct 5, 2021

I cannot. Well I can review it but given I'm not a maintainer, so this won't change a thing. The project moves at the pace that the maintainers can afford to spend on it. Sometimes it moves a lot, and sometimes, there are other priorities. It's just like that, sorry :)

Also, please don't assume everyone is a guy ;)

@abitrolly
Copy link
Contributor Author

@ewjoachim
Copy link
Contributor

Ah, then, if the Washington post has issued an article stating that me and the other people you mentioned were ok with being addressed as "guys", then what can I say ;) (Can't recall when the journalist asked me though 🤔)

Sarcasm aside, I'm doing my very best to try and help you here, but doubling down when a friendly advice is given might not be the strategy that will lead to the most satisfying outcome for all parties involved.

@abitrolly
Copy link
Contributor Author

@ewjoachim I can relate to that people in power or under pressure may not do the thing that they are expected to do if they are not being approached in the way they like. Happened to me more than once. If you're saying that it might be the case here, then I am forced to oblige that "guys" is not an appropriate word and give my apologies. )

@ewjoachim D&I issues aside, why don't "they" give you the privileges to merge requests or at least unblock workflows?

@abitrolly abitrolly force-pushed the compose-ci-testing branch 2 times, most recently from 7fd08b8 to b509d4e Compare October 11, 2021 19:35
@abitrolly abitrolly force-pushed the compose-ci-testing branch 3 times, most recently from 37c1f2f to a29161d Compare October 13, 2021 02:32
@abitrolly
Copy link
Contributor Author

Rebased. Still waiting for review.

@abitrolly
Copy link
Contributor Author

@ewjoachim so how you would turn attention from the PSF sponsored devs to this PR without using the word "guys"?

@ewjoachim
Copy link
Contributor

https://heyguys.cc/

@abitrolly
Copy link
Contributor Author

So, peeps, how about getting this PR a review?

@abitrolly
Copy link
Contributor Author

I am going to rebase this to troubleshoot if my broken local build for #9972 repeats on newer code. For the reference Dev Setup after the last rebase took 16m 30s.

image

Dev Setup #7 - https://github.com/pypa/warehouse/actions/runs/1378501108

@abitrolly
Copy link
Contributor Author

Okay, the development setup is broken again on main. Dev Setup #8 - https://github.com/pypa/warehouse/actions/runs/1545247212

...
Installing collected packages: pyflakes, pycodestyle, mccabe, pbr, flake8, typing-extensions, toml, stevedore, restructuredtext-lint, regex, platformdirs, pathspec, parsy, mypy-extensions, flake8-polyfill, attrs, pep8-naming, isort, doc8, curlylint, black
Successfully installed attrs-21.2.0 black-21.11b1 curlylint-0.13.0 doc8-0.10.1 flake8-4.0.1 flake8-polyfill-1.0.2 isort-5.10.1 mccabe-0.6.1 mypy-extensions-0.4.3 parsy-1.1.0 pathspec-0.9.0 pbr-5.7.0 pep8-naming-0.12.1 platformdirs-2.4.0 pycodestyle-2.8.0 pyflakes-2.4.0 regex-2021.11.10 restructuredtext-lint-1.3.2 stevedore-3.5.0 toml-0.10.2 typing-extensions-3.10.0.2
# install ipython if enabled
/home/runner/work/warehouse/warehouse/.state/env/bin/pip-compile --allow-unsafe --generate-hashes --output-file=requirements/main.txt requirements/main.in
    ERROR: Command errored out with exit status 1:
     command: /home/runner/work/warehouse/warehouse/.state/env/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-resolver-7hbghyfu/pycurl/setup.py'"'"'; __file__='"'"'/tmp/pip-resolver-7hbghyfu/pycurl/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-mqfu4yi0
         cwd: /tmp/pip-resolver-7hbghyfu/pycurl/
    Complete output (22 lines):
    Traceback (most recent call last):
      File "/tmp/pip-resolver-7hbghyfu/pycurl/setup.py", line 234, in configure_unix
        p = subprocess.Popen((self.curl_config(), '--version'),
      File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'

abitrolly added a commit to abitrolly/warehouse that referenced this pull request Dec 11, 2021
This removes circular dependency in Makefile added in pypi#10278

Unblocks pypi#10052
Fixes pypi#10446
Fixes pypi#10447
abitrolly added a commit to abitrolly/warehouse that referenced this pull request Dec 11, 2021
This removes circular dependency in Makefile added in pypi#10278

Unblocks pypi#10052
Fixes pypi#10446
Fixes pypi#10447
abitrolly added a commit to abitrolly/warehouse that referenced this pull request Dec 11, 2021
This removes circular dependency in Makefile added in pypi#10278

Unblocks pypi#10052
Fixes pypi#10446
Fixes pypi#10447
Add healthcheck to docker-compose.yml
Add a script to wait for DB healthcheck to pass
Stop waiting for DB after 1 minute
miketheman added a commit to miketheman/warehouse that referenced this pull request Jun 26, 2023
Exercise some of our `Makefile`, `docker-compose.yml` and shell script
wrapper utilities.

Originally conceived in pypi#10052, simplified with current commands.

Closes pypi#10052

Signed-off-by: Mike Fiedler <[email protected]>
miketheman added a commit that referenced this pull request Jun 30, 2023
* test: run the development environment steps in CI

Exercise some of our `Makefile`, `docker-compose.yml` and shell script
wrapper utilities.

Originally conceived in #10052, simplified with current commands.

Closes #10052

Signed-off-by: Mike Fiedler <[email protected]>

* Add a start_period to the db healthcheck

Allow some time for the database to start up before performing "real"
readiness checks.

If the service is ready (healthcheck test command passes) during the
start_period, it'll be considered healthy and continue.

Refs: https://docs.docker.com/engine/reference/builder/#healthcheck:~:text=start%20period%20provides%20initialization%20time%20for%20containers%20that%20need,will%20be%20counted%20towards%20the%20maximum%20number%20of%20retries.

Signed-off-by: Mike Fiedler <[email protected]>

* only run on a schedule, and not part of PR/flow

Signed-off-by: Mike Fiedler <[email protected]>

---------

Signed-off-by: Mike Fiedler <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants