google / google/clusterfuzz

Incompatible return types for storage.get between local filesystem and GCS implementation

Open
#4,357 0 comments 0 reactions 1 assignee Claimed by @vitorguidi View on GitHub
Dominant language
Python
Stars
5.6k
Forks
629
Avg merge
4d 6h
Merged PRs (30d)
22

Description

As per GCP docs, the GET method returns a datetime object serialized as UTC string, for the last update time. Thus, the [implementation for GCS](https://github.com/google/clusterfuzz/blob/24f976051fbe6b02660cc02f9d5c87986b01c981/src/clusterfuzz/_internal/google_cloud_utils/storage.py#L381) in storage.get returns a string for ['updated'].

The local [filesystem implementation](https://github.com/google/clusterfuzz/blob/24f976051fbe6b02660cc02f9d5c87986b01c981/src/clusterfuzz/_internal/google_cloud_utils/storage.py#L646), however, returns a raw datetime object. This generates inconsistency for two concrete implementations of the same contract.

The issue was noticed in #4341

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.