-
-
Notifications
You must be signed in to change notification settings - Fork 724
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
Add cities and countries to DFC affiliate sales data endpoint #12964
base: master
Are you sure you want to change the base?
Add cities and countries to DFC affiliate sales data endpoint #12964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, nice and straightforward. Sorry for the delay in review.
@chahmedejaz just checking is this URL correct? https://staging.coopcircuits.fr/api/dfc/affiliate_sales_data?endDate=2024-12-31&startDate=2024-01-01 |
Yes, @RachL - I believe it should be this. Plus please make sure you are login to the staging server and DFC is connected in the connected apps. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I updated the docs as well which demonstrate example data.
@chahmedejaz Yes Ioggedin (otherwise I land on a blanck page). I'm landing on the api but when I try to expand the data, there is no info: I'm sensing the answer is obvious and I'm not looking at the right place 😅 |
@RachL - To validate this, please follow these steps:
After following the above steps please try the API endpoint again. I think the enterprise you are testing with is not allowing data sharing 😅 |
9a77efc
to
785249c
Compare
Thanks @chahmedejaz with the fact that the staging data has changed since my first tests I completely forgot my setup was incomplete, sorry for the waste of time 🤦♀️ However I now get an error 500 when reaching the URL. I'm using enterprise ID 5714 on staging FR, let me know if you want super admin access and I can upgrade your account. |
No worries, @RachL |
Apologies... This was me trying to make another PR work. I've restored the test data to a previous point. I guess this interefered with your testing @RachL , sorry for that :-/ I guess restoring the DB needs to be used with care, to prevent such situations |
I've just noticed the staging-FR label was on this PR. I thought it was not, because of this notice: The "removed" comes last, so I assumed the server was available. I hope I did not interfere (yet again!) with your testing @RachL . I've re-added the label. |
@filipefurtad0 no don't worry I've left it for Ahmed to look at it. |
@RachL - The issue is that your range has a lot of data. This takes time and our server timeout before returning the response |
I knew the problem was simple!! thanks @chahmedejaz merging :) |
785249c
to
f536f24
Compare
@chahmedejaz there is one failling test, do you confirm it's ok to merge? |
That's strange @RachL , this failing spec is passed in the master as well as in this branch on local. Will look into it a bit more in a while if I can find something. Just a tip for the future, unless we have conflict or latest-master-dependant failing spec, we don't need to rebase or force push the branch. 🙂 |
thanks! I could be wrong, but I think I've done the rebase otherwise I wouldn't have the merge button (the message said the branch was not up-to-date with the base branch anymore or something like that). |
Have re-run the spec quite a few times. The failure seems consistent or at least very flaky. If it fails with the same frequency in master we would have to look into it immediately though. |
Ah, you did the rebase from GitHub. Sorry for my misunderstanding, I thought you did it by terminal for something 😅 |
Thanks, Sigmund. Let me do some more digging on it and get back to you before we merge |
f536f24
to
9a77efc
Compare
9a77efc
to
b1b4b10
Compare
I tried validating this by pushing only my changes before rebasing, build got green. I looked into it more closely, the failing spec, I think I've found a way to fix this. But still it's strange that the changes are not related to that spec and it's still changing its behavior 😅 Anyhow, I'll fix this spec here and push the fix as soon as possible. PS: the failing spec always passes in local setup in both cases, before and after rebase |
@@ -138,4 +140,18 @@ | |||
expect(lines.last).to have_content("TOTAL 50.0 50.0 0.0 0.0 0.0 50.0") | |||
end | |||
end | |||
|
|||
def update_line_items_product_names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though these specs are unrelated to this PR's changes, rebasing with the latest master does cause these spec failures.
The reason was that somehow, product names were different in the report and the actual order line item variant product.
In the line_item factory, these products are created with random names. So, in this PR, I've updated those product names to have constant values.
@sigmundpetersen @RachL - The specs are fixed now, there was some specs data issue. Data has been fixed and specs got fixed now. The PR functionality has not changed, nor was it related to the previous failure. Please see, if we are good to merge this as PR has been passed the validation. |
Let's get a short review from a dev on the last commit, after that it's good to merge I think 👍 |
@chahmedejaz before this get reviewed again I apologies but I need to ask you to remove the city. I've received an email from the researchers and apparently there is a legal issue about the city name 👀 Sorry about this, I'm really surprise to hear about this so late in the project. Please do put all your hours in clokify / CoopCircuits will pay for that extra work anyway. |
Sure @RachL - No worries. |
City has been removed and the changes are ready for review. Thanks |
What? Why?
What should we test?
Release notes
Changelog Category (reviewers may add a label for the release notes):