Skip to content

Conversation

@savokr-asana
Copy link
Contributor

@savokr-asana savokr-asana commented Jun 23, 2025

Description
This PR introduces support for handling updates of PR description/comments and updating corresponding attachments in asana task.

Test
Added unit tests are passing, added tests for all new functions.

Pull Request synchronized with Asana task
Pull Request: #212

Copy link
Contributor Author

savokr-asana commented Jun 23, 2025

@savokr-asana savokr-asana changed the title Implement dynamodb based attachments update feat: Add support for handling PR updates in asana task attachments Jun 23, 2025
@savokr-asana savokr-asana assigned savokr-asana and vn6 and unassigned savokr-asana Jun 23, 2025
@savokr-asana savokr-asana requested a review from vn6 June 23, 2025 16:41
@savokr-asana savokr-asana marked this pull request as ready for review June 23, 2025 16:41
Copy link
Contributor

@vn6 vn6 left a comment

Choose a reason for hiding this comment

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

functionality looks good! just a couple comments to clean up the logic here

]

# Update the attachments mapping in DynamoDB
dynamodb_client.update_attachments_for_github_node(github_node_id, new_attachments)
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be simplified to just use the current_asset_ids instead of creating a new list for new_attachments (though would need to fix types)

Suggested change
dynamodb_client.update_attachments_for_github_node(github_node_id, new_attachments)
dynamodb_client.update_attachments_for_github_node(github_node_id, current_asset_ids)

and change the for loop above to just go through assets_to_create

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure I got your point but I feel like current implementation is good enough. We can't change the types for update_attachments function since it need the full attachments information, not just asset_ids. I've renamed some of the variables to make things more clear but don't really see that it can be simplified further. Also, attachments count should be really low, no more than around 10, so I don't think it will have any performance impact either.

@asana-sgtm asana-sgtm bot assigned savokr-asana and unassigned vn6 Jun 23, 2025
@savokr-asana savokr-asana force-pushed the saveliinovikov-update-asana-attachments branch from 7ef0ccc to 9bcaf06 Compare June 24, 2025 10:14
Base automatically changed from saveliinovikov-add-media-attachments to master June 24, 2025 11:37
@savokr-asana savokr-asana force-pushed the saveliinovikov-update-asana-attachments branch from 9bcaf06 to 741b957 Compare June 24, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants