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

Removing console.log() from legacy migrations #374

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Conversation

rvsiyad
Copy link
Contributor

@rvsiyad rvsiyad commented Jan 12, 2024

DEFRA/water-abstraction-team#91

This PR is focusing on removing console.log() from legacy migrations as per Teams issue. When working on DEFRA/water-abstraction-service#2227 we again broke GitHub CI because of the volume of output from our migrations.

In DEFRA/water-abstraction-team#65 we thought we'd dealt with the issue believing that db-mgrate's verbose() argument was to blame.

Looking into the issue in the stuck bill run we came across a db-migrate/node-db-migrate#453 (comment) that gave us a 🤦 !

The db-migrate template used when generating migrations includes a console.log() that outputs the migration file read in. So, though we might not be outputting all the SQL being fired, we are still outputting the contents of every single migration file!

We definitely don't need to see this and it should remove the chance of us breaking the build in this way once and for all.

So, this issue is about going into the existing migrations and removing the 2 console.log('received data: ' + data) lines in each across all repos.

DEFRA/water-abstraction-team#91

This PR is focusing on removing console.log() from legacy migrations as per Teams issue. When working on DEFRA/water-abstraction-service#2227 we again broke GitHub CI because of the volume of output from our migrations.

In DEFRA/water-abstraction-team#65 we thought we'd dealt with the issue believing that db-mgrate's verbose() argument was to blame.

Looking into the issue in the stuck bill run we came across a db-migrate/node-db-migrate#453 (comment) that gave us a 🤦 !

The db-migrate template used when generating migrations includes a console.log() that outputs the migration file read in. So, though we might not be outputting all the SQL being fired, we are still outputting the contents of every single migration file!

We definitely don't need to see this and it should remove the chance of us breaking the build in this way once and for all.

So, this issue is about going into the existing migrations and removing the 2 console.log('received data: ' + data) lines in each across all repos.
@rvsiyad rvsiyad self-assigned this Jan 12, 2024
@rvsiyad rvsiyad added the housekeeping Refactoring, tidying up or other work which supports the project label Jan 12, 2024
@rvsiyad rvsiyad marked this pull request as ready for review January 12, 2024 16:19
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

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

@rvsiyad rvsiyad merged commit d895e10 into main Jan 15, 2024
4 checks passed
@rvsiyad rvsiyad deleted the removing-console-logs branch January 15, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants