Commit graph

380 commits

Author SHA1 Message Date
e437f48b34 Changed checks to accept ints for expected values.
(In the configuration)
2023-10-18 12:32:33 +02:00
0ea9ad4c6e Added logging option for the server command 2023-10-18 12:31:54 +02:00
bf24f87fd7 Add more information on database configuration, and allow using a .env file 2023-10-18 02:37:00 +02:00
824a0afa3e Update installation instructions and config example. 2023-10-18 02:31:23 +02:00
85e73e0869 Update the README 2023-10-18 02:26:22 +02:00
75a8af37f0 Added a few more template files 2023-10-18 02:23:36 +02:00
de3e94333a Add pydantic-settings to pyproject.toml 2023-10-17 23:55:51 +02:00
62ef133b36 Add Jinja2 dependency to pyproject.toml 2023-10-17 23:52:49 +02:00
a97a57d06c Remove old imports from checks.py 2023-10-17 23:50:34 +02:00
2ad0bfab39 Update the CLI interface.
- server and auth are now arguments rather than required options.
2023-10-17 19:24:53 +02:00
83f57c6e47 Started working on a simple web interface.
- The web interface is exposed at /, and the api
  at /api.
- Include picocss for a minimal CSS framework
- Added some queries and models.Task properties
  to access the latest results
2023-10-13 09:43:47 +02:00
e2d8066746 Update API endpoints and test cases
- Adjusted test cases in test_api.py
  - Updated test_db fixture to delete the database between each test.
  - Consolidated test cases for tasks retrieval and results
2023-10-12 00:16:06 +02:00
43f8aabb2c Refactor server codebase for testing.
- Restructured server module to separate the application creation and configuration.
- Moved code dealing with SQLAlchemy database
  setup and teardown to the main application file.
- Moved functions related to configuration file loading to `argos.server.settings`.
- Fixed SQLAchemy expressions in `argos.server.queries`.
- Implemented a more granular system of setting checks' schedule on the server.
- Introduced frequency scheduling on per-website basis in the YAML config.
- Introduced Pytest fixtures for handling test database and authorized HTTP client in `tests/conftest.py`.
- Included a first test for the api
- Implemented changes to models to accommodate changes to task scheduling.
- Fixed errors concerning database concurrency arising from changes to the application setup.
2023-10-11 23:52:33 +02:00
e540eee9b3 Add the ability to convert to days, hours, minutes 2023-10-11 15:46:05 +02:00
4935a025ce Add a few more tests for duration conversions 2023-10-11 11:29:46 +02:00
daa22708c4 Make it possible to specify the frequency with '1d' 2023-10-11 11:11:57 +02:00
ca6584c803 Loop the agents and enhance the selection of tasks on the server 2023-10-10 19:24:50 +02:00
d35be89f4b Support !include filename in the yaml files.
- run isort on the codebase
2023-10-10 11:45:33 +02:00
cdfb1e30ac Add authorization headers
- Service endpoints now require an authentication
- Changed the location of the commands, which are now in `commands.py`
- There is now only one "argos" command which can start the server or an agent.
2023-10-10 11:30:16 +02:00
43e1767002 Refactor check config vlidation
- Refactored the `get_check_by_name` method to `get_registered_check` in the
  BaseCheck class and added a `get_registered_checks` method to get all the
  registered checks.
- Added a validation in the `WebsitePath` class to ensure that a check exists
  when parsing the configuration file.
- Updated the existing test for parsing SSL duration and added new tests to
  validate path parsing and check existence validation.
2023-10-10 10:04:46 +02:00
42ec15c6f4 Working SSL checks, refactoring of the codebase.
- Start implementing some tests using pytest
- Packaged using pyproject.toml
- Implemented SSL checks using httpx
- Checks can now run partially on the server, to access the configuration and determine the severity of the error if any
- Used black to format all the files
- Added an utility to convert strings like "3d" and "3w" to days
- The internal representation of SSL thresholds is now a list of tuples
- Models were lacking some relationship between Tasks and Results
2023-10-09 19:33:58 +02:00
d3c4f1e87b Implement SSL certificate expiration check
- Added pyOpenSSL to Pipfile and Pipfile.lock for SSL certificate expiration check implementation
- Implemented SSLCertificateExpiration check in checks.py
- Updated config.yaml with new test cases
- Minor changes and clean up in base.py and config.py
2023-10-07 00:19:36 +02:00
ff4588bc39 Refactor argos check and cli modules
- Added a simple way to have a registry for the checks.
- Use a Result dataclass to send back results from the workers
2023-10-05 11:36:36 +02:00
835ee50c1f Log errors that occured on the client side 2023-10-05 11:10:39 +02:00
f038a37022 Update implemented features 2023-10-05 11:07:03 +02:00
fa092ad75b "/response" endpoint is now functional 2023-10-05 11:05:51 +02:00
f41e74d402 Refactor code to handle job failures on clients
- Added error handler `SerializableException` in models.py which gets error details from base exception
- Added an API to get the results back from the clients
2023-10-05 00:48:26 +02:00
0a4850c1ed First iterations of the client / server.
- Added new libraries to Pipfile: httpx and click
- Refactored the file structure
- Added new functionality in logging.py to set log level
- README.md now includes information about running the server, running the client, and a sample configuration file
- Started working on checks logic
2023-10-03 11:44:52 +02:00
8ac5cdb529 Updated models.py and queries.py
- Removed the `Definition` class and added the `Task` class. It contains all information needed to run the jobs on the workers.
- Added the `Result` class. It stores the results returned by workers.
- In queries.py, updated the `update_from_config` function. Now it checks for the existence of tasks with the same URL, check, and expected result before adding new ones.
2023-10-02 13:03:06 +02:00
eea465af5c Start working with FastAPI 2023-10-02 12:15:57 +02:00