Open EvoXCX opened 4 months ago
The error indicates an error in your toml config file.
Expected ']' at the end of a table declaration (at line 1, column 25)
This Error says that the first line is wrong, after the 25th character, it expects a ]
(I assume the 25. character is a "
?).
The snippet you posted is AFAIU only a part of your whole config, right? At least with the snippet, the parser doesn't throw an error when I test it.
Otherwise can you post the very first line of your configfile?
It might also help to put your toml config through something such as toml-lint to make sure it's valid TOML.
Hello @Melkor333,
%D is not supported apparently by pyaptly, snapshots works with a "normal" name. All my snapshot configuration is in the upper issue, I use separate files to do what I need.
Hello @Melkor333,
%D is not supported apparently by pyaptly, snapshots works with a "normal" name. All my snapshot configuration is in the upper issue, I use separate files to do what I need.
Hm strange that it already fails at parsing anyway. But yeah the only thing that works right now is %T
, which includes some manual parsing IIRC.
You'd like to only have the day with %D
, right?
That may be something to put in the backlog -> Allow all kinds of Date/Time formats...
Yeah, this is exactly what I want to do.
%D
won't do anything for you. %T
is a feature implemented in pyaptly. It means that you get snapshots with their retention managed by pyaptly. I guess it was a bad idea to name it %T
, as it suggests other known %X
placeholders will work.
But I was confused, why you get a parse error. You should get a snapshot that is literally named bookworm-main-%D
. I tried to reproduce this problem. Exactly what I described happened, I cannot reproduce. Did you install the exact version defined in poetry.lock
? No need to actually invest time into this, as you'll just get a snapshot that is literally named bookworm-main-%D
. I just mention this for future reference.
As for supporting %D
is don't see a reason to do that. How the timestamps work will never be selectable by the user, at it is deeply connected to the retention algorithm. We could format the timestamp different, but that opens the door for many bugs, for no apparent advantage.
Fair argument against generalizing %T
! maybe a "solution" would be to completely hide this from the user (and therefore also eliminate configuration errors) by having an additional flag like:
[snapshot."bookworm-main"]
mirror = "bookworm-main"
add_timestamp = true
That would also mean we don't need to parse the snapshot name to see if it has timestamps.
That would also mean we don't need to parse the snapshot name to see if it has timestamps.
That is a great proposal!
Hello, I have a problem with creating snapshots with PyAPTly, it raise an error say I do not respect the syntax, nothing wrong with my configuration file as it's the same as provided by examples.
For example my bookworm snapshots from existing mirrors I created.
Command issued:
pyaptly snapshot snapshots_bookworm.toml create
Here is the full error with Traceback in case of this issue need to go further:
Thanks in advance for your help 😄