Skip to content

[$60]Change submission API version v5 for DELETE calls #3575

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

Open
sushilshinde opened this issue Jan 16, 2020 · 43 comments
Open

[$60]Change submission API version v5 for DELETE calls #3575

sushilshinde opened this issue Jan 16, 2020 · 43 comments
Assignees
Labels
Dev Env QA Fail QA verification on Dev has failed. Assignee to redo the fix. tcx_Assigned

Comments

@sushilshinde
Copy link
Collaborator

sushilshinde commented Jan 16, 2020

Refer to the issue and comment :
#3545 (comment)

Swagger Reference :

https://github.com/topcoder-platform/submissions-api/blob/267ff963ab513cc5db9be965badc5a2a61b92e71/docs/swagger.yaml#L406

PP branches :

https://github.com/topcoder-platform/topcoder-react-lib/tree/hot-fixes-3

In case required - https://github.com/topcoder-platform/community-app/tree/hot-fixes-5

@topcoder-platform/tcxcommunity @topcoder-platform/topcodercompetitors open for pickup

@sumitdaga sumitdaga self-assigned this Jan 16, 2020
@sushilshinde sushilshinde changed the title $[50]Change submission API version for DELETE calls $[50]Change submission API version v5 for DELETE calls Jan 16, 2020
@sumitdaga
Copy link
Contributor

sumitdaga commented Jan 16, 2020

@sushilshinde the V5 api throws the error "submissionId" must be a valid GUID

@sushilshinde
Copy link
Collaborator Author

@callmekatootie can you help here?

@callmekatootie
Copy link
Collaborator

@sumitdaga Can you kindly let me know the id that you are passing to the api...

@sushilshinde sushilshinde changed the title $[50]Change submission API version v5 for DELETE calls [$50]Change submission API version v5 for DELETE calls Jan 16, 2020
@sumitdaga
Copy link
Contributor

@callmekatootie sure
208646 is an example submission id ... i am guessing it must have worked with the V3 api (although i did not try)

@crazyk07
Copy link

Contest https://www.topcoder.com/challenges/30112871 has been created for this ticket.

This is an automated message for crazyk via Topcoder X

@crazyk07
Copy link

Contest https://www.topcoder.com/challenges/30112871 has been updated - it has been assigned to daga_sumit.

This is an automated message for crazyk via Topcoder X

@callmekatootie
Copy link
Collaborator

208646 is most likely the legacy submission id. v5 submission api expects it to be a guid... and I am not sure which api one would call to get the v5 id from the legacy id...

@sushilshinde I am not sure about this. You might want to check with @cwdcwd or @dushyantb

@callmekatootie
Copy link
Collaborator

I typed too soon. My bad.

@sumitdaga So, use the legacy submission id, 208646 in this case and make the api call as follows:

GET https://api.topcoder-dev.com/v5/submissions?legacySubmissionId=208646 (with the relevant token) to get the submission details.

Here, you will get the v5 submission id, which you will then use in the v5 DELETE request

@sumitdaga
Copy link
Contributor

@callmekatootie right, the V5 swagger doc also has this documented ..thanks!

@sumitdaga
Copy link
Contributor

sumitdaga commented Jan 16, 2020

@sushilshinde
there seems to be some inconsistency between APIs ..i am not sure
i deleted two submissions after implementing it with V5 api
the submissions are successfully deleted as it does not show up here but they still show up here
Selection_246

@sushilshinde
Copy link
Collaborator Author

@sumitdaga can you PR the changes?

@sumitdaga
Copy link
Contributor

@sumitdaga
Copy link
Contributor

@sushilshinde any update here ?

@sumitdaga
Copy link
Contributor

@sushilshinde
i would say it is a bit strange to open an issue, have somebody work on it and submit an MR and then completely ignore the issue!

@sumitdaga sumitdaga removed their assignment Feb 6, 2020
@sushilshinde
Copy link
Collaborator Author

Hey @sumitdaga sorry about that, I was stuck in the other issues. You will be paid for your work, don't worry about it.

@LieutenantRoger
Copy link
Collaborator

Hi @sumitdaga will review your submission, let me go through the issue now.

@sumitdaga
Copy link
Contributor

@sushilshinde no worries, it is not about the money though!
thanks for checking in!

@LieutenantRoger
Copy link
Collaborator

Hi @sumitdaga

There are lint issue with the fix, could you please fix them ? Thanks

image

@LieutenantRoger
Copy link
Collaborator

Hi @sumitdaga

Which user you used to verify the delete submission ? I used TonyJ account, but it reported me this error:

https://take.ms/TdDA4

@sumitdaga
Copy link
Contributor

@LieutenantRoger indeed i am getting the same error, but IIRC i was not getting this error when i had pushed the PR ...not sure!

@LieutenantRoger
Copy link
Collaborator

ok, thanks for checking out, let me get some clarification from the team.

@sumitdaga
Copy link
Contributor

@LieutenantRoger
any update ?

@LieutenantRoger
Copy link
Collaborator

Thanks for the patient.

I haven't got time to test on current dev environment, the dev environment seems got reset recently. I'll check this later.

@LieutenantRoger
Copy link
Collaborator

Hi @sumitdaga

I just tried the fix, but receiving a lot of errors like this when launching community-app. https://take.ms/0RvkL
Will you please take a look as well and see if it works on your side ?

Thanks much.

@sumitdaga
Copy link
Contributor

sumitdaga commented Feb 24, 2020

@LieutenantRoger I don't think these are due to my fixes/PR ...

@LieutenantRoger
Copy link
Collaborator

@LieutenantRoger I don't think these are due to my fixes/PR ...

Hmm,as it can't be verified now,could you please raise a new PR against our latest branch?The modification should only be on topcoder-react-lib,right?

@LieutenantRoger LieutenantRoger changed the title [$50]Change submission API version v5 for DELETE calls [$60]Change submission API version v5 for DELETE calls Feb 24, 2020
@LieutenantRoger
Copy link
Collaborator

I will increase the price a bit for the extra work,Thanks much.

@LieutenantRoger
Copy link
Collaborator

Hi @sumitdaga

Sorry for the late response, we have got a base branch now, could you please work on hot-fix-delete-submission branch:

https://github.com/topcoder-platform/topcoder-react-lib/tree/hot-fix-delete-submission

Thanks

@sumitdaga
Copy link
Contributor

Hey @LieutenantRoger
i updated the existing MR topcoder-platform/topcoder-react-lib#124 to use the above branch and there were no conflicts , so i guess its fine!

@LieutenantRoger
Copy link
Collaborator

Hmm, I believe you will have to merge hot-fix-delete-submission back into your local branch and verify, even though there's no conflict. The original base branch is very old, I don't think we can merge the PR like this.

@sumitdaga
Copy link
Contributor

ok, sure, i will verify it when i can and let you know!

@LieutenantRoger
Copy link
Collaborator

https://take.ms/Nvb5F

The delete operation is returning 204 succeeded, though after we refresh the page, the deleted submission comes back. This might be a backend issue.

I'll approve this PR for now.

@SathyaJayabal
Copy link
Collaborator

@LieutenantRoger , for MM "My Submissions " does not have delete option.
Screenshot 2020-03-17 at 12 16 47 PM
Develop Challenges do not have option to view/delete submissions

For design challenges there does not seem to be any api call to delete the submission and the submission is not getting deleted. Please see attached video.
cc @sushilshinde
delete sub.mov.zip

@LieutenantRoger
Copy link
Collaborator

Hi @SathyaJayabal

I tried the challenge in your video recording,

it looks we can delete the bottom two submissions. See the snapshot: https://take.ms/p425s
I tried to delete the second submission in the design challenge.

The one presented in your recording might be a wrong submission.

@SathyaJayabal
Copy link
Collaborator

@LieutenantRoger

  1. The submission(209121) you have deleted for challenge (30054692) and user (TonyJ) is visible again.
  2. I am not able to delete any of the three submissions for TonyJ, The api call for delete is not placed.
  3. When logged in dan_developer and trying to delete a submission, the api returns an error

Screenshot 2020-03-17 at 7 27 00 PM

Screenshot 2020-03-17 at 7 27 45 PM

@LieutenantRoger
Copy link
Collaborator

Hi @sushilshinde

Please clarify above, we seems not on the same page for this ticket.

@LieutenantRoger
Copy link
Collaborator

LieutenantRoger commented Mar 18, 2020

Seems the same file can't be deleted twice, I switched to another MM challenge, and tried the delete operation
https://monosnap.com/file/jUjg2N1mBeqKsfNLvIuvE6V5emtO9t

@sushilshinde
Copy link
Collaborator Author

It can't be completed before this fix
topcoder-platform/submissions-api#175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Env QA Fail QA verification on Dev has failed. Assignee to redo the fix. tcx_Assigned
Projects
None yet
Development

No branches or pull requests

8 participants