Skip to content

Spring Boot migration - AAD related samples#10614

Merged
saragluna merged 16 commits intoAzure:masterfrom
saragluna:feature/spring-boot-aad-samples
Jun 10, 2020
Merged

Spring Boot migration - AAD related samples#10614
saragluna merged 16 commits intoAzure:masterfrom
saragluna:feature/spring-boot-aad-samples

Conversation

@saragluna
Copy link
Member

Split PR #9395 into several PRs for the convenience of reviewing.

Modules included:

  • azure-spring-boot-bom
  • azure-spring-boot-sample-active-directory
  • azure-spring-boot-sample-active-directory-backend
  • azure-spring-boot-sample-active-directory-backend-v2
  • azure-spring-boot-sample-active-directory-stateless

<version>2.2.5-beta.1</version> <!-- {x-version-update;com.microsoft.azure:azure-active-directory-spring-boot-starter;current} -->
</dependency>
<!--
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is commented out, if this is not needed, should we remove it ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The commented out parts are in following PRs.

In Azure portal, app registration manifest page, configure `oauth2AllowImplicitFlow` in your application manifest to `true`. See [this issue](https://github.com/MicrosoftDocs/azure-docs/issues/8121#issuecomment-387090099) for details on this workaround.

## Next steps
## Contributing No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

We should put standard text for contributing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should we link to this CONTRIBUTING.md?

Copy link
Contributor

Choose a reason for hiding this comment

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

This contributing guide is very specific to azure-sdk-for-java and its related tools. You probably want a guide which talks about how user can contribute to something which is specific to azure-spring-*

Copy link
Contributor

@JimSuplizio JimSuplizio left a comment

Choose a reason for hiding this comment

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

There are some guidelines that were written for spring which need to be followed.

The spring libraries are either track 1 (data) or track 2 (client). The way things are being declared is a hybrid, the libraries themselves are com.microsoft.azure and have their versions in version_data.txt which implies data however the sdk/spring/ci.yml is using the client template and the various libraries are using the azure-client-sdk-parent which isn't correct for a data track library. The differences in the parents does matter since it concerns what you do and do not need in the pom file. For example track 1 doesn't get an entry in jacoco nor is it subject to maven-enforcer-plugin.

<artifactId>azure-sdk-template</artifactId>
<version>1.0.4-beta.13</version> <!-- {x-version-update;com.azure:azure-sdk-template;current} -->
</dependency>
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is a track 1, or data, library it does not belong in here. Jacoco is for track 2, or client libraries only.

Copy link
Member Author

Choose a reason for hiding this comment

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

@JimSuplizio Thanks for the clarification. I'll define the versions of Spring modules in version_client.txt then. We'd like to use track 2 pipelines for Spring modules, but only with the group id azure.microsoft.com for as long as one more release for them.

Copy link
Contributor

@JimSuplizio JimSuplizio left a comment

Choose a reason for hiding this comment

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

This is the only PR, out of the set of spring PRs, that I'm not creating issues for and just approving. This is because of the BOM files. In the email that went out last week I pretty clear on BOM files:

BOM files are not used in the repository for building libraries within the repository. If Spring needs to define a BOM file, for consumers, then it should be done in a manner similar to the Azure SDK BOM for client libraries and should be in the sdk/boms directory.

I'm also under the impression that BOM files aren't supposed to be frequent releases as such, the SDK libraries in BOM files shouldn't be tagged with 'current', those versions are carefully updated by hand. Right now the BOM is inside the spring directory and being used to build the samples. If this is going to change in one way or the other I'd like to hear input/thoughts from @mitchdenny and @JonathanGiles .

@mitchdenny
Copy link
Contributor

I agree with @JimSuplizio on BOMs. We should not create a BOM with the intention of referencing it as an internal dependency (that is, our Spring Boot libraries depend on it). If you choose to create a BOM then it will need to go in sdk/boms/[bom-name] but not be referenced anywhere else within our repository.

@saragluna
Copy link
Member Author

@mitchdenny @JimSuplizio We're going to apply such changes, moving spring-bom to sdk/boms folder and removing dependencyManagement sections.

@saragluna saragluna requested a review from JimSuplizio May 28, 2020 04:31
@saragluna
Copy link
Member Author

/azp run java - aggregate-reports

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saragluna
Copy link
Member Author

saragluna commented Jun 9, 2020

@hemanttanwar @JimSuplizio Please help approve this PR. The master's been rebased and aggregate-reports run.

Copy link
Contributor

@JimSuplizio JimSuplizio left a comment

Choose a reason for hiding this comment

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

@saragluna I'm going to pre-approve this however the spring BOM file should not be using the current or dependency tags (external dependency is okay) of the spring libraries. The BOM files versions should get updated before it's released which is supposed to be much less frequently than the library releases.

@saragluna
Copy link
Member Author

@saragluna I'm going to pre-approve this however the spring BOM file should not be using the current or dependency tags (external dependency is okay) of the spring libraries. The BOM files versions should get updated before it's released which is supposed to be much less frequently than the library releases.

Thanks for pointing it out, I've removed all current tags from the BOM file.

@saragluna
Copy link
Member Author

/azp run java - aggregate-reports

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saragluna saragluna merged commit 0636e82 into Azure:master Jun 10, 2020
@saragluna saragluna deleted the feature/spring-boot-aad-samples branch June 10, 2020 05:01
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.

5 participants