[go: nahoru, domu]

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

google-cloud-run, ContainerOverride is missing command #12760

Open
iuiu34 opened this issue May 30, 2024 · 9 comments
Open

google-cloud-run, ContainerOverride is missing command #12760

iuiu34 opened this issue May 30, 2024 · 9 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@iuiu34
Copy link
iuiu34 commented May 30, 2024

Hi,
in cloudRun. Given a job, you can override args but not command. Why?
I'm reporting this as bug, instead of feature requests, cause seems inconsistent to me

from google.cloud import run_v2

def run_job(command: str ,
            args: dict ,
            job_name: str ,
            location: str ,
            project: str 

            ):
    if type(args) is dict:
        args = [f'--{k}={v}' for k, v in args.items()]

    client = run_v2.JobsClient()
    args =['get_circ_mrna', '--args', 'args']
    container_overrides = run_v2.RunJobRequest.Overrides.ContainerOverride(
        args=args,
        # command=command # why this is not allowed?
    )

    overrides = run_v2.RunJobRequest.Overrides(
        container_overrides=[container_overrides]
    )
    job_name_ = f"projects/{project}/locations/{location}/jobs/{job_name}"

    request = run_v2.RunJobRequest(
        name=job_name_,
        overrides=overrides,
    )

    request = client.run_job(request=request)
    name = request.metadata.name.split('/')[-1]

    print(f"executed job: {name}")
    # response = operation.result()
    link = f"https://console.cloud.google.com/run/jobs/executions/details/{location}/{name}/tasks?project={project}"
    print(f"job link: {link}")
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label May 30, 2024
@iuiu34
Copy link
Author
iuiu34 commented May 30, 2024

@mukund-ananthu
Copy link

@iuiu34

The issue created looks related to Cloud Run. This repository deals with issues related to Cloud Pub/Sub. Could you please let me know if there was a reason for creating the issue in this repository?

@mukund-ananthu
Copy link
mukund-ananthu commented May 30, 2024

I could find this repository that is related to Google Cloud Run: https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-run . Please feel free to create the issues there if you find it more relevant. I am also closing this issue, please feel free to reopen if you think it is related to Cloud Pub/Sub.

@parthea parthea transferred this issue from googleapis/python-pubsub May 30, 2024
@parthea parthea reopened this May 30, 2024
@iuiu34
Copy link
Author
iuiu34 commented May 30, 2024

@mukund-ananthu i don't follow

cloud run is in https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-run.
Which is this current repo, where i'm opening the issue, no?

@parthea
Copy link
Contributor
parthea commented May 30, 2024

@iuiu34 The issue is in the correct repository now.

@mukund-ananthu
Copy link

cloud run is in https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-run.
Which is this current repo, where i'm opening the issue, no?

@iuiu34

  1. The issue was created in https://github.com/googleapis/python-pubsub/tree/main
  2. It was then transferred to the correct repository after the comment. Refer to [parthea](https://github.com/parthea) transferred this issue from googleapis/python-pubsub [5 minutes ago](https://github.com/googleapis/google-cloud-python/issues/12760#event-12990340805) in the issue history.

@parthea
Copy link
Contributor
parthea commented May 30, 2024

@iuiu34,
Regrettably, the feature doesn't exist in the Cloud Run API as per the API documentation. Thank you for filing an issue in the API specific issue tracker. Please follow up via the API specific bug https://issuetracker.google.com/issues/343734020.

@iuiu34
Copy link
Author
iuiu34 commented May 30, 2024

understood.

For me is inconsistent also that the functionality of overwriting command is in the cmd but not in the python api

@parthea
Copy link
Contributor
parthea commented May 30, 2024

The Python Client Library for Cloud Run supports all of the published API interfaces. As this issue is specific to the API itself, please follow up on https://issuetracker.google.com/issues/343734020.

@parthea parthea added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. external This issue is blocked on a bug with the actual product. labels May 30, 2024
@parthea parthea assigned parthea and unassigned mukund-ananthu May 30, 2024
@parthea parthea added the priority: p2 Moderately-important priority. Fix may not be included in next release. label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. external This issue is blocked on a bug with the actual product. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants
@parthea @iuiu34 @mukund-ananthu and others