-
Notifications
You must be signed in to change notification settings - Fork 223
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
Fix uploadToS3 import path #5472
Conversation
This reverts commit e4573d5. It's still being imported from src/scripts/build/uploadAutoCompleteLocations.js, so it can't be plain TypeScript yet.
Also change back to a regular import; I don't think it does much harm to import it when unnecessary, and potentially obfuscates invalid import paths.
@@ -27,6 +27,7 @@ import os from "os"; | |||
import path from "path"; | |||
import fs from "fs"; | |||
import AdmZip from "adm-zip"; | |||
import { uploadToS3 } from "../../utils/s3.js"; |
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.
Note the changed path - but also, @rhelmer, you explicitly made this into a dynamic import here:
Was that just to avoid importing it if not used? Because I think that potentially obscures the path being invalid, so I changed it to a regular import - but let me know if there's another reason.
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.
IIRC it was to be able to run this locally more easily when setting up a new dev env, I'm fine changing it as long as it works. It was added in #4949
Preview URL 🚀 : https://blurts-server-pr-5472-mgjlpikfea-uk.a.run.app |
@@ -27,6 +27,7 @@ import os from "os"; | |||
import path from "path"; | |||
import fs from "fs"; | |||
import AdmZip from "adm-zip"; | |||
import { uploadToS3 } from "../../utils/s3.js"; |
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.
IIRC it was to be able to run this locally more easily when setting up a new dev env, I'm fine changing it as long as it works. It was added in #4949
Cleanup completed - database 'blurts-server-pr-5472' destroyed, cloud run service 'blurts-server-pr-5472' destroyed |
This potentially fixes MNTOR-3922 as well, since the icon upload imported from the
.js
file:blurts-server/src/scripts/cronjobs/syncBreaches.ts
Line 22 in d91f5a5
I reverted
s3.ts
back to a JS file because it was still being imported from the JS upload script. Or at least, it was supposed to, as that had the wrong path.