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

🪟 🔧 Remove demo mode from UI #15746

Merged
merged 5 commits into from
Aug 23, 2022
Merged

🪟 🔧 Remove demo mode from UI #15746

merged 5 commits into from
Aug 23, 2022

Conversation

lmossman
Copy link
Contributor

@lmossman lmossman commented Aug 18, 2022

What

Resolves #15648

How

Removes the demo mode banner from the UI, as well as any code related to that banner (e.g. env vars and intl messages), as we will now be using a third-party tool to display that banner on the demo airbyte deployment.

There is a separate PR to remove the env var from the one place it exists in the cloud repo as well: https://github.com/airbytehq/airbyte-cloud/pull/2397

@lmossman lmossman requested a review from a team as a code owner August 18, 2022 00:52
@github-actions github-actions bot added area/platform issues related to the platform kubernetes area/frontend Related to the Airbyte webapp labels Aug 18, 2022
@lmossman lmossman changed the title Remove demo mode from UI 🪟 🔧 Remove demo mode from UI Aug 18, 2022
Copy link
Contributor

@krishnaglick krishnaglick left a comment

Choose a reason for hiding this comment

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

From a code-overview it looks fine. I'm not sure how I could test this locally.

@lmossman
Copy link
Contributor Author

Yeah, I'm not really sure how to test this locally either, since this is just removing all of the IS_DEMO stuff, which is only really relevant to the demo deployment.

So it feels like all we can really do is wait until this is merged, and then deploy the demo application to see if it looks correct (which I expect it to since it should now be the same as non-demo).

I suppose we could also deploy the demo app from this branch so we can test it out before merging, but I'm not exactly sure how that is done. @nataliekwong do you know how we currently deploy the demo instance, or do you know who would know about that?

@nataliekwong
Copy link
Contributor

Yes! @marcosmarxm directed me to this page before on how to access it: https://www.notion.so/Demo-Airbyte-Instance-b2b8f1ddfa53438db78433cca0ae0568

@lmossman
Copy link
Contributor Author

Thank you for linking that, super helpful!

@krishnaglick in that Notion page linked above, it says that the command to deploy airbyte in the demo instance is

API_URL=/api/v1/ AIRBYTE_ROLE=demo IS_DEMO=true docker-compose up -d

So I tried running that locally on this PR branch, and I confirmed that the demo mode banner is no longer present in the UI, and the rest of the app seems to be working as expected. So I think that should be sufficient for local testing

@lmossman lmossman force-pushed the lmossman/remove-demo-mode branch from 8a2d0ce to 2558869 Compare August 19, 2022 17:22
@lmossman lmossman requested a review from krishnaglick August 19, 2022 17:23
@lmossman lmossman temporarily deployed to more-secrets August 19, 2022 17:25 Inactive
@marcosmarxm
Copy link
Member

@lmossman this won't break the demo.airbyte.io stuff?

Copy link
Contributor

@edmundito edmundito left a comment

Choose a reason for hiding this comment

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

Overall it's looking good. I found an issue that needs to be fixed.

Comment on lines 176 to 180
<<<<<<< HEAD

secrets: {}
=======
>>>>>>> 8a2d0ce928 (remove demo mode from UI)
Copy link
Contributor

Choose a reason for hiding this comment

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

Unresolved conflict, whoops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Looks like I used the vs code "accept incoming change" button incorrectly somehow. Pushed the fix!

@edmundito
Copy link
Contributor

edmundito commented Aug 22, 2022

@marcosmarxm See #15648 (comment) for details. There is already a new way to set up the messaging that the instance is a demo.

Copy link
Contributor

@krishnaglick krishnaglick left a comment

Choose a reason for hiding this comment

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

I'm marking this as approved, pending Edmundo's greenlight and that merge message removed 👍

@lmossman
Copy link
Contributor Author

lmossman commented Aug 22, 2022

@marcosmarxm as Natalie stated in her comment on the related issue here (#15648 (comment)), we are going to use Google Optimize to display the banner instead of this custom logic.

However, I am actually not sure what causes the demo application to be read-only. When I tested locally on master (i.e. without these changes), setting IS_DEMO to true did not make the app read-only, so I figured that was somehow happening somewhere else (e.g. configured somewhere in AWS where it is deployed). @marcosmarxm Do you happen to know what makes the demo app read only?

EDIT: see comment below - I found where this is configured, so feel free to disregard this comment

@lmossman lmossman temporarily deployed to more-secrets August 22, 2022 21:13 Inactive
@lmossman lmossman temporarily deployed to more-secrets August 22, 2022 21:16 Inactive
@lmossman
Copy link
Contributor Author

Aha, I found where we configured the demo app to fail non-read API calls:

# By default we deny all api calls
resource "aws_lb_listener_rule" "deny-all-api" {
listener_arn = aws_lb_listener.airbyte-alb-listener.arn
priority = 100
action {
type = "fixed-response"
fixed_response {
content_type = "application/json"
message_body = "{}"
status_code = "401"
}
}
condition {
path_pattern {
values = ["/api/v1/*"]
}
}
}

Since that is configured through terraform, that should not be affected by any of the changes in this PR. So this should be safe to merge!

@lmossman lmossman requested a review from edmundito August 22, 2022 21:44
@lmossman lmossman temporarily deployed to more-secrets August 22, 2022 21:46 Inactive
@lmossman lmossman temporarily deployed to more-secrets August 22, 2022 23:11 Inactive
@lmossman lmossman merged commit 874d02a into master Aug 23, 2022
@lmossman lmossman deleted the lmossman/remove-demo-mode branch August 23, 2022 23:44
@ireyna-modo ireyna-modo mentioned this pull request Aug 24, 2022
rodireich pushed a commit that referenced this pull request Aug 25, 2022
* remove demo mode from UI

* remove merge conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform kubernetes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove demo mode from UI
5 participants