Closed
Bug 1114742
Opened 10 years ago
Closed 10 years ago
Show a suppressible deprecation notice to third party consumers of TBPL's API
Categories
(Tree Management Graveyard :: TBPL, defect)
Tree Management Graveyard
TBPL
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(2 files)
(deleted),
patch
|
RyanVM
:
review+
emorley
:
checkin+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
RyanVM
:
review+
emorley
:
checkin+
|
Details | Diff | Splinter Review |
In order to give third party consumers of TBPL's API a firm nudge with respects to TBPL EOL and their needing to switch over to Treeherder's API, I think we should show a deprecation notice to them.
So that these consumers actually pay attention, the notice needs to be fatal initially, but we'll let them skip it by appending "&ignore_deprecation_notice=1" to the URL.
Initially we'll just set the notice on only the php/get*.php files (since the submit/update variants are still used by Treeherder until the various patches land soon), and we'll also exclude getParsedLog.php, since it's linked from many places on Bugzilla for people's Try runs etc.
Assignee | ||
Comment 1•10 years ago
|
||
In the next commit a fatal deprecation notice will be shown to consumers of some
of the get*.php files, so we need to add the acknowledgement parameter to
internal consumers of the API. This is being done as a separate commit, so we
can deploy this before the second part, to ensure most clients will have
fetched the updated js assets before the API calls are made fatal if they do not
contain the magic parameter.
Attachment #8540339 -
Flags: review?(ryanvm)
Assignee | ||
Comment 2•10 years ago
|
||
In order to give third party consumers of TBPL's API a firm nudge with respects
to TBPL EOL and their needing to switch over to Treeherder's API, this patch
adds a fatal deprecation notice to some of the TBPL API endpoints.
To skip the deprecation notice, "&ignore_deprecation_notice=1" must be appended
to the URL.
Initially, only the following API endpoints will display the notice:
php/getBuilderHistory.php
php/getBuilders.php
php/getHiddenBuilderNames.php
php/getJob.php
php/getLeakAnalysis.php
php/getLogExcerpt.php
php/getRevisionBuilds.php
Attachment #8540342 -
Flags: review?(ryanvm)
Updated•10 years ago
|
Attachment #8540339 -
Flags: review?(ryanvm) → review+
Comment 3•10 years ago
|
||
Comment on attachment 8540342 [details] [diff] [review]
Part 2: Add a deprecation notice to most of the get*.php API endpoints
Review of attachment 8540342 [details] [diff] [review]:
-----------------------------------------------------------------
::: php/inc/Communication.php
@@ +30,5 @@
> }
> +
> +function requireDeprecationAcknowledgement($set) {
> + if (empty($set['ignore_deprecation_notice']))
> + die("TBPL is due to be switched off imminently, please switch to Treeherder's API asap! Please file a bug blocking bug 1054977, and for now append '&ignore_deprecation_notice=1' to skip this message.");
"TBPL is nearing end-of-life. At that time, the API you have requested will no longer be available. To avoid any disruptions when EOL happens, please switch to Treeherder's API ASAP. If the API you need isn't available, file a bug blocking bug 1054977. To skip this message for the time-being, you can append '&ignore_deprecation_notice=1'" ?
Attachment #8540342 -
Flags: review?(ryanvm) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Thanks for the review :-)
I like most of the alternative message - the only thing compared to the original, is that I was meaning to get people to file bugs even if the API they needed is available, so I can track stragglers and make a determination as to whether they should hold up EOL. That said, I guess we could make the argument that we shouldn't wait for consumers of TBPL's 'API' since it was pretty unofficial and undocumented. Either way I would be curious to have third party consumers at least drop a note somewhere so I know they exist.
Anyway I'll revise the message soon, in the meantime I'll land part 1 first, for the reasons in comment 1.
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8540339 [details] [diff] [review]
Part 1: Add &ignore_deprecation_notice=1 to all internal uses of the API
https://hg.mozilla.org/webtools/tbpl/rev/02ab854ea378
Deployed:
[localhost] out: Changelog: https://hg.mozilla.org/webtools/tbpl/pushloghtml?fromchange=5102de8e7970&tochange=02ab854ea378
[2014-12-23 17:15:17] [localhost] running: cd /data/genericrhel6/src/tbpl.mozilla.org/tbpl && hg pull -u -v -r 02ab854ea378
[2014-12-23 17:15:19] [localhost] finished: cd /data/genericrhel6/src/tbpl.mozilla.org/tbpl && hg pull -u -v -r 02ab854ea378 (1.703s)
[localhost] out: pulling from http://hg.mozilla.org/webtools/tbpl
[localhost] out: searching for changes
[localhost] out: all local heads known remotely
[localhost] out: adding changesets
[localhost] out: adding manifests
[localhost] out: adding file changes
[localhost] out: added 1 changesets with 7 changes to 7 files
[localhost] out: resolving manifests
[localhost] out: getting js/BuildbotDBUser.js
[localhost] out: getting js/Data.js
[localhost] out: getting js/HiddenBuildsAdminUI.js
[localhost] out: getting js/MachineResult.js
[localhost] out: getting php/inc/AnnotatedSummaryGenerator.php
[localhost] out: getting php/inc/ParallelLogGenerating.php
...
[localhost] out: merging dataimport/import-buildbot-data.py
[localhost] out: 6 files updated, 1 files merged, 0 files removed, 0 files unresolved
Attachment #8540339 -
Flags: checkin+
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8540342 [details] [diff] [review]
Part 2: Add a deprecation notice to most of the get*.php API endpoints
https://hg.mozilla.org/webtools/tbpl/rev/eb654a2734c3
Attachment #8540342 -
Flags: checkin+
Assignee | ||
Comment 7•10 years ago
|
||
Part 2 deployed:
[localhost] out: Changelog: https://hg.mozilla.org/webtools/tbpl/pushloghtml?fromchange=02ab854ea378&tochange=eb654a2734c3
[2014-12-29 08:17:13] [localhost] running: cd /data/genericrhel6/src/tbpl.mozilla.org/tbpl && hg pull -u -v -r eb654a2734c3
[2014-12-29 08:17:15] [localhost] finished: cd /data/genericrhel6/src/tbpl.mozilla.org/tbpl && hg pull -u -v -r eb654a2734c3 (1.884s)
[localhost] out: pulling from http://hg.mozilla.org/webtools/tbpl
[localhost] out: searching for changes
[localhost] out: all local heads known remotely
[localhost] out: adding changesets
[localhost] out: adding manifests
[localhost] out: adding file changes
[localhost] out: added 1 changesets with 8 changes to 8 files
[localhost] out: resolving manifests
[localhost] out: getting php/getBuilderHistory.php
[localhost] out: getting php/getBuilders.php
[localhost] out: getting php/getHiddenBuilderNames.php
[localhost] out: getting php/getJob.php
[localhost] out: getting php/getLeakAnalysis.php
[localhost] out: getting php/getLogExcerpt.php
[localhost] out: getting php/getRevisionBuilds.php
[localhost] out: getting php/inc/Communication.php
[localhost] out: 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Tree Management → Tree Management Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•