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

feat(bulk-import): adding sorting based on column in /imports #178

Conversation

its-mitesh-kumar
Copy link
Contributor

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Dec 13, 2024

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-bulk-import-backend workspaces/bulk-import/plugins/bulk-import-backend patch v5.2.1
@red-hat-developer-hub/backstage-plugin-bulk-import workspaces/bulk-import/plugins/bulk-import patch v1.10.7

@its-mitesh-kumar its-mitesh-kumar force-pushed the feat/bulk-import-import-job-sorting branch from 54ca224 to ba86c46 Compare December 13, 2024 13:45
Copy link
Member

@christoph-jerolimov christoph-jerolimov left a comment

Choose a reason for hiding this comment

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

Hi @its-mitesh-kumar, thanks for picking up also the backend work.

I added some comments, that IMHO we should remove the sorting in our backend, and add sorting params to the request calls for GitHub / Catalog API calls.

Let me know if I miss something and its not possible for some reason. And let the backend team and me know if you want continue with this.

@its-mitesh-kumar its-mitesh-kumar force-pushed the feat/bulk-import-import-job-sorting branch from ba86c46 to ea7ffa3 Compare December 23, 2024 14:59
@its-mitesh-kumar
Copy link
Contributor Author

@christoph-jerolimov @dzemanov I have resolved the comments , Please re-review it

Copy link
Member

@dzemanov dzemanov left a comment

Choose a reason for hiding this comment

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

Tested with all sort values, on the backend and frontend. Works as expected except for when sortColumn is not specified. Please run prettier to fix failing tests :).

@dzemanov
Copy link
Member

dzemanov commented Jan 3, 2025

Also, please add changeset.

@its-mitesh-kumar its-mitesh-kumar force-pushed the feat/bulk-import-import-job-sorting branch 3 times, most recently from 322faef to de3defc Compare January 8, 2025 13:29
@its-mitesh-kumar
Copy link
Contributor Author

@dzemanov I have resolved all the comments , CI job failing please try prettier:fix and push it from your system , its not getting resolve from end .

@dzemanov
Copy link
Member

dzemanov commented Jan 8, 2025

@its-mitesh-kumar it is failing on type check in bulkImports.test.ts which needs to be updated.

@its-mitesh-kumar its-mitesh-kumar force-pushed the feat/bulk-import-import-job-sorting branch from 5aacddc to 817b20a Compare January 8, 2025 17:36
@its-mitesh-kumar
Copy link
Contributor Author

@dzemanov Now CI is failing due to prettier issue

@its-mitesh-kumar its-mitesh-kumar force-pushed the feat/bulk-import-import-job-sorting branch from cc41673 to 093e4f6 Compare January 10, 2025 13:26
Copy link
Member

@dzemanov dzemanov left a comment

Choose a reason for hiding this comment

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

@its-mitesh-kumar Thank you for all the changes! Enum key repositoryName can be now safely deleted. Tested again with the changes and works fine except for one bug I found, but not sure it it is related to this PR:

2025-01-13.10-40-16.mp4

@its-mitesh-kumar
Copy link
Contributor Author

@dzemanov ! Quality gate is failing due to its considering the objects of locationUrls as duplicate of each other .
Screenshot 2025-01-13 at 4 17 06 PM (2)
](url)

@dzemanov
Copy link
Member

/lgtm
However, @its-mitesh-kumar you will need to request review from CODEOWNERS

@its-mitesh-kumar
Copy link
Contributor Author

@christoph-jerolimov @debsmita1 can we get this merge ?

@debsmita1
Copy link
Member

When I click on a column to change the order, it triggers the API with the current column name and order along with the previous column name and order

Screen.Recording.2025-01-17.at.1.04.27.PM.mov

@its-mitesh-kumar
Copy link
Contributor Author

@debsmita1 , That's happening due to some odd behavior of useQuery , What I can see if we updating value of any key of queryKey , its recalling queryFunction once with old data and once with new value . We can fix this later , I have raised bug for the same .

@openshift-ci openshift-ci bot removed the lgtm label Jan 22, 2025
Copy link
Member

@debsmita1 debsmita1 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 22, 2025
@debsmita1 debsmita1 removed the lgtm label Jan 22, 2025
@debsmita1
Copy link
Member

@its-mitesh-kumar Could you resolve this #178 (comment)

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
13.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@debsmita1 debsmita1 added the lgtm label Jan 22, 2025
@debsmita1 debsmita1 merged commit b47ad99 into redhat-developer:main Jan 22, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants