Commit Graph

2060 Commits

Author SHA1 Message Date
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
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
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
Charlie Crane
89107f2c4b #2706 - Type-hint changes following review 2024-08-06 10:37:11 +01:00
Charlie Crane
457395baee #2706 - Correcting wording on documentation titles 2024-08-06 09:33:41 +01:00
Charlie Crane
1e64e87798 #2706 - Actioning Review comments 2024-08-06 09:30:27 +01:00
Chris McCarthy
d2011ff327 #2811 - Updated syslog messaging around DatabaseClient and DatabaseService connection request and password authentication 2024-08-05 22:23:54 +01:00
Nick Todd
3441dd2509 #2777: Code review changes. 2024-08-05 17:45:01 +01:00
Nick Todd
3253dd8054 #2777: Update test 2024-08-05 16:27:54 +01:00
Charlie Crane
63a689d94a #2706 - correcting test failures 2024-08-05 16:25:35 +01:00
Charlie Crane
4fe9753fcf #2706 - Updated terminal.receive() to work with SSHPacket class, fixed some tests and updated RemoteTerminalConnection to hold Source_IP for easier reading 2024-08-05 15:44:52 +01:00
Nick Todd
d059ddceab #2777: Remove debug print statement 2024-08-05 15:11:57 +01:00
Nick Todd
966542c2ca #2777: Add determinism to torch backends when seed set. 2024-08-05 15:08:31 +01:00
Charlie Crane
972b0b9712 #2706 - Added another test demonstrating an SSH connection across a network. Actioned some review comments and a minor change to other ACL Terminal tests 2024-08-05 11:19:27 +01:00
Nick Todd
7d7117e624 #2777: Merge with dev 2024-08-05 11:13:32 +01:00
Nick Todd
0e21137874 Merge branch 'dev' into feature/2777_set_RNG_seed 2024-08-05 11:12:30 +01:00
Charlie Crane
ca8e568734 #2706 - Additional tests to check terminal login to/from networknodes. Redo of test to check that a router will block SSH traffic if no ACL rule. 2024-08-05 10:58:23 +01:00
Nick Todd
2e4a1c37d1 #2777: Pre-commit fixes to test 2024-08-05 10:34:06 +01:00
Charlie Crane
814663cf2c #2706 - Terminal now installs on a Router 2024-08-05 10:04:23 +01:00
Charlie Crane
22c84d35d7 Merge branch 'dev' into feature/2706-Terminal_Sim_Component 2024-08-05 09:52:53 +01:00
Charlie Crane
4bddf72cd3 #2706 - Initial refactor of Terminal Class following review discussion on Friday. Terminal will now return a TerminalConnection/RemoteTerminalConnection object on login.
The new connection object can then be used to pass commands to the target node, without needing to form a full payload item.
2024-08-05 09:29:17 +01:00
Christopher McCarthy
e275a9376b Merged PR 496: Implement User, UserManager, and UserSessionManager
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

## 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

Related work items: #2735, #2778
2024-08-02 14:45:10 +00:00
Marek Wolan
aab47289ac Merged PR 493: Update dev with all 3.2 updates
Related work items: #2625
2024-08-02 12:46:12 +00:00
Charlie Crane
d9faa1a5da Merge branch 'dev' into feature/2706-Terminal_Sim_Component 2024-08-02 13:34:00 +01:00
Charlie Crane
e132c52121 #2706 - Removed the LoginValidator. Will be handled by UserSessionManager. Updated some missing variables in method definitions/ 2024-08-02 13:32:34 +01:00
Chris McCarthy
71d8c6ea63 #2735 - synced with dev and resolved merge conflicts 2024-08-02 12:55:09 +01:00
Nick Todd
0cc724be60 #2777: Updated CHANGELOG 2024-08-02 12:50:40 +01:00
Nick Todd
a1e1a17c2a #2777: Add RNG test 2024-08-02 12:49:17 +01:00
Chris McCarthy
696236aa61 #2735 - make the disabled/enabled admins/non-admins dynamic properties for simplicity. Added num_of_logins to User. Added additional test for counting user logins. Added all users to the UserManager describe_state function. Refactored model fields with empty dict as default value to have direct instantiation instead of using Field(default_factory=dict) or Field(default_factory=: lambda: {}). 2024-08-02 12:47:02 +01:00
Christopher McCarthy
61c7cc2da3 Apply suggestions from code review 2024-08-02 10:57:51 +00:00
Nick Todd
5dcc0189a0 #2777: Implementation of RNG seed 2024-08-02 11:30:45 +01:00
Nick Todd
3ebad7d7e9 Merged PR 448: Global NMNE variables are incorrectly accessed
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

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

## 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
- [X] attended to any **TO-DOs** left in the code

Related work items: #2676
2024-08-02 08:28:08 +00:00
Charlie Crane
ab4931463f #2706 - Minor change following the session_id changes as local_login failed to pass a session_id when creating a new TerminalClientConnection object 2024-08-02 09:21:55 +01:00
Chris McCarthy
c2a19af6fa #2735 - added documentation for users, usermanager and usersessionmanager. Added the ability to add additional users from config and documented this. also tested additional users from config. 2024-08-02 09:20:00 +01:00
Charlie Crane
0fe61576c7 #2706 - Removed source and target ip_address attributes from the SSHPacket Class. Terminal now uses session_id to send login outcome. No more network_interface[1].ip_address. 2024-08-02 09:13:31 +01:00
Czar Echavez
0c66d594f6 Merged PR 490: #2735: fixes to broken items
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

## 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

#2735: fixes to broken items

Related work items: #2735
2024-08-01 22:56:31 +00:00
Marek Wolan
78ad95fcef #2735 - fix up node request manager and system software 2024-08-01 13:58:35 +01:00
Marek Wolan
a719b24cfc Merge branch 'dev' into feature/2735-usermanager-fixes 2024-08-01 13:23:03 +01:00
Marek Wolan
ddbbcf66e8 Merge remote-tracking branch 'origin/dev' into backport-3.2 [skip ci] 2024-08-01 13:03:52 +01:00
Marek Wolan
e02907cfb9 [skip ci] v3.2.0 2024-08-01 12:40:36 +01:00
Marek Wolan
9ed333945d [skip ci] 2024-08-01 12:39:52 +01:00