Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Bug 1507521 - Finish library per RFC 128#1

Merged
djmitche merged 2 commits intotaskcluster:masterfrom
djmitche:bug1507521
Nov 19, 2018
Merged

Bug 1507521 - Finish library per RFC 128#1
djmitche merged 2 commits intotaskcluster:masterfrom
djmitche:bug1507521

Conversation

@djmitche
Copy link
Copy Markdown
Contributor

Manage manifests, reference documents, schemas, and metaschemas as
described in RFC 128.

Intended uses of this library:

  • tc-references' build process will create a serializable version and cache that, then on startup will read that and write out a uri-structured format for nginx to serve
  • services will use this (with an additional fromService({schemaset, builder, exchanges}) method) to check their schemas and references are valid at test time
  • tc-web will use this (somehow, maybe just during build?) to gather up all of the schemas and references for display under /docs

@djmitche djmitche self-assigned this Nov 17, 2018
@djmitche djmitche requested review from imbstack and removed request for imbstack November 17, 2018 03:13
@djmitche
Copy link
Copy Markdown
Contributor Author

Hm, actually I want to refactor this a bit so that a References can either be absolute or abstract.

@djmitche
Copy link
Copy Markdown
Contributor Author

OK, I'm a good bit happier with that.

Comment thread schemas/metadata-metaschema.yml Outdated
Manage manifests, reference documents, schemas, and metaschemas as
described in RFC 128.
@@ -0,0 +1,35 @@
$schema: "http://json-schema.org/draft-06/schema#"
Copy link
Copy Markdown
Member

@petemoore petemoore Nov 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about:

$schema: "https://taskcluster.net/schemas/common/metadata-metaschema-v1.json#"
metadata:
  - name: "metadata-metaschema"
  - version: 1

;-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like having a document be its own metaschema could lead to trouble? What's the benefit here?

Copy link
Copy Markdown
Member

@petemoore petemoore Nov 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe this even works(?) I suspect not, I suspect $schema needs to be a fully qualified URI...

$schema: #/
metadata:
  - name: "metadata-metaschema"
  - version: 1

Copy link
Copy Markdown
Member

@petemoore petemoore Nov 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a way of decorating this schema too with metadata, and enabling versioning of it, should we wish to add additional metadata later, for example...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think anything would read that version, though (and anyway, wouldn't it have to read the version of its metaschema, and just keep going until it looped? And what if the loop was a cycle of more than one metaschema?). Can we just keep this simple?

Copy link
Copy Markdown
Contributor

@imbstack imbstack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to make sense to me. I am in favor of the simplicity approach I think.

@djmitche djmitche merged commit 1fa0db6 into taskcluster:master Nov 19, 2018
@djmitche
Copy link
Copy Markdown
Contributor Author

I've released this as v1.0.0. I'm sure there will be some patch releases..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants