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

[FSTORE-1593] S3 Connector doesn't refetch credentials when preparing Spark write #1401

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/beam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hsfs-parent</artifactId>
<groupId>com.logicalclocks</groupId>
<version>3.9.0-RC3</version>
<version>3.9.0-RC4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion java/flink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hsfs-parent</artifactId>
<groupId>com.logicalclocks</groupId>
<version>3.9.0-RC3</version>
<version>3.9.0-RC4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion java/hsfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>hsfs-parent</artifactId>
<groupId>com.logicalclocks</groupId>
<version>3.9.0-RC3</version>
<version>3.9.0-RC4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.logicalclocks</groupId>
<artifactId>hsfs-parent</artifactId>
<packaging>pom</packaging>
<version>3.9.0-RC3</version>
<version>3.9.0-RC4</version>
<modules>
<module>hsfs</module>
<module>spark</module>
Expand Down
2 changes: 1 addition & 1 deletion java/spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>hsfs-parent</artifactId>
<groupId>com.logicalclocks</groupId>
<version>3.9.0-RC3</version>
<version>3.9.0-RC4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
1 change: 1 addition & 0 deletions python/hsfs/storage_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ def prepare_spark(self, path: Optional[str] = None) -> Optional[str]:
# Arguments
path: Path to prepare for reading from cloud storage. Defaults to `None`.
"""
self.refetch()
return engine.get_instance().setup_storage_connector(self, path)

def connector_options(self) -> Dict[str, Any]:
Expand Down
2 changes: 1 addition & 1 deletion python/hsfs/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#

__version__ = "3.9.0rc3"
__version__ = "3.9.0rc4"
3 changes: 3 additions & 0 deletions python/tests/test_feature_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,7 @@ def test_prepare_spark_location(self, mocker, backend_fixtures):
def test_prepare_spark_location_with_s3_connector(self, mocker, backend_fixtures):
# Arrange
engine = spark.Engine()
refetch_api = mocker.patch("hsfs.storage_connector.S3Connector.refetch")
engine_instance = mocker.patch("hsfs.engine.get_instance", return_value=engine)
json = backend_fixtures["feature_group"]["get_basic_info"]["response"]
fg = feature_group.FeatureGroup.from_response_json(json)
Expand All @@ -918,13 +919,15 @@ def test_prepare_spark_location_with_s3_connector(self, mocker, backend_fixtures
# Assert
assert fg.location == path
engine_instance.assert_called_once()
refetch_api.assert_called_once()

def test_prepare_spark_location_with_s3_connector_python(
self, mocker, backend_fixtures
):
# Arrange
engine = python.Engine()
engine_instance = mocker.patch("hsfs.engine.get_instance", return_value=engine)
mocker.patch("hsfs.storage_connector.S3Connector.refetch")
json = backend_fixtures["feature_group"]["get_basic_info"]["response"]
fg = feature_group.FeatureGroup.from_response_json(json)
fg._location = f"{fg.name}_{fg.version}"
Expand Down
2 changes: 1 addition & 1 deletion utils/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.logicalclocks</groupId>
<artifactId>hsfs-utils</artifactId>
<version>3.9.0-RC3</version>
<version>3.9.0-RC4</version>

<properties>
<hops.version>3.2.0.0-SNAPSHOT</hops.version>
Expand Down
Loading