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

Bug | Linter failing when making commits in Ocean due to type checks #1131

Closed
wants to merge 4 commits into from

Conversation

lordsarcastic
Copy link
Contributor

Description

What - Precommit checks fail due to assertion statement in Ocean test

Why - Without this fix, commits can't be made in development environments due to lint fails

How - Changing type(val) == str check to isinstance(val, str)

Type of change

  • Non-breaking change (fix of existing functionality that will not change current behavior)

All tests should be run against the port production environment(using a testing org).

Core testing checklist

  • Integration able to create all default resources from scratch
  • Resync finishes successfully
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Scheduled resync able to abort existing resync and start a new one
  • Tested with at least 2 integrations from scratch
  • Tested with Kafka and Polling event listeners
  • Tested deletion of entities that don't pass the selector

Integration testing checklist

  • Integration able to create all default resources from scratch
  • Resync able to create entities
  • Resync able to update entities
  • Resync able to detect and delete entities
  • Resync finishes successfully
  • If new resource kind is added or updated in the integration, add example raw data, mapping and expected result to the examples folder in the integration directory.
  • If resource kind is updated, run the integration with the example data and check if the expected result is achieved
  • If new resource kind is added or updated, validate that live-events for that resource are working as expected
  • Docs PR link here

Preflight checklist

  • Handled rate limiting
  • Handled pagination
  • Implemented the code in async
  • Support Multi account

Screenshots

Include screenshots from your environment showing how the resources of the integration will look.

API Documentation

Provide links to the API documentation used for this integration.

@lordsarcastic lordsarcastic marked this pull request as ready for review November 8, 2024 17:11
@lordsarcastic lordsarcastic requested a review from a team as a code owner November 8, 2024 17:11
Copy link
Member

@erikzaadi erikzaadi left a comment

Choose a reason for hiding this comment

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

@erikzaadi
Copy link
Member

@lordsarcastic this doesn't fail for me, and not in the CI, could you make sure you're up to date locally (make install;make lint)

@lordsarcastic
Copy link
Contributor Author

lordsarcastic commented Nov 11, 2024

@lordsarcastic this doesn't fail for me, and not in the CI, could you make sure you're up to date locally (make install;make lint)

It doesn't fail in linting but when you try to make a commit. I am facing the issue on my port-5598 branch. I've tried make install but I can't commit. The make lint command works file.

Edit: I see it happens when you commit outside of a virtual environment. Is this intended behaviour?

@lordsarcastic
Copy link
Contributor Author

This isn't happening anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants