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

feat(codepipeline): add Triggers and Trigger Filters for CodeStarSourceConnection action #30516

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheRealAmazonKendra
Copy link
Contributor

This change deprecates the old Triggers and re-scopes adding them to the only action where they are valid.

This also adds classes for simplifying the input of filters for all filter types

Issue # (if applicable)

Closes #.

Still TODO:

  • add integration tests
  • update README
  • prevent usage of both trigger types in one pipeline

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

This change deprecates the old filters and re-scopes adding them to the only action where they are valid.

This also adds classes for simplifying the input of filters for all filter types
@TheRealAmazonKendra TheRealAmazonKendra marked this pull request as draft June 11, 2024 01:19
@github-actions github-actions bot added the p2 label Jun 11, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team June 11, 2024 01:19
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 11, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 85495b9
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Comment on lines +40 to +44
test('onTags returns no filters when none are provided', () => {
expect(() =>
Filter.push(PushFilter.onTags({})),
).toThrow('PushFilter.onTags() must contain at least one \'includes\' or \'excludes\' pattern.');
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
test('onTags returns no filters when none are provided', () => {
expect(() =>
Filter.push(PushFilter.onTags({})),
).toThrow('PushFilter.onTags() must contain at least one \'includes\' or \'excludes\' pattern.');
});
test('onTags throws when no filters are provided', () => {
expect(() =>
Filter.push(PushFilter.onTags({})),
).toThrow('PushFilter.onTags() must contain at least one \'includes\' or \'excludes\' pattern.');
});

Comment on lines +19 to +26
const filter = Filter.push(PushFilter.onTags({
includes: ['tag1', 'tag2'],
}));

expect(filter._push?.tags).toEqual({ includes: ['tag1', 'tag2'] });
expect(filter._push?.branches).toBeUndefined();
expect(filter._push?.filePaths).toBeUndefined();
expect(filter._pullRequest).toBeUndefined();
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like testing implementation details, but I appreciate the brevity of these tests. We should have a unit test that shows using a Filter with a Trigger on an Action, so we get some tests that cover (and show) the intended usage.

@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Features must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

@dguisinger
Copy link

@TheRealAmazonKendra any progress on this? It appears to have been sitting idle for a month and a half

@atali
Copy link

atali commented Aug 10, 2024

Any plan to merge the code ?

@moltar
Copy link
Contributor

moltar commented Sep 23, 2024

Really want to see this PR land. This is a long-awaited feature.

@amine-mf
Copy link
Contributor

amine-mf commented Oct 7, 2024

Woow, it's been "dead" for 3 months, for a feature that is long awaited... Maybe some help is needed?

@dguisinger
Copy link

Woow, it's been "dead" for 3 months, for a feature that is long awaited... Maybe some help is needed?

Its really disappointing because it was fixed by a contributor, and then AWS said they didn't like how it was done, backed it out, created this and let it hang out here for months. If AWS wants to do it themselves, maybe we need a project owner's eyes to get it re-prioritized and assigned to someone who will finish it

@shandc007
Copy link

Any clue when this PR will be merged?

@khoatrandata
Copy link

one up vote for this feature please!

@nelsonsilva-code
Copy link

Any news on when this fix will be released?

@dguisinger
Copy link

Any news on when this fix will be released?

I have seen no evidence this stayed on the radar of anyone at AWS after they overruled the initial implementation someone submitted. Does anyone know who we can tag so someone from the team will actually start paying attention?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants