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

Y24-220 Create v2 end point for tagsets #4732

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

seenanair
Copy link
Contributor

@seenanair seenanair commented Mar 12, 2025

Closes #4238

Changes proposed in this pull request

  • API v2 end point to query tag sets
  • Fetaure flag support (y24_220_enable_tag_set_api)

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@seenanair seenanair requested review from KatyTaylor and yoldas March 13, 2025 09:19
@seenanair seenanair requested a review from andrewsparkes March 18, 2025 10:34
Copy link
Contributor

@harrietc52 harrietc52 left a comment

Choose a reason for hiding this comment

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

Looks good!

Just the comment about adding the example requests for the Yard docs.

Whilst adding comments/ example requests for the other API v2 requests, I created a PostMan directory to persist mainly the POST requests, but also the GETs. If you would like to (or just to have a play) you can add these GET requests to the PostMan. Ref here

#
# This resource represents a TagSet, which links together two related tag groups.
# It includes the following attributes and relationships:
#
Copy link
Contributor

@harrietc52 harrietc52 Mar 19, 2025

Choose a reason for hiding this comment

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

Would it be possible to include the example GET requests, including the filter examples?

I’ve added example requests as part of updated docs here. You can then use the GitHub action to rebuild the Yard Syntax and view these comments/ examples here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@harrietc52 , I've updated the documentation as well as the Sequencescape API v2.postman_collection.json in smb://files-smb/pipeline_solutions. Please check if it is ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you might need to run this Workflow, as described here, to update the SS Yard documentation on GitHub pages :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Postman looks good, thank you

Copy link
Contributor

@KatyTaylor KatyTaylor left a comment

Choose a reason for hiding this comment

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

Looks mostly good, thank you! Just a couple of questions to look at.

model {}

instance {}
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this necessary for some reason? We shouldn't be adding new V1 endpoints - Stuart's project was to replace remaining V1 use with V2 API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not sure about this and I just copied how it was for other end points. :D It sounds like it is for supporting V1. Shall I remove this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes pretty sure this is just for V1 so unnecessary.


def check_feature_flag
render json: { error: 'TagSets API is disabled' } unless Flipper.enabled?(:y24_220_enable_tag_set_api)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Think there should there be an addition to feature_flags.yml in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, if you haven't already, would you mind creating a story and a pull request to remove the feature flag, so it's easy to remove when we decide to? There's a team feature flags guidance page on Confluence in case if you haven't seen 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.

Done 👍 #4766

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you 🙏

I think the idea was to go even further, and create the (draft) pull request ready to merge in whenever appropriate - so that removing the feature flag is really effortless (obviously extra effort for you upfront, but hopefully less overall since it's fresh in your head).

Also, thinking about when to remove the flag - on the story you've written "once the prerequisite work (Y25-185) is completed".

We can definitely switch the new feature 'on' once Y25-185 is completed, but I think we could let the flag hang around for a couple of months or so afterwards, just to ensure the page gets used and we haven't missed anything?

This was what I thought about the level of risk (copied from Slack):

I think there is a small remaining risk, as we are making the functionality on that page more constrained, in that we're not including ALL the tag groups, and we're not allowing you to select any possible combination of tag 1 and tag 2.
So feature flagging could help in that we could resolve any prod issues immediately by flipping the flag.

Since you've implemented the flag, I feel we may as well keep it around for a little while in case we get any production issues due to the above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, okay. I agree, and all of your comments make complete sense. I will create a draft PR and chang the timing to remove the flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KatyTaylor
Following draft PRs created which enable the removal of
SS - #4770
Limber - sanger/limber#2275
Integration suite - https://gitlab.internal.sanger.ac.uk/psd/integration-suite/-/merge_requests/232

Copy link
Contributor

@KatyTaylor KatyTaylor left a comment

Choose a reason for hiding this comment

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

Looks good, thank you, although a couple of tests are still failing

@seenanair
Copy link
Contributor Author

seenanair commented Mar 24, 2025

@harrietc52 @KatyTaylor I've addressed all your comments, and now all tests are passing. Please review and let me know if any further changes are needed.

@harrietc52
Copy link
Contributor

@harrietc52 @KatyTaylor I've addressed all your comments, and now all tests are passing. Please review and let me know if any further changes are needed.

Looks great! Just the command to run to update the SS GitHub Pages for Yard documentation as mentioned above 😄

@seenanair
Copy link
Contributor Author

seenanair commented Mar 26, 2025

@harrietc52 @KatyTaylor I've addressed all your comments, and now all tests are passing. Please review and let me know if any further changes are needed.

Looks great! Just the command to run to update the SS GitHub Pages for Yard documentation as mentioned above 😄

@harrietc52 Thanks for the review! 🙏 I ran the action 14081314706 against branch y24_220_create_v2_end_point_for_tagsets , but the documentation hasn’t been updated with the Tagset API but worked fine locally. Did I miss something?

@harrietc52
Copy link
Contributor

harrietc52 commented Mar 27, 2025

@harrietc52 Thanks for the review! 🙏 I ran the action 14081314706 against branch y24_220_create_v2_end_point_for_tagsets , but the documentation hasn’t been updated with the Tagset API but worked fine locally. Did I miss something?

Oh strange! That is odd. I’ll try give it a go too

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.

Y24-220 - Create API V2 end point for tag sets
3 participants