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

Making CI tests only on push #64

Merged

Conversation

vishnuchalla
Copy link
Collaborator

@vishnuchalla vishnuchalla commented Aug 8, 2024

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Making CI tests to run only on push because they use secrets that work only on the mainstream repo.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

Will be tested against every PR after merge into main branch.

Copy link
Collaborator

@shashank-boyapally shashank-boyapally left a comment

Choose a reason for hiding this comment

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

/lgtm

@vishnuchalla vishnuchalla force-pushed the ci-test-onpush branch 2 times, most recently from cbbbb1f to d4dae1f Compare August 9, 2024 14:06
@paigerube14
Copy link
Collaborator

shouldn't we try to run the tests on any given pr before its merged to know if its a breaking change?

@vishnuchalla
Copy link
Collaborator Author

shouldn't we try to run the tests on any given pr before its merged to know if its a breaking change?

Ideally yes. But the problem is github secrets are not available for fork PRs which will try to fetch our QE ES server credentials while executing the CI tests. Only main repo has access to secrets, which is a limitation with github. So the idea behind this change is to get tests triggered after a merge which will help us detect issues atleast before we cut a release solving our purpose.

@paigerube14
Copy link
Collaborator

@vishnuchalla thoughts on maybe just loading some data into the public es instance that we wouldn't have to use a secret but could still run pr based tests

@vishnuchalla
Copy link
Collaborator Author

@vishnuchalla thoughts on maybe just loading some data into the public es instance that we wouldn't have to use a secret but could still run pr based tests

Yeah, thought about it too. But the issue is we have to hardcode its URL in the tests which will make it available to the internet. So literally anyone will be able to use our ES instance and we will be charged for it.

@paigerube14
Copy link
Collaborator

Thoughts on adding in documentation somewhere on how to run the github tests locally. or even completely remove them as to run in github/actions and just have them documented to run before opening a pr

@jtaleric
Copy link
Member

or even completely remove them as to run in github/actions and just have them documented to run before opening a pr

+1

I wonder instead of trying to use live data, we just store the json in a var to test? instead of querying ES, we just load the json, so we know the expected outcome?

@vishnuchalla / @shashank-boyapally - Could we close out on this?

@vishnuchalla
Copy link
Collaborator Author

vishnuchalla commented Aug 16, 2024

or even completely remove them as to run in github/actions and just have them documented to run before opening a pr

+1

I wonder instead of trying to use live data, we just store the json in a var to test? instead of querying ES, we just load the json, so we know the expected outcome?

@vishnuchalla / @shashank-boyapally - Could we close out on this?

The idea was to have functional tests that are close to the ones that execute in our CI. So I think we should keep them as is but have clear documentation on how to trigger github actions for the ease of contributors.

Having the data input mocked as json will transition these tests into unit based rather than functionality taking us far away from our purpose.

@shashank-boyapally
Copy link
Collaborator

I think we can either add this in the readme on how to test before pushing the changes or have a contributing.md, either way works..

@jtaleric
Copy link
Member

jtaleric commented Aug 16, 2024

Having the data input mocked as json will transition these tests into unit based rather than functionality taking us far away from our purpose.

Orion shouldn't need to functionally test connectivity to ES / OpenSearch that is more of a fmatch function.

@vishnuchalla
Copy link
Collaborator Author

Having the data input mocked as json will transition these tests into unit based rather than functionality taking us far away from our purpose.

Orion shouldn't need to functionally test connectivity to ES / OpenSearch that is more of a fmatch function.

Its not about what orion has, these tests are all about what orion does in an end-to-end workflow.

@jtaleric
Copy link
Member

Having the data input mocked as json will transition these tests into unit based rather than functionality taking us far away from our purpose.

Orion shouldn't need to functionally test connectivity to ES / OpenSearch that is more of a fmatch function.

Its not about what orion has, these tests are all about what orion does in an end-to-end workflow.

sure - the complexity is verifying the end to end -- however since we have limitations on connectivity for each PR either
A) We make the PR submitter do the testing because the CI lack functionality due to security.
B) Mock aspects JUST for the CI to ensure things being introduce do not break.

Having the CI run at push into main IMHO lacks why we have a CI - because if identifies a breaking change, we will have to revert vs testing IN the PR.

Signed-off-by: Vishnu Challa <vchalla@vchalla-thinkpadp1gen2.rmtusnc.csb>
@vishnuchalla
Copy link
Collaborator Author

vishnuchalla commented Aug 17, 2024

Updated with appropriate docs as discussed offline. PTAL 👋🏼

@shashank-boyapally
Copy link
Collaborator

Merging!

@shashank-boyapally shashank-boyapally merged commit 1b21868 into cloud-bulldozer:main Aug 22, 2024
3 checks passed
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.

4 participants