-
Notifications
You must be signed in to change notification settings - Fork 0
More resiliance and observability to EMMA #57
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
migrations/20260316120000-token-pool-download-observability.js
This file contains hidden or 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,49 @@ | ||
| 'use strict'; | ||
|
|
||
| var dbm; | ||
| var type; | ||
| var seed; | ||
| var fs = require('fs'); | ||
| var path = require('path'); | ||
| var Promise; | ||
|
|
||
| exports.setup = function(options, seedLink) { | ||
| dbm = options.dbmigrate; | ||
| type = dbm.dataType; | ||
| seed = seedLink; | ||
| Promise = options.Promise; | ||
| }; | ||
|
|
||
| exports.up = function(db) { | ||
| var filePath = path.join(__dirname, 'sqls', '20260316120000-token-pool-download-observability-up.sql'); | ||
| return new Promise( function( resolve, reject ) { | ||
| fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ | ||
| if (err) return reject(err); | ||
| console.log('received data: ' + data); | ||
|
|
||
| resolve(data); | ||
| }); | ||
| }) | ||
| .then(function(data) { | ||
| return db.runSql(data); | ||
| }); | ||
| }; | ||
|
|
||
| exports.down = function(db) { | ||
| var filePath = path.join(__dirname, 'sqls', '20260316120000-token-pool-download-observability-down.sql'); | ||
| return new Promise( function( resolve, reject ) { | ||
| fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ | ||
| if (err) return reject(err); | ||
| console.log('received data: ' + data); | ||
|
|
||
| resolve(data); | ||
| }); | ||
| }) | ||
| .then(function(data) { | ||
| return db.runSql(data); | ||
| }); | ||
| }; | ||
|
|
||
| exports._meta = { | ||
| "version": 1 | ||
| }; |
14 changes: 14 additions & 0 deletions
14
migrations/sqls/20260316120000-token-pool-download-observability-down.sql
This file contains hidden or 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,14 @@ | ||
| ALTER TABLE token_pool_download | ||
| DROP COLUMN progress, | ||
| DROP COLUMN stage, | ||
| DROP COLUMN attempt_count, | ||
| DROP COLUMN last_failure_reason, | ||
| DROP COLUMN last_failure_at, | ||
| DROP COLUMN failure_count, | ||
| DROP COLUMN error_reason, | ||
| DROP COLUMN failed_at, | ||
| DROP COLUMN completed_at, | ||
| DROP COLUMN last_heartbeat_at, | ||
| DROP COLUMN claimed_at, | ||
| DROP COLUMN updated_at, | ||
| DROP COLUMN created_at; |
14 changes: 14 additions & 0 deletions
14
migrations/sqls/20260316120000-token-pool-download-observability-up.sql
This file contains hidden or 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,14 @@ | ||
| ALTER TABLE token_pool_download | ||
| ADD COLUMN created_at BIGINT NULL, | ||
| ADD COLUMN updated_at BIGINT NULL, | ||
| ADD COLUMN claimed_at BIGINT NULL, | ||
| ADD COLUMN last_heartbeat_at BIGINT NULL, | ||
| ADD COLUMN completed_at BIGINT NULL, | ||
| ADD COLUMN failed_at BIGINT NULL, | ||
| ADD COLUMN error_reason LONGTEXT NULL, | ||
| ADD COLUMN failure_count INT NOT NULL DEFAULT 0, | ||
| ADD COLUMN last_failure_at BIGINT NULL, | ||
| ADD COLUMN last_failure_reason LONGTEXT NULL, | ||
| ADD COLUMN attempt_count INT NOT NULL DEFAULT 0, | ||
| ADD COLUMN stage VARCHAR(64) NULL, | ||
| ADD COLUMN progress LONGTEXT NULL; |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: 6529-Collections/allowlist-api
Length of output: 4737
🏁 Script executed:
Repository: 6529-Collections/allowlist-api
Length of output: 1456
🏁 Script executed:
Repository: 6529-Collections/allowlist-api
Length of output: 848
Synchronize package.json and package-lock.json for
@6529-collections/allowlist-lib.The package.json declares version 0.0.131, but package-lock.json is still locked to 0.0.124. This mismatch will cause inconsistent dependency resolution across environments. Regenerate the lock file by running
npm install(ornpm ciafter install) to ensure package-lock.json reflects the version specified in package.json, or revert package.json to 0.0.124 if 0.0.131 is not yet available on GitHub Package Registry.🤖 Prompt for AI Agents