Skip to content

Commit

Permalink
FIX: SDVT Update Scripts (#1911)
Browse files Browse the repository at this point in the history
* Update CharonService.js

* revert to failed when

* change reference command

* dont check for charon version
  • Loading branch information
NeoPlays committed Jun 12, 2024
1 parent 2b9b684 commit 7c64450
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions controls/roles/update-changes/tasks/2.1.5/charon_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
- name: Adjust Charon Config if connected to a NimbusBeaconService
lineinfile:
path: "{{ config_file_path }}"
insertafter: "--beacon-node-endpoints"
line: "{{ service_configuration_text | split('\n') | select('match', '^\\s*- --beacon-node-endpoints') | first | split('-') | first }}- --feature-set-enable=json_requests"
insertafter: "--validator-api-address"
line: "{{ service_configuration_text | split('\n') | select('match', '^\\s*- --validator-api-address') | first | split('-') | first }}- --feature-set-enable=json_requests"
when:
- service_configuration.dependencies.consensusClients | selectattr('service', 'equalto', 'NimbusBeaconService') | list | length > 0
- service_configuration.command | select('match', '--feature-set-enable=json_requests') | length == 0

- name: add builder tag if not present
lineinfile:
path: "{{ config_file_path }}"
insertafter: "--beacon-node-endpoints"
line: "{{ service_configuration_text | split('\n') | select('match', '^\\s*- --beacon-node-endpoints') | first | split('-') | first }}- --builder-api"
insertafter: "--validator-api-address"
line: "{{ service_configuration_text | split('\n') | select('match', '^\\s*- --validator-api-address') | first | split('-') | first }}- --builder-api"
when:
- service_configuration.command | select('match', '--builder-api') | length == 0
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- name: Check if service_configuration.id is in any of the filtered_files
shell: "grep -lq '{{ service_configuration.id }}' {{ item }}"
loop: "{{ filtered_files }}"
ignore_errors: true
failed_when: false
register: grep_result
changed_when: false

Expand Down
6 changes: 3 additions & 3 deletions controls/roles/update-changes/tasks/2.1.5/updates-215.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
loop: "{{ service_config_files.files }}"

- name: Filter files that contain both regex patterns
shell: "grep -rlE 'service: CharonService' /etc/stereum/services | xargs grep -lE 'image: obolnetwork/charon:v1\\.[0-9]+\\.[0-9]+'"
shell: "grep -rlE '^service: CharonService' /etc/stereum/services"
register: grep_result
ignore_errors: true
failed_when: false
changed_when: false

- name: Set fact for filtered files
Expand All @@ -26,7 +26,7 @@
shell: "grep -lE '{{ uuids | join('|') }}' {{ item.path }}"
with_items: "{{ service_config_files.files }}"
register: uuid_grep_result
ignore_errors: true
failed_when: false
changed_when: false
when: uuids | length > 0

Expand Down
1 change: 1 addition & 0 deletions launcher/src/backend/ethereum-services/CharonService.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class CharonService extends NodeService {
"--p2p-tcp-address=0.0.0.0:3610",
"--validator-api-address=0.0.0.0:3600",
"--monitoring-address=0.0.0.0:3620",
"--builder-api"
], // command
["/usr/local/bin/charon"], // entrypoint
null, // env
Expand Down

0 comments on commit 7c64450

Please sign in to comment.