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

Jira structure: back to swagger schemas, but fix incorrect #5523

Merged
merged 8 commits into from
Sep 2, 2021

Conversation

vovavovavovavova
Copy link
Contributor

@vovavovavovavova vovavovavovavova commented Aug 19, 2021

What

Closes #5256

How

  1. returned to previous schemas (discard auto-generated)
  2. fixes: schemas, that had "items" root caused Source JIRA: certain stream schemas are not properly defined #4950 now have properties root
  3. repaired some files like airbyte-integrations/connectors/source-jira/source_jira/schemas/avatars.json
    It's schema, had both system and custom roots, when in the code we expand and get inner value. Now schema suits to output
  4. add additionalproperties, where response contains.more fields, than written in schema. Some original schemas had additional properties as false, that caused error because of some fields.
  5. add null values
  6. remove parse_response_root from some classes. As example, class IssueVotes. Using this parse_response_root returns only the voters (users), but we need also the information about the votes https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-votes/#api-rest-api-3-issue-issueidorkey-votes-get . We skipped info hasVoted, votes amount, self. Those schemas and roots were repaired to return full information, not only voters. Several changes in streams have the same reason.
  7. some other issues were fixed to pass the normalization through Airbyte UI

Recommended reading order

  1. x.java
  2. y.python

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.

@github-actions github-actions bot added the area/connectors Connector related issues label Aug 19, 2021
@vovavovavovavova
Copy link
Contributor Author

vovavovavovavova commented Aug 19, 2021

/test connector=connectors/source-jira

🕑 connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1146579627
✅ connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1146579627

@jrhizor jrhizor temporarily deployed to more-secrets August 19, 2021 10:25 Inactive
}
"additionalProperties": false,
"description": "List of system avatars."
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo add newline

@vovavovavovavova vovavovavovavova changed the title Valdemar/#5256 jira structure Jira structure: back to swagger schemas, but fix incorrect Aug 19, 2021
@vovavovavovavova
Copy link
Contributor Author

vovavovavovavova commented Aug 20, 2021

/test connector=connectors/source-jira

🕑 connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1149720958
✅ connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1149720958

@jrhizor jrhizor temporarily deployed to more-secrets August 20, 2021 06:36 Inactive
@@ -1,33 +1,24 @@
{
"$schema": "http://json-schema.org/schema#",
"type": ["object", "null"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be a
"$schema": "http://json-schema.org/draft-07/schema#",
too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

autogenerated schema always have this entry $schema. The swagger big hairy json is https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json . Accordingly to it, the labels are https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-labels/#api-group-labels PageBeanString. In this json document it is described here root['components']['schemas']['PageBeanString'] and it just does not contain $schema entry. Schemas were restored to the state before #4947 and it seems that schemas, as well swagger one's just does not contain this entry. We can modify existing jsons and set it, BUT the previous version and swagger do not have it, and we use swagger.

Copy link
Contributor

@vitaliizazmic vitaliizazmic left a comment

Choose a reason for hiding this comment

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

Could you provide some details about changes?

@vovavovavovavova
Copy link
Contributor Author

Could you provide some details about changes?

upgraded description

@yevhenii-ldv
Copy link
Contributor

yevhenii-ldv commented Sep 2, 2021

/test connector=connectors/source-jira

🕑 connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1194467390
✅ connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1194467390

@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 14:01 Inactive
@yevhenii-ldv
Copy link
Contributor

yevhenii-ldv commented Sep 2, 2021

/publish connector=connectors/source-jira

🕑 connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1194598138
✅ connectors/source-jira https://github.com/airbytehq/airbyte/actions/runs/1194598138

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Sep 2, 2021
@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 14:37 Inactive
@yevhenii-ldv yevhenii-ldv merged commit 7216de8 into master Sep 2, 2021
@yevhenii-ldv yevhenii-ldv deleted the valdemar/#5256_jira_structure branch September 2, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jira Connector: "issues" stream structure changed unexpectedly
6 participants