Skip to content

Comments

SQSERVICES-547 post/get conversation/:cnv/code returns error if feature disabled#1980

Merged
fisx merged 5 commits intodevelopfrom
SQSERVICES-547-do-not-allow-add-when-feature-disabled
Dec 20, 2021
Merged

SQSERVICES-547 post/get conversation/:cnv/code returns error if feature disabled#1980
fisx merged 5 commits intodevelopfrom
SQSERVICES-547-do-not-allow-add-when-feature-disabled

Conversation

@battermann
Copy link
Contributor

@battermann battermann commented Dec 9, 2021

https://wearezeta.atlassian.net/browse/SQSERVICES-1057

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • If HTTP endpoint paths have been added or renamed, the endpoint / config-flag checklist (see Wire-employee only backend wiki page) has been followed.
  • If a cassandra schema migration has been added, I ran make git-add-cassandra-schema to update the cassandra schema documentation.
  • changelog.d contains the following bits of information (details):
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.
    • If new config options introduced: added usage description under docs/reference/config-options.md
    • If new config options introduced: recommended measures to be taken by on-premise instance operators.
    • If a cassandra schema migration is backwards incompatible (see also these docs), measures to be taken by on-premise instance operators are explained.
    • If a data migration (not schema migration) introduced: measures to be taken by on-premise instance operators.
    • If public end-points have been changed or added: does nginz need un upgrade?
    • If internal end-points have been added or changed: which services have to be deployed in a specific order?

@battermann battermann requested review from fisx and removed request for fisx December 9, 2021 12:32
@battermann battermann marked this pull request as draft December 9, 2021 12:38
@battermann battermann changed the title SQSERVICES-547 addCode: return error if feature disabled SQSERVICES-547 post/get conversation/:cnv/code returns error if feature disabled Dec 9, 2021
@battermann battermann marked this pull request as ready for review December 9, 2021 12:45
@battermann battermann requested a review from fisx December 9, 2021 12:45
Copy link
Contributor

@fisx fisx left a comment

Choose a reason for hiding this comment

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

Both this and #1976 look great, but please add integration tests.

  • test s "join code-access conversation" postJoinCodeConvOk,
    - add code (i think?)
  • not so sure where get is called?
  • I also just realized that if a conversation is created, there is the option of adding a guest link right away. That should also trigger the same error (can be done here or in a separate PR; I'll add it to the ticket.)

@@ -0,0 +1 @@
If guest links team feature is disabled `post /conversations/:cnv/code` and `get /conversations/:cnv/code` will return an error.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking what would be the right level of aggregation here? Maybe keep this but start with "enforce disabled conv links."?

@fisx fisx force-pushed the SQSERVICES-547-enforce-disabling-guest-links-feature branch from 66e60ca to 8d4fdc1 Compare December 17, 2021 10:30
Base automatically changed from SQSERVICES-547-enforce-disabling-guest-links-feature to develop December 17, 2021 16:26
changelog

addCode: return error if feature disabled

changelog

check feature enabled for get code
@battermann battermann force-pushed the SQSERVICES-547-do-not-allow-add-when-feature-disabled branch from ab0fae3 to cf7294a Compare December 17, 2021 17:42
@battermann battermann requested a review from fisx December 20, 2021 11:46
Copy link
Contributor

@fisx fisx left a comment

Choose a reason for hiding this comment

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

LGTM! (I probably would have tried to eliminate code duplication in the two tests, but this also works.)

@fisx fisx merged commit dd36838 into develop Dec 20, 2021
@fisx fisx deleted the SQSERVICES-547-do-not-allow-add-when-feature-disabled branch December 20, 2021 12:49
@akshaymankar akshaymankar mentioned this pull request Jan 18, 2022
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.

2 participants