Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create suite for different app depending on environment #1007

Merged
merged 4 commits into from
Jan 11, 2019
Merged

Conversation

lukebjerring
Copy link
Contributor

Description

Uses the production wpt.fyi installation if the events are arriving in production.

@lukebjerring lukebjerring requested a review from Hexcles January 11, 2019 15:17
@wpt-pr-bot
Copy link

Staging instance deployed by Travis CI!
Running at https://app-id-dot-wptdashboard-staging.appspot.com

@lukebjerring
Copy link
Contributor Author

This is also the last piece of the checks, so resolves #712

Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

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

LGTM % nits

checksStagingAppID = int64(21580) // https://github.com/apps/checks-staging-instance

wptRepoInstallationID = int64(577173)
wptRepoStagingInstallationID = int64(449270)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: move these constants to api/checks/api.go where they are used.


func (s checksAPIImpl) GetWPTRepoAppInstallationIDs() (appID, installationID int64) {
aeID := appengine.AppID(s.ctx)
domainAndID := strings.Split(aeID, ":")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: maybe a comment to give an example of aeID (I tend to do this whenever I'm doing non-trivial string manipulation).

Copy link
Member

Choose a reason for hiding this comment

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

Besides, in the method below, you split on "." instead of ":". Can you confirm?

version := strings.Split(appengine.VersionID(a.ctx), ".")[0]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yah, not sure why the inconsistency, but the ID format is documented on the AppID method itself.

@lukebjerring lukebjerring merged commit 979e19f into master Jan 11, 2019
@lukebjerring lukebjerring deleted the app-id branch January 11, 2019 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants