Skip to content

[FSTORE-1912] java client-fix for 400 error code change for feature group not found#956

Merged
dhananjay-mk merged 3 commits into
logicalclocks:mainfrom
dhananjay-mk:fs1912
May 22, 2026
Merged

[FSTORE-1912] java client-fix for 400 error code change for feature group not found#956
dhananjay-mk merged 3 commits into
logicalclocks:mainfrom
dhananjay-mk:fs1912

Conversation

@dhananjay-mk

Copy link
Copy Markdown
Contributor

This PR adds/fixes/changes...

  • please summarize your changes to the code
  • and make sure to include all changes to user-facing APIs

JIRA Issue: -

Priority for Review: -

Related PRs: -

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Tests on VM

Checklist For The Assigned Reviewer:

- [ ] Checked if merge conflicts with master exist
- [ ] Checked if stylechecks for Java and Python pass
- [ ] Checked if all docstrings were added and/or updated appropriately
- [ ] Ran spellcheck on docstring
- [ ] Checked if guides & concepts need to be updated
- [ ] Checked if naming conventions for parameters and variables were followed
- [ ] Checked if private methods are properly declared and used
- [ ] Checked if hard-to-understand areas of code are commented
- [ ] Checked if tests are effective
- [ ] Built and deployed changes on dev VM and tested manually
- [x] (Checked if all type annotations were added and/or updated appropriately)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

The Hopsworks backend changed the HTTP status code returned when a feature group is not found from 404 to 400, while keeping the same errorCode (270009). The Java client's getOrCreateFeatureGroup was matching on both the Error: 404 substring and the error code, so after the backend change it would propagate the error instead of creating the feature group. This PR loosens the match to rely on the error code only, and adds unit tests covering both the not-found-and-create path and the rethrow path.

Changes:

  • Drop the Error: 404 substring check in FeatureGroupEngine.getOrCreateFeatureGroup, keeping only the errorCode:270009 check so both 400 and 404 responses trigger creation.
  • Add TestFeatureGroupEngine with tests for the 400-not-found path, the existing-FG path, and rethrow of unrelated errors.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
java/hsfs/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngine.java Relax the error matcher so the not-found-and-create branch triggers regardless of HTTP status code.
java/hsfs/src/test/java/com/logicalclocks/hsfs/engine/TestFeatureGroupEngine.java New unit tests for getOrCreateFeatureGroup covering create-on-not-found, existing FG, and rethrow paths.

@github-actions

github-actions Bot commented May 19, 2026

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@dhananjay-mk dhananjay-mk changed the title [FSTORE-1912][APPEND] java client-fix for 400 error code change for feature group not found [FSTORE-1912] java client-fix for 400 error code change for feature group not found May 22, 2026
@dhananjay-mk dhananjay-mk merged commit 2f8dcf1 into logicalclocks:main May 22, 2026
17 checks passed
dhananjay-mk added a commit to dhananjay-mk/hopsworks-api that referenced this pull request May 25, 2026
dhananjay-mk added a commit that referenced this pull request May 25, 2026
…r feature group not fo… (#969)

* Revert "fix for accept 400 error code change for feature group not found (#956)"

This reverts commit 2f8dcf1.

* add unit test
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