-
Notifications
You must be signed in to change notification settings - Fork 438
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
WIP: Always use backend response for requests to source/:project_name #16955
Open
krauselukas
wants to merge
4
commits into
openSUSE:master
Choose a base branch
from
krauselukas:fix/issue_16911
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
krauselukas
added
Frontend
Things related to the OBS RoR app
API
Things regarding our API
labels
Oct 15, 2024
krauselukas
commented
Oct 15, 2024
end | ||
|
||
def render_project_issues | ||
set_issues_defaults | ||
render partial: 'source/project_issues', formats: [:xml] | ||
end | ||
|
||
def render_project_packages | ||
@packages = params.key?(:expand) ? @project.expand_all_packages : @project.packages.pluck(:name) |
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.
the expand
parameter can be handled by the backend as well
krauselukas
changed the title
Always use backend response for requests to source/:project_name
WIP: Always use backend response for requests to source/:project_name
Oct 15, 2024
Set back to WIP since the minitests indicated some gaps... |
krauselukas
force-pushed
the
fix/issue_16911
branch
from
October 16, 2024 12:37
f8f5d12
to
43aca1c
Compare
krauselukas
commented
Oct 16, 2024
# This implicitly also checks if the user can access the project (for hidden projects). | ||
# We have to make sure to initialize the project already at this | ||
# point, even we dont need the object in most cases because of that fact. | ||
# TODO: Don't implicitly use the finder logic to authorize! |
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.
krauselukas
force-pushed
the
fix/issue_16911
branch
3 times, most recently
from
October 18, 2024 13:04
513e531
to
cab76c6
Compare
Right now we use the presence of the `?deleted=0` query parameter as a workaround to force the request being passed directly to the backend and returning results based on backend data over returning results based on frontend database entries. This workaround currently leads to inconsistant results being returned by the API. Instead of using this workaround we better should always let the backend handle the request (where possible) and return the data based on it's info. Fixes openSUSE#16911
In this case we want the return to avoid double render errors.
After changing the `source/:project_name` to always pass the request to the backend, the `count` attribute is not longer part of the `directory` tag. This was only included by the frontend.
Since we now always get the info from the backend on `source/:project_name` the multibuild flavors are included as well. We have to skip those when querying for `source/:project_name/:package_name/_meta` since multibuild flavors dont have their own meta file.
krauselukas
force-pushed
the
fix/issue_16911
branch
from
October 23, 2024 14:00
cab76c6
to
6a64e22
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now we use the presence of the
?deleted=0
query parameteras a workaround to force the request being passed directly to the
backend and returning results based on backend data over returning
results based on frontend database entries.
This workaround currently leads to inconsistant results being returned
by the API.
Instead of using this workaround we better should always
let the backend handle the request (where possible) and return
the data based on it's info.
Fixes #16911
Replaces #16928
So in short, after introducing this change we always deliver what
?delete=0
was doing before.