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

fix(cli): fixed runtime metadata filename not being valid (special characters) for all platforms #1322

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

EduardWayland
Copy link
Contributor

This PR should solve the issue #1318.
I have noticed that in the latest version of Genkit (0.9.X), the filename of runtime follows the format ${process.pid}-${timestamp}.json as in the writeRuntimeFile(). However, the produced filename is not a valid name on Windows due to the timestamp part which contains reserved characters such as ":".

What happens next is that when you try to run any kind of script using genkit library, the runtime file won't be generated due to
invalid filename: "Error writing runtime file: Error: ENOENT: no such file or directory, open '.genkit\runtimes\42744-2024-11-18T12:17:25.549Z.json'

As I don't know exactly the purpose of the ISO format in the filename, I've replaced that format with the milliseconds.

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Changelog #updated
  • Docs updated

@pavelgj
Copy link
Collaborator

pavelgj commented Nov 18, 2024

Thanks for the fix! LGTM

@pavelgj pavelgj changed the title Fixed filename not being valid for all platforms fix: fixed runtime metadata filename not being valid (special characters) for all platforms Nov 18, 2024
@pavelgj pavelgj changed the title fix: fixed runtime metadata filename not being valid (special characters) for all platforms fix(cli): fixed runtime metadata filename not being valid (special characters) for all platforms Nov 18, 2024
@pavelgj pavelgj merged commit 932ac6d into firebase:main Nov 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants