public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Bob Manson <bmanson@juniper.net>
To: gnats-devel@sourceware.cygnus.com
Subject: proclamation of intent
Date: Wed, 18 Aug 1999 11:21:00 -0000	[thread overview]
Message-ID: <199908181821.LAA02046@tristam.juniper.net> (raw)

Or something like that, anyway.

I recently started working for Juniper, and was asked to look into
doing some gnats development (specifically, making it easy to add new
fields).  I asked the almighty Jason "Wreck" Molenda about getting cvs
access, and he urged me to take on a larger maintainership role.

So I shall.

This has turned into a major hacking frenzy.  I've been rewriting
large bits of code, stripping out hordes of vile global variables,
adding bits of new functionality, and just plain trying to clean it
up.  It's an ugly horrible job, but it badly needs to be done.

There will be breakage. I will try to minimize this, if for no other
reason than that we need to actually use it here.  The external client
interface will be unchanged at least for now, but internally things
are markedly different, and there will be a lot of new options.

The plan is to have all information that describe fields live in a
struct (currently it's all done as extensions of PR_entry, tho this
will probably change), rather than hard-coded throughout the sources.
This work is mostly complete.  Some fields have special meaning to
gnats, such as Number, Category, Submitter, State, Last-Modified,
etc. and thus their presence will remain hardcoded, but wherever
possible fields will be user-configurable, and it will certainly be
possible to add new fields via a configuration file.

The clients will need to obtain the list of valid fields and their
datatypes by doing appropriate queries.  Perhaps it would make sense
to add these sorts of functions to query-pr, tho it might be a better
idea to have a separate program to do it instead.  Such a client would
also be able to do basic field validation (verify that the provided
data is valid for an enumerated field).

The interface to the random administrative files has been made
generic; in essence any field can have an administrative file
associated with it now.  One thought is to move the data contained in
these files into a central file with a better structure (perhaps with
tagged fields etc).

I'm beginning to wonder if it makes sense for the user to invoke
query-pr directly.  That is, it may make sense to move some amount of
the current functionality that is in query-pr into another program,
and have query-pr be a script or some other program that does
appropriate formatting of output.  I've never liked the way fields
were delimited in query-pr's output, and perhaps this would be an
opportunity to change it.

As a specific example, the various query classes that are currently in
query-pr don't exactly make sense to me in a more generic context.
That functionality can be easily achieved by putting an appropriate
script on top of a query-pr-like program.

Obviously there will need to be a configuration file that describes
the field structure.  That's essentially the main issue I need to
resolve now, by coming up with an appropriate design. I'm thinking
something along the lines of:

	field "Release-Note" {
		multitext
		query-default exact-regexp
	}

	field "Release" {
		string matching "insert-regex-here"
		query-pr-option "A" "--release"
		network-query-command "RLSE"
		query-default inexact-regexp
	}

	field "Priority" {
		enum {
			values {
				"high" "medium" "low"
			}
			default "medium"
		}
		query-pr-option "p" "--priority"
		network-query-command "PRIO"
		query-default exact-regexp
	}

	field "Class" {
		enumerated_in_file {
			path "path/relative/to/GNATS_ROOT"
			fields {
				"class" "type" "description"
			}
			key "class"
		}
		query-pr-option "L" "--class"
		network-query-command "CLSS"
		query-default inexact-regexp
	}
	...
	index {
		path "path/relative/to/GNATS_ROOT"
		fields {
			"Submitter"  "Responsible" "State" "Confidential"
			"Severity" "Priority" "Date-Required" "Quarter"
			...
		}
		separator "|"
	}

For now, I will also have a query section that will look something like

	query "Full" {
		fields all
	}

	query "Summary" {
		printf ("%8s %-8.8s %-8.8s %-9.9s %-9.9s %-8.8s %-10.10s %s",
			"Number", "Responsible", "Category", "State",
			"Severity", "Priority", "Submitter", "Synopsis");
	}

	...

This is probably all "a bit verbose", but I like files where I can
just look at them and have a good idea of exactly what's going on.

At some point it would be nice to add "triggers", or the ability to
invoke a program or script to do field verification etc.

The new options will come in when new fields are used.  Obviously the
current scheme of single-letter options or specific network commands
for queries is not extensible or practical; instead, query-pr will have
options such as

	--field-Content --equals "foo"
	--field-Last-Modified --is-less-than "some-date"

I haven't decided the exact syntax of this, but that's the basic idea.
I'd like to be able to specify inexact matches versus exact matches,
and strings versus regexps too.  Maybe I should give up on the idea of
trying to do this as a set of options, and make it full expressions.

There will be appropriate network commands added for querying specific
fields.  This part is relatively obvious.

I've already added the ability to have boolean expressions to query-pr:

( --release "3.3" --and --submitter "bar" ) --or --release "3.4"

along with appropriate extensions to the network protocol.

These changes will necessarily make the network clients incompatible
with old servers, and vice-versa.  I don't see much reason to try and
make this work.

Thoughts, comments, questions, flames?
					Bob

             reply	other threads:[~1999-08-18 11:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-18 11:21 Bob Manson [this message]
1999-08-18 12:36 ` Rick Macdonald
1999-08-18 13:13   ` Bob Manson
1999-08-18 13:37     ` Stephen Dahmen
1999-08-18 14:15     ` Rick Macdonald
1999-08-23 10:21     ` Rick Macdonald
1999-08-23 10:27       ` Paul Traina
1999-08-23 10:28         ` Rick Macdonald
1999-08-24  5:23         ` Mike Sutton
1999-08-24  9:56           ` Michael Richardson
1999-08-23 10:38       ` Bob Manson
1999-08-23 10:48         ` Paul Traina
1999-08-23 10:52           ` Bob Manson
1999-08-23 10:54             ` Paul Traina
1999-08-23 11:13           ` Rick Macdonald
1999-08-23 11:32             ` Tony Parent
1999-08-23 11:41               ` Rick Macdonald
1999-08-23 12:12             ` Bob Manson
1999-08-23 15:54               ` client info format ideas Rick Macdonald
1999-08-24  5:35             ` proclamation of intent Mike Sutton
1999-08-23 10:58         ` gnatsd accepting new PRs Rick Macdonald
1999-08-23 11:03           ` Bob Manson
1999-08-23 11:28             ` Tony Parent
     [not found] <Pine.LNX.4.04.9908241439580.17979-100000@intern.snow.nl>
1999-08-24  7:30 ` proclamation of intent Rick Macdonald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908181821.LAA02046@tristam.juniper.net \
    --to=bmanson@juniper.net \
    --cc=gnats-devel@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).