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

404 Exception Handling. #5275

Merged
merged 3 commits into from
Aug 10, 2021
Merged

404 Exception Handling. #5275

merged 3 commits into from
Aug 10, 2021

Conversation

davinchia
Copy link
Contributor

@davinchia davinchia commented Aug 9, 2021

What

This is a lot going on in this PR.

The main gist is:

  • add a 404 test to sanity check we return 404 when queried for non-existent resources.
  • WorkspaceHelpers currently always swallow exception. This is suboptimal for Cloud since the exception rethrown is a generic RTE, which does not help us know what specific status code to return. Refactor this so we have both kinds of functions.

Lastly, disable normal publishing and return to publishing shadow jars. This is because of this PR that we are iterating on. I don't want to block anyone in the mean time.

Recommended reading order

  1. build.gradle and api-server/build.gradle - to see build changes.
  2. WorkspaceHelpers.java - to see refactoring and new workspace methods that throw exceptions.
  3. AcceptanceTest.java - to see sanity check 404 test.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed.

…l jar pushing. Enable api shadow jar publishing to unblock everyone. Refactor workspace helper to use propagate exceptions and non-exceptions.
@github-actions github-actions bot added the area/platform issues related to the platform label Aug 9, 2021
@davinchia davinchia changed the title Add sanity check test that missing resource throws 404. Disable norma… 404 Exception Handling. Aug 9, 2021
@davinchia davinchia marked this pull request as ready for review August 9, 2021 14:12
@davinchia davinchia merged commit 9898396 into master Aug 10, 2021
@davinchia davinchia deleted the davinchia/config-not-found-mapper branch August 10, 2021 02:34
}
}
}
// TODO: Davin will turn this back on.
Copy link
Contributor

Choose a reason for hiding this comment

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

@davinchia was this supposed to happen before this PR went in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants