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

Feature: history / status #400

Open
shawn111 opened this issue Feb 26, 2024 · 2 comments
Open

Feature: history / status #400

shawn111 opened this issue Feb 26, 2024 · 2 comments

Comments

@shawn111
Copy link
Contributor

shawn111 commented Feb 26, 2024

Description

Comtrya is awesome, it is so flexible compare to other dotfile managers.
Could we have some methods to measure what manifests status in machine?

related issue: #254

Additional information

Something like dnf history:

# dnf history
ID     | Command line                                                                               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------------------------------------------------------------------------
    16 | install perl                                                                               | 2024-02-25 21:29 | Install        |  196
    15 | install openssl1.1-devel --allowerasing                                                    | 2024-02-25 21:28 | E, I           |    3
    14 | install -y openssl openssl-libs openssl-devel pkg-config                                   | 2024-02-25 21:26 | Install        |    2
    13 | install -y gcc                                                                             | 2024-02-24 21:28 | Install        |    8
    12 | remove wezterm                                                                             | 2024-02-23 17:20 | Removed        |    2
$ comtrya histroy
ID     | Command line                                                                               | Date and time    | Action(s)       | 
-------------------------------------------------------------------------------------------------------------------------------------------------
    16 | apply abc                                                                               | 2024-02-25 21:29 | File, Command    |  
    15 | apply foo                                                                               | 2024-02-25 21:28 | File, Package        |   
$ comtrya status

manifests                                                  |                   applied time
-------------------------------------------------------------------------------------------------
foo                                                              |              2024-02-25 21:29 

@icepuma
Copy link
Member

icepuma commented Feb 26, 2024

I think we could easily write something like a history or add an adapter framework to write the history to "SQLite", "file", ...

Takes a bit of brainstorming, but could be a cool feature. We have to be aware of redacting secrets and other sensitive information.

@shawn111
Copy link
Contributor Author

shawn111 commented Mar 7, 2024

@icepuma #407

I added tracing_journald support.
It allows linux users (systemd) to review specific manifest or action logs.

╰─❯ journalctl -t comtrya F_MANIFEST=github -p 5

Mar 07 13:18:27 fedora comtrya[413440]: nothing to be done to reconcile action
Mar 07 13:18:27 fedora comtrya[413440]: Completed
Mar 07 13:20:55 fedora comtrya[414248]: need to define action summarize
Mar 07 13:20:55 fedora comtrya[414248]: not found action summarize
Mar 07 13:20:55 fedora comtrya[414248]: Completed
Mar 07 17:31:40 fedora comtrya[481344]: nothing to be done to reconcile action
Mar 07 17:31:40 fedora comtrya[481344]: Completed

╰─❯ journalctl -t comtrya F_MANIFEST=github -p 4

Mar 07 13:20:55 fedora comtrya[414248]: need to define action summarize

For manifest status and long term, I like the db or files framework idea that works for all platforms.

shawn111 added a commit to shawn111/comtrya that referenced this issue May 2, 2024
Plan to add status of manifests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants