Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add controller for remote update #419

Merged
merged 157 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
6b68c06
fix get version
da13da Oct 21, 2024
61ea459
Merge branch 'main' of https://github.com/nodecross/nodex
da13da Oct 22, 2024
73c415a
feat: execute agent by controller
da13da Oct 30, 2024
bf5b94c
fix: lint
da13da Oct 30, 2024
5697e82
fix: dependency
da13da Oct 30, 2024
bb9b7a7
feat: handle signal and monitoring state
da13da Oct 31, 2024
fe3c29b
fix: shutdown bug
da13da Nov 1, 2024
57ddef4
reafacto: agent process manager
da13da Nov 3, 2024
507b6aa
feat: handle yaml
da13da Nov 3, 2024
5914b26
refactor: use error
da13da Nov 3, 2024
a75cd5e
feat: update process on agent
da13da Nov 4, 2024
2f6a130
feat: handle updating
da13da Nov 4, 2024
d84c6cf
fix: cargo
da13da Nov 4, 2024
3407e02
fix: runtime err
da13da Nov 4, 2024
233304e
fix: agent when update
da13da Nov 4, 2024
41f2f6b
fix: initialize fd
da13da Nov 4, 2024
ab77d98
Merge branch 'feat/add-controller-for-remote-update' of https://githu…
da13da Nov 4, 2024
2b667c2
fix: write runtime
da13da Nov 4, 2024
81c67b9
fix: fmt and cargo member
da13da Nov 4, 2024
498a83f
Merge branch 'feat/add-controller-for-remote-update' of https://githu…
da13da Nov 4, 2024
7830ea5
feat: run action
da13da Nov 5, 2024
9d215ed
fix: agent info to process info
da13da Nov 6, 2024
9761fc8
fix: lint
da13da Nov 6, 2024
906dd56
fix: log and func name
da13da Nov 6, 2024
e34f311
feat: rollback and backup
da13da Nov 7, 2024
7bb4e9e
fix: runtime
da13da Nov 12, 2024
d6b1dce
refactor runtime and dir name
da13da Nov 14, 2024
066c51b
validate by process
da13da Nov 14, 2024
b287df3
feat: handle signal
da13da Nov 14, 2024
55b50b1
fix: conflict
da13da Nov 14, 2024
3908d02
fix: conflict
da13da Nov 14, 2024
5f61564
fix: initialize by debug
da13da Nov 15, 2024
affa1dd
fix: controller only unix
da13da Nov 15, 2024
78ea8a1
fix: change func name and main error handling
da13da Nov 16, 2024
3c9959e
feat: monitor update version and check storage
da13da Nov 21, 2024
9b53fbf
fix: by ota e2e
da13da Nov 23, 2024
09698fe
fix: create backup
da13da Nov 24, 2024
8b68a74
fix: rollback
da13da Nov 24, 2024
b405afa
fix: read runtime_info
da13da Nov 24, 2024
1934e93
fix: handling update
da13da Nov 24, 2024
89d9664
fix: change runtime_info path
da13da Nov 24, 2024
f906ff8
fix: resolve conflict
da13da Nov 24, 2024
9220738
fix: e2e test
da13da Nov 24, 2024
d68a87b
fix: tar target
da13da Nov 24, 2024
3726106
fix: rollback
da13da Nov 25, 2024
3e79652
fix: ci
da13da Nov 25, 2024
e5ef462
fix: taplo format
da13da Nov 25, 2024
8909f0d
fix: build windows
da13da Nov 25, 2024
07b45eb
fix: drop socket
da13da Nov 29, 2024
2ffcde4
fix: build omnibus
da13da Nov 29, 2024
aff0b3f
fix: postinst
da13da Nov 29, 2024
5d60b8d
fix: drop lisener when controller received sigterm
da13da Nov 29, 2024
43e9fa8
fix: handle windows
da13da Nov 30, 2024
52c3204
fix: handle windows
da13da Nov 30, 2024
a42cf30
fix: handle windows
da13da Nov 30, 2024
399b973
fix: typo
da13da Nov 30, 2024
aee2f94
fix: handle windows
da13da Nov 30, 2024
f3025cc
fix: handle windows
da13da Nov 30, 2024
b68c2d3
fix: use unimplemented macro
da13da Nov 30, 2024
7743f8f
fix: use unimplemented macro
da13da Nov 30, 2024
0a36ce7
fix: fmt
da13da Nov 30, 2024
3840229
Merge branch 'main' into feat/add-controller-for-remote-update
da13da Dec 2, 2024
9ff1157
fix: use async-trait
da13da Dec 6, 2024
e525a47
fix: conflict
da13da Dec 6, 2024
32c47f6
fix: lint
da13da Dec 6, 2024
875bc71
feat: add test code
da13da Dec 6, 2024
8e9c404
feat: build windows
da13da Dec 6, 2024
b695d29
feat: build windows
da13da Dec 6, 2024
6604b22
feat: build windows
da13da Dec 6, 2024
15bc598
feat: build windows
da13da Dec 7, 2024
1deebde
feat: add agent validator test
da13da Dec 8, 2024
3a87382
feat: validator.agent error case
da13da Dec 8, 2024
13d11e0
feat: add default test
da13da Dec 9, 2024
26ee94e
fix: typo
da13da Dec 9, 2024
2b88715
fix: not run controller process
da13da Dec 9, 2024
df04a47
feat: use watch channel for state monitoring
da13da Dec 9, 2024
81ef5db
feat: specify send
da13da Dec 9, 2024
9520619
Encapsulate
tzskp1 Dec 10, 2024
b936e07
Leave a file open
tzskp1 Dec 10, 2024
79dba46
Get rid of dbg!
tzskp1 Dec 10, 2024
b849587
pull
da13da Dec 10, 2024
697e392
Change file to shm
tzskp1 Dec 11, 2024
7c59b71
Refactor
tzskp1 Dec 11, 2024
1fab81b
Fix update state
tzskp1 Dec 11, 2024
b65e1a6
Lint
tzskp1 Dec 11, 2024
13a8b01
Fix validtation
tzskp1 Dec 11, 2024
b365e02
Refactor
tzskp1 Dec 11, 2024
74f19a2
test: add default and rollback
da13da Dec 11, 2024
9151e65
Stop forcing state back to Default
tzskp1 Dec 11, 2024
2a27094
Refactor
tzskp1 Dec 11, 2024
29f6b7b
Fix initial state
tzskp1 Dec 11, 2024
a58e13f
Remove Updating
tzskp1 Dec 11, 2024
4e390f9
Fix example script
tzskp1 Dec 11, 2024
68c392d
Use owned copy logic
tzskp1 Dec 11, 2024
909cc80
Fix rollback impl
tzskp1 Dec 11, 2024
f968dfe
Fix
tzskp1 Dec 11, 2024
45976d2
fix: fmt
da13da Dec 11, 2024
2cc5b13
fix: extract action by version and add test
da13da Dec 11, 2024
cec6a90
Re-design state machine
tzskp1 Dec 14, 2024
4f92d76
Add sloppy stab script
tzskp1 Dec 14, 2024
8bd1d30
Refactor
tzskp1 Dec 14, 2024
56edc91
Clean up
tzskp1 Dec 14, 2024
bb344e8
Lint
tzskp1 Dec 14, 2024
5365a96
Refactor
tzskp1 Dec 16, 2024
c79ecbe
test: add agents and storage
da13da Dec 16, 2024
adb4fa2
fix: test
da13da Dec 18, 2024
d1a9391
fix: lint
da13da Dec 18, 2024
a8839a4
Migrate to axum
tzskp1 Dec 18, 2024
5b2e1d2
Fix broken endpoint
tzskp1 Dec 18, 2024
abafbb4
Use SIGUSR1 to send uds
tzskp1 Dec 19, 2024
0e5f126
Wait for binding to uds
tzskp1 Dec 19, 2024
50fa0a8
Refactor
tzskp1 Dec 19, 2024
fb51aef
Add leaked file
tzskp1 Dec 19, 2024
4b9daa4
Fix tests
tzskp1 Dec 19, 2024
5fec80d
Fix error structure
tzskp1 Dec 19, 2024
b62899c
Get rid of Agent Manager
tzskp1 Dec 19, 2024
3e91b56
Quit trait of Runtime Manager
tzskp1 Dec 19, 2024
bf29fa4
Get rid of dbg
tzskp1 Dec 19, 2024
803eb09
Clean up
tzskp1 Dec 19, 2024
528cb29
fix: build windows
da13da Dec 19, 2024
87e4567
fix: remove test
da13da Dec 19, 2024
6fcade8
Wait for socket
tzskp1 Dec 21, 2024
23221b4
Refactor
tzskp1 Dec 21, 2024
be5cf54
Add leaked file
tzskp1 Dec 21, 2024
d2b1910
Lint
tzskp1 Dec 21, 2024
e018193
Refactor
tzskp1 Dec 23, 2024
e51ddd1
Format
tzskp1 Dec 23, 2024
1a51770
Fix test scripts
tzskp1 Dec 23, 2024
9b9d1b2
Fix visibility
tzskp1 Dec 23, 2024
24a7664
Add comments
tzskp1 Dec 23, 2024
c0682cb
Add comment
tzskp1 Dec 23, 2024
bf6e18f
Clean up
tzskp1 Dec 23, 2024
dee9e23
Improve test script
tzskp1 Dec 23, 2024
9b2aae3
Refactor
tzskp1 Dec 23, 2024
b3b059d
Fix visibility
tzskp1 Dec 23, 2024
0c333bc
Fix for windows
tzskp1 Dec 23, 2024
bbb17f0
Update Cargo.lock
tzskp1 Dec 23, 2024
907c454
Fix for bsd unix
tzskp1 Dec 23, 2024
8f2da8e
Fix unix domain socket creation wait logic for macos
tzskp1 Dec 23, 2024
3c1d501
Remove mqtt
tzskp1 Dec 23, 2024
8c8c69d
Refactor e2e tests
tzskp1 Dec 23, 2024
7a32fa2
Fix windows e2e tests
tzskp1 Dec 23, 2024
be33a07
Merge remote-tracking branch 'origin/feat/revised-controller-for-remo…
tzskp1 Dec 23, 2024
37cbd7f
Add trait of RuntimeManager
tzskp1 Dec 23, 2024
3be3e88
Fix tests
tzskp1 Dec 24, 2024
a696931
Acceptable to start Agent alone
tzskp1 Dec 24, 2024
b526f53
Fix for windows
tzskp1 Dec 24, 2024
e9e7fbb
fix: build setting for deb package
da13da Dec 24, 2024
b123b27
Merge remote-tracking branch 'origin/feat/add-controller-for-remote-u…
tzskp1 Dec 25, 2024
5f84fc6
Add Cargo.lock
tzskp1 Dec 25, 2024
6dae343
Fix for systemd
tzskp1 Dec 25, 2024
747520c
Fix unit definition
tzskp1 Dec 25, 2024
60c5ee5
Add comment
tzskp1 Dec 25, 2024
45258ab
Refactor the procedure for killing the controller
tzskp1 Dec 25, 2024
77a2b6c
Get rid of Init state for re-entrant safety
tzskp1 Dec 26, 2024
03b3e58
Merge pull request #454 from nodecross/feat/revised-ota-test
tzskp1 Dec 26, 2024
8ce2a92
Merge remote-tracking branch 'origin/main' into feat/add-controller-f…
tzskp1 Dec 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/e2e-mac/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ runs:
prism mock -h localhost -p 8020 test_resource/studio.yaml > studio.txt 2>&1 &
sleep 5

${{ inputs.binary-path }} > log.txt 2>&1 &
${{ inputs.binary-path }} controller > log.txt 2>&1 &
sleep 5

cd e2e
cargo test

pgrep -f nodex-agent | xargs kill -SIGINT
pgrep -f "nodex-agent controller" | xargs kill -SIGINT
sleep 5

if !grep -q "SIGINT" log.txt; then
echo "SIGINT not found in log."
exit 1
fi

pids=$(pgrep -f nodex-agent || true)
pids=$(pgrep -f "nodex-agent controller" || true)
# When executing pgrep, if the process does not exist, it exits; therefore, a solution for that is needed.
if [ -z "$pids" ]; then
echo "Process not found, as expected."
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/e2e-with-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
shell: bash
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
pid=$(docker exec $container_id pgrep -f nodex-agent)
pid=$(docker exec $container_id pgrep -f "nodex-agent controller")
docker exec $container_id kill -SIGINT $pid
sleep 3

Expand All @@ -53,7 +53,7 @@ runs:
if: steps.check_logs_for_sigint.outputs.stopped_found == 'true'
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
if ! docker exec $container_id pgrep -f /tmp/nodex-agent; then
if ! docker exec $container_id pgrep -f "/tmp/nodex-agent controller"; then
echo "Process not found, as expected."
else
echo "Process is still running, which is not expected."
Expand All @@ -70,7 +70,7 @@ runs:
shell: bash
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
pid=$(docker exec $container_id pgrep -f nodex-agent)
pid=$(docker exec $container_id pgrep -f "nodex-agent controller")
docker exec $container_id kill -SIGTERM $pid
sleep 3

Expand All @@ -89,7 +89,7 @@ runs:
if: steps.check_logs_for_sigterm.outputs.stopped_found == 'true'
run: |
container_id=$(docker compose -f test_resource/compose.yaml -f test_resource/overrides/${{ inputs.docker-image }}.yaml --profile e2e ps -q e2e_agent)
if ! docker exec $container_id pgrep -f /tmp/nodex-agent; then
if ! docker exec $container_id pgrep -f "/tmp/nodex-agent controller"; then
echo "Process not found, as expected."
else
echo "Process is still running, which is not expected."
Expand Down
Loading
Loading