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

Remove private json package in favor of encoding/json #93

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

donatwork
Copy link
Contributor

PR Submission checklist

Remove the older internal version of the json package and instead use the now mature and maintained encoding/json package. This was a drop in replacement as the internal code was from an earlier version of encoding/json. There was one customization of importance which relied on a custom unmarshall directive to prevent marshalling the ID field but still allow unmarshalling of the field. I did not see a modern way of doing that, other than a custom unmarshaller. Given that it is standard practice to separate the request and response structures I opted to use a separate structure, ExportReq for (PUT, POST) requests and the normal Export for responses. Unit tests pass and I ran cert-csi provisioning and volume IO tests.

GitHub Issues

GitHub Issue #
dell/csm#1559

Common PR Checklist:

  • Have you made sure that the code compiles?
  • Have you commented your code, particularly in hard-to-understand areas
  • Did you run tests in a real Kubernetes cluster?
  • Have you maintained backward compatibility

Description of your changes:

  • Removal of api/json
  • Separate request and response structures
  • Add conversion function to limit northbound changes
  • Update of unit tests, remove obsolete tests.

@donatwork donatwork merged commit 370117a into chore-code-coverage Feb 19, 2025
7 checks passed
@donatwork donatwork deleted the chore-code-coverage-dk branch February 19, 2025 20:14
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