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

Improvements to e2e tests #198

Closed
Tracked by #97
laurentsimon opened this issue Apr 22, 2022 · 14 comments
Closed
Tracked by #97

Improvements to e2e tests #198

laurentsimon opened this issue Apr 22, 2022 · 14 comments

Comments

@laurentsimon
Copy link
Contributor

laurentsimon commented Apr 22, 2022

It would be useful to have the following to improve troubleshooting and maintaining our e2e tests:

  1. In each test repo, name the workflows as: trigger.branch.(<optional params>)yml, e.g. schedule.main.yml, workflow_dispatch.main.<user-options>
  2. Give each workflow a name to make it easier to locate in the Actions tab: Trigger - Branch should work?
  3. Add more information to the body of the issues created when the e2e test fails:
Repo: <repo name@branch>
(optional) Workflow name: <name of workflow>
Workflow file: <path/to/workflow.yaml>
Trigger: <trigger-name>
Branch: <branch-name>
Private repo : <true/false>

@naveensrinivasan wdut?

/cc @azeemshaikh38

@azeemshaikh38
Copy link
Contributor

Let's prioritize (2) and (3) since we need this for debugging any failures in the upcoming Golang-based action. Since workflow_dispatch and pull_request are supposed to be experimental and not expected to have full-support in our upcoming release, let's attempt those when we plan to add support for it.

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Apr 26, 2022

So let's wait until these minor changes (2 and 3) are landed to cut the release?

@naveensrinivasan I don't know if you've created PRs on the other repos for these, but I think I'd like to be a reviewer. Not that I'll block anything, but mostly to follow and learn how it's setup a little more in details :-) Thanks!

@azeemshaikh38
Copy link
Contributor

So let's wait until these minor changes (2 and 3) are landed to cut the release?

Yes, if you mean the Golang release. Not needed for the minor release maybe.

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Apr 26, 2022

OK, then we have only one item left for the minor, which @rohankh532 is working on #196
Almost there!

@laurentsimon
Copy link
Contributor Author

laurentsimon commented Apr 28, 2022

An additional feature is to crate an entry only if the issue is not already crated. If the issue already exists, we can add a comment with the information for the new run. I've implemented this in https://github.com/slsa-framework/example-package/blob/main/.github/workflows/e2e-report-failure.sh, I think it can be re-used

@naveensrinivasan
Copy link
Member

So let's wait until these minor changes (2 and 3) are landed to cut the release?

@naveensrinivasan I don't know if you've created PRs on the other repos for these, but I think I'd like to be a reviewer. Not that I'll block anything, but mostly to follow and learn how it's setup a little more in details :-) Thanks!

Yes, I will include you as the reviewer!

@laurentsimon
Copy link
Contributor Author

Cool, thanks. Fyi you can see the setup for SLSA in https://github.com/slsa-framework/example-package/blob/main/.github/workflows/

naveensrinivasan added a commit to ossf-tests/scorecard-action-non-main-branch that referenced this issue Apr 30, 2022
ossf/scorecard-action#198

Included detail message in the body.

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
@laurentsimon
Copy link
Contributor Author

You also need to set THIS_FILE. I could not find a GITHUB_ for it. Let me know if you find one

@naveensrinivasan
Copy link
Member

You also need to set THIS_FILE. I could not find a GITHUB_ for it. Let me know if you find one

Thanks, I wasn't able to find one either. I set them manually so that it will help to debug. Let me know. If you are good merge those PR's. Thanks

@laurentsimon
Copy link
Contributor Author

Go ahead merge. No further comment on my end.

@naveensrinivasan
Copy link
Member

They are merged. Can we close this ticket and open another if we want any other enhancements?

@laurentsimon
Copy link
Contributor Author

laurentsimon commented May 2, 2022

SGTM. Feel free to close and add the newly-created issue to the release issue. I think in the new issue we want:

  1. Re-use existing issue instead of creating new one
  2. Verify push/dispatch_workflow work properly
  3. Auto-close issues when e2e tests pass

Are these what you had in mind or there were others?

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

No branches or pull requests

3 participants