-
Notifications
You must be signed in to change notification settings - Fork 3
Be able to name revisions #74
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
base: main
Are you sure you want to change the base?
Conversation
|
Spec in (SPECIFICATION.md) says revision directories are immutable “once released” (and “treat as read-only once created (and especially once released)”). This PR formalizes: released = immutable, draft = can be replaced. That’s arguably consistent with “especially once released”, but it does weaken “immutable snapshots” if you interpret that as “immutable once created”. The new behavior is fine, but could you add a note like below to the SPECIFICATION.md, to clarify the nuance:
|
smallfactory/cli/sf_cli.py
Outdated
| ent_rev_bump.add_argument("--notes", default=None, help="Optional notes for revision metadata (applied to snapshot and release)") | ||
| ent_rev_bump.add_argument("--released-at", dest="released_at", default=None, help="ISO datetime for release (default now)") | ||
|
|
||
| ent_rev_new = rev_sub.add_parser("new", help="Create a new draft release") |
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.
Should likely say "... draft revision"
| if snap_dir.exists(): | ||
| raise FileExistsError(f"Revision '{label}' already exists for {sfid}") | ||
| # Ok, it exists. But maybe it's a draft, and we can blow it away. | ||
| meta = _read_meta(snap_dir / "meta.yml") |
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.
meta["status"] should likely be meta.get("status") to avoid KeyError on malformed/old meta.
web/templates/entities/view.html
Outdated
| <tr class="odd:bg-gray-50"> | ||
| <td class="px-3 py-1.5 font-mono text-blue-700">${id}</td> | ||
| <td class="px-3 py-1.5 text-gray-800">${st}</td> | ||
| <td class="px-3 py-1.5"><span class="px-2 py-0.5 rounded-full text-xs bg-${st_color}-100 text-${st_color}-800">${st}</span></td> |
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.
consider avoiding bg-${color}-100 style in case we adopt compiled Tailwind later (use fixed class set or mapping).
b003c10 to
c999e27
Compare
|
Agreed on all counts. How about now? |
Adds support for naming revisions from the CLI. Partially f.ixes #73 (but not fully; web UI not modified to create named revisions).