Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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 playbooks/committees/base_committees/buf_committees.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ buf_committees:
enable_voting: false
project_uid: !ref "buf_committee_project_lookup.steps[0]._response"
- json:
name: Technical Oversight Committee
name: Technical Steering Committee
description: >-
The Technical Oversight Committee for the Big Umbrella Foundation (BUF).
category: Technical Oversight Committee
The Technical Steering Committee for the Big Umbrella Foundation (BUF).
category: Technical Steering Committee
public: true
enable_voting: true
business_email_required: true
Expand Down
44 changes: 44 additions & 0 deletions playbooks/v1_meetings/umbrella_board_meeting/board_meeting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,50 @@ buf_board_meeting_committee_participants_access_update:
{% endif %}
{% endfor %}

buf_board_meeting_committee_participants_rsvps_create:
type: nats-publish
params:
# Create the meeting registrant's RSVP in OpenSearch (via indexer).
subject: lfx.index.v1_meeting_rsvp
steps:
# Count matches the count in buf_board_members.
{% for i in range(board_member_count) %}
{% set rsvp_response_date = fake.date_time_between(start_date='-30d', end_date='now') %}
- json:
action: created
headers:
authorization: !jwt bearer=true,aud=lfx-v2-project-service,principal={{ fake.user_name() }},email={{ fake.email() }}
x-on-behalf-of: !jwt bearer=true,aud=lfx-v2-project-service,principal=clients@m2m_helper
data:
id: "{{ fake.uuid4() }}"
meeting_and_occurrence_id: ""
meeting_id: "{{ meeting_id }}"
occurrence_id: ""
registrant_id: !ref "buf_board_meeting_committee_participants_create.steps[{{ i }}].json.data.id"
email: !ref "buf_board_members.steps[{{ i }}].json.email"
name: !sub "${buf_board_members.steps[{{ i }}].json.first_name} ${buf_board_members.steps[{{ i }}].json.last_name}"
user_id: ""
{% if member_has_username[i] %}
username: {{ fake.user_name() }}
{% else %}
username: ""
{% endif %}
org: !ref "buf_board_members.steps[{{ i }}].json.organization.name"
{% if fake.pybool() %}
job_title: ""
{% else %}
job_title: "{{ fake.job() }}"
{% endif %}
response: "{{ fake.random_element(elements=('accepted', 'declined', 'maybe')) }}"
scope: "all" # There are three scopes: single, all, this_and_following. However, "all" is the easiest to support.
response_date: "{{ rsvp_response_date.isoformat() }}Z"
ses_message_id: "{{ fake.uuid4().replace('-', '')[0:40] }}"
email_subject: "Re: Invitation to Monthly Board Meeting"
email_text: "{{ fake.sentence() }}"
created_at: "{{ rsvp_response_date.isoformat() }}Z"
modified_at: "{{ rsvp_response_date.isoformat() }}Z"
{% endfor %}

#
# Loop over each past meeting.
#
Expand Down
16 changes: 14 additions & 2 deletions src/lfx_v2_mockdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,24 @@ def run_http_request_playbook(name: str, playbook: dict) -> None:
response.raise_for_status()
# Store the response in the playbook for future reference.
except requests.exceptions.RequestException as e:
# Try to get detailed error message from response body
error_detail = str(e)
if hasattr(e, 'response') and e.response is not None:
try:
error_body = e.response.text
if error_body:
error_detail = f"{e}\nResponse body: {error_body}"
except Exception:
pass # If we can't get the body, just use the original error

if cli_args.force:
logger.error("Request failed", error=str(e), playbook=name)
logger.error("Request failed", error=error_detail, playbook=name)
# Add a placeholder response to prevent re-running.
step_payload["_response"] = {}
continue
raise

# Re-raise with enhanced error message
raise requests.exceptions.RequestException(error_detail) from e
try:
r_dict = response.json()
step_payload["_response"] = r_dict
Expand Down