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

Schema tidy up#9

Merged
djmitche merged 1 commit intotaskcluster:masterfrom
petemoore:schedule-cleanup
Nov 11, 2015
Merged

Schema tidy up#9
djmitche merged 1 commit intotaskcluster:masterfrom
petemoore:schedule-cleanup

Conversation

@petemoore
Copy link
Copy Markdown
Member

These changes are to improve the generated hooks library code in taskcluster-client-go.

At the moment we have two schemas with the title Hook Schedule which results in generated go types HookSchedule and embedded inside it, HookSchedule1. I've renamed HookSchedule1 to Schedule and updated description for it to be an abstract schedule (not hook-specific), and that HookSchedule now contains the hook-relevant context in its description.

If you take a close look at the godocs, you'll see HookSchedule.Schedule doesn't have a description (unlike HookSchedule.NextScheduledDate) which is also a reason for moving the description up a level to HookSchedule, so that both of its members now have a description, and then inside the new Schedule type (that used to be called HookSchedule1) the description is now about how it represents a generic (non-hook-specific) schedule.

I wasn't sure how to test my changes, i.e. how to convert the .yml files to .json and then view the updated docs in a web browser. Maybe we should set up a staging env using heroku pipelines and then it would be possible to validate these changes before pushing to production. What do you think? So - to be clear - I haven't worked out how to test that these yml changes result in valid json.

…d by hooks - main motiviation is to improve generated code in taskcluster-client-go
@petemoore
Copy link
Copy Markdown
Member Author

Please note this does not clash with PR #8. If we land both changes we'll have

  • HookSchedule => HookScheduleResponse
  • HookSchedule1 => Schedule

I think these are both good names, and since Schedule is generic, it can be reused for schedules that are not hook specific.

djmitche added a commit to djmitche/taskcluster-hooks that referenced this pull request Nov 11, 2015
@djmitche djmitche merged commit 1e73b18 into taskcluster:master Nov 11, 2015
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.

2 participants