Why am I running into an error when trying to apply a minimumModuleVersionOverride?

210 Views Asked by At

We need to specify jobSpecOverrides in transforms-python/build.gradle in order to specify spark module of previous version to use:

jobSpecOverrides {
    minimumModuleVersionOverride {
        version = "1.579.0"
        expiresAfter = "2022-12-30T08:00Z"
    }
}

We always get an error like:

> Could not find method jobSpecOverrides() for arguments [build_7fuwjnfbdqnzske0gypcnsj4u$_run_closure1$_closure2$_closure4$_closure7@52c272c2] on object of type org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.

How can we avoid getting this error?

1

There are 1 best solutions below

0
Max Magid On

Your syntax looks mostly correct, you just need to be sure that the minimum module version is all the way at the bottom of the build.gradle file.

Example:

buildscript {
    repositories {
        maven {
            credentials {
                username ''
                password transformsBearerToken
            }
            authentication {
                basic(BasicAuthentication)
            }
            url project.transformsMavenProxyRepoUri
        }
    }

    dependencies {
        classpath "com.palantir.transforms.python:lang-python-gradle-plugin:${transformsLangPythonPluginVersion}"
    }
}


jobSpecOverrides {
    minimumModuleVersionOverride {
        version = "1.376.0" // there must be a version that's runnable on the stack that's greater than or equal to this. also must be higher than the transforms-defined one.
        expiresAfter = "2021-11-09T08:00Z" // must be at most 7 days after the time CI runs.
    }
}