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

Maintenance week #553

Merged
merged 4 commits into from
Jun 6, 2024
Merged

Maintenance week #553

merged 4 commits into from
Jun 6, 2024

Conversation

ehanson8
Copy link
Contributor

@ehanson8 ehanson8 commented Jun 5, 2024

Purpose and background context

Maintenance week updates

How can a reviewer manually see the effects of these changes?

Run the following command to verify there are no issues running a harvest:

pipenv run oai -h https://dspace.mit.edu/oai/request -o output/dspace-updates.xml harvest -m mets --method get -f 2024-05-07

Includes new or updated dependencies?

YES

Changes expectations for external applications?

NO

Developer

  • All new ENV is documented in README
  • All new ENV has been added to staging and production environments
  • All related Jira tickets are linked in commit message(s)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer(s)

  • The commit message is clear and follows our guidelines (not just this PR message)
  • There are appropriate tests covering any new functionality
  • The provided documentation is sufficient for understanding any new functionality introduced
  • Any manual tests have been performed or provided examples verified
  • New dependencies are appropriate or there were no changes

* The vcrpy version update required the cassette fixtures to be recreated
* Update unit tests to account for the new cassette fixtures
Copy link
Contributor

@ghukill ghukill left a comment

Choose a reason for hiding this comment

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

Looks good to me! Nice work on navigating the cassettes.

I remain a little conflicted about them, but think your solution here is an elegant one for the situation at hand (maintenance + python version bump). If we did want to explore non-VCR approaches, perhaps for some routes or things to test, an issue could be started to explore it. But no need to do everything, all at once, during maintenance.

Similar to other ongoing work, I think iterative change and improvements are great, and this feels like the embodiment of that approach.

w55au72VgtpCFjeDShZXsriSxZUsrmRxJYsrWVzJ4v+TLP5FWTa/nxxnQiAQX/QGuV3MkBr7a0an
nanTzogbBFBcuGbj1LBdXGuCUjT+JvKJO9q42R/k7NF1zr7ewQ0cNA57dRgBAvltcD2/jP8Ly9YB
6pwfAAA=
string: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Took me a bit to parse (had to look at original file and new file, not diff, as the diff kind of mangles it), but I think I'm understanding the changes here. My understanding is:

  • response.body.string: "" was manually set
  • response.status.code was already 500 so left as-is

If so, cool! Seems like a good use of setting the HTTP status manually.

I was going to propose that maybe it'd be nice to set a manual response like:

<html><p>ERROR!  This is a manually created error that simulates OAI-PMH response for 500.</p></html>

But ultimately, maybe that's just as confusing and/or inaccurate. After thinking on it, I think I'm good with just an empty string "" for the body of this simulated 500 HTTP response.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did manually set the 500 as well because that handle is now returning a 200 with a record. Agree with your point about creating a fake response string being confusing and inaccurate. It did ultimately feel like too much overhead to support both vcrpy and requests-mock in the test suite but as you say, we can evaluate this more comprehensively later

@ehanson8 ehanson8 merged commit 4915456 into main Jun 6, 2024
4 checks passed
@ehanson8 ehanson8 deleted the maintenance-week branch June 6, 2024 13:53
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.

3 participants