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

Fix handling of relative STAC links #59199

Merged
merged 3 commits into from
Oct 25, 2024
Merged

Conversation

uclaros
Copy link
Contributor

@uclaros uclaros commented Oct 24, 2024

Description

Resolve relative links to STAC Catalogs, Collections and Items into absolute links.
The link with self relation is used for resolving.

QgsStacParser now has a setBaseUrl() method to set the url which will be used to resolved any relative links (both QgsStacLink and QgsStacAsset hrefs)

@github-actions github-actions bot added this to the 3.40.0 milestone Oct 24, 2024
Copy link

github-actions bot commented Oct 24, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 9628a43)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 9628a43)

@nyalldawson nyalldawson reopened this Oct 24, 2024
@nyalldawson nyalldawson merged commit 258b688 into qgis:master Oct 25, 2024
32 checks passed
@qgis-bot
Copy link
Collaborator

The backport to release-3_40 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply 5d8633b34f3... Resolve relative STAC links
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging src/core/stac/qgsstaccontroller.cpp
Auto-merging src/core/stac/qgsstacparser.cpp
CONFLICT (content): Merge conflict in src/core/stac/qgsstacparser.cpp
Auto-merging src/core/stac/qgsstacparser.h
Auto-merging tests/src/core/testqgsstac.cpp

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_40 release-3_40
# Navigate to the new working tree
cd .worktrees/backport-release-3_40
# Create a new branch
git switch --create backport-59199-to-release-3_40
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 5d8633b34f309f18e99c65b2935414934e1eeb4f,be864209e9ef2fb36bccafaa2fddab2693c06d7e,9628a43d324c83bbc90b1ca3f5a0eb1c0b0d415f
# Push it to GitHub
git push --set-upstream origin backport-59199-to-release-3_40
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_40

Then, create a pull request where the base branch is release-3_40 and the compare/head branch is backport-59199-to-release-3_40.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 failed backport The automated backport attempt failed, needs a manual backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants