arcsecond 4.4.3__tar.gz → 4.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. {arcsecond-4.4.3 → arcsecond-4.4.4}/PKG-INFO +1 -1
  2. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/composedoc.py +16 -0
  3. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/docker/docker-compose.yml +26 -5
  4. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/lifecycle.py +4 -1
  5. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/local.py +2 -1
  6. {arcsecond-4.4.3 → arcsecond-4.4.4}/pyproject.toml +1 -1
  7. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_composedoc.py +26 -1
  8. {arcsecond-4.4.3 → arcsecond-4.4.4}/uv.lock +1 -1
  9. {arcsecond-4.4.3 → arcsecond-4.4.4}/.docker/Dockerfile_postgres +0 -0
  10. {arcsecond-4.4.3 → arcsecond-4.4.4}/.docker/Dockerfile_redis +0 -0
  11. {arcsecond-4.4.3 → arcsecond-4.4.4}/.flake8 +0 -0
  12. {arcsecond-4.4.3 → arcsecond-4.4.4}/.gitattributes +0 -0
  13. {arcsecond-4.4.3 → arcsecond-4.4.4}/.github/dependabot.yml +0 -0
  14. {arcsecond-4.4.3 → arcsecond-4.4.4}/.github/workflows/pythonpublish.yml +0 -0
  15. {arcsecond-4.4.3 → arcsecond-4.4.4}/.github/workflows/tests.yml +0 -0
  16. {arcsecond-4.4.3 → arcsecond-4.4.4}/.gitignore +0 -0
  17. {arcsecond-4.4.3 → arcsecond-4.4.4}/LICENSE +0 -0
  18. {arcsecond-4.4.3 → arcsecond-4.4.4}/Makefile +0 -0
  19. {arcsecond-4.4.3 → arcsecond-4.4.4}/README.md +0 -0
  20. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/__init__.py +0 -0
  21. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/__version__.py +0 -0
  22. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/alpaca/__init__.py +0 -0
  23. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/alpaca/commands.py +0 -0
  24. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/alpaca/dome_probe.py +0 -0
  25. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/alpaca/probe.py +0 -0
  26. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/alpaca/telescope_probe.py +0 -0
  27. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/api/__init__.py +0 -0
  28. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/api/config.py +0 -0
  29. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/api/constants.py +0 -0
  30. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/api/endpoint.py +0 -0
  31. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/api/main.py +0 -0
  32. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/api/resources.py +0 -0
  33. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cli.py +0 -0
  34. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/__init__.py +0 -0
  35. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/auth.py +0 -0
  36. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/resources.py +0 -0
  37. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/__init__.py +0 -0
  38. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/constants.py +0 -0
  39. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/context.py +0 -0
  40. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/__init__.py +0 -0
  41. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/context.py +0 -0
  42. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/errors.py +0 -0
  43. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/uploader.py +0 -0
  44. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/utils.py +0 -0
  45. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/errors.py +0 -0
  46. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/logger.py +0 -0
  47. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/uploader.py +0 -0
  48. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/utils.py +0 -0
  49. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploader/walker.py +0 -0
  50. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/cloud/uploads.py +0 -0
  51. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/docgen.py +0 -0
  52. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/errors.py +0 -0
  53. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/__init__.py +0 -0
  54. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/backups.py +0 -0
  55. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/database.py +0 -0
  56. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/docker/__init__.py +0 -0
  57. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/doctor.py +0 -0
  58. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/network/__init__.py +0 -0
  59. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/network/guard.py +0 -0
  60. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/network/manifest.toml +0 -0
  61. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/network/outbound.py +0 -0
  62. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/network/probe.py +0 -0
  63. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/network/sheet.py +0 -0
  64. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/skybrightness.py +0 -0
  65. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/stack.py +0 -0
  66. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/token.py +0 -0
  67. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/hosting/utils.py +0 -0
  68. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/__init__.py +0 -0
  69. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/autostart.py +0 -0
  70. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/commands.py +0 -0
  71. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/detection.py +0 -0
  72. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/proxy.py +0 -0
  73. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/registry.py +0 -0
  74. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/runtime.py +0 -0
  75. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/sources/__init__.py +0 -0
  76. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/sources/base.py +0 -0
  77. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/sources/filewatch.py +0 -0
  78. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/sources/mdns.py +0 -0
  79. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/sources/network.py +0 -0
  80. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/sources/opencv.py +0 -0
  81. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/imagesources/store.py +0 -0
  82. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/options.py +0 -0
  83. {arcsecond-4.4.3 → arcsecond-4.4.4}/arcsecond/targets.py +0 -0
  84. {arcsecond-4.4.3 → arcsecond-4.4.4}/examples/example_upload_files.py +0 -0
  85. {arcsecond-4.4.3 → arcsecond-4.4.4}/requirements.txt +0 -0
  86. {arcsecond-4.4.3 → arcsecond-4.4.4}/setup.cfg +0 -0
  87. {arcsecond-4.4.3 → arcsecond-4.4.4}/setup.py +0 -0
  88. {arcsecond-4.4.3 → arcsecond-4.4.4}/sonar-project.properties +0 -0
  89. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/__init__.py +0 -0
  90. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/api/__init__.py +0 -0
  91. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/api/test_api.py +0 -0
  92. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/api/test_api_endpoint.py +0 -0
  93. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/api/test_config.py +0 -0
  94. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/api/test_config_pointer.py +0 -0
  95. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/api/test_targets.py +0 -0
  96. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/__init__.py +0 -0
  97. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/__init__.py +0 -0
  98. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/__init__.py +0 -0
  99. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_errors.py +0 -0
  100. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_full_process.py +0 -0
  101. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_init.py +0 -0
  102. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_prepare.py +0 -0
  103. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_upload.py +0 -0
  104. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/conftest.py +0 -0
  105. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/fixtures/docker-compose-6.2.yml +0 -0
  106. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/fixtures/docker-compose-6.4.yml +0 -0
  107. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/fixtures/file1.fits +0 -0
  108. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_alpaca_probe.py +0 -0
  109. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_cli.py +0 -0
  110. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_cli_api_commands.py +0 -0
  111. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_docgen.py +0 -0
  112. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_backups_install_dir.py +0 -0
  113. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_backups_restore.py +0 -0
  114. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_database.py +0 -0
  115. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_doctor.py +0 -0
  116. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_lifecycle.py +0 -0
  117. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_local.py +0 -0
  118. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_network_guard.py +0 -0
  119. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_network_manifest.py +0 -0
  120. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_network_outbound.py +0 -0
  121. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_network_probe.py +0 -0
  122. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_network_sheet.py +0 -0
  123. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_skybrightness.py +0 -0
  124. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_stack.py +0 -0
  125. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_token.py +0 -0
  126. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_hosting_utils_secret_key.py +0 -0
  127. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_autostart.py +0 -0
  128. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_commands.py +0 -0
  129. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_detection.py +0 -0
  130. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_mdns.py +0 -0
  131. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_network.py +0 -0
  132. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_proxy.py +0 -0
  133. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_store.py +0 -0
  134. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_imagesources_webcam.py +0 -0
  135. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/test_targets_planning.py +0 -0
  136. {arcsecond-4.4.3 → arcsecond-4.4.4}/tests/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: arcsecond
3
- Version: 4.4.3
3
+ Version: 4.4.4
4
4
  Summary: CLI for arcsecond.io
5
5
  Project-URL: Homepage, https://github.com/arcsecond-io/cli
6
6
  Project-URL: Issues, https://github.com/arcsecond-io/cli/issues
@@ -51,6 +51,7 @@ class Service:
51
51
  volumes: List[str] = field(default_factory=list)
52
52
  healthcheck: bool = False
53
53
  stop_grace_period: Optional[str] = None
54
+ logging: Optional[str] = None # e.g. "*default-logging", the shared anchor
54
55
  env_vars: List[str] = field(default_factory=list)
55
56
  optional: Optional[str] = None # the marker name, e.g. "alerts"
56
57
 
@@ -139,6 +140,7 @@ class _Reader:
139
140
  "restart": "restart",
140
141
  "entrypoint": "entrypoint",
141
142
  "stop_grace_period": "stop_grace_period",
143
+ "logging": "logging",
142
144
  }
143
145
  if key in scalar:
144
146
  setattr(self.current, scalar[key], _as_shipped(value))
@@ -229,6 +231,20 @@ ENV_KEYS: Dict[str, tuple] = {
229
231
  "NASA GCN client credentials for the optional transient-alerts service. Empty until you paste yours.",
230
232
  ),
231
233
  "GCN_CONSUMER_CLIENT_SECRET": (OPERATOR, "See GCN_CONSUMER_CLIENT_ID."),
234
+ "FINK_ENABLED": (
235
+ BACKEND,
236
+ "`false` turns off the survey alerts from Fink in the optional transient-alerts service; GCN keeps "
237
+ "running. Fink needs no credentials, so it is on wherever the service runs.",
238
+ ),
239
+ "FINK_KAFKA_GROUP_ID": (
240
+ BACKEND,
241
+ "The installation's consumer group at Fink. Empty: `arcsecond-local-` and this machine's fingerprint, "
242
+ "which no other installation shares. Two installations sharing a group split the alerts between them.",
243
+ ),
244
+ "FINK_TOPICS": (
245
+ BACKEND,
246
+ "Comma-separated Fink topics, each ending in its survey (`_ztf`). Empty: the topics Arcsecond chose.",
247
+ ),
232
248
  FRONTEND_HOST_ENV_KEY: (
233
249
  OPERATOR,
234
250
  "The address other computers reach the installation at, port included (e.g. 192.168.1.42:5555). The backend "
@@ -1,6 +1,15 @@
1
1
  # === Arcsecond.local config. ===
2
2
  # *** DO NOT change any name or port number. ***
3
- # Version 7.5
3
+ # Version 7.7
4
+
5
+ # One log setting for every service, so no service can fill the disk with
6
+ # its log: five files of 20 MB each, the oldest dropped first. A full disk
7
+ # stops the database and the broker from saving, and the whole stack with them.
8
+ x-logging: &default-logging
9
+ driver: json-file
10
+ options:
11
+ max-size: "20m"
12
+ max-file: "5"
4
13
 
5
14
  services:
6
15
  # Database (PostgresQL)
@@ -8,6 +17,7 @@ services:
8
17
  image: postgres:16
9
18
  container_name: arcsecond-db
10
19
  restart: unless-stopped
20
+ logging: *default-logging
11
21
  # No host port. The backend reaches the DB over the internal Docker
12
22
  # network (hostname `arcsecond-db`), and every CLI command that needs
13
23
  # the DB (backups, restore, password rotation) goes through `docker exec`
@@ -24,6 +34,7 @@ services:
24
34
  image: redis:7.4
25
35
  container_name: arcsecond-broker
26
36
  restart: unless-stopped
37
+ logging: *default-logging
27
38
  # No host port either: Redis with no auth must never be reachable from
28
39
  # outside the stack, and the backend reaches it over the Docker network.
29
40
 
@@ -37,6 +48,7 @@ services:
37
48
  pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
38
49
  container_name: arcsecond-api
39
50
  restart: unless-stopped
51
+ logging: *default-logging
40
52
  entrypoint: /home/app/entrypoint-server.sh
41
53
  # This machine only. Browsers and other computers go through the webapp's
42
54
  # port, which serves the very same API under /api/; 8800 is for the
@@ -81,6 +93,7 @@ services:
81
93
  pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
82
94
  container_name: arcsecond-worker
83
95
  restart: unless-stopped
96
+ logging: *default-logging
84
97
  entrypoint: /home/app/entrypoint-worker.sh
85
98
  depends_on:
86
99
  backend:
@@ -110,6 +123,7 @@ services:
110
123
  pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
111
124
  container_name: arcsecond-dataworker
112
125
  restart: unless-stopped
126
+ logging: *default-logging
113
127
  entrypoint: /home/app/entrypoint-worker.sh
114
128
  depends_on:
115
129
  backend:
@@ -137,6 +151,7 @@ services:
137
151
  pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
138
152
  container_name: arcsecond-beat
139
153
  restart: unless-stopped
154
+ logging: *default-logging
140
155
  entrypoint: /home/app/entrypoint-beat.sh
141
156
  depends_on:
142
157
  backend:
@@ -150,6 +165,7 @@ services:
150
165
  image: ghcr.io/arcsecond-io/arcsecond-service-platesolver-astrometry:latest
151
166
  container_name: arcsecond-platesolver
152
167
  restart: unless-stopped
168
+ logging: *default-logging
153
169
  # No host port. Only the backend calls the solver, over the internal Docker
154
170
  # network; it has no authentication and nothing outside the stack needs it.
155
171
 
@@ -163,6 +179,7 @@ services:
163
179
  pull_policy: ${ARCSECOND_WEB_PULL_POLICY:-missing}
164
180
  container_name: arcsecond-web
165
181
  restart: unless-stopped
182
+ logging: *default-logging
166
183
  depends_on:
167
184
  backend:
168
185
  condition: service_started
@@ -188,16 +205,20 @@ services:
188
205
 
189
206
  # >>> arcsecond:alerts
190
207
  # Arcsecond transient-alerts consumer (optional).
191
- # Long-lived Kafka client for NASA GCN. Outbound TLS only — nothing listens:
192
- # auth.gcn.nasa.gov on 443, then kafka, kafka1, kafka2 and
193
- # kafka3.gcn.nasa.gov on 9092. Requires GCN_CONSUMER_CLIENT_ID /
194
- # GCN_CONSUMER_CLIENT_SECRET in .env; idles harmlessly when they are absent.
208
+ # Long-lived Kafka clients, outbound only — nothing listens.
209
+ # NASA GCN, over TLS: auth.gcn.nasa.gov on 443, then kafka, kafka1, kafka2
210
+ # and kafka3.gcn.nasa.gov on 9092. Requires GCN_CONSUMER_CLIENT_ID /
211
+ # GCN_CONSUMER_CLIENT_SECRET in .env; idles harmlessly without them.
212
+ # Fink survey alerts, unencrypted (public data): kafka-ztf.fink-broker.org
213
+ # and the brokers it hands out, all on 24499. Needs nothing in .env;
214
+ # FINK_ENABLED=false turns it off.
195
215
  # Single instance only — do not scale it.
196
216
  alerts:
197
217
  image: ${ARCSECOND_API_IMAGE:-ghcr.io/arcsecond-io/arcsecond-api:latest}
198
218
  pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
199
219
  container_name: arcsecond-alerts
200
220
  restart: unless-stopped
221
+ logging: *default-logging
201
222
  entrypoint: /home/app/entrypoint-alerts.sh
202
223
  depends_on:
203
224
  backend:
@@ -272,7 +272,10 @@ def status(directory):
272
272
  @basic_options
273
273
  def logs(directory, service, follow, tail):
274
274
  """Show recent logs. Services are named as in `arcsecond status`:
275
- backend, worker, dataworker, beat, web, db, broker, platesolver, alerts."""
275
+ backend, worker, dataworker, beat, web, db, broker, platesolver, alerts.
276
+
277
+ Each service keeps the last 100 MB of its log, so a busy one cannot fill
278
+ the disk; older lines are dropped."""
276
279
  install = stack.resolve_install_dir(directory)
277
280
  stack.ensure_docker()
278
281
  args = ["logs", "--tail", str(tail)]
@@ -605,7 +605,8 @@ def setup(with_alerts, lan_host, with_sky_map):
605
605
  "\nTransient alerts next steps: create GCN credentials (see "
606
606
  "https://docs.arcsecond.io/guides/operating/transient-alerts), paste them into "
607
607
  ".env as GCN_CONSUMER_CLIENT_ID / GCN_CONSUMER_CLIENT_SECRET, then "
608
- "run: arcsecond restart alerts"
608
+ "run: arcsecond restart alerts. Survey alerts from Fink need nothing: "
609
+ "they start with the service."
609
610
  )
610
611
 
611
612
  click.echo("\nNext: " + click.style("arcsecond start", bold=True))
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "arcsecond"
7
- version = "4.4.3"
7
+ version = "4.4.4"
8
8
  authors = [
9
9
  { name = "Cedric Foellmi", email = "cedric@arcsecond.io" },
10
10
  ]
@@ -1,9 +1,11 @@
1
1
  """The services and environment reference, read from the packaged template."""
2
2
 
3
+ import re
4
+
3
5
  from click.testing import CliRunner
4
6
 
5
7
  from arcsecond import cli
6
- from arcsecond.hosting import composedoc, local
8
+ from arcsecond.hosting import composedoc, lifecycle, local
7
9
 
8
10
 
9
11
  def _services():
@@ -44,6 +46,28 @@ def test_facts_are_read_where_the_template_states_them():
44
46
  assert any("/data" in v for v in s["backend"].volumes)
45
47
 
46
48
 
49
+ def test_every_service_keeps_a_capped_log():
50
+ """One shared setting, so no service can fill the disk with its log; a
51
+ service added without it fails here."""
52
+ text = local.packaged_compose_text()
53
+ assert (
54
+ "x-logging: &default-logging\n"
55
+ " driver: json-file\n"
56
+ " options:\n"
57
+ ' max-size: "20m"\n'
58
+ ' max-file: "5"\n'
59
+ ) in text
60
+ for service in composedoc.parse_services(text):
61
+ assert service.logging == "*default-logging", service.name
62
+
63
+
64
+ def test_the_logs_help_states_the_cap_the_template_sets():
65
+ text = local.packaged_compose_text()
66
+ size = int(re.search(r'max-size: "(\d+)m"', text).group(1))
67
+ files = int(re.search(r'max-file: "(\d+)"', text).group(1))
68
+ assert f"last {size * files} MB" in lifecycle.logs.help
69
+
70
+
47
71
  def test_the_comments_are_kept_as_documentation():
48
72
  s = _services()
49
73
  assert s["db"].description == ["Database (PostgresQL)"]
@@ -56,6 +80,7 @@ def test_optional_services_are_recognised_by_their_markers():
56
80
  assert s["alerts"].optional == "alerts"
57
81
  assert s["web"].optional is None
58
82
  assert "GCN_CONSUMER_CLIENT_ID" in " ".join(s["alerts"].description)
83
+ assert "FINK_ENABLED" in " ".join(s["alerts"].description)
59
84
 
60
85
 
61
86
  def test_every_service_on_the_backend_image_can_be_given_a_local_build():
@@ -155,7 +155,7 @@ wheels = [
155
155
 
156
156
  [[package]]
157
157
  name = "arcsecond"
158
- version = "4.4.3"
158
+ version = "4.4.4"
159
159
  source = { editable = "." }
160
160
  dependencies = [
161
161
  { name = "alpyca" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes