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

File name of zip-archives alternates between 1 and 2 digits #106

Open
andgdk opened this issue Nov 24, 2024 · 1 comment
Open

File name of zip-archives alternates between 1 and 2 digits #106

andgdk opened this issue Nov 24, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers up-for-grabs https://up-for-grabs.net/

Comments

@andgdk
Copy link
Contributor

andgdk commented Nov 24, 2024

Brief bug description

The file name of zip-archives generated with timestamps could be improved to keep a consistent number of digits.
Running a backup at between 12:00 and 12:09
results in a file name of e.g.
2024-11-12-12-8-backup-ENVIRONMENT-ID but should likely be
2024-11-12-12-08-backup-ENVIRONMENT-ID.

Ensuring lower digits to start with 0 guarantees the zip archives to be in order of their creation when sorting files alphabetically in a file explorer or consuming archives in automations that relay on the file name.

Repro steps

  1. Time the following execution to happen between a full hour and 9 minutes past the hour.
  2. Execute npx @kontent-ai/data-ops@latest environment backup --environmentId=<environment-id> --apiKey=<Management-API-key>
  3. Observe the file name of the zip-archive.

Expected behavior

Consistent alphabetical and historical order.

Test environment

  • Windows 11
  • Node 22.10.0
  • Node uses a 24 h scheme

Additional context

This is a minor issue, being the purpose of documentation.
It has not been tested if this also applies to months or days (or hours - getting up to late xD).

Screenshots

No response

@IvanKiral
Copy link
Contributor

Thanks for the issue :) we will look at this later as it is a minor issue, in the meantime I will set the appropriate tags for this :)

@IvanKiral IvanKiral added bug Something isn't working good first issue Good for newcomers up-for-grabs https://up-for-grabs.net/ labels Dec 4, 2024
andgdk added a commit to andgdk/kontent-ai-data-ops that referenced this issue Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers up-for-grabs https://up-for-grabs.net/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants