Anders Kaseorg
1e9b6445a9
ruff: Fix PLR6104 Use `+=` to perform an augmented assignment directly.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-14 13:49:51 -07:00
Anders Kaseorg
e08a24e47f
ruff: Fix UP006 Use `list` instead of `List` for type annotation.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Alex Vandiver
87d36d24c9
droplet: Rebuild droplet image with 22.04.
2024-05-30 11:51:44 -07:00
Alex Vandiver
3ae3aba712
droplet: Upgrade to 4GB of RAM and 2CPUs; 2GB is insufficient.
2024-05-30 11:51:44 -07:00
Anders Kaseorg
553f268b04
ruff: Fix RUF027 Possible f-string without an `f` prefix.
...
This is a preview rule, not yet enabled by default.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-01 09:30:04 -08:00
Anders Kaseorg
2665a3ce2b
python: Elide unnecessary list wrappers.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-13 12:41:23 -07:00
Anders Kaseorg
e932e2ce52
ruff: Fix UP032 Use f-string instead of `format` call.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-08-02 15:58:55 -07:00
Anders Kaseorg
bca5564c1e
ruff: Fix UP032 Use f-string instead of `format` call.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-07-23 15:18:18 -07:00
Anders Kaseorg
43b4f10578
run-dev: Drop .py from script name.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-03 18:02:37 -08:00
Anders Kaseorg
4eda29bd86
ruff: Fix RUF005 Consider spread instead of concatenation.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-26 10:16:30 -08:00
Alex Vandiver
b5bcc5f1b4
droplets: Switch to Ubuntu 20.04 base image.
2022-04-28 11:30:47 -07:00
Alex Vandiver
702807829f
droplets: Add IPv6 addresses to droplets.
2022-04-28 11:30:47 -07:00
Alex Vandiver
738d21f24b
droplets: Allow specifying the region for the droplet.
2022-04-28 11:30:47 -07:00
Alex Vandiver
b18b9d25e1
droplets: Add a script to do the provisioning.
2022-04-28 11:30:47 -07:00
Alex Vandiver
2fc7054a09
droplet: Fix printed instructions to have the right username/hostname.
2022-03-10 12:25:05 -08:00
Alex Vandiver
72b10937fc
droplet: Factor out common droplet_domain_name.
2022-03-10 12:25:05 -08:00
Alex Vandiver
5086241361
droplet: Set a secure erlang cookie at startup.
2022-03-10 12:25:05 -08:00
Alex Vandiver
aa9039d83e
droplet: Switch to a new Debian 10 template snapshot.
2022-03-10 12:25:05 -08:00
Alex Vandiver
d8c77eafb4
droplet: Always create with the "dev" tag.
...
This allows the firewall to be enforced on new hosts.
2022-03-10 12:25:05 -08:00
Alex Vandiver
25d753889b
droplet: Allow overriding the subdomain.
2022-03-10 12:25:05 -08:00
Anders Kaseorg
b0ce4f1bce
docs: Fix many spelling mistakes.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-02-07 18:51:06 -08:00
Anders Kaseorg
544bbd5398
docs: Fix capitalization mistakes.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-10 09:57:26 -07:00
Vishnu KS
965a71a332
droplets: Remove obvious comments from create.py.
2021-03-23 14:05:34 -07:00
Vishnu KS
b1a26c7123
droplets: Rename get_keys to get_ssh_public_keys_from_github.
2021-03-23 14:05:34 -07:00
Vishnu KS
36ba00f65a
droplets: Rename fork_exists to assert_user_forked_zulip_server_repo.
2021-03-23 14:05:34 -07:00
Vishnu KS
c1d80561a6
droplets: Add support for creating prod droplets.
2021-03-23 14:05:34 -07:00
Vishnu KS
fa623dbd62
droplets: Make assert_droplet_does_not_exist take droplet_name as argument.
2021-03-23 14:05:34 -07:00
Vishnu KS
13b9cf200b
droplets: Make print_completion take droplet_domain_name instead of username.
2021-03-23 14:05:34 -07:00
Vishnu KS
33f51305eb
droplets: Rename username argument to record_name in create_dns_record.
2021-03-23 14:05:34 -07:00
Vishnu KS
3407627c46
droplets: Rename exit_if_droplet_exists to assert_droplet_does_not_exist.
2021-03-23 14:05:34 -07:00
Vishnu KS
ca9d82fc06
droplets: Rename user_exists to assert_github_user_exists.
2021-03-23 14:05:34 -07:00
Vishnu KS
656fa15da1
droplets: Make create_droplet take droplet name instead of username.
2021-03-23 14:05:34 -07:00
Vishnu KS
4ba16d6ed9
droplets: Create get_ssh_keys_string_from_github_ssh_key_dicts function.
2021-03-23 14:05:34 -07:00
Anders Kaseorg
6e4c3e41dc
python: Normalize quotes with Black.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-02-12 13:11:19 -08:00
Anders Kaseorg
11741543da
python: Reformat with Black, except quotes.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-02-12 13:11:19 -08:00
Anders Kaseorg
72d6ff3c3b
docs: Fix more capitalization issues.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-23 11:46:55 -07:00
Anders Kaseorg
b4597a8ca8
python: Elide default for store_{true,false} argparse arguments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-03 16:17:14 -07:00
Anders Kaseorg
a5dbab8fb0
python: Remove redundant dest for argparse arguments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-02 11:04:10 -07:00
Anders Kaseorg
7ee974729b
docs: Replace Digital Ocean with DigitalOcean.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-30 11:30:43 -07:00
Anders Kaseorg
57a80856a5
python: Convert more "".format to Python 3.6 f-strings.
...
Generated by pyupgrade --py36-plus --keep-percent-format.
Now including %d, %i, %u, and multi-line strings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-13 15:39:00 -07:00
Anders Kaseorg
365fe0b3d5
python: Sort imports with isort.
...
Fixes #2665 .
Regenerated by tabbott with `lint --fix` after a rebase and change in
parameters.
Note from tabbott: In a few cases, this converts technical debt in the
form of unsorted imports into different technical debt in the form of
our largest files having very long, ugly import sequences at the
start. I expect this change will increase pressure for us to split
those files, which isn't a bad thing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-11 16:45:32 -07:00
Anders Kaseorg
8dd83228e7
python: Convert "".format to Python 3.6 f-strings.
...
Generated by pyupgrade --py36-plus --keep-percent-format, but with the
NamedTuple changes reverted (see commit
ba7906a3c6
, #15132 ).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-08 15:31:20 -07:00
Vishnu KS
9442835386
droplets: Make sure the username is lowercase.
...
Otherwise, if someone tries to create a droplet with a mixed case username,
the existing DNS records (which are always lowercase) would not be deleted.
Also, existing droplets would not be destroyed(--recreate) if there is a mismatch
in case. Unlike DNS records, droplets are created with case sensitive
hostnames.
Plus it's neater to have lowercase hostnames.
2020-05-20 09:32:11 -07:00
Vishnu Ks
2bd0e59462
droplets: Disable SSH password authentication.
...
We cannot disable this in base droplet as DigitalOcean overrides
the file and enable password authentication during droplet creation.
2020-05-07 17:09:05 -07:00
Vishnu KS
4796206629
droplets: Use bash script instead of cloud-config as user data.
...
We use cloud-config for setting up the SSH keys and executing
some commands. When cloud-config sets the SSH key it doesn't override
the existing keys. So we need to set the SSH keys manually using a command
instead. This means we no longer require cloud config. We can instead
pass a bash script as the user data instead of cloud-config.
I also included a command to set the SSH key of the root.
2020-05-07 17:09:05 -07:00
Vishnu KS
c07fb47aab
droplets: Set template_id to the id of the new image on 18.04.
...
size_slug represents the plan the droplet should be created on.
Since the new base droplet is created on the cheaper but more
feature rich new plan we have to update the slug_size as well
to take advantage of the cheaper plan.
2020-05-07 17:09:05 -07:00
Vishnu KS
87ff8ada6d
droplets: Move git clean to setup_repo string.
2020-05-07 17:09:05 -07:00
Vishnu KS
6079c19304
droplets: Set the hostname correctly using cloud-init.
2020-05-07 17:09:05 -07:00
Anders Kaseorg
5901e7ba7e
python: Convert function type annotations to Python 3 style.
...
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and six fixes for runtime issues:
- def __init__(self, token: Token, parent: Optional[Node]) -> None:
+ def __init__(self, token: Token, parent: "Optional[Node]") -> None:
-def main(options: argparse.Namespace) -> NoReturn:
+def main(options: argparse.Namespace) -> "NoReturn":
-def fetch_request(url: str, callback: Any, **kwargs: Any) -> Generator[Callable[..., Any], Any, None]:
+def fetch_request(url: str, callback: Any, **kwargs: Any) -> "Generator[Callable[..., Any], Any, None]":
-def assert_server_running(server: subprocess.Popen[bytes], log_file: Optional[str]) -> None:
+def assert_server_running(server: "subprocess.Popen[bytes]", log_file: Optional[str]) -> None:
-def server_is_up(server: subprocess.Popen[bytes], log_file: Optional[str]) -> bool:
+def server_is_up(server: "subprocess.Popen[bytes]", log_file: Optional[str]) -> bool:
- method_kwarg_pairs: List[FuncKwargPair],
+ method_kwarg_pairs: "List[FuncKwargPair]",
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:42:48 -07:00
Anders Kaseorg
c734bbd95d
python: Modernize legacy Python 2 syntax with pyupgrade.
...
Generated by `pyupgrade --py3-plus --keep-percent-format` on all our
Python code except `zthumbor` and `zulip-ec2-configure-interfaces`,
followed by manual indentation fixes.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-09 16:43:22 -07:00