fix(set_resources): remove wildcard in method signature#143
Open
MattWellie wants to merge 1 commit intomainfrom
Open
fix(set_resources): remove wildcard in method signature#143MattWellie wants to merge 1 commit intomainfrom
MattWellie wants to merge 1 commit intomainfrom
Conversation
Contributor
📊 SonarQube Summary
|
Contributor
🐳 Docker Image BuiltA new Docker image has been built for this PR: Image: Pull command: docker pull australia-southeast1-docker.pkg.dev/cpg-common/images-dev/cpg_flow:217a2f138490bdf906b6e28dc6c28a90842adb7d🔗 View in Google Cloud Console This comment was automatically generated by the Docker workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The production-pipelines implementation (here) had the method signature:
That method signature was changed in the liftover to:
Most/all of the uses of this method in code had the job as the first argument, often without keyword, e.g.
res = STANDARD.set_resources(j, ncpu=nthreads, storage_gb=50)This syntax is no longer valid in CPG-Flow, as the
*consumes thejobparameter unless it is supplied with a keyword, giving the error:TypeError: MachineType.set_resources() takes 1 positional argument but 2 positional arguments (and 2 keyword-only arguments) were givenThis PR proposes changing back to the original syntax and removing the non-keyword argument consumer, as I can't see why the
*was added.