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

build: master to MN 4 #303

Merged
merged 29 commits into from
Feb 14, 2023
Merged

build: master to MN 4 #303

merged 29 commits into from
Feb 14, 2023

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Nov 28, 2022

No description provided.

…279)

* ci: version to 3.0.0 Micronaut 4.0.0-SNAPSHOT githubCoreBranch=4.0.x

* change to micronaut-test 3.6.2
sdelamo and others added 15 commits November 28, 2022 10:24
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 3.0.1 to 3.5.0.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](mikepenz/action-junit-report@v3.0.1...v3.5.0)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps micronaut-gradle-plugin from 3.5.3 to 3.6.5.

---
updated-dependencies:
- dependency-name: io.micronaut.gradle:micronaut-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
activemq = '5.17.2'
amazon-sqs-messaging = '1.1.0'
artemis-client = '2.27.0'
awaitility = '4.2.0'
aws-sqs = '1.12.349'
jcl-slf4j = '1.7.36'
micronaut-aws-v1 = '3.9.3'
testcontainers = '1.17.6'
Bumps [kotlin-allopen](https://github.com/JetBrains/kotlin) from 1.6.21 to 1.7.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.6.21...v1.7.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-allopen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.6.21 to 1.7.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.6.21...v1.7.21)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergio del Amo <[email protected]>
@sbodvanski sbodvanski assigned sbodvanski and unassigned timyates and sbodvanski Dec 7, 2022
renovate bot and others added 6 commits December 10, 2022 02:56
…es to correspond to changed bom/platform architecture, misc build fixes.
# Conflicts:
#	.github/workflows/central-sync.yml
#	.github/workflows/dependency-update.yml
#	.github/workflows/gradle.yml
#	.github/workflows/publish-snapshot.yml
#	.github/workflows/release.yml
#	.github/workflows/sonarqube.yml
#	buildSrc/build.gradle
#	gradle.properties
#	gradle/libs.versions.toml
#	settings.gradle
…ion-junit-report-3.x

chore(deps): update mikepenz/action-junit-report action to v3.6.2
…rk-slsa-github-generator-1.x

chore(deps): update slsa-framework/slsa-github-generator action to v1.4.0
@wetted wetted assigned wetted and unassigned sbodvanski Dec 15, 2022
@wetted wetted requested a review from timyates December 15, 2022 23:22
@wetted wetted marked this pull request as ready for review December 15, 2022 23:23
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@wetted
Copy link
Contributor

wetted commented Jan 4, 2023

@sdelamo I am trying to resolve a broken test. In the test, CustomizeBrokerSpec (there is a copy for each language, they all fail the same way).

    @Test
    void testCustomizeBroker() {

        ConnectionFactory connectionFactory = applicationContext.getBean(
            ConnectionFactory.class,
            Qualifiers.byName(CONNECTION_FACTORY_BEAN_NAME));

        assertTrue(connectionFactory instanceof JMSConnectionPool);

        ...

That assert is failing , where it passes on the branch for the MN 3 version of the module. The bean is registered in this method,

    public void process(BeanDefinition<?> beanDefinition, BeanContext context) {
        final Object candidate = context.getBean(beanDefinition);
        Assert.isTrue(candidate instanceof ConnectionFactory,
            () -> "@JMSConnectionFactory can only be applied to a bean of type javax.jms.ConnectionFactory. " +
            "Provided class was " + candidate.getClass().getName());

        final ConnectionFactory connectionFactory = (ConnectionFactory) candidate;
        final String name = beanDefinition.stringValue(JMSConnectionFactory.class)
            .orElseThrow(() -> new ConfigurationException(
                "@JMSConnectionFactory must specify a name for the bean."));

        context.registerSingleton(
            JMSConnectionPool.class,
            new JMSConnectionPool(
                connectionFactory,
                properties.getInitialPoolSize(),
                properties.getMaxPoolSize()),
            Qualifiers.byName(name));

        logger.debug("created JMSConnectionPool bean '{}' for ConnectionFactory {}",
            name, connectionFactory.getClass().getName());
    }

The logger output here is, "created JMSConnectionPool bean 'activeMqConnectionFactory' for ConnectionFactory org.apache.activemq.ActiveMQConnectionFactory"

I'm not understanding why this fails now. Could it be an issue with the registerSingleton(...) method?

@graemerocher previously stated (when I asked), "the approach taken here looks like a hack
but probably the exposed type doesn't expose ConnectionFactory as a bean".

So what's the hack, the process() method or the test (or both)? Now that I look closer, the test was changed in September, and if I revert that change to what it was, it passes? So what is the right thing?

class CustomizeBrokerSpec extends AbstractJmsSpec {

    @Test
    void testCustomizeBroker() {

        ConnectionFactory connectionFactory = applicationContext.getBean(
            ConnectionFactory.class,
            Qualifiers.byName(CONNECTION_FACTORY_BEAN_NAME));

        assertTrue(connectionFactory instanceof ActiveMQConnectionFactory);

        ActiveMQConnectionFactory amqcf = (ActiveMQConnectionFactory) connectionFactory;

        assertTrue(amqcf.isUseAsyncSend());
    }
}

Note that my last commit was to push that reverted change, but that doesn't mean I think it's the correct thing to do.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@graemerocher graemerocher self-assigned this Feb 14, 2023
@graemerocher graemerocher merged commit af40740 into master Feb 14, 2023
@sdelamo sdelamo deleted the 3.0.x branch November 5, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants