Skip to content

Switch from Common JS to ES Modules, multiple file exports, use full IPs#3

Merged
kookster merged 11 commits intomainfrom
feat/es_multi_config
Feb 24, 2026
Merged

Switch from Common JS to ES Modules, multiple file exports, use full IPs#3
kookster merged 11 commits intomainfrom
feat/es_multi_config

Conversation

@kookster
Copy link
Copy Markdown
Member

@kookster kookster commented Jan 25, 2026

  • Switch from Common JS to ES Modules
  • Multiple file exports, in array of config values
  • Conditionally allow full IPs

@kookster kookster requested a review from cavis February 12, 2026 18:40
@cavis cavis changed the base branch from main to feat/node24-upgrade February 12, 2026 18:43
Copy link
Copy Markdown
Member

@cavis cavis left a comment

Choose a reason for hiding this comment

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

Couple questions, but looks good to me. And also... huzzah tests!

return cachedConfigs;
} catch (error) {
console.error(`Error loading configurations from S3: ${error.message}`);
throw error;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, so if we fail to load config, just throw an error. And hopefully we retry this batch of S3 log files later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, I think that's the right thing - no config, no processing

});

describe("loadConfigs", () => {
test("should load configurations successfully from S3", async () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Testing things FTW!

return PODCAST_IDS.includes(parseInt(data["prx-podcast-id"]));
});

const currentFields = [...originalFields];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Github not formatting this diff very nicely... but it seems like you're implying different destinations may get a different set of fields now? (Not the same for everyone).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just keeping track of which were the original fields, which were derived from the initial rows in the file, and which are fields we are adding.

I did think at one point that different files could have different rows, but also just looking to making it clearer to future me which cols we added, and when we are adding columns.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I also moved a few things out of the config loop, and made the initialRows usage clearer, which may make the diff a bit easier to read, and the code slightly more efficient.

- LogBucket
- LogPrefix
- DestinationBucket
- DestinationPrefix
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this was unused for permissions

Copy link
Copy Markdown
Member

@cavis cavis left a comment

Choose a reason for hiding this comment

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

👍

Base automatically changed from feat/node24-upgrade to main February 24, 2026 15:16
@kookster kookster merged commit d7cdaf7 into main Feb 24, 2026
3 checks passed
@kookster kookster deleted the feat/es_multi_config branch February 24, 2026 15:18
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