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

fix(dp): Fix typo in domain-proxy Makefile #13019

Merged
merged 1 commit into from
Jun 19, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dp-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy
branches:
- master
- 'v1.*'
pull_request_target:
pull_request:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reverts the change suggested in #12855 (comment). Can you elaborate why this was done? I think @Neudrino had some reason for his suggestion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion was to use the pull_request_target trigger action to make secrets available. We took the advice without actually verifying the validity of the suggestion.
pull_request_target is documented as follows:

This event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the pull_request event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.

We are building code from the pull request, as that is the whole idea of running integration tests.

Secondly, the only secret we use is the GITHUB_TOKEN which is an exception to availability of secrets in PRs from forks:

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.

Now, since we have introduced the pull_request_target, the CI was run from the base of the PRs, rather from the head of the PR branch, and that hid the mistake in the Makefile.

branches:
- master
- 'v1.*'
Expand Down
4 changes: 2 additions & 2 deletions dp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
endif

ifdef DP_METRICS
APPEND_METRICS_PROFILE = ,metrics
APPEND_METRICS_PROFILE=,metrics
endif

.PHONY: local
Expand Down Expand Up @@ -165,7 +165,7 @@ _ci_integration_tests_no_orc8r: _install_skaffold_ci

.PHONY: _ci_integration_tests_orc8r
_ci_integration_tests_orc8r: _install_skaffold_ci
skaffold run -p orc8r-deployment,integration-tests-no-orc8,integration-tests-orc8r-only,$(APPEND_METRICS_PROFILE)
skaffold run -p orc8r-deployment,integration-tests-no-orc8,integration-tests-orc8r-only$(APPEND_METRICS_PROFILE)
kubectl logs test-runner-orc8r --timestamps=true -f | tee /tmp/integration-tests-results/$@.txt
@set -e;\
sleep 2;\
Expand Down