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

[HOLD for payment 2023-06-30] [$1000] Android - Share code - Copied link has NOT staging label #19464

Closed
1 of 6 tasks
kbecciv opened this issue May 23, 2023 · 69 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented May 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue found when executing PR #19249

Action Performed:

  1. Open the App
  2. Login with any account
  3. Go to settings > Share code
  4. Click on "Copy URL to clipboard"
  5. Go any chat.
  6. Paste the link.
  7. Verify that the url is treated as a link

Expected Result:

Copied link has staging label

Actual Result:

Copied link has NOT staging label

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.17.0

Reproducible in staging?: Yes

Reproducible in production?: n/a

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://platform.applause.com/services/links/v1/external/f2c90b9aef4ae82b8e2a172f074f90a3824b4b9a476747a628ef41eed4bafad8

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01015fed2b575db172
  • Upwork Job ID: 1661856374223589376
  • Last Price Increase: 2023-06-08
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@adelekennedy adelekennedy removed the Bug Something is broken. Auto assigns a BugZero manager. label May 24, 2023
@adelekennedy adelekennedy removed their assignment May 24, 2023
@adelekennedy adelekennedy added the Bug Something is broken. Auto assigns a BugZero manager. label May 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

Triggered auto assignment to @kevinksullivan (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@kevinksullivan
Copy link
Contributor

@kbecciv I don't see this issue when I try it, or at least I am not seeing different things in each account. I sent the link from staging on one account, and it didn't show staging in the URL. Then when I went to the recipient's account I also didn't see staging.

image

Is the issue that the URL is different in one view v. the other, or that it should showing staging in both URLs?

@kevinksullivan kevinksullivan added the Needs Reproduction Reproducible steps needed label May 25, 2023
@kevinksullivan
Copy link
Contributor

got clarity in slack, moving on!

@kevinksullivan kevinksullivan added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels May 25, 2023
@melvin-bot melvin-bot bot changed the title Android - Share code - Copied link has NOT staging label [$1000] Android - Share code - Copied link has NOT staging label May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01015fed2b575db172

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Triggered auto assignment to @alex-mechler (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@rojiphil
Copy link
Contributor

rojiphil commented May 27, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Share Code - Copied link does not have staging label on Android native builds.

What is the root cause of that problem?

The root cause of the problem is that we are not using the Environment to decide on the URL.

What changes do you think we should make in order to solve the problem?

The following changes need to be done in ShareCodePage file

a) Use the withEnvironment component

import withEnvironment, {environmentPropTypes} from '../components/withEnvironment';

Using withEnvironment will make sure that the property this.props.environment with refer to correct environment for the specific platform on which the app is running. Specifically, for native devices, this funcionality will also take into consideration the mode (i.e. beta/prod) in which the app is running and decide the appropriate environment.

b) Use the this.props.environment and construct the share code url by replace this line with the following:

const environmentURL = (this.props.environment === CONST.ENVIRONMENT.STAGING) ?  Url.addTrailingForwardSlash(CONST.STAGING_NEW_EXPENSIFY_URL) : CONST.NEW_EXPENSIFY_URL;
const url = isReport ? `${environmentURL}r/${this.props.report.reportID}` : `${environmentURL}details?login=${encodeURIComponent(this.props.session.email)}`;

We use the staging url only for the staging environment and use the production url for all other environments as production url is the default URL.

Result

19464_android-native_prod.mp4
19464_android-native_stag.mp4

What alternative solutions did you explore? (Optional)

@mananjadhav
Copy link
Collaborator

@rojiphil I think I agree with the .env file changes but I am not convinced if we should just change it to .env.staging for debug mode. The reason being, what if I am running a local build?

apply from: project(":react-native-config").projectDir.getPath() + "/dotenv.gradle"

And what's the reasoning for changing the filepath from top to bottom?

@rojiphil
Copy link
Contributor

@mananjadhav Thanks for your feedback.

And what's the reasoning for changing the filepath from top to bottom?

Adding at the top does not help in reading the config file whereas adding to the bottom helps. Attaching the build output for your reference.
Capture

I think I agree with the .env file changes but I am not convinced if we should just change it to .env.staging for debug mode. The reason being, what if I am running a local build?

Not sure if I understood your comment correctly. Did you mean the local release build as shown here?

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@mananjadhav
Copy link
Collaborator

Not the local release build, but local debug build will always use staging env? I don't think we would want that.

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Triggered auto assignment to @flodnv (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@kevinksullivan
Copy link
Contributor

@flodnv added engineering label to have someone step in on the PR review for Alex.

#21107

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @rojiphil got assigned: 2023-06-14 19:00:23 Z
  • when the PR got merged: 2023-06-21 16:48:06 UTC
  • days elapsed: 5

On to the next one 🚀

@kevinksullivan
Copy link
Contributor

Waiting 6 days for any regressions

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 23, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Android - Share code - Copied link has NOT staging label [HOLD for payment 2023-06-30] [$1000] Android - Share code - Copied link has NOT staging label Jun 23, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.31-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-06-30. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mananjadhav] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 30, 2023
@anmurali
Copy link

anmurali commented Jul 1, 2023

Paid @mananjadhav on New Dot

@rojiphil
Copy link
Contributor

rojiphil commented Jul 2, 2023

@kevinksullivan Gentle reminder as I am also awaiting payment.

@kevinksullivan
Copy link
Contributor

hi @mananjadhav can you finish out the steps above please? Thanks!

@kevinksullivan
Copy link
Contributor

@rojiphil sorry for the confusion here. A few weeks ago it seems I created another job for you but I'm not seeing it. Do you have an upwork job for this, and can you provide the link here? If not I'll just have to create another one.

@rojiphil
Copy link
Contributor

rojiphil commented Jul 3, 2023

@kevinksullivan Here is the link to the Upwork job.
I have also sent you a message on Upwork if that helps in tracking within Upwork.

@mananjadhav
Copy link
Collaborator

Yes @kevinksullivan, I'll post an update tomorrow.

@kevinksullivan
Copy link
Contributor

Thanks @rojiphil , all set.

@rojiphil
Copy link
Contributor

rojiphil commented Jul 4, 2023

Thanks @kevinksullivan @mananjadhav @AndrewGable @alex-mechler @MelvinBot. This was my first contribution to Expensify. Love the fairness, transparency, and process-oriented approach here.

@mananjadhav
Copy link
Collaborator

Ohh that's good to hear @rojiphil. thanks for the patience on this one and appreciate your contribution. Welcome to the community. Looking forward to working with you more :)

@mananjadhav
Copy link
Collaborator

mananjadhav commented Jul 4, 2023

In this PR, we added a fixed variable NEW_EXPENSIFY, which isn't set based on the environment. I wouldn't treat this so much as bug as we were on the fence to even fix this. We fixed this for uniformity. I've posted the comment on the PR, but I don't see any action to be updated here.

I don't think we need a regression test for this one. @flodnv @kevinksullivan wdyt?

@mananjadhav mananjadhav mentioned this issue Jul 4, 2023
57 tasks
@flodnv
Copy link
Contributor

flodnv commented Jul 5, 2023

Agreed

@kevinksullivan
Copy link
Contributor

yup, agree @mananjadhav

@kevinksullivan
Copy link
Contributor

Closing out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants