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

fix(ui): Make long pacticipant versions look nice #407

Merged

Conversation

barthez
Copy link
Contributor

@barthez barthez commented Mar 26, 2021

We happen to use base64 encoded data as pacticipant versions. It makes UI looks ugly. This PR fixes it by wrapping long version numbers.

We are setting up Pact for GQL Gateway contracts and the GQL gateway is it's code version and the version of all services it is federating. The base64 may became pretty long 😄

Make long versions break in UI and hal-browser.
@mefellows
Copy link
Member

@bethesque just thinking that the use of what OP wants here might be better as arbitrary K/v pairs in metadata rather than trying to abuse the name itself. I think I recall seeing you extend the model recently (on mobile so it's hard to see).

But truncating long names might still be useful.

@bethesque
Copy link
Member

Thanks!

@bethesque bethesque merged commit dbb967e into pact-foundation:master Mar 27, 2021
@bethesque
Copy link
Member

I'd like to understand more about why you're using the base64 encoded data. Is what you're putting in there something we could make a supported property of the version resource?

@barthez barthez deleted the make-long-versions-look-nice branch March 28, 2021 11:16
@barthez
Copy link
Contributor Author

barthez commented Mar 28, 2021

Yeah, sure. Our idea was to configure pact broker to handle contract between consumers and providers via GQL Gateway (we are using https://www.apollographql.com/docs/federation/). Basically the provider is a gateway, but when we would like to verify contract against the provider we would need to setup whole gateway and all the federated services. So, we came up with an idea that we write custom verification for GQL Gateway where running verification would create contracts between gateway and downstream service and the the contract (GQL -> Downstream) would record responses instead of real verification. it was a long process to came to this conclusion, I may not be clear enough on the details.

The idea behind putting base64 data was backed up by a need to store GQL Gateway version which isn't only a version of a gateway code (which changes rarely) but also version of all federated services.

btw. Any chances this will be released soon?

bethesque pushed a commit that referenced this pull request Mar 28, 2021
Make long versions break in UI and hal-browser.
@bethesque
Copy link
Member

I've put out a release for you.

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