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 upload of validation reports to Google Cloud #1102

Merged
merged 17 commits into from
May 4, 2022

Conversation

lionel-nj
Copy link
Contributor

@lionel-nj lionel-nj commented Feb 9, 2022

closes #1094

Summary:

This PR removes the usage of GCP cloud storage. The content of this PR fixes the behavior described here

Expected behavior:

On forks, acceptance tests should run and not fail because of missing credentials: upload to cloud storage is not used - on this GitHub repository, google cloud storage is used as a backup.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • [ ] Run the unit tests with gradle test to make sure you didn't break anything
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@lionel-nj lionel-nj self-assigned this Feb 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Thank you for this contribution! 🍰✨🦄

Information about source corruption

0 out of 1248 sources are corrupted.

Acceptance test details

The changes in this pull request did not trigger any new errors on known GTFS datasets from the MobilityDatabase.
Download the full acceptance test report for commit 6e94daa here (report will disappear after 90 days).

@lionel-nj lionel-nj marked this pull request as ready for review February 9, 2022 13:44
Copy link
Member

@barbeau barbeau left a comment

Choose a reason for hiding this comment

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

Thanks @lionel-nj! Comments in-line.

@@ -186,16 +186,6 @@ jobs:
with:
name: reports_all
path: ${{ github.sha }}/output
- name: Set up and authorize Cloud
Copy link
Member

Choose a reason for hiding this comment

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

Could you describe more what we lose by disabling this? Can we still download the reports as linked in the comment generated by the acceptance test (e.g., "Download the full acceptance test report for commit 6e94daa [here] (report will disappear after 90 days)"? If not does that comment need to change?

If it possible to check here if the Action has permission to use the credentials? If so, we could still run this block for branches on this repo, but just not for 3rd party forks.

Copy link
Contributor Author

@lionel-nj lionel-nj Feb 9, 2022

Choose a reason for hiding this comment

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

Could you describe more what we lose by disabling this?

By doing so, we loose the ability to store validation reports on GCP Cloud storage. But it is still possible to download them from the internal storage of github.

Can we still download the reports as linked in the comment generated by the acceptance test (e.g., "Download the full acceptance test report for commit 6e94daa [here] (report will disappear after 90 days)"? If not does that comment need to change?

Yes - this remains possible.

If it possible to check here if the Action has permission to use the credentials? If so, we could still run this block for branches on this repo, but just not for 3rd party forks.

Let me see.

Copy link
Contributor Author

@lionel-nj lionel-nj Feb 9, 2022

Choose a reason for hiding this comment

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

From a quick searchhere and there; it appears that checking the presence of a repo secret in a if block of a job's step might not be possible. However, it might be possible to include an intermediate step that consists in checking the presence of said secret and store the boolean in an environmental variable, then execute Set up and authorize Cloud and Upload reports to Google Cloud Storage conditionally. Unfortunately I will not have the time to finish it 😔.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this is the issue regarding making execution conditional on secrets - actions/runner#520

@barbeau
Copy link
Member

barbeau commented Feb 9, 2022

Also, I believe the link you have in your original post of "The process of the acceptance tests will solely rely on the internal Github storage in order to avoid the behavior described #755." is pointing to the wrong issue.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Thank you for this contribution! 🍰✨🦄

Information about source corruption

0 out of 1248 sources are corrupted.

Acceptance test details

The changes in this pull request did not trigger any new errors on known GTFS datasets from the MobilityDatabase.
Download the full acceptance test report for commit f632372 here (report will disappear after 90 days).

Based on actions/runner#520 (comment)

Expected behavior is that it will upload reports to Google Cloud for PRs for branches on the main repo, but skip upload on PRs from forks.
@barbeau barbeau changed the title ci: do not use GCP cloud storage in acceptance test process ci: Skip upload of validation reports to Google Cloud for PRs from forks Apr 27, 2022
@github-actions
Copy link
Contributor

Thank you for this contribution! 🍰✨🦄

Information about source corruption

0 out of 1248 sources are corrupted.

Acceptance test details

The changes in this pull request did not trigger any new errors on known GTFS datasets from the MobilityDatabase.
Download the full acceptance test report for commit 6a9edf6 here (report will disappear after 90 days).

@barbeau barbeau changed the title ci: Skip upload of validation reports to Google Cloud for PRs from forks ci: Skip upload of validation reports to Google Cloud Apr 28, 2022
@barbeau
Copy link
Member

barbeau commented Apr 28, 2022

@maximearmstrong @isabelle-dr I've expanded on the work that @lionel-nj started here to effectively skip all validation report uploads to Google Cloud, which should fix acceptance tests on PRs from forks and therefore close #1094.

Ideally we'd conditionally upload reports to Google Cloud only if the PR is for a branch on this repo (and not upload if the PR is from a fork). However, this IF statement in the GitHub Action isn't currently working as expected.

Given that the acceptance tests running on forks is a critical part of the workflow of this repo for evaluating PRs like #1125, and uploading reports to Google Cloud is effectively a "nice to have" feature, I propose that we merge this PR as-is to fix the acceptance tests for forks.

We can then fix the Google Cloud uploads in future work. I've opened issue #1128 to track re-enabling Google Cloud uploads in the future by tweaking the existing code in this PR. I've also marked the code that's not working as intended with a FIXME statement pointing to that issue.

So as long as all the acceptance tests pass for my latest push to this branch, then as far as I know this should be ok to merge if you agree.

@github-actions
Copy link
Contributor

Thank you for this contribution! 🍰✨🦄

Information about source corruption

0 out of 1248 sources are corrupted.

Acceptance test details

The changes in this pull request did not trigger any new errors on known GTFS datasets from the MobilityDatabase.
Download the full acceptance test report for commit 79c3021 here (report will disappear after 90 days).

@maximearmstrong
Copy link
Contributor

Thank you for this work @barbeau!

@isabelle-dr Do you see value in keeping the reports for more than 90 days? If yes, I agree with Sean that we should merge this PR as-is to fix the problem and then address the Google Cloud issue. If no, I suggest that we remove the code related to Google Cloud right away.

@isabelle-dr
Copy link
Contributor

@maximearmstrong @barbeau I'm ok not keeping the report after 90 days, because:

  • this is what is currently written in the GH action message, so if the user want to keep it for longer, they can
  • we still have access to the list of datasets in the GH action message "forever", if we need to troubleshoot something that happened in the past

@barbeau barbeau changed the title ci: Skip upload of validation reports to Google Cloud ci: Remove upload of validation reports to Google Cloud May 4, 2022
@barbeau
Copy link
Member

barbeau commented May 4, 2022

@maximearmstrong @isabelle-dr Sounds good - I've removed the Google Cloud upload code entirely in ced54b9.

After the tests run this PR should be ready for review/merge.

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

Thank you for this contribution! 🍰✨🦄

Information about source corruption

0 out of 1248 sources are corrupted.

Acceptance test details

The changes in this pull request did not trigger any new errors on known GTFS datasets from the MobilityDatabase.
Download the full acceptance test report for commit 81cd956 here (report will disappear after 90 days).

Copy link
Contributor

@maximearmstrong maximearmstrong left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you @barbeau and @lionel-nj for this contribution :)

@maximearmstrong maximearmstrong merged commit cf170b1 into master May 4, 2022
@maximearmstrong maximearmstrong deleted the fix/acceptance-test-on-forks branch May 4, 2022 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Acceptance tests fail for PR opened from forked repository
4 participants