Skip to content

feat(storage): Restart delete resumable upload config #29215

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

Draft
wants to merge 2,264 commits into
base: main
Choose a base branch
from

Conversation

shubhangi-google
Copy link
Contributor

@shubhangi-google shubhangi-google commented Feb 27, 2025

Feature to support Restart and Delete resumable upload functionality

@example   

storage = Google::Cloud::Storage.new
bucket = storage.bucket bucket_name
## sample upload_id=  "AKDAyIs3wDvKFtl2e4PopZi-YtGZDxFr2vlR4Z58T6hL9Seypi5W2s7vrRe6-Qw5Fur79g11bT7MtcsSu-vYRkm5nVUKPpm_ciLPn65GQDqNMQ"
#Initiating Resumable upload 
bucket.create_file file, file_name
#Restarting  Resumable upload 
bucket.restart_resumable_upload file, upload_id
#Deleting Resumable upload 
bucket.delete_resumable_upload upload_id

Implementation linked with - googleapis/google-api-ruby-client#21896

@bajajneha27
Copy link
Contributor

#Initiating Resumable upload
bucket = storage.bucket bucket_name

How is this initiating the resumable upload?

#Restarting Resumable upload
storage = Google::Cloud::Storage.new(upload_chunk_size: chunk_size, upload_url: upload_url)

Again, how is this resuming the upload and why do I need to pass the upload_url in the client initialization ?

#Deleting Resumable upload
storage = Google::Cloud::Storage.new(upload_chunk_size: chunk_size, upload_url: upload_url, delete_upload: true)

I don't think we should be passing upload_url or delete_upload in the client initialization. They should rather be either separate functions or parameters for create_file or equivalent method of uploading an object/file.

@bajajneha27
Copy link
Contributor

Also, please disable the acceptance tests that are failing, create a separate bug to fix them and then enable them later.

@shubhangi-google shubhangi-google marked this pull request as draft March 10, 2025 05:23
@shubhangi-google
Copy link
Contributor Author

Also, please disable the acceptance tests that are failing, create a separate bug to fix them and then enable them later.

Hi @bajajneha27 FYI samples are not always failing after @dazuma had merged some fixes in main branch

@shubhangi-google shubhangi-google marked this pull request as ready for review March 13, 2025 10:24
@shubhangi-google shubhangi-google requested a review from a team as a code owner March 13, 2025 10:24
@shubhangi-google shubhangi-google marked this pull request as draft April 30, 2025 10:25
@shubhangi-google shubhangi-google marked this pull request as ready for review May 2, 2025 09:23
Copy link
Contributor

@bajajneha27 bajajneha27 left a comment

Choose a reason for hiding this comment

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

LGTM. Please look at the CI failure

@shubhangi-google
Copy link
Contributor Author

@bajajneha27 Kokoro failure here is not related to changes made by us

  1. Failure:
    Google::Cloud::Storage::Bucket::uniform_bucket_level_access::storage#test_0002_sets uniform_bucket_level_access true and is unable to get the file [acceptance/storage/bucket_uniform_bucket_level_access_test.rb:68]:
    Google::Cloud::PermissionDeniedError expected but nothing was raised.
    https://btx.cloud.google.com/invocations/adb33245-6f5f-4ba0-b242-dacc2184369e/targets/cloud-devrel%2Fclient-libraries%2Fgoogle-cloud-ruby%2Fpresubmit%2Facceptance;config=default/log

def delete_resumable_upload upload_id
ensure_service!
raise "Upload Id missing" unless upload_id
service.delete_resumable_upload name, upload_id, options: { delete_upload: true }
Copy link
Contributor

Choose a reason for hiding this comment

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

I just thought of this.
Since the method already is separate for deleting the resumable upload, we don't need this option: delete_upload: true
We can just add it directly in core library method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @bajajneha27 I have created a new PR #30510 as this PR seemed to have some issue after merging main branch

release-please bot and others added 26 commits June 11, 2025 20:29
* docs: fix various typos in commentary

PiperOrigin-RevId: 764977880

Source-Link: googleapis/googleapis@021fc2e

Source-Link: googleapis/googleapis-gen@9fb7f64
Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUtdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiI5ZmI3ZjY0ZjgxNjg2YzY3MmNmNzNiOTJiZDU0MjYzYzk1NTljZTE4In0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…0482)

feat: add a project ID to table reference so that org parents can create single table discovery configs.
feat: new fields for data profile finding.
docs: various doc revisions
feat: add image_gc_low_threshold_percent in NodeKubeletConfig
feat: add image_gc_high_threshold_percent in NodeKubeletConfig
feat: add image_minimum_gc_age in NodeKubeletConfig
feat: add image_maximum_gc_age in NodeKubeletConfig
feat: add container_log_max_size in NodeKubeletConfig
feat: add container_log_max_files in NodeKubeletConfig
feat: add allowed_unsafe_sysctls in NodeKubeletConfig
feat: add TopologyManager
feat: add MemoryManager
feat: add storage_pools in NodeConfig
feat: add max_run_duration in NodeConfig
feat: add local_ssd_encryption_mode in NodeConfig
feat: add effective_cgroup_mode in NodeConfig
feat: add flex_start in NodeConfig
feat: add performance_monitoring_unit in AdvancedMachineFeatures
feat: add parallelstore_csi_driver_config in AddonsConfig
feat: add high_scale_checkpointing_config in AddonsConfig
feat: add private_endpoint_enforcement_enabled in MasterAuthorizedNetworksConfig
feat: add alpha_cluster_feature_gates in Cluster
feat: add pod_autoscaling in Cluster
feat: add control_plane_endpoints_config in Cluster
feat: add user_managed_keys_config in Cluster
feat: add rbac_binding_config in Cluster
feat: add anonymous_authentication_config in Cluster
feat: add linux_node_config in NodePoolAutoConfig
feat: add desired_default_enable_private_nodes in ClusterUpdate
feat: add desired_control_plane_endpoints_config in ClusterUpdate
feat: add desired_pod_autoscaling in ClusterUpdate
feat: add user_managed_keys_config in ClusterUpdate
feat: add desired_rbac_binding_config in ClusterUpdate
feat: add desired_enterprise_config in ClusterUpdate
feat: add desired_disable_l4_lb_firewall_reconciliation in ClusterUpdate
feat: add desired_node_pool_auto_config_linux_node_config in ClusterUpdate
feat: add desired_compliance_posture_config in ClusterUpdate
feat: add desired_anonymous_authentication_config in ClusterUpdate
feat: add storage_pools in UpdateNodePoolRequest
feat: add max_run_duration in UpdateNodePoolRequest
feat: add flex_start in UpdateNodePoolRequest
feat: add upgrade_target_version in ReleaseChannelConfig
feat: add NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS in StatusCondition.Code
feat: add disable_l4_lb_firewall_reconciliation in NetworkConfig
feat: add UPGRADE_INFO_EVENT in NotificationConfig.EventType
feat: add confidential_instance_type in ConfidentialNodes
feat: add event_type in UpgradeInfoEvent
feat: add standard_support_end_time in UpgradeInfoEvent
feat: add extended_support_end_time in UpgradeInfoEvent
feat: add mitigated_versions in SecurityBulletinEvent
feat: add autopilot_compatibility_auditing_enabled in WorkloadPolicyConfig
feat: add KCP_HPA in LoggingComponentConfig.Component
feat: add JOBSET in MonitoringComponentConfig.Component
feat: add auto_monitoring_config in ManagedPrometheusConfig
feat: add data_cache_count in EphemeralStorageLocalSsdConfig
feat: add FetchClusterUpgradeInfoRequest
feat: add ClusterUpgradeInfo
feat: add UpgradeDetails
feat: add FetchNodePoolUpgradeInfoRequest
feat: add NodePoolUpgradeInfo
docs: Minor documentation updates
feat: add image_gc_low_threshold_percent in NodeKubeletConfig
feat: add image_gc_high_threshold_percent in NodeKubeletConfig
feat: add image_minimum_gc_age in NodeKubeletConfig
feat: add image_maximum_gc_age in NodeKubeletConfig
feat: add container_log_max_size in NodeKubeletConfig
feat: add container_log_max_files in NodeKubeletConfig
feat: add allowed_unsafe_sysctls in NodeKubeletConfig
feat: add max_run_duration in NodeConfig
feat: add flex_start in NodeConfig
feat: add performance_monitoring_unit in AdvancedMachineFeatures
feat: add high_scale_checkpointing_config in AddonsConfig
feat: add alpha_cluster_feature_gates in Cluster
feat: add pod_autoscaling in Cluster
feat: add desired_pod_autoscaling in ClusterUpdate
feat: add desired_disable_l4_lb_firewall_reconciliation in ClusterUpdate
feat: add desired_anonymous_authentication_config in ClusterUpdate
feat: add max_run_duration in UpdateNodePoolRequest
feat: add flex_start in UpdateNodePoolRequest
feat: add NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS in StatusCondition.Code
feat: add disable_l4_lb_firewall_reconciliation in NetworkConfig
feat: add UPGRADE_INFO_EVENT in NotificationConfig.EventType
feat: add confidential_instance_type in ConfidentialNodes
feat: add event_type in UpgradeInfoEvent
feat: add standard_support_end_time in UpgradeInfoEvent
feat: add extended_support_end_time in UpgradeInfoEvent
feat: add mitigated_versions in SecurityBulletinEvent
feat: add autopilot_compatibility_auditing_enabled in WorkloadPolicyConfig
feat: add KCP_HPA in LoggingComponentConfig.Component
feat: add JOBSET in MonitoringComponentConfig.Component
feat: add auto_monitoring_config in ManagedPrometheusConfig
feat: add data_cache_count in EphemeralStorageLocalSsdConfig
feat: add FetchClusterUpgradeInfoRequest
feat: add ClusterUpgradeInfo
feat: add UpgradeDetails
feat: add FetchNodePoolUpgradeInfoRequest
feat: add NodePoolUpgradeInfo
docs: Minor documentation updates
feat: add identity mapping service
feat: add user license config service
feat: add HealthcareFhirConfig to FHIR data store
feat: add ConnectorRunErrorContext to error log
feat: support structured content for chunk
feat: support ACL data store and document
feat: add more options for layout parser config
feat: support media recommendation engine
feat: enable claim level score for grounding
feat: add custom search operators for Workspace search
feat: add more indexing state for site search engine
docs: keep the API doc up-to-date with recent changes
feat: add identity mapping service
feat: add user license config service
feat: add HealthcareFhirConfig to FHIR data store
feat: add ConnectorRunErrorContext to error log
feat: support structured content for chunk
feat: support ACL data store and document
feat: add more options for layout parser config
feat: support media recommendation engine
feat: enable claim level score for grounding
feat: add custom search operators for Workspace search
feat: add more indexing state for site search engine
docs: keep the API doc up-to-date with recent changes
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.

6 participants