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

[FLINK-33279][Connector/Kinesis] Skip AWS e2e tests run if credentials not present #108

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

z3d1k
Copy link
Contributor

@z3d1k z3d1k commented Oct 18, 2023

Purpose of the change

Prevent AWS E2E tests running on PR.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Manual verification:

Using actions with debug logging (docs)

Workflow setup:
##[debug]Evaluating: secrets.FLINK_AWS_USER
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'FLINK_AWS_USER'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: secrets.FLINK_AWS_PASSWORD
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'FLINK_AWS_PASSWORD'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: ((secrets.FLINK_AWS_USER != '') && (secrets.FLINK_AWS_PASSWORD != ''))
##[debug]Evaluating And:
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating secrets:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'FLINK_AWS_USER'
##[debug]....=> null
##[debug]....Evaluating String:
##[debug]....=> ''
##[debug]..=> false
##[debug]=> false
##[debug]Expanded: ((null != '') && (secrets['FLINK_AWS_PASSWORD'] != ''))
##[debug]Result: false
Before:
##[debug]Evaluating condition for step: 'Run AWS e2e tests'
##[debug]Evaluating: (success() && env.HAS_AWS_CREDS)
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating Index:
##[debug]....Evaluating env:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'HAS_AWS_CREDS'
##[debug]..=> 'false'
##[debug]=> 'false'
##[debug]Expanded: (true && 'false')
##[debug]Result: 'false'
##[debug]Starting: Run AWS e2e tests
After:
##[debug]Evaluating condition for step: 'Run AWS e2e tests'
##[debug]Evaluating: (success() && (env.HAS_AWS_CREDS == 'true'))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating Equal:
##[debug]....Evaluating Index:
##[debug]......Evaluating env:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'HAS_AWS_CREDS'
##[debug]....=> 'false'
##[debug]....Evaluating String:
##[debug]....=> 'true'
##[debug]..=> false
##[debug]=> false
##[debug]Expanded: (true && ('false' == 'true'))
##[debug]Result: false

Significant changes

(Please check any boxes [x] if the answer is "yes". You can first publish the PR and check them afterwards, for convenience.)

  • Dependencies have been added or upgraded
  • Public API has been changed (Public API is any class annotated with @Public(Evolving))
  • Serializers have been changed
  • New feature has been introduced
    • If yes, how is this documented? (not applicable / docs / JavaDocs / not documented)

@z3d1k
Copy link
Contributor Author

z3d1k commented Oct 18, 2023

When credentials are present in repository:

Workflow setup:

##[debug]Evaluating: secrets.FLINK_AWS_USER
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'FLINK_AWS_USER'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.FLINK_AWS_PASSWORD
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'FLINK_AWS_PASSWORD'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: ((secrets.FLINK_AWS_USER != '') && (secrets.FLINK_AWS_PASSWORD != ''))
##[debug]Evaluating And:
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating secrets:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'FLINK_AWS_USER'
##[debug]....=> '***'
##[debug]....Evaluating String:
##[debug]....=> ''
##[debug]..=> true
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating secrets:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'FLINK_AWS_PASSWORD'
##[debug]....=> '***'
##[debug]....Evaluating String:
##[debug]....=> ''
##[debug]..=> true
##[debug]=> true
##[debug]Expanded: (('***' != '') && ('***' != ''))
##[debug]Result: true

Step condition evaluation

##[debug]Evaluating condition for step: 'Run AWS e2e tests'
##[debug]Evaluating: (success() && (env.HAS_AWS_CREDS == 'true'))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating Equal:
##[debug]....Evaluating Index:
##[debug]......Evaluating env:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'HAS_AWS_CREDS'
##[debug]....=> 'true'
##[debug]....Evaluating String:
##[debug]....=> 'true'
##[debug]..=> true
##[debug]=> true
##[debug]Expanded: (true && ('true' == 'true'))
##[debug]Result: true
##[debug]Starting: Run AWS e2e tests

Copy link
Contributor

@dannycranmer dannycranmer left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @z3d1k

@dannycranmer dannycranmer merged commit c3395b7 into apache:main Oct 19, 2023
1 check passed
@z3d1k z3d1k deleted the FLINK-33279 branch October 19, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants