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

ci: remove changed files check #104

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,65 +78,8 @@ jobs:
with:
fetch-depth: 0

# Note: By default, changed-files will compare against the last non-merge commit on the target branch for pull
# request events, and the previous remote commit of the current branch for push events.
- name: compile list of relevant changed files for instrumentation and operator controller image build
id: changed-files
uses: tj-actions/changed-files@v44
with:
files_yaml: |
instrumentation:
- .github/actions/build-image/**
- .github/workflows/ci.yaml
- images/instrumentation/**
operator_controller:
- .github/actions/build-image/**
- .github/workflows/ci.yaml
- go.mod
- go.sum
- api/**
- cmd/**
- internal/**
collector:
- .github/actions/build-image/**
- .github/workflows/ci.yaml
- images/collector/**
configuration_reloader:
- .github/actions/build-image/**
- .github/workflows/ci.yaml
- images/configreloader/**
filelog_offset_synch:
- .github/actions/build-image/**
- .github/workflows/ci.yaml
- images/filelogoffsetsynch/**

- name: show changed files
env:
INSTRUMENTATION_CHANGED_FILES_FLAG: ${{ steps.changed-files.outputs.instrumentation_any_changed }}
INSTRUMENTATION_CHANGED_FILES_LIST: ${{ steps.changed-files.outputs.instrumentation_all_changed_files }}
OPERATOR_CONTROLLER_CHANGED_FILES_FLAG: ${{ steps.changed-files.outputs.operator_controller_any_changed }}
OPERATOR_CONTROLLER_CHANGED_FILES_LIST: ${{ steps.changed-files.outputs.operator_controller_all_changed_files }}
COLLECTOR_CHANGED_FILES_FLAG: ${{ steps.changed-files.outputs.collector_any_changed }}
COLLECTOR_CHANGED_FILES_LIST: ${{ steps.changed-files.outputs.collector_all_changed_files }}
CONFIGURATION_RELOADER_CHANGED_FILES_FLAG: ${{ steps.changed-files.outputs.configuration_reloader_any_changed }}
CONFIGURATION_RELOADER_CHANGED_FILES_LIST: ${{ steps.changed-files.outputs.configuration_reloader_all_changed_files }}
FILELOG_OFFSET_SYNCH_CHANGED_FILES_FLAG: ${{ steps.changed-files.outputs.filelog_offset_synch_any_changed }}
FILELOG_OFFSET_SYNCH_CHANGED_FILES_LIST: ${{ steps.changed-files.outputs.filelog_offset_synch_any_changed_files }}
run: |
echo "files for instrumentation image have changed: $INSTRUMENTATION_CHANGED_FILES_FLAG"
echo "changed files for instrumentation image: $INSTRUMENTATION_CHANGED_FILES_LIST"
echo "files for operator controller image have changed: $OPERATOR_CONTROLLER_CHANGED_FILES_FLAG"
echo "changed files for operator controller image: $OPERATOR_CONTROLLER_CHANGED_FILES_LIST"
echo "files for collector image have changed: $COLLECTOR_CHANGED_FILES_FLAG"
echo "changed files for collector image: $COLLECTOR_CHANGED_FILES_LIST"
echo "files for configuration reloader image have changed: $CONFIGURATION_RELOADER_CHANGED_FILES_FLAG"
echo "changed files for configuration reloader image: $CONFIGURATION_RELOADER_CHANGED_FILES_LIST"
echo "files for file offset synch image have changed: $FILELOG_OFFSET_SYNCH_CHANGED_FILES_FLAG"
echo "changed files for file offset synch image: $FILELOG_OFFSET_SYNCH_CHANGED_FILES_LIST"

- name: build instrumentation image
uses: ./.github/actions/build-image
if: steps.changed-files.outputs.instrumentation_any_changed == 'true' || contains(github.ref, 'refs/tags/')
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
imageName: instrumentation
Expand All @@ -147,7 +90,6 @@ jobs:

- name: build collector image
uses: ./.github/actions/build-image
if: steps.changed-files.outputs.collector_any_changed == 'true' || contains(github.ref, 'refs/tags/')
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
imageName: collector
Expand All @@ -158,7 +100,6 @@ jobs:

- name: build configuration reloader image
uses: ./.github/actions/build-image
if: steps.changed-files.outputs.configuration_reloader_any_changed == 'true' || contains(github.ref, 'refs/tags/')
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
imageName: configuration-reloader
Expand All @@ -169,7 +110,6 @@ jobs:

- name: build operator controller image
uses: ./.github/actions/build-image
if: steps.changed-files.outputs.operator_controller_any_changed == 'true' || contains(github.ref, 'refs/tags/')
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
imageName: operator-controller
Expand All @@ -180,7 +120,6 @@ jobs:

- name: build filelog offset synch image
uses: ./.github/actions/build-image
if: steps.changed-files.outputs.filelog_offset_synch_any_changed == 'true' || contains(github.ref, 'refs/tags/')
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
imageName: filelog-offset-synch
Expand Down
8 changes: 8 additions & 0 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ var _ = Describe("Dash0 Kubernetes Operator", Ordered, func() {
})
By("all workloads have been deployed")

deleteTestIdFiles()

deployOperator(operatorNamespace, operatorHelmChart, operatorHelmChartUrl, images, true)
deployDash0MonitoringResource(
applicationUnderTestNamespace,
Expand All @@ -153,6 +155,8 @@ var _ = Describe("Dash0 Kubernetes Operator", Ordered, func() {
})
By("all workloads have been instrumented")

deleteTestIdFiles()

undeployDash0MonitoringResource(applicationUnderTestNamespace)

runInParallelForAllWorkloadTypes(workloadConfigs, func(config controllerTestWorkloadConfig) {
Expand All @@ -176,6 +180,7 @@ var _ = Describe("Dash0 Kubernetes Operator", Ordered, func() {
By("installing the Node.js job")
Expect(installNodeJsJob(applicationUnderTestNamespace)).To(Succeed())
deployOperator(operatorNamespace, operatorHelmChart, operatorHelmChartUrl, images, true)
deleteTestIdFiles()
deployDash0MonitoringResource(
applicationUnderTestNamespace,
defaultDash0MonitoringValues,
Expand Down Expand Up @@ -251,6 +256,7 @@ var _ = Describe("Dash0 Kubernetes Operator", Ordered, func() {
},
}
deployOperator(operatorNamespace, operatorHelmChart, operatorHelmChartUrl, initialImages, false)
deleteTestIdFiles()
deployDash0MonitoringResource(
applicationUnderTestNamespace,
defaultDash0MonitoringValues,
Expand All @@ -268,6 +274,7 @@ var _ = Describe("Dash0 Kubernetes Operator", Ordered, func() {
"controller",
)

deleteTestIdFiles()
upgradeOperator(
operatorNamespace,
operatorHelmChart,
Expand Down Expand Up @@ -345,6 +352,7 @@ var _ = Describe("Dash0 Kubernetes Operator", Ordered, func() {
// uninstrumentation procedure there. Thus, for jobs, we test the failing uninstrumentation and
// its effects here.
By("verifying that removing the Dash0 monitoring resource attempts to uninstruments the job")
deleteTestIdFiles()
undeployDash0MonitoringResource(applicationUnderTestNamespace)

Eventually(func(g Gomega) {
Expand Down