Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 5 additions & 3 deletions .github/workflows/ko-build-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Publish Tagged Release
- v*

env:
COSIGN_VERSION: v2.6.1
COSIGN_VERSION: v3.0.2
HELM_VERSION: 4.0.1

permissions:
Expand Down Expand Up @@ -116,8 +116,10 @@ jobs:
actions: read
id-token: write
packages: write
uses: >- # v2.1.0
slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@f7dd8c54c2067bafc12ca7a55595d5ee9b75204a
# Note, this action *cannot* be pinned to a ref: see the project's
# explanation at "Referencing SLSA builders and generators" in their
# README.
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0
with:
image: ${{ needs.release-helm-chart.outputs.image_name }}
digest: ${{ needs.release-helm-chart.outputs.digest }}
Expand Down
2 changes: 1 addition & 1 deletion charts/lfx-v1-sync-helper/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ apiVersion: v2
name: lfx-v1-sync-helper
description: LFX Platform v1 Sync Helper chart
type: application
version: 0.3.5
version: 0.3.6
60 changes: 42 additions & 18 deletions cmd/lfx-v1-sync-helper/handlers_meetings.go
Original file line number Diff line number Diff line change
Expand Up @@ -1113,19 +1113,27 @@ func convertInviteeToV2Participant(ctx context.Context, invitee *ZoomPastMeeting
if invitee.CreatedAt != "" {
createdAt, err := time.Parse(time.RFC3339, invitee.CreatedAt)
if err != nil {
logger.With(errKey, err, "created_at", invitee.CreatedAt).ErrorContext(ctx, "failed to parse created_at")
return nil, fmt.Errorf("failed to parse created_at: %w", err)
logger.With(errKey, err,
"created_at", invitee.CreatedAt,
"invitee_id", invitee.ID,
"meeting_and_occurrence_id", invitee.MeetingAndOccurrenceID,
).WarnContext(ctx, "failed to parse created_at")
} else {
pastMeetingParticipant.CreatedAt = &createdAt
}
pastMeetingParticipant.CreatedAt = &createdAt
}

if invitee.ModifiedAt != "" {
modifiedAt, err := time.Parse(time.RFC3339, invitee.ModifiedAt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to the change you made, but I'm assuming our source data is kinda inconsistent with the dates, so maybe we could try different date formats to actually get the data into v2 as much as possible.

Here's an example (not elegant at first glance, I know, but it works when the source doesn't follow a pattern):

Maybe this could be a backlog ticket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good idea, though in this case somehow that field actually got the value left the meeting. Reason : left the meeting (the leave reason being stored as the leave time, not sure if it's itx-zoom's fault or bad data in the Zoom webhook itself.

Also I believe Meltano is actually be doing some date normalization already. I just checked the autodetected/built Dynamo ingest scheme, and these are getting considered as datetime fields—and while we turned off schema validation for Dynamo-replicated data, because it was so inconsistent—meaning individual fields are coming across with different schemas, so some records will be a "string" instead of a "datetime"—the ones that do get parsed as a datetime are, I believe, converted to python datetime.datetime in transit, and then back to JSON.

if err != nil {
logger.With(errKey, err, "modified_at", invitee.ModifiedAt).ErrorContext(ctx, "failed to parse modified_at")
return nil, fmt.Errorf("failed to parse modified_at: %w", err)
logger.With(errKey, err,
"modified_at", invitee.ModifiedAt,
"invitee_id", invitee.ID,
"meeting_and_occurrence_id", invitee.MeetingAndOccurrenceID,
).WarnContext(ctx, "failed to parse modified_at")
} else {
pastMeetingParticipant.UpdatedAt = &modifiedAt
}
pastMeetingParticipant.UpdatedAt = &modifiedAt
}
if invitee.OrgIsMember != nil {
pastMeetingParticipant.OrgIsMember = *invitee.OrgIsMember
Expand Down Expand Up @@ -1311,19 +1319,27 @@ func convertAttendeeToV2Participant(ctx context.Context, attendee *PastMeetingAt
if attendee.CreatedAt != "" {
createdAt, err := time.Parse(time.RFC3339, attendee.CreatedAt)
if err != nil {
logger.With(errKey, err, "created_at", attendee.CreatedAt).ErrorContext(ctx, "failed to parse created_at")
return nil, fmt.Errorf("failed to parse created_at: %w", err)
logger.With(errKey, err,
"created_at", attendee.CreatedAt,
"attendee_id", attendee.ID,
"meeting_and_occurrence_id", attendee.MeetingAndOccurrenceID,
).WarnContext(ctx, "failed to parse created_at")
} else {
pastMeetingParticipant.CreatedAt = &createdAt
}
pastMeetingParticipant.CreatedAt = &createdAt
}

if attendee.ModifiedAt != "" {
modifiedAt, err := time.Parse(time.RFC3339, attendee.ModifiedAt)
if err != nil {
logger.With(errKey, err, "modified_at", attendee.ModifiedAt).ErrorContext(ctx, "failed to parse modified_at")
return nil, fmt.Errorf("failed to parse modified_at: %w", err)
logger.With(errKey, err,
"modified_at", attendee.ModifiedAt,
"attendee_id", attendee.ID,
"meeting_and_occurrence_id", attendee.MeetingAndOccurrenceID,
).WarnContext(ctx, "failed to parse modified_at")
} else {
pastMeetingParticipant.UpdatedAt = &modifiedAt
}
pastMeetingParticipant.UpdatedAt = &modifiedAt
}

if attendee.OrgIsMember != nil {
Expand All @@ -1343,19 +1359,27 @@ func convertAttendeeToV2Participant(ctx context.Context, attendee *PastMeetingAt
if session.JoinTime != "" {
joinTime, err := time.Parse(time.RFC3339, session.JoinTime)
if err != nil {
logger.With(errKey, err, "join_time", session.JoinTime).ErrorContext(ctx, "failed to parse join_time")
return nil, fmt.Errorf("failed to parse join_time: %w", err)
logger.With(errKey, err,
"join_time", session.JoinTime,
"attendee_id", attendee.ID,
"meeting_and_occurrence_id", attendee.MeetingAndOccurrenceID,
).WarnContext(ctx, "failed to parse join_time")
} else {
participantSession.JoinTime = &joinTime
}
participantSession.JoinTime = &joinTime
}

if session.LeaveTime != "" {
leaveTime, err := time.Parse(time.RFC3339, session.LeaveTime)
if err != nil {
logger.With(errKey, err, "leave_time", session.LeaveTime).ErrorContext(ctx, "failed to parse leave_time")
return nil, fmt.Errorf("failed to parse leave_time: %w", err)
logger.With(errKey, err,
"leave_time", session.LeaveTime,
"attendee_id", attendee.ID,
"meeting_and_occurrence_id", attendee.MeetingAndOccurrenceID,
).WarnContext(ctx, "failed to parse leave_time")
} else {
participantSession.LeaveTime = &leaveTime
}
participantSession.LeaveTime = &leaveTime
}

pastMeetingParticipant.Sessions = append(pastMeetingParticipant.Sessions, participantSession)
Expand Down