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

Moving automation into workbench libs #134

Merged
merged 21 commits into from
Jan 25, 2018
Merged

Moving automation into workbench libs #134

merged 21 commits into from
Jan 25, 2018

Conversation

UrsaStutsman
Copy link
Contributor

<your comments for this PR go here>

Have you read CONTRIBUTING.md lately? If not, do that first.

I, the developer opening this PR, do solemnly pinky swear that:

  • I've documented my API changes in Swagger

In all cases:

  • Get two thumbsworth of review and PO signoff if necessary
  • Verify all tests go green
  • Squash and merge; you can delete your branch after this
  • Test this change deployed correctly and works on dev environment after deployment

@UrsaStutsman UrsaStutsman changed the title 2801 sam redux Moving automation into workbench libs Jan 25, 2018
@@ -3,6 +3,7 @@
{{with $environment := env "ENVIRONMENT"}}
{{with $dir := env "ROOT_DIR"}}
{{with $local_ui := env "LOCAL_UI"}}
{{with $trialBillingPemSecrets := vault (printf "secret/dsde/firecloud/%s/common/trial-billing-account.pem" $environment)}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Most of these additions are not used by Leonardo automation, but they are required by the current iteration of workbench-libs automation config. Removing these is a TODO but let's not block on it.

Copy link
Contributor

Choose a reason for hiding this comment

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

should vault-y confs be living in a public repo?

Copy link
Contributor

Choose a reason for hiding this comment

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

every repo will be getting this

@@ -35,13 +37,14 @@ object Dependencies {
"com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
"com.typesafe.akka" %% "akka-slf4j" % akkaV,
"org.specs2" %% "specs2-core" % "3.7" % "test",
"org.scalatest" %% "scalatest" % "2.2.6" % "test",
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
Copy link
Contributor

Choose a reason for hiding this comment

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

This update to match workbench-service-test required changes in how we use eventually

@@ -1,6 +1,6 @@
package org.broadinstitute.dsde.firecloud.page

import org.broadinstitute.dsde.workbench.util.WebBrowserUtil
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO non-blocker: Remove most of the page classes from Leonardo

Copy link
Contributor

Choose a reason for hiding this comment

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

can we github ticket these todos?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep I'll write something up

val actualCluster = eventually {
clusterCheck(Leonardo.cluster.get(googleProject, clusterName), clusterRequest.labels, googleProject, clusterName, Seq(ClusterStatus.Running, ClusterStatus.Error), clusterRequest.jupyterExtensionUri)
} (clusterPatience)
Copy link
Contributor

Choose a reason for hiding this comment

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

ScalaTest 3 makes it more difficult to pass patience as a parameter

GIT_SHA=$(git rev-parse ${GIT_BRANCH})
echo GIT_SHA=$GIT_SHA > env.properties # for jenkins jobs
docker build -t $REPO:${GIT_SHA:0:12} .
echo "building $PROJECT docker image..."
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes enable new-style Jenkins builds

@jmthibault79
Copy link
Contributor

jenkins retest

@jmthibault79
Copy link
Contributor

Initial Jenkins-pipeline failed because clusters were in Error state. Trying again.

@jmthibault79 jmthibault79 mentioned this pull request Jan 25, 2018
5 tasks
@jmthibault79
Copy link
Contributor

jenkins retest

@@ -7,11 +7,13 @@ object Dependencies {

val workbenchModelV = "0.8-d97f551"
val workbenchGoogleV = "0.10-b95b2c1"
val serviceTestV = "0.1-c5a3162-SNAP"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should update to non-SNAP; I guess that is dependent on the workbench-libs PR being merged.


val excludeWorkbenchModel = ExclusionRule(organization = "org.broadinstitute.dsde.workbench", name = "workbench-model_2.11")

val workbenchModel: ModuleID = "org.broadinstitute.dsde.workbench" %% "workbench-model" % workbenchModelV
val workbenchGoogle: ModuleID = "org.broadinstitute.dsde.workbench" %% "workbench-google" % workbenchGoogleV excludeAll excludeWorkbenchModel
val workbenchServiceTest: ModuleID = "org.broadinstitute.dsde.workbench" %% "workbench-service-test" % serviceTestV % "test" classifier "tests" excludeAll excludeWorkbenchModel
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wonder if we should be excluding both workbenchModel and workbenchGoogle?


case class LeoAuthToken(value: String)

case object LeoAuthToken extends AuthToken {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am curious how this class is different from AuthToken, UserAuthToken, ServiceAccountAuthToken classes in workbench-libs:

https://github.com/broadinstitute/workbench-libs/tree/2801-sam/serviceTest/src/test/scala/org/broadinstitute/dsde/workbench/auth

Could one of those classes be used instead?

Copy link
Contributor Author

@UrsaStutsman UrsaStutsman Jan 25, 2018

Choose a reason for hiding this comment

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

We've got a card already for the next iteration of this - I can add refactoring this to it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And I've added it.

val ronAuthToken = AuthToken(LeonardoConfig.Users.ron)
val hermioneAuthToken = AuthToken(LeonardoConfig.Users.hermione)
val ronEmail = LeonardoConfig.Users.ron.email
// Ron and Hermione are on the dev Leo whitelist, and Hermione is a Project Owner
Copy link
Collaborator

Choose a reason for hiding this comment

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

What whitelist? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Heh, good point. I would like to defer those changes please :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

Copy link
Collaborator

@rtitle rtitle left a comment

Choose a reason for hiding this comment

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

A couple minor questions, overall big 👍

Copy link
Contributor

@aweng98 aweng98 left a comment

Choose a reason for hiding this comment

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

A very long sbt module name for workbenchServiceTest. project compiled cleanly, and Leonardo tests passed.

@UrsaStutsman UrsaStutsman merged commit 09167fe into develop Jan 25, 2018
@UrsaStutsman UrsaStutsman deleted the 2801-sam-redux branch January 25, 2018 20:05
akarukappadath pushed a commit that referenced this pull request Jul 11, 2018
* use workbench libs

* auth token for leo, other deletions, tweaks

* adding methods to configs

* adding some more info

* forgot to render users.json

* build/push swat tests docker image in jenkins build script

* all up to date

* syncing users json

* Add campaignManagers to users

* workbench-libs needs these (TODO remove)

* fix for app conf

* real fix for app conf

* Hermione and Ron

* more app conf fix

* more app conf ctmpl

* Update scalatest version for workbench-libs compatibility

* implicits are the devil

* dammit weasley

* MORE PATIENCE

* fix build script when pushing to develop

* save git SHA during build script
akarukappadath pushed a commit that referenced this pull request Oct 22, 2018
* use workbench libs

* auth token for leo, other deletions, tweaks

* adding methods to configs

* adding some more info

* forgot to render users.json

* build/push swat tests docker image in jenkins build script

* all up to date

* syncing users json

* Add campaignManagers to users

* workbench-libs needs these (TODO remove)

* fix for app conf

* real fix for app conf

* Hermione and Ron

* more app conf fix

* more app conf ctmpl

* Update scalatest version for workbench-libs compatibility

* implicits are the devil

* dammit weasley

* MORE PATIENCE

* fix build script when pushing to develop

* save git SHA during build script
Qi77Qi pushed a commit that referenced this pull request Jun 25, 2019
* use workbench libs

* auth token for leo, other deletions, tweaks

* adding methods to configs

* adding some more info

* forgot to render users.json

* build/push swat tests docker image in jenkins build script

* all up to date

* syncing users json

* Add campaignManagers to users

* workbench-libs needs these (TODO remove)

* fix for app conf

* real fix for app conf

* Hermione and Ron

* more app conf fix

* more app conf ctmpl

* Update scalatest version for workbench-libs compatibility

* implicits are the devil

* dammit weasley

* MORE PATIENCE

* fix build script when pushing to develop

* save git SHA during build script
jchanbroad pushed a commit that referenced this pull request Jun 27, 2019
* use workbench libs

* auth token for leo, other deletions, tweaks

* adding methods to configs

* adding some more info

* forgot to render users.json

* build/push swat tests docker image in jenkins build script

* all up to date

* syncing users json

* Add campaignManagers to users

* workbench-libs needs these (TODO remove)

* fix for app conf

* real fix for app conf

* Hermione and Ron

* more app conf fix

* more app conf ctmpl

* Update scalatest version for workbench-libs compatibility

* implicits are the devil

* dammit weasley

* MORE PATIENCE

* fix build script when pushing to develop

* save git SHA during build script
jdcanas pushed a commit that referenced this pull request Jul 10, 2019
* use workbench libs

* auth token for leo, other deletions, tweaks

* adding methods to configs

* adding some more info

* forgot to render users.json

* build/push swat tests docker image in jenkins build script

* all up to date

* syncing users json

* Add campaignManagers to users

* workbench-libs needs these (TODO remove)

* fix for app conf

* real fix for app conf

* Hermione and Ron

* more app conf fix

* more app conf ctmpl

* Update scalatest version for workbench-libs compatibility

* implicits are the devil

* dammit weasley

* MORE PATIENCE

* fix build script when pushing to develop

* save git SHA during build script
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.

None yet

6 participants