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

Providing API version header from server to caller when available. #2757

Merged
merged 5 commits into from
Aug 2, 2024

Conversation

OrangeAndGreen
Copy link
Contributor

Attempts to safely retrieve the x-api-current-version header from API response payloads so calling code can do version checking.
https://dimagi.atlassian.net/browse/CCCT-239

cross-request: dimagi/commcare-core#1409


@Override
public String getApiVersion() {
return apiVersion;
Copy link
Contributor

Choose a reason for hiding this comment

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

how about return requester.getApiVersion() ?

Also is this API version connect only or will also be added to non connect server calls ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, excellent suggestion, I'll do that!

Currently both the ConnectId and Connect servers are returning this header. I'm not sure about any plans for HQ to use it.

Addressed linter errors in several files
@OrangeAndGreen
Copy link
Contributor Author

@damagatchi Retest this please

…essor when call completed instead of implementing it as a class and passing 'this'.

Lint.
@OrangeAndGreen
Copy link
Contributor Author

@damagatchi retest this please

3 similar comments
@OrangeAndGreen
Copy link
Contributor Author

@damagatchi retest this please

@OrangeAndGreen
Copy link
Contributor Author

@damagatchi retest this please

@OrangeAndGreen
Copy link
Contributor Author

@damagatchi retest this please

@shubham1g5 shubham1g5 added the skip-integration-tests Skip android tests. label Aug 2, 2024
@shubham1g5
Copy link
Contributor

@damagatchi retest this please

Since the core PR is merged without these changes we are now breaking the master build. Our integration tests are failing currently due to Password provisioning, hence I am running without integration tests to be able to merge this.

@shubham1g5 shubham1g5 merged commit c0bf495 into master Aug 2, 2024
4 of 6 checks passed
@shubham1g5 shubham1g5 deleted the dv/api_versioning branch August 2, 2024 06:52
@OrangeAndGreen
Copy link
Contributor Author

Ah, yes, thanks for that. I'd considered skipping the integration tests as well since the failures didn't seem related to these changes, but wasn't sure whether that would be advised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants