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

USAGOV-1982-event-log-revision: Add revision number to cf event log entries, to aid in NR queries #1979

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

arpage
Copy link
Collaborator

@arpage arpage commented Sep 25, 2024

Jira Task

https://cm-jira.usa.gov/browse/USAGOV-1982

Description

Type of Changes

  • New Feature
  • Bugfix
  • Frontend (Twig, Sass, JS)
    • Add screenshot showing what it should look like
  • Drupal Config (requires "drush cim")
  • New Modules (requires rebuild)
  • Documentation
  • Infrastructure
    • CMS
    • WAF
    • WWW
    • Egress
    • Tools
    • Cron
  • Other

Testing Instructions

  • I set up a specific value for mobomo.logrev.cfevent = "0.1.1"
  • Then, I deployed the code to DR that would add that logrev to cfevents
  • (that generated a couple appstop/appstart events at the time of deployment)
  • I verified I could see those in NR, using the logrev as the query
  • Then, I deleted the logs.lastrun from s3 (which makes get-events go back a month or so) See Below
  • I added a date range of the 5 minutes around the deployment time, to verify all I saw was the expected appstart/appstop messages.
  • Then, I removed the date range from the query and added "last 7 days" - after which I got a bunch more cf events in the results.

So, based on that it looks like NR is accepting my timestamp as the event time

# Delete logs.lastrun causing the cfevents cron job to get all available past events
SPACE=dr                                          
. bin/cloudgov/get-s3-access cron-event-storage $SPACE
aws s3 rm s3://$S3_BUCKET/cfevents/$SPACE/logs.lastrun

Change Requirements

  • Requires New Documentation (Link: {})
  • Requires New Config
  • Requires New Content

Validation Steps

  • Test instruction 1
  • Test instruction 2
  • Test instruction 3

Security Review

  • Adds/updates software (including a library or Drupal module)
  • Communication with external service
  • Changes permissions or workflow
  • Requires SSPP updates

Reviewer Reminders

  • Reviewed code changes
  • Reviewed functionality
  • Security review complete or not required

Post PR Approval Instructions

Follow these steps as soon as you merge the new changes.

  1. Go to the USAGov Circle CI project.
  2. Find the commit of this pull request.
  3. Build and deploy the changes.
  4. Update the Jira ticket by changing the ticket status to Review in Test and add a comment. State whether the change is already visible on cms-dev.usa.gov and beta-dev.usa.gov, or if the deployment is still in process.

Copy link
Member

@akf akf left a comment

Choose a reason for hiding this comment

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

This looks totally safe!

@akf akf merged commit fdb33c9 into dev Sep 27, 2024
5 of 6 checks passed
@akf akf deleted the USAGOV-1982-event-log-revision branch September 27, 2024 18:16
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.

2 participants