-
Notifications
You must be signed in to change notification settings - Fork 12
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
AJ-1234: Use helmchart name for pact identifier. #1234
Conversation
This pairs with broadinstitute/sam#1234, where `sam` also renames its reference from `sam-consumer` to just `sam`. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698068076950019) discussing the `-consumer` and `-provider` suffix anti-pattern. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698241095600099) discussing the recommendation to use the helmchart name.
This pairs with broadinstitute/sam#1234, where `sam` also renames its reference from `sam-consumer` to just `sam`. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698068076950019) discussing the `-consumer` and `-provider` suffix anti-pattern. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698241095600099) discussing the recommendation to use the helmchart name.
Use helmchart names for pact identifiers. This pairs with broadinstitute/sam#1234, where `sam` also renames its reference from `sam-consumer` to just `sam`. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698068076950019) discussing the `-consumer` and `-provider` suffix anti-pattern. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698241095600099) discussing the recommendation to use the helmchart name.
@@ -307,4 +307,4 @@ jobs: | |||
repo: broadinstitute/terra-github-workflows | |||
ref: refs/heads/main | |||
token: ${{ secrets.BROADBOT_TOKEN }} # github token for access to kick off a job in the private repo | |||
inputs: '{ "pacticipant": "sam-provider", "version": "${{ needs.verify-consumer-pact.outputs.provider-sha }}" }' | |||
inputs: '{ "pacticipant": "sam", "version": "${{ needs.verify-consumer-pact.outputs.provider-sha }}" }' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sam also can be a consumer, will this cause any name collisions/issues with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ultimately what we want is for sam to self-identify itself as sam
when acting in both the provider and consumer role. I think this will let the pact-broker do some dependency graph magic which is currently stymied by having the consumer/provider roles named divergently.
So I think there may be some followup work to rename the consumer side of things as well, but I wanted to try to keep the scope of this change as tight as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok nice that makes sense thanks! btw side-note the verify-consumer-pact action was failing on our pr's and it looks like this change fixed it...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dang, I didn't realize these were failing previously.
And, I hate to disappoint... but I think that's actually a false 'pass' on this PR...
The first time a pact verification runs for a given provider (in this case, the newly renamed sam
) it treats the contracts as being in a 'pending' state, and quietly passes the tests (even if they're failing).
You need to go to the logs to see that the tests are still failing with the same looking stack traces as before this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick look at the failure @Ghost-in-a-Jar and I think it's because the verify_consumer_pacts.yml
needs to somehow run /bin/bash -c env/test.env
as part of setting up its environment before running sbt test on the SamProviderSpec
.
I tried a few different incantations (see 5d547ce for latest attempt) but kept hitting permission problems, so I am backing that commit out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok good to know thanks for taking a look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jladieu I managed to fix it with this change https://github.com/broadinstitute/sam/pull/1233/files#diff-88f8d59210f317b7bdd12e6a807c0b84cf473372221acb3ce860f5a0160183b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks! I picked up that change and will see how re-running looks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ghost-in-a-Jar I think you fixed the issue with permissions, but it looks like maybe another false pass on the PR you linked: If you take a look at: https://github.com/broadinstitute/sam/actions/runs/6711027848/job/18237474362 I'm still seeing some errors (despite the GHA passing).
Example:
1.1) body: $.userEmail Expected '[email protected]' (String) but received '[email protected]' (String)
1.2) body: $.userSubjectId Expected 'testUser' (String) but received '509175583607142998ceb' (String)
The bright side is the errors look like they're a lot easier to troubleshoot than the one you fixed since they're concrete pact problems rather than connectivity issues.
5d547ce
to
9bc2592
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This pairs with DataBiosphere/terra-workspace-data-service#384, where `wds` also renames its reference from `sam-provider` to just `sam`. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698068076950019) discussing the `-consumer` and `-provider` suffix anti-pattern. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698241095600099) discussing the recommendation to use the helm chart name. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698262189799389) discussing doing this for `sam`.
9bc2592
to
a7c40bc
Compare
Prefer helmchart name as the pacticipant identifier: * `bpm-provider` -> `bpm` * `bpm-consumer` -> `bpm` * `sam-provider` -> `sam` * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698068076950019) discussing the `-consumer` and `-provider` suffix anti-pattern. * See [thread](https://broadinstitute.slack.com/archives/C043YJ40719/p1698241095600099) discussing the recommendation to use the helm chart name. Unblocks: * broadinstitute/rawls#2610 * DataBiosphere/terra-workspace-manager#1511 * broadinstitute/sam#1234
This is prefactoring work for AJ-1234
This pairs with DataBiosphere/terra-workspace-data-service#384, where
wds
also renames its reference fromsam-provider
to justsam
.-consumer
and-provider
suffix anti-pattern.sam
.