-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jgasiorek-ffs-880
- Loading branch information
Showing
9 changed files
with
114 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Cbv::AgreementsController < Cbv::BaseController | ||
def show | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<h1><%= t('.header') %></h1> | ||
<p><%= t('.subheader') %></p> | ||
<ul> | ||
<li><%= t('.step1') %></li> | ||
<li><%= t('.step2') %></li> | ||
<li><%= t('.step3') %></li> | ||
<li><%= t('.step4') %></li> | ||
<li><%= t('.step5') %></li> | ||
</ul> | ||
|
||
<div class="usa-alert usa-alert--info margin-bottom-3 margin-top-3"> | ||
<div class="usa-alert__body"> | ||
<p class="usa-alert__text"> | ||
<%= t('.information_is_secure') %> | ||
</p> | ||
</div> | ||
</div><p class="text-bold"><%= t('.by_continuing') %></p> | ||
|
||
<%= link_to next_path do %> | ||
<button class="usa-button usa-button--outline" type="button"> | ||
<%= t('.continue') %> | ||
</button> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module NewRelicEventTracker | ||
def self.track(event_type, attributes = {}) | ||
Rails.logger.info "Sending New Relic event: #{event_type} with attributes: #{attributes}" | ||
response = NewRelic::Agent.record_custom_event(event_type, attributes) | ||
Rails.logger.info "New Relic event sent" | ||
response | ||
rescue StandardError => e | ||
Rails.logger.error "Failed to send New Relic event: #{e.message}" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'rails_helper' | ||
require 'new_relic_event_tracker' | ||
|
||
RSpec.describe NewRelicEventTracker do | ||
describe '.track' do | ||
let(:event_type) { 'TestEvent' } | ||
let(:attributes) { { key: 'value' } } | ||
|
||
it 'calls NewRelic::Agent.record_custom_event with correct parameters' do | ||
expect(NewRelic::Agent).to receive(:record_custom_event).with(event_type, attributes) | ||
described_class.track(event_type, attributes) | ||
end | ||
|
||
context 'when an error occurs' do | ||
before do | ||
allow(NewRelic::Agent).to receive(:record_custom_event).and_raise(StandardError.new('Test error')) | ||
end | ||
|
||
it 'logs an error message' do | ||
expect(Rails.logger).to receive(:error).with("Failed to send New Relic event: Test error") | ||
described_class.track(event_type, attributes) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Deploy Failure Runbook | ||
|
||
Add documentation to this runbook to help future us diagnose deploy problems. | ||
|
||
|
||
## Failed "Run Migration" Github Action | ||
|
||
This action sometimes fails when "Waiting for log stream to be created". This means the container running migrations failed to start for some reason. | ||
|
||
You can see the container startup error by going to the AWS ECS service and changing "Filter Desired Status" to "Any Desired Status": | ||
* https://us-east-1.console.aws.amazon.com/ecs/v2/clusters/app-dev/services/app-dev/tasks?region=us-east-1 | ||
|
||
<details> | ||
<summary> | ||
<strong>ResourceInitializationError: unable to pull secrets or registry auth</strong> | ||
</summary> | ||
Did you (or someone else) add an environment variable lately? You may need to run `make infra-update-app-service APP_NAME=app ENVIRONMENT=dev` in order for Terraform to give the ECS task executor user permission to pull the value of the environment variable. | ||
</details> | ||
|
||
## Unsure what version is deployed? | ||
|
||
If you're not sure what version of code is currently deployed, follow these steps to understand the state of the last deploy: | ||
|
||
1. Check the latest Github commit and whether it was successfully deployed | ||
2. Check the healthcheck endpoint: https://{host}/health | ||
3. Check the AWS ECS task definition to see what version of the container image is supposed to be used. | ||
|
||
## Failed "Build release" step | ||
|
||
This action sometimes fails when the Docker rate limit has been reached: | ||
|
||
> ERROR: failed to solve: registry.docker.com/library/ruby:3.3.0-slim: failed to copy: httpReadSeeker: failed open: unexpected status code https://registry.docker.com/v2/library/ruby/manifests/sha256:{commit sha}: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit | ||
Docker is likely rate limiting pulling of the Ruby image. This limit resets every 6 hours. Still, Github uses multiple IPs to make egress calls. **Simply redeploying the workflow usually works.** [Further discussion](https://nava.slack.com/archives/C06FC5TPAR3/p1719865408255839?thread_ts=1719862944.272089&cid=C06FC5TPAR3). | ||
|
||
|