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

TW-76 - Add tested mappings feature #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

francktrouillez
Copy link

@francktrouillez francktrouillez commented Oct 19, 2023

What are you doing and why

This PR adds the tested mappings feature, required in order to allow the parallelization of specs WITH the use of Apivore (specs split across the controllers, instead of everything in api_spec.rb).

You can go back to the base PR for the context:

This is a request coming from a discussion with @renatolond and @dsusviela that you can find here.

This is blocking for:

The code quality isn't perfect, I agree, but I tried to keep the same spirit as what was already done, no judgment pls

Associated ticket number and/or AirBrake error?

TW-76

Due Date or Desirable Merge

Not urgent, but needs to be tackled before going for the refactor of apivore described in these 2 PRs:

How has this been tested?

Locally with apptweak pointing to this gem.

Anticipated impact

Able to persist the tested mappings in a given file (/tmp/apivore/tested_mappings.json).

How do you plan to monitor the change in prod to make sure it's working?

Check that the gem is working lol

Question

How do we release this new version of the gem? Is this the same process as for apptweak-utils-ruby? I don't see any tag for the current version, so idk.

Checklist

  • My code follows the code style of this project.
  • I have run tests locally (manual tests and otherwise).
  • [ ] This has been tested on staging.
  • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
  • [ ] My change includes a database modification
    • [ ] I have tested my database modification in staging.
  • [ ] My changes require changes in other components/squads/teams
    • [ ] I already did the changes in the other components or notified the responsible people that the changes need to be done
    • [ ] The needed changes are already deployed or ready to be deployed

Copy link

@renatolond renatolond left a comment

Choose a reason for hiding this comment

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

Minor comment, but lgtm

validate_swagger!
setup_mappings!
end

def load_swagger_doc!
@swagger = Apivore::Swagger.new(fetch_swagger!)
def load_swagger_doc!(is_local: false)

Choose a reason for hiding this comment

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

isn't it better to set @is_local = is_local and then use it further instead of passing it down?

Copy link
Author

Choose a reason for hiding this comment

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

Good idea, done

@francktrouillez francktrouillez force-pushed the TW-76/add-tested-mappings-feature branch from bbbec15 to 6f4824c Compare October 20, 2023 14:08
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.

3 participants