Fossil Forum

RFC: MOTD (Message of the Day) feature
Login

RFC: MOTD (Message of the Day) feature

RFC: MOTD (Message of the Day) feature

(1) By Stephan Beal (stephan) on 2020-08-11 11:33:37 [source]

While writing /forumpost/97fe7a6f3b it occurred to me that it "might be useful" if fossil had the ability to output an administrator-defined message after syncing a repo, e.g.:

fossil clone .... foo.fossil
...
=======================================
After cloning, if you want the wiki to be
full-featured you need to:

  fossil config set set-html w

Where that message would be defined by the owner of the being-cloned repo (and should probably be part of the CONFIGSET_PROJ(?) sync group so that it propagates to new clones and their clones and their clones).

(Hmmm... why is mv-rm-files in the project-level settings? That's clearly a personal preference, not a project policy.)

Assuming such an MOTD would be useful, it might (might) also make sense to offer one which is displayed when pulling:

fossil sync
...
=============================
2020-08-11:
 - Be sure to check out the feature-x branch...
 - @Dave: please pick up your child at the front desk.

The questions:

  • Is this something fossil needs?

If so...

  • How many variants? (clone and pull?)
  • What should the setting(s) be called? (motd-clone and motd-pull?)
  • Should there be a way to see the MOTDs in the web interface? We could presumably see them in the CLI by using, e.g., fossil set motd-clone.
  • Versionable or not? If so, they would not be limited to an admin and would not need to be part of any configuration group. This seems like an admin-only feature to me, though (and not something which necessarily needs to be kept around in the blockchain).

:-?

(2) By Alfred M. Szmidt (ams) on 2020-08-12 05:55:51 in reply to 1 [link] [source]

I .. kinda like the idea. What might even be nice, is to have news items about the project pop up. Maybe just use the tech-notes as input? Latest tech-node is shown once...

(4) By Stephan Beal (stephan) on 2020-08-12 09:46:11 in reply to 2 [link] [source]

Maybe just use the tech-notes as input? Latest tech-node is shown once...

That's an interesting idea. i was thinking the motd should be transient, but we already have technotes, and that might be a good reuse of them.

(6) By John Rouillard (rouilj) on 2020-08-12 14:46:27 in reply to 4 [link] [source]

Also could use a wiki page with the name MOTD/clone or some such. MOTD/ would go out for all interactions (pull, clone etc.). Change the part after the / for different interactions MOTD/pull is only shown on pulls etc.

Not sure how you would restrict access to this though. Having the ability to review previous MOTD messages could be useful.

This would also mean no changes to the transfer protocol to send the MOTD. It just moves as part of the blockchain. Then the client can see if it has changed and issue the MOTD. This allows the user to say:

  • motd - every time
  • motd - if not already shown
  • motd - I know all I need to know

(7) By Stephan Beal (stephan) on 2020-08-12 15:01:04 in reply to 6 [link] [source]

i like this approach as well, but share Sean's concern (is it real?) about potential blindness resulting from over-use by arbitrary team members. The wiki would probably be the most natural place for it, but we don't have (and probably don't want) the ability to limit write access to specific pages to certain user classes (probably setup in this case).

We have the convention of tying wiki pages to stuff using a name prefix, so motd/pull, motd/clone, etc, would be a perfectly reasonable place to pack such messages.

i'm now wondering if, when updating to a branch/tag/checkout, if there's a corresponding wiki page we should simply dump that to the screen (if it's plain text) or start fossil ui at that wiki page? That would effectively provide the motd feature using only existing infrastructure.

(8) By Alfred M. Szmidt (ams) on 2020-08-12 17:03:16 in reply to 7 [link] [source]

I don't like that, if you have a branch with lots of text then your screen will get quickly full of what might be nonsense.

(9) By John Rouillard (rouilj) on 2020-08-12 17:47:10 in reply to 7 [link] [source]

Hi Stephan:

about potential blindness resulting from over-use by arbitrary team members.

Yeah it can be a thing. I ignore the motd on a number of sites I log into. In fact when I write them. I make obvious changes (more lines, additional markup) to make a visual distinction between older and newer motd messages.

The blindness is also why I suggested a client side option to control the display of the motd.

we don't have (and probably don't want) the ability to limit write access to specific pages

Actually I kind of would like this (e.g. to prevent defacing of the wiki content on the Home page). But that's another kettle of fish.

If what we want is to control if the changes to a wiki page should be emitted, what about some sort of checksum under the control of the setup or admin users. If the MOTD page checksum matches the blessed value then the motd is shown. Otherwise it's not.

I am not in love with this idea as a change to MOTD and not updating the checksum will result in the MOTD silently failing and the MOTD author will have no idea.

i'm now wondering if, when updating to a branch/tag/checkout, if there's a corresponding wiki page we should simply dump that to the screen (if it's plain text) or start fossil ui at that wiki page?

I am not sure that works. I see MOTD more as a repo notification and not a branch notification. E.G. you have a security patch that has been put in trunk that everybody working on private feature branches needs to merge. (I realize being able to turn off the motd like I suggested upstream makes it less useful for this purpose.)

(10) By Stephan Beal (stephan) on 2020-08-12 18:47:58 in reply to 9 [link] [source]

Actually I kind of would like this (e.g. to prevent defacing of the wiki content on the Home page). But that's another kettle of fish.

Agreed.

If what we want is to control if the changes to a wiki page should be emitted, what about some sort of checksum under the control of the setup or admin users. If the MOTD page checksum matches the blessed value then the motd is shown. Otherwise it's not.

i was thinking about the page's timestamp for that - only show the motd if it's newer than the last time we showed it (which we would need to record locally), but a hash token might make more sense. Hmmm... except there doesn't appear to be a fast/efficient way to get a wiki page's timestamp (or its hash, for that matter - the info in the event table (the timeline) maps to the raw wiki artifact, not its name).

(3) By sean (jungleboogie) on 2020-08-12 06:41:03 in reply to 1 [link] [source]

Would it really be "of the day" so that if there's nothing in the last ~12-24 hours it would drop off? I have a feeling some folks may a)overlook it or b) forget or just don't change it out.

Plenty of people at my employer write "update", "new", "fixed", "bug fix", etc for their commit messages (not via fossil). While it's possible that people would write nice messages in this proposal, I don't know if everyone would read them/notice them, and then there's the possible vague messages. "bug fixed now" would be a terrible thing to see with this proposal.

tl;dr It's nice but I don't know if it would be taken advantage of enough and effectively. (though I realize that's not a technical limitation).

(5) By Stephan Beal (stephan) on 2020-08-12 09:54:25 in reply to 3 [link] [source]

Would it really be "of the day" so that if there's nothing in the last ~12-24 hours it would drop off?

That wasn't my intent. motd comes from the conventional message file on Unix-style systems: if /etc/motd exists then it is shown to users when they log in.

While it's possible that people would write nice messages in this proposal, I don't know if everyone would read them/notice them, and then there's the possible vague messages. "bug fixed now" would be a terrible thing to see with this proposal.

Yeah, i was thinking more about post-clone instructions which might be needed for a repo, e.g. setting the "safe-html" flag to a value compatible with the repo's content. (That flag is, since yesterday, now pulled on the first clone and whenever the skin is synced, but older versions don't do that.) Similarly, maybe a reminder about how to pull the latest versions of the repo or a pointer to the main documentation wiki/file. Or maybe it shows a warning that the project is no longer maintained and directs the user to alternative projects. Presumably the website would say so, but people who cloned it long ago might pull regularly without ever visiting the site.

tl;dr It's nice but I don't know if it would be taken advantage of enough and effectively. (though I realize that's not a technical limitation).

My proposal is that only a setup user would be able to modify this, not a developer or even a non-setup admin. That "should" help keep the noise level down.

(11) By Richard Hipp (drh) on 2020-08-16 16:34:04 in reply to 1 [link] [source]

I'm not sure about MOTD, but I do see a need for real-time comms between developers. The need for this is illustrated by two recent events:

  1. Fixing a bad merge which resulted in some concurrent developer confusion.

  2. Merging a branch before it was ready resulting in a trunk version that segfaults.

On the SQLite project, the developers have a private chat room that we use to coordinate activity. Perhaps something like that could be added to Fossil to help coordinate activities.

(12) By andygoth on 2020-08-17 00:38:22 in reply to 11 [link] [source]

Your forum post links don't work, and I don't know why. I'd like to think they're to be interpreted relative to the current URL directory, but Fossil is choosing not to emit href attributes for <a> at all. Tellingly, it's also not eliding the square brackets. My guess is Fossil doesn't recognize those hex strings as check-ins or files.

Here are the corrected links:

(13) By John Rouillard (rouilj) on 2020-08-17 01:49:08 in reply to 12 [link] [source]

My guess is Fossil doesn't recognize those hex strings as check-ins or files.

That makes sense since the forum is a separate fossil repo and those checksums/ids don't exist in the forum fossil's list of artifacts.

(15) By andygoth on 2020-08-17 07:46:14 in reply to 13 [link] [source]

That was my first guess too, but when I looked into it, they are actually the IDs of forum posts in this same repository.

(14.1) By Stephan Beal (stephan) on 2020-08-17 02:11:58 edited from 14.0 in reply to 12 [link] [source]

Your forum post links don't work, and I don't know why.

They work for me but they're taking me to the /info entries rather than the /forumpost entries.

Edit: looking at the source of that post, he wrote the links like:

[bad merge](1477c7840b) ...
[developer confusion](8588a991ad) ...

Whereas /forumpost/hash would probably be preferred.

(16) By andygoth on 2020-08-17 07:47:38 in reply to 14.1 [link] [source]

The question is whether what we've got is fine or if we really do want to allow linking to forum posts using the same syntax as linking to artifacts. I don't have an opinion here.