Skip to content

KMS-689: Add 'xml:base' to rdf result's header - #130

Merged
htranho merged 1 commit into
mainfrom
KMS-689
Aug 11, 2026
Merged

KMS-689: Add 'xml:base' to rdf result's header#130
htranho merged 1 commit into
mainfrom
KMS-689

Conversation

@htranho

@htranho htranho commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Overview

What is the feature?

RDF response from /kms/concepts should have xml:base="https://gcmd.earthdata.nasa.gov/kms/concept/" in header.

What is the Solution?

Add 'xml:base' to RDF result in getConcepts handler.

What areas of the application does this impact?

/kms/concepts(*)

Testing

http://localhost:3013/concepts
http://localhost:3013/concepts/concept_scheme/instruments
should show 'xml:base' in RDF header

Attachments

N/A

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Summary by CodeRabbit

  • New Features

    • RDF/XML responses now include the concept base URL through the xml:base attribute.
  • Tests

    • Added coverage verifying RDF root namespace declarations and xml:base in concept responses.
    • Added validation for successful RDF response status and exact root element formatting.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fdcd7be2-856f-4221-aa2c-4ccbeac18a49

📥 Commits

Reviewing files that changed from the base of the PR and between 95005dd and f2e67a5.

📒 Files selected for processing (3)
  • serverless/src/getConcept/__tests__/handler.test.js
  • serverless/src/getConcepts/__tests__/handler.test.js
  • serverless/src/getConcepts/handler.js

📝 Walkthrough

Walkthrough

The RDF response now includes an xml:base attribute set to the KMS concept base URL. Tests validate this attribute and the root namespace declarations for getConcept and getConcepts.

Changes

RDF base URI

Layer / File(s) Summary
RDF output and validation
serverless/src/getConcepts/handler.js, serverless/src/getConcept/__tests__/handler.test.js, serverless/src/getConcepts/__tests__/handler.test.js
The RDF output includes the KMS concept base URL in xml:base. Success tests validate the RDF root namespaces and base URI.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: cgokey

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required overview, solution, impact, testing, attachments, and checklist sections with relevant details.
Title check ✅ Passed The title clearly identifies the main change: adding xml:base to the RDF response header.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch KMS-689

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed: dependency version conflict. Check your lock file or package.json.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.71%. Comparing base (95005dd) to head (f2e67a5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #130   +/-   ##
=======================================
  Coverage   99.71%   99.71%           
=======================================
  Files         234      234           
  Lines        6346     6346           
  Branches     1866     1873    +7     
=======================================
  Hits         6328     6328           
  Misses         16       16           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cgokey

cgokey commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

You will need to refresh the caches since it stores the old rdf base.
So once you merge, hit POST /cache/rebuild and be sure to include an authorization header.
Otherwise, PR looks good, approved!

@htranho
htranho merged commit f4aa7a2 into main Aug 11, 2026
7 checks passed
@htranho
htranho deleted the KMS-689 branch August 11, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants