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

Check that events are at least expected ones #3375

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

afrittoli
Copy link
Member

Changes

Fixes #3374

Signed-off-by: Andrea Frittoli [email protected]

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 12, 2020
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2020
@ghost
Copy link

ghost commented Oct 13, 2020

/approve cancel

sorry i did not see the WIP

@tekton-robot tekton-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2020
@afrittoli
Copy link
Member Author

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 13, 2020
@afrittoli afrittoli changed the title WIP Check that events are at least expected ones Check that events are at least expected ones Oct 13, 2020
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 13, 2020
@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2020
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 15, 2020
Comment on lines 174 to 175
collectedEvents := ""
for i, event := range events {
collectedEvents += fmt.Sprintf("%#v", event)
if i < (len(events) - 1) {
collectedEvents += ", "
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
collectedEvents := ""
for i, event := range events {
collectedEvents += fmt.Sprintf("%#v", event)
if i < (len(events) - 1) {
collectedEvents += ", "
}
}
collectedEvents := make([]string, 0, len(events))
for _, event := range events {
collectedEvents = append(collectedEvents, fmt.Sprintf("%#v", event))
}
... = strings.Join(collectedEvents, ", ")

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, done

@afrittoli afrittoli closed this Oct 15, 2020
@afrittoli afrittoli reopened this Oct 15, 2020
@afrittoli
Copy link
Member Author

@pritidesai @sbwsg it would be good to get this merged, as it keeps causing flakes

@afrittoli afrittoli added the kind/flake Categorizes issue or PR as related to a flakey test label Oct 20, 2020
@afrittoli afrittoli removed the kind/bug Categorizes issue or PR as related to a bug. label Oct 20, 2020
Copy link
Member

@mattmoor mattmoor left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

hold for the nit, if you care, but otherwise I'd love to harden the test and reduce the noise I see from this.

@tekton-robot tekton-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Oct 20, 2020
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2020
Events are not guaranteed to be sent once, so allow for more than
one in the cancel_test.

Fixes tektoncd#3374

Signed-off-by: Andrea Frittoli <[email protected]>
@mattmoor
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2020
Copy link
Member

@pritidesai pritidesai left a comment

Choose a reason for hiding this comment

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

thank you @afrittoli!

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pritidesai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2020
@afrittoli
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@afrittoli
Copy link
Member Author

workspace in sidecar might be the next flake?

@mattmoor
Copy link
Member

/hold cancel

As well.

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 20, 2020
@tekton-robot tekton-robot merged commit e98baae into tektoncd:master Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/flake Categorizes issue or PR as related to a flakey test lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent Cloud Event failures during integration tests
4 participants