mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 04:51:38 +03:00
Workaround missing aws
CLI on self-hosted runners by running the Cloud tests on GH runners (#10977)
- Followup of #10964 - I assumed `aws` CLI is available, because it is on GH runners. But we are running on self-hosted by default. - Ideally we should make the CLI available there and switch back. - But for now, trying to run on the GH runner.
This commit is contained in:
parent
8b30998afb
commit
88aaa51341
10
.github/workflows/extra-nightly-tests.yml
vendored
10
.github/workflows/extra-nightly-tests.yml
vendored
@ -44,11 +44,6 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: ./run backend test std-snowflake
|
- run: ./run backend test std-snowflake
|
||||||
env:
|
env:
|
||||||
ENSO_CLOUD_COGNITO_REGION: ${{ secrets.ENSO_CLOUD_COGNITO_REGION }}
|
|
||||||
ENSO_CLOUD_COGNITO_USER_POOL_ID: ${{ secrets.ENSO_CLOUD_COGNITO_USER_POOL_ID }}
|
|
||||||
ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID: ${{ secrets.ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID }}
|
|
||||||
ENSO_CLOUD_TEST_ACCOUNT_PASSWORD: ${{ secrets.ENSO_CLOUD_TEST_ACCOUNT_PASSWORD }}
|
|
||||||
ENSO_CLOUD_TEST_ACCOUNT_USERNAME: ${{ secrets.ENSO_CLOUD_TEST_ACCOUNT_USERNAME }}
|
|
||||||
ENSO_SNOWFLAKE_ACCOUNT: ${{ secrets.ENSO_SNOWFLAKE_ACCOUNT }}
|
ENSO_SNOWFLAKE_ACCOUNT: ${{ secrets.ENSO_SNOWFLAKE_ACCOUNT }}
|
||||||
ENSO_SNOWFLAKE_DATABASE: ${{ secrets.ENSO_SNOWFLAKE_DATABASE }}
|
ENSO_SNOWFLAKE_DATABASE: ${{ secrets.ENSO_SNOWFLAKE_DATABASE }}
|
||||||
ENSO_SNOWFLAKE_PASSWORD: ${{ secrets.ENSO_SNOWFLAKE_PASSWORD }}
|
ENSO_SNOWFLAKE_PASSWORD: ${{ secrets.ENSO_SNOWFLAKE_PASSWORD }}
|
||||||
@ -81,10 +76,9 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
checks: write
|
checks: write
|
||||||
enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-linux-amd64:
|
enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-linux-amd64:
|
||||||
name: Standard Library Tests (GraalVM CE) (linux, amd64)
|
name: Standard Library Tests (GraalVM CE) (LinuxLatest)
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- ubuntu-latest
|
||||||
- Linux
|
|
||||||
steps:
|
steps:
|
||||||
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
|
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
|
||||||
name: Installing wasm-pack
|
name: Installing wasm-pack
|
||||||
|
@ -707,7 +707,7 @@ pub fn extra_nightly_tests() -> Result<Workflow> {
|
|||||||
|
|
||||||
// We run the extra tests only on Linux, as they should not contain any platform-specific
|
// We run the extra tests only on Linux, as they should not contain any platform-specific
|
||||||
// behavior.
|
// behavior.
|
||||||
let target = (OS::Linux, Arch::X86_64);
|
let target = PRIMARY_TARGET;
|
||||||
workflow.add(target, job::SnowflakeTests {});
|
workflow.add(target, job::SnowflakeTests {});
|
||||||
workflow.add(target, job::StandardLibraryTests {
|
workflow.add(target, job::StandardLibraryTests {
|
||||||
graal_edition: graalvm::Edition::Community,
|
graal_edition: graalvm::Edition::Community,
|
||||||
|
@ -245,8 +245,8 @@ impl JobArchetype for StandardLibraryTests {
|
|||||||
let graal_edition = self.graal_edition;
|
let graal_edition = self.graal_edition;
|
||||||
let should_enable_cloud_tests = self.cloud_tests_enabled;
|
let should_enable_cloud_tests = self.cloud_tests_enabled;
|
||||||
let job_name = format!("Standard Library Tests ({graal_edition})");
|
let job_name = format!("Standard Library Tests ({graal_edition})");
|
||||||
let mut job = RunStepsBuilder::new("backend test standard-library")
|
let run_steps_builder =
|
||||||
.customize(move |step| {
|
RunStepsBuilder::new("backend test standard-library").customize(move |step| {
|
||||||
let main_step = step
|
let main_step = step
|
||||||
.with_secret_exposed_as(
|
.with_secret_exposed_as(
|
||||||
secret::ENSO_LIB_S3_AWS_REGION,
|
secret::ENSO_LIB_S3_AWS_REGION,
|
||||||
@ -268,9 +268,14 @@ impl JobArchetype for StandardLibraryTests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
vec![updated_main_step, step::stdlib_test_reporter(target, graal_edition)]
|
vec![updated_main_step, step::stdlib_test_reporter(target, graal_edition)]
|
||||||
})
|
});
|
||||||
.build_job(job_name, target)
|
let mut job = build_job_ensuring_cloud_tests_run_on_github(
|
||||||
.with_permission(Permission::Checks, Access::Write);
|
run_steps_builder,
|
||||||
|
target,
|
||||||
|
&job_name,
|
||||||
|
should_enable_cloud_tests,
|
||||||
|
)
|
||||||
|
.with_permission(Permission::Checks, Access::Write);
|
||||||
match graal_edition {
|
match graal_edition {
|
||||||
graalvm::Edition::Community => job.env(env::GRAAL_EDITION, graalvm::Edition::Community),
|
graalvm::Edition::Community => job.env(env::GRAAL_EDITION, graalvm::Edition::Community),
|
||||||
graalvm::Edition::Enterprise =>
|
graalvm::Edition::Enterprise =>
|
||||||
@ -288,6 +293,26 @@ impl JobArchetype for StandardLibraryTests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This is a temporary workaround.
|
||||||
|
*
|
||||||
|
* The Cloud tests preparation requires `aws` CLI to be installed on the machine.
|
||||||
|
* The GitHub hosted runners have it, but our self-hosted runners do not.
|
||||||
|
* To fix this we either need to modify self-hosted runners to provide the AWS CLI or change the
|
||||||
|
* way we prepare the Cloud tests to not require it.
|
||||||
|
*/
|
||||||
|
fn build_job_ensuring_cloud_tests_run_on_github(
|
||||||
|
run_steps_builder: RunStepsBuilder,
|
||||||
|
target: Target,
|
||||||
|
job_name: &str,
|
||||||
|
cloud_tests_enabled: bool,
|
||||||
|
) -> Job {
|
||||||
|
if cloud_tests_enabled {
|
||||||
|
run_steps_builder.build_job(job_name, RunnerLabel::LinuxLatest)
|
||||||
|
} else {
|
||||||
|
run_steps_builder.build_job(job_name, target)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct SnowflakeTests {}
|
pub struct SnowflakeTests {}
|
||||||
|
|
||||||
@ -324,10 +349,13 @@ impl JobArchetype for SnowflakeTests {
|
|||||||
crate::libraries_tests::snowflake::env::ENSO_SNOWFLAKE_WAREHOUSE,
|
crate::libraries_tests::snowflake::env::ENSO_SNOWFLAKE_WAREHOUSE,
|
||||||
);
|
);
|
||||||
|
|
||||||
let updated_main_step = enable_cloud_tests(main_step);
|
// Temporarily disabled until we can get the Cloud auth fixed.
|
||||||
|
// Snowflake does not rely on cloud anyway, so it can be disabled.
|
||||||
|
// But it will rely once we add datalink tests, so this should be fixed soon.
|
||||||
|
// let updated_main_step = enable_cloud_tests(main_step);
|
||||||
|
|
||||||
vec![
|
vec![
|
||||||
updated_main_step,
|
main_step,
|
||||||
step::extra_stdlib_test_reporter(target, GRAAL_EDITION_FOR_EXTRA_TESTS),
|
step::extra_stdlib_test_reporter(target, GRAAL_EDITION_FOR_EXTRA_TESTS),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user