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

Fixed hardcoded minnesota endpoint. #595

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

mdellabitta
Copy link
Contributor

@mdellabitta mdellabitta commented Nov 25, 2024

Important

Removed hardcoded endpoint in MdlHarvester and made it configurable via queryParams.

  • Behavior:
    • Removed hardcoded endpoint URL in getFirstUrl() in MdlHarvester.scala.
    • Endpoint is now configurable via queryParams map using conf.harvest.endpoint.
  • Configuration:
    • Added endpoint to queryParams map in MdlHarvester.scala.

This description was created by Ellipsis for 61e9873. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 61e9873 in 39 seconds

More details
  • Looked at 28 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. src/main/scala/dpla/ingestion3/harvesters/api/MdlHarvester.scala:30
  • Draft comment:
    Remove the trailing comma in the queryParams Map definition.
    "rows" -> conf.harvest.rows.getOrElse(defaultRows)
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The trailing comma in a Map definition is unnecessary and can lead to confusion.
2. src/main/scala/dpla/ingestion3/harvesters/api/MdlHarvester.scala:28
  • Draft comment:
    Ensure that the endpoint parameter is validated and not set to an empty string, as this could lead to invalid URL construction.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_MOsLmshmbmimUQfo


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

.setScheme("https")
.setHost("lib-metl-prd-01.oit.umn.edu")
.setPath("/api/v2/records")
val url = new URIBuilder(queryParams.getOrElse("endpoint", ""))
Copy link

Choose a reason for hiding this comment

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

Consider adding validation to ensure the endpoint is a valid URL before using it in URIBuilder.

@mdellabitta mdellabitta merged commit 3c1eb92 into develop Nov 25, 2024
3 checks passed
@mdellabitta mdellabitta deleted the fix-hardcoded-minnesota-endpoint branch November 25, 2024 16:17
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.

1 participant