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

Remove unwanted test logs #1085

Merged
merged 2 commits into from
Jan 10, 2024
Merged

Remove unwanted test logs #1085

merged 2 commits into from
Jan 10, 2024

Conversation

ashwinisukale
Copy link
Contributor

@ashwinisukale ashwinisukale commented Jan 10, 2024

Purpose

Log a message when we send a message from Lupo to SQS.

Approach

Open Questions and Pre-Merge TODOs

Learning

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

@ashwinisukale ashwinisukale requested a review from a team January 10, 2024 08:52
if relevant_changes.any? || (created == updated)
send_import_message(to_jsonapi)
Rails.logger.info "[Event Data Import Message] send to Event Data service. #{aasm_state} #{to_jsonapi} "
Rails.logger.info "[Event Data Import Message] State: #{aasm_state} Params: #{to_jsonapi} message sent to Event Data service."
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@richardhallett I feel we should have this log which confirms that we did send a message from Lupo to Sqs. Right now there is no way to verify if Lupo sent a message correctly to sqs or not.

I would love to hear your thoughts on this, as I am adding some logs which might increase storage cost.

Copy link
Contributor

Choose a reason for hiding this comment

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

Something that might help if I understand this correctly. The AWS::SQS::Client.send_message does return a result -> https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Client.html#send_message-instance_method.

So you could get the result (https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SQS/Types/SendMessageResult.html) by simply saving the value returned by send_import_message.

result = send_import_message(to_jsonapi)

Copy link
Contributor

@richardhallett richardhallett left a comment

Choose a reason for hiding this comment

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

As per slack, go with it for now, we can adjust if causes us too much traffic in the logs.

@ashwinisukale ashwinisukale merged commit 3723171 into master Jan 10, 2024
13 checks passed
@ashwinisukale ashwinisukale deleted the remove_log branch January 10, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants