Skip to content

Non-breaking update to powerbi-models dependency to 0.9.0 which has support for validateDashboardLoad. Update embed load to call abstract validate method which is provided by concrete Report and Dashboard classes. - #49

Merged
Matt Mazzola (mattmazzola) merged 3 commits into
devfrom
nonbreakingmodelsupdate
Sep 9, 2016

Conversation

@mattmazzola

@mattmazzola Matt Mazzola (mattmazzola) commented Sep 7, 2016 •

Copy link
Copy Markdown
Contributor

Although the powerbi-models@0.8.0 had a better scalability and semantics the namespace is breaking change and would have caused breaking change for consumers of powerbi-client. We decided to revert and refactor to a different change which is more sublte and allows powerbi-client to consume it without being a breaking change since it's usage of validation methods is internal.

Also, note that we use abstract validate method in the embed class which enforces that it is called and is implemented as opposed to the previous implementation which extended the load method and relied on developer calling correct code.

Main feedback looking for is to actually re-confirm it's non-breaking even though there is breaking change in dependency since validateLoad changed to validateReportLoad etc.

…upport for validateDashboardLoad. Update embed load to call abstract validate method which is provided by concrete Report and Dashboard classes.
@msftclas Microsoft Contribution License Agreements (msftclas) added the documentation Improvements or additions to documentation label Sep 7, 2016
Comment thread test/utility/mockApp.ts Outdated
load(config: models.ILoadConfiguration): Promise<void>;
validateLoad(config: models.ILoadConfiguration): Promise<models.IError[]>;
load(config: models.IReportLoadConfiguration): Promise<void>;
validateLoad(config: models.IReportLoadConfiguration): Promise<models.IError[]>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can this be IDashboardLoadConfiguration or the mock app is only for report?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

add in general what's the difference between validate(config) above and validateLoad(config) here?

@mattmazzola Matt Mazzola (mattmazzola) Sep 7, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well at the time I thinking it would be best to reduce the number of changes and was taking advantage of fact that Dashboard confirguration is also a valid Report configuration but I think you are right. It is probably better to explicitly support both to avoid confusion.

If this is straight forward to update I'll try adding it.

@mattmazzola Matt Mazzola (mattmazzola) Sep 8, 2016 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They perform the similar function just in different places since powerbi-models is shared across code. The one in IApp is strictly for mocking during tests to simulate product code while the former actually part of SDK.

It would probably be clearer to rename validate to validateLoad so people know it's generic for validating loading, but less generic than validateReportLoad which is only for report loads.

@mattmazzola
Matt Mazzola (mattmazzola) deleted the nonbreakingmodelsupdate branch September 9, 2016 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants