ChainSafe / forest-iac

Infrastructure as Code to support the Forest Filecoin project
Apache License 2.0
10 stars 5 forks source link

chore: forest-archive dns migration to forest-internal #453

Closed samuelarogbonlo closed 3 months ago

samuelarogbonlo commented 3 months ago

Summary of changes Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

github-actions[bot] commented 3 months ago

Forest: Snapshot Service Infrastructure Plan: success

Show Plan ``` newrelic_notification_channel.slack-channel[0]: Refreshing state... [id=2b6082f7-06e3-4947-b2bd-5ae0691038b6] newrelic_alert_policy.alert: Refreshing state... [id=1319060] newrelic_synthetics_script_monitor.snapshot-age-monitor: Refreshing state... [id=Mzk0MjU3NXxTWU5USHxNT05JVE9SfGNlNjIyNmVhLWQ0MGEtNDE2OS1hNWQ2LWNjYjBiZTk4OTdhNA] newrelic_notification_channel.pagerduty-channel[0]: Refreshing state... [id=6f147e42-38c3-4eef-9246-00c4dfd68da7] newrelic_nrql_alert_condition.failing-snapshot-age: Refreshing state... [id=1319060:5975451] newrelic_workflow.alerting-workflow-slack[0]: Refreshing state... [id=81a87711-6a9b-41c6-b35a-8fc073c82832] newrelic_workflow.alerting-workflow-pagerduty[0]: Refreshing state... [id=b19c03a4-3b85-4bec-9bb5-3b23b9c77c7c] Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # newrelic_synthetics_script_monitor.snapshot-age-monitor will be updated in-place ~ resource "newrelic_synthetics_script_monitor" "snapshot-age-monitor" { id = "Mzk0MjU3NXxTWU5USHxNT05JVE9SfGNlNjIyNmVhLWQ0MGEtNDE2OS1hNWQ2LWNjYjBiZTk4OTdhNA" name = "prod-snapshot-age-monitor" ~ script = <<-EOT // eslint-disable-next-line @typescript-eslint/no-var-requires -- "approved" methods of resolving this lint do not work in the NR context. var assert = require("assert"); function check_snapshot(url, genesisTime) { // eslint-disable-next-line @typescript-eslint/no-unused-vars -- that's how the callback works in this context. var callback = function (_err, response, _body) { assert.equal(response.statusCode, 200, "Expected a 200 OK response"); var snapshotName = response.url.split("/").pop(); var height = snapshotName.match(/height_(\d+)/)[1]; var currentTime = Math.floor(Date.now() / 1000); var snapshotTime = height * 30 + genesisTime; var snapshotAgeInMinutes = (currentTime - snapshotTime) / 60; assert( snapshotAgeInMinutes < 360, "Expected snapshot to be less than 360 minutes old" ); }; // This variable is provided by New Relic. // eslint-disable-next-line no-undef $http.head(url, callback); } check_snapshot( - "https://forest-archive.chainsafe.dev/latest/calibnet/", + "https://forest-internal.chainsafe.dev/latest/calibnet/", 1667326380 ); check_snapshot( - "https://forest-archive.chainsafe.dev/latest/mainnet/", + "https://forest-internal.chainsafe.dev/latest/mainnet/", 1598306400 ); EOT # (10 unchanged attributes hidden) # (1 unchanged block hidden) } Plan: 0 to add, 1 to change, 0 to destroy. ───────────────────────────────────────────────────────────────────────────── Saved the plan to: /home/runner/work/forest-iac/forest-iac/tfplan To perform exactly these actions, run the following command to apply: terraform apply "/home/runner/work/forest-iac/forest-iac/tfplan" ```
LesnyRumcajs commented 3 months ago

Any reason you omitted these?

images/snapshot-service/src/upload_snapshot.sh|71 col 40| for i in {1..5}; do aria2c -x5 https://forest-archive.chainsafe.dev/latest/$CHAIN_NAME/ && break || sleep 15; done
tf-managed/modules/snapshot-monitoring/README.md|4 col 12| - <https://forest-archive.chainsafe.dev/mainnet/latest/>
tf-managed/modules/snapshot-monitoring/README.md|5 col 12| - <https://forest-archive.chainsafe.dev/calibnet/latest/>
hanabi1224 commented 3 months ago

LGTM. Just one nit, from a normal user's perspective, internal in the URL is a bit surprising and makes me double check if it's the proper link, public look more proper to me

LesnyRumcajs commented 3 months ago

LGTM. Just one nit, from a normal user's perspective, internal in the URL is a bit surprising and makes me double check if it's the proper link, public look more proper to me

To my understanding, the entire internal (and so quite a bit of code in this repository) will soon go, and before that, it shouldn't be used outside of the Forest team.

samuelarogbonlo commented 3 months ago

Any reason you omitted these?

images/snapshot-service/src/upload_snapshot.sh|71 col 40| for i in {1..5}; do aria2c -x5 https://forest-archive.chainsafe.dev/latest/$CHAIN_NAME/ && break || sleep 15; done
tf-managed/modules/snapshot-monitoring/README.md|4 col 12| - <https://forest-archive.chainsafe.dev/mainnet/latest/>
tf-managed/modules/snapshot-monitoring/README.md|5 col 12| - <https://forest-archive.chainsafe.dev/calibnet/latest/>

@LesnyRumcajs None just missed them.