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

Feature: New Backend System Migration #192

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

Conversation

ionSurf
Copy link

@ionSurf ionSurf commented Sep 25, 2024

Hey, I just made a Pull Request!

This feature provides full integration with the new backend system.

Context

Given that Backstage is rapidly evolving, this plugin was in danger of falling behind and starting to have notable incompatibilities.

Issue ticket number and link

  • Fixes # (issue)

Checklist before requesting a review

  • I have performed a self-review of my own code
  • I have verified that the code builds perfectly fine on my local system
  • I have verified that my code follows the style already available in the repository
  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@ionSurf ionSurf requested a review from a team as a code owner September 25, 2024 20:55
Copy link

changeset-bot bot commented Sep 25, 2024

🦋 Changeset detected

Latest commit: ae936fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@axis-backstage/plugin-jira-dashboard-backend Major
backend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ionSurf ionSurf force-pushed the feature/new-backend-system-migration branch from 2cc98f0 to 6c2c41c Compare September 25, 2024 20:58
Copy link
Contributor

@anicke anicke left a comment

Choose a reason for hiding this comment

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

Thank you very much, I have some minor concerns!

.changeset/orange-buses-hug.md Outdated Show resolved Hide resolved

/**
* Constructs a jira dashboard router.
* @deprecated Please migrate to the new backend system as this will be removed in the future.
Copy link
Contributor

Choose a reason for hiding this comment

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

The "@Deprecation" notice here is a warning that the "RouterOptions" and "createRouter" should not be included in the public api of the plugin, as described here.

So we either need to remove the exports or keep the "deprecations"?

Copy link
Author

Choose a reason for hiding this comment

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

I'd say let's go ahead and remove the exports. You already had the deprecated tags in the latest version. According to the documentation, the next step is to remove the exports.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, I would be surprised if anyone was using the "old backend" still.

Copy link
Author

Choose a reason for hiding this comment

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

I'd even go as far as to stop functions that were previously used to create a legacy-wrapper to be exported by the plugin, as suggested by the docs . I'm commiting these changes too, let me know what you think.

Copy link
Author

@ionSurf ionSurf Sep 26, 2024

Choose a reason for hiding this comment

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

I've noticed too that as a best practice, all types are usually exported from the common plugin. How about I move those to the types file in the common plugin and export all types from there? That way, the backend plugin will be def cleaner and up to code!

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not move any types right now.

Copy link
Author

Choose a reason for hiding this comment

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

@anicke , all types have been moved back into the jira-dashboard-backend plugin.

export type { SearchOptions } from './api';
export { jqlQueryBuilder } from './queries';
Copy link
Contributor

Choose a reason for hiding this comment

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

We can only remove createRouter and RouterOptions, i.e. what is deprecated. The others should be there.

Copy link
Author

Choose a reason for hiding this comment

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

OK. I'll put them back.

@ionSurf ionSurf force-pushed the feature/new-backend-system-migration branch from 6d970d5 to 3f8ae36 Compare September 26, 2024 15:15
@@ -93,8 +93,6 @@ export type SearchOptions = {
* @param config - A Backstage config
* @param jqlQuery - A string containing the jql query.
* @param options - Query options that will be passed on to the POST request.
*
* @public
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to add the "@public" here? The "searchJira" is not included in the "api-report"?

Copy link
Author

Choose a reason for hiding this comment

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

Right... I just aded it back.

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.

2 participants