Commit Graph

2105 Commits

Author SHA1 Message Date
Marek Wolan
98f5454f04 Merge remote-tracking branch 'origin/dev' into feature/2736-instantaneous-rewards 2024-08-20 10:40:48 +01:00
Nick Todd
b7ef538942 Merged PR 507: #2748: Port of PrimAITE Internal changes.
## Summary
This a port of the AgentHistoryItem DB Admin (GreenAdminDatabaseUnreachablePenalty reward) changes that were made to the PrimAITE Internal repo.
See also #2826.

## Test process
Updated tests/integration_tests/game_layer/test_rewards.py.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2748: Port of PrimAITE Internal changes.

Related work items: #2748
2024-08-19 16:09:52 +00:00
Marek Wolan
15b7334f05 #2736 - Update changelog 2024-08-19 15:34:50 +01:00
Marek Wolan
538e853f26 #2736 - Add sticky reward tests and fix sticky reward behaviour 2024-08-19 15:32:25 +01:00
Czar Echavez
01f1569cc4 Merged PR 484: #2769: initial commit of user account actions
## Summary
Adding the Action Space for remote login and remote log out + change password

Updated ray to 2.32.0

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/484?_a=files&path=/tests/integration_tests/game_layer/actions/user_account_actions/test_remote_user_account_actions.py

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2769: initial commit of user account actions

Related work items: #2769
2024-08-19 14:31:44 +00:00
Marek Wolan
f344d292db #2736 - Fix up broken reward tests 2024-08-19 13:59:35 +01:00
Nick Todd
2c71958c91 #2748: Port of PrimAITE Internal changes. 2024-08-19 12:55:45 +01:00
Marek Wolan
a997cebbc6 Apply suggestions from code review [skip ci] 2024-08-19 11:14:53 +00:00
Marek Wolan
aeca5fb6a2 #2769 - Clean up incorrect names and commented out code [skip ci] 2024-08-19 10:28:39 +01:00
Marek Wolan
05f9751fa8 #2736 - implement instantaneous rewards 2024-08-19 10:17:39 +01:00
Marek Wolan
d74227e34f #2769 - update changelog 2024-08-16 10:10:26 +01:00
Marek Wolan
21c0b02ff7 #2769 - update observation tests with new parameter 2024-08-16 09:21:27 +01:00
Marek Wolan
1d2705eb1b #2769 - Add user login observations 2024-08-15 20:16:11 +01:00
Marek Wolan
7b7adc20f9 Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-13 13:15:47 +01:00
Marek Wolan
929bd46d6d #2769 - Make changing password disconnect remote sessions 2024-08-12 14:16:04 +01:00
Marek Wolan
c886d4b014 Merged PR 501: #2799 - Fix folder scan not being required and make it configurable
## Summary
Make folder and file requiring scanning configurable. By default it's true and the new option can be omitted to ensure compatibility with old configs.

## Test process
New tests to verify that the actual or visible file/folder states are shown when configured.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

#2799 - Fix folder scan not being required and make it configurable

Related work items: #2799
2024-08-12 08:57:14 +00:00
Marek Wolan
5956721804 Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-12 09:23:55 +01:00
Marek Wolan
5800334dc0 Merge dev into feature branch 2024-08-12 09:02:11 +01:00
Marek Wolan
3df55a708d #2769 - add actions and tests for terminal 2024-08-11 23:24:29 +01:00
Marek Wolan
31c46950ad Merged PR 502: Add PDF benchmark output
## Summary
Uses md2pdf (MIT License) to convert the markdown file to html then to PDF.
I updated the formatting of the charts to be more legible too.
This requires WeasyPrint which is a system package available on linux, mac and windows.

## Test process
installed weasyprint on our build machine and tried the benchmark script and it worked.

https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE?version=GBrelease/fake-release-for-testing-purposes&path=/benchmark/results/v3/v3.3.0-dev0/PrimAITE%20v3.3.0-dev0%20Benchmark%20Report.pdf

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2772
2024-08-09 12:21:26 +00:00
Christopher McCarthy
ca2aef7343 Merged PR 503: Enable Multi-Port Listening for Services and Applications
## Summary
- Added a `listen_on_ports` set in the `IOSoftware` class to enable software listening on ports in addition to the main port they're assigned.
- Also added something I missed in the `CHANGELOG.md` from user login ticket 🙃

## Test process
- Tested listening on ports with a dummy listener software class and counted frames snooped on.
- Also tested that the actual software that the posts being snooped in on still works as expected.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [X] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2768
2024-08-09 10:25:33 +00:00
Marek Wolan
f92a57cfc4 Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-09 11:12:40 +01:00
Marek Wolan
bf44ceaeac Apply suggestions from code review 2024-08-09 09:26:37 +00:00
Chris McCarthy
72e6e78ed7 #2768 - Removed debugging print statement 2024-08-09 09:32:13 +01:00
Charlie Crane
c4281f513f Merged PR 500: #2781 - Integrate Terminal and User Session manager
## Summary
Changes to Terminal to use the user_session_manager to validate user credentials.

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2781 - Initial commit with changes to Terminal to integrate with user_session_manager. Login and logout are now talking to the monitored user session

Related work items: #2781
2024-08-09 08:14:40 +00:00
Marek Wolan
df9ab13209 #2799 - Fix docstring 2024-08-09 09:11:54 +01:00
Chris McCarthy
a3a9ca9963 #2768 - Fixed issue causing main port to not be included in list of open ports. documented the configuration of listen_on_ports. added test that tests listen_on_ports configuration from yaml. 2024-08-08 21:20:20 +01:00
Charlie Crane
665c53d880 #2781 - Actioning review comments 2024-08-08 15:48:44 +01:00
Chris McCarthy
a5652ae4b2 Merge branch 'refs/heads/dev' into feature/2768_enable-multi-port-listening-for-services-and-applications 2024-08-08 14:26:35 +01:00
Charlie Crane
116ac725b0 #2718 - making terminal rm _login() and _remote_login() consistent in their RequestResponse 2024-08-08 14:23:10 +01:00
Charlie Crane
5f5ea5e524 #2718 - Updates to Terminal following discussion about implementation with actions. 2024-08-08 14:20:23 +01:00
Charlie Crane
ff054830bc #2781 - Correcting some typos in Terminal notebook and elaborating the data in _remote_login request 2024-08-08 11:57:30 +01:00
Charlie Crane
93ef3076f5 #2781 - user_session_manager._timeout_session() now sends a user_timeout command when closing remote sessions. Corrected source_ip in Terminal.receive() 2024-08-08 11:33:42 +01:00
Marek Wolan
d2693d974f Fix relative path to primaite benchmark to align with build pipeline step 2024-08-07 13:18:20 +00:00
Marek Wolan
b193b46b7b #2799 - Update observation tests 2024-08-07 13:43:11 +01:00
Marek Wolan
fe599f7745 #2799 - Fix folder scan not being required and make it configurable 2024-08-07 12:09:44 +01:00
Charlie Crane
9fea34bb43 #2781 - Correcting terminal tests and fixing a typo in base.py 2024-08-07 11:58:17 +01:00
Charlie Crane
1802648436 #2781 - Initial commit with changes to Terminal to integrate with user_session_manager. Login and logout are now talking to the monitored user session 2024-08-07 11:31:51 +01:00
Marek Wolan
0ad34caf1e Merge remote-tracking branch 'origin/dev' into feature/2772-pdf-benchmark 2024-08-07 10:09:16 +01:00
Charlie Crane
23816b0056 Merged PR 489: #2706 - Terminal Simulation Component
## Summary
This PR introduces the Terminal service simulation component to PrimAITE.

The full design details can be found at https://dev.azure.com/ma-dev-uk/PrimAITE/_wiki/wikis/PrimAITE.wiki/707/Terminals, and details how the terminal can be used, and does a better job of explaining it than I can in a PR.
There are some TODO comments within the code - these are  for #2781 , so will be picked up in the following terminal PR.

## Test process
13 Unit tests to cover functionality

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2706, #2710, #2711, #2712, #2713, #2714, #2735
2024-08-07 09:08:20 +00:00
Marek Wolan
368e846c8b 2772 - Generate pdf benchmark from 2024-08-07 10:07:19 +01:00
Charlie Crane
bd91b4be1d #2706 - Merge branch 'dev' into feature/2706-Terminal_Sim_Component 2024-08-07 09:08:43 +01:00
Nick Todd
61fa109ecc Merged PR 498: RNG seed setting.
## Summary
Add support for setting random number seed in config file.

## Test process
Tested on all notebooks in PrimAITE Internal except Training-an-Ray-RLLIB-MARL-System.
Added specific test for seed setting.
## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2777
2024-08-07 08:04:49 +00:00
Charlie Crane
6d6f21a20a #2706 - Additional assert on new test and a guard clause on LocalTerminalConnection.execute() to check that the Terminal service is running before sending a command 2024-08-06 19:14:53 +01:00
Charlie Crane
d05fd00594 #2706 - Resolving an issue that saw disconnected terminal connections still able to send execute commands that were also then processed by the target node. Created a new class: LocalterminalConnection, for local connection objects to terminal. Calling terminal.show() when there is a local connection will have 'Local Connection' as the IP address. Receive and execute will check that the provided connection uuid is valid before actioning any commands. TerminalClientConnection objects now have an is_active flag similar to DatabaseClientConnection. Added a new test to check that terminals will reject commands from disconnected clientconnection objects. 2024-08-06 19:09:23 +01:00
Charlie Crane
de14dfdc48 #2706 - Updated Changelog 2024-08-06 16:22:08 +01:00
Charlie Crane
dd7e466104 #2706 - Fixing pipeline failure 2024-08-06 15:01:53 +01:00
Charlie Crane
df49b3b5bb #2706 - Actioning Review Comments 2024-08-06 14:10:10 +01:00
Charlie Crane
68621f172b #2706 - xfail on test_ray_multi_agent_action_masking as this is causing pipeline failures. Bugticket raised as 2812 2024-08-06 12:10:14 +01:00
Christopher McCarthy
462ff40278 Merged PR 499: #2811 - Fix Logging and Connection Validation in DatabaseService and DatabaseClient
## Summary
Updated syslog messaging around `DatabaseClient` and `DatabaseServic` connection request and password authentication

## Test process
Manual checks:

### Before:
![image (2).png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/499/attachments/image%20%282%29.png)

### After:
![image (3).png](https://dev.azure.com/ma-dev-uk/b50a61ee-86c4-48bc-9a0b-a67645ba12ee/_apis/git/repositories/2825053e-bd3b-45b2-8680-1281809eefa2/pullRequests/499/attachments/image%20%283%29.png)

## Checklist
- [ ] PR is linked to a **work item**
- [ ] **acceptance criteria** of linked ticket are met
- [ ] performed **self-review** of the code
- [ ] written **tests** for any new functionality added with this PR
- [ ] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [ ] updated the **change log**
- [ ] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2811 - Updated syslog messaging around DatabaseClient and DatabaseService connection request and password authentication

Related work items: #2811
2024-08-06 11:04:49 +00:00