grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.78k stars 951 forks source link

Fix grails-core build #13573

Closed codeconsole closed 1 month ago

codeconsole commented 1 month ago

https://github.com/grails/grails-core/pull/13572

Changelog / release_notes (pull_request_target) Failing after 16s

    data: {
      message: 'Bad credentials',
      documentation_url: 'https://docs.github.com/rest',
      status: '401'
    }

Grails Joint Validation Build / build_groovy (pull_request) Failing after 47s

   > Could not find org.jfrog.buildinfo:build-info-extractor:2.3.2.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/jfrog/buildinfo/build-info-extractor/2.3.2/build-info-extractor-2.3.2.pom
       - https://plugins.gradle.org/m2/org/jfrog/buildinfo/build-info-extractor/2.3.2/build-info-extractor-2.3.2.pom
       - https://oss.sonatype.org/content/repositories/snapshots/org/jfrog/buildinfo/build-info-extractor/2.3.2/build-info-extractor-2.3.2.pom
       - https://jitpack.io/org/jfrog/buildinfo/build-info-extractor/2.3.2/build-info-extractor-2.3.2.pom
     Required by:
         project : > org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3
codeconsole commented 1 month ago

@osscontributor How do we fix Changelog / release_notes (pull_request_target)

 data: {
      message: 'Bad credentials',
      documentation_url: 'https://docs.github.com/rest',
      status: '401'
    }
osscontributor commented 1 month ago

I do not know, but it is possible that the GH_TOKEN is either expired or has been revoked. Do any of you know if this error would be consistent with one of those scenarios?

codeconsole commented 1 month ago
  request: {
    method: 'GET',
    url: 'https://api.github.com/repos/grails/grails-core/contents/.github%2Frelease-drafter.yml',
    headers: {
      accept: 'application/vnd.github.v3.raw',
      'user-agent': 'probot/12.2.5 octokit-core.js/3.5.1 Node.js/20.13.1 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: {}
  },
  stack: 'HttpError: Bad credentials\n' +
    '    at /home/runner/work/_actions/release-drafter/release-drafter/v6/dist/index.js:8462:21\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
    '    at async Job.doExecute (/home/runner/work/_actions/release-drafter/release-drafter/v6/dist/index.js:30793:18)',
  type: 'Error'
}

https://api.github.com/repos/grails/grails-core/contents/.github/release-drafter.yml

https://github.com/grails/grails-core/blob/6.2.x/.github/release-drafter.yml

https://github.com/grails/grails-core/blob/26245fe430790bee6adea75f97972f5e19574cb1/.github/workflows/release-notes.yml#L27-L34

@osscontributor it sounds like secrets.GH_TOKEN does not have access to https://api.github.com/repos/grails/grails-core/contents/.github/release-drafter.yml Can you please either replace the secrets.GH_TOKEN with a non-expired one, or grant me access to do so myself?

osscontributor commented 1 month ago

Can you please either replace the secrets.GH_TOKEN with a non-expired one, or grant me access to do so myself?

If the current one is expired then yes, I can replace it. I will look at that today.

osscontributor commented 1 month ago

I have updated the token, will keep an eye on the build later this morning.

matrei commented 1 month ago

@codeconsole I have created a PR on the Groovy repo to fix the problem with the groovy-joint-workflow: apache/groovy#2103

codeconsole commented 1 month ago

@matrei perhaps we just need to update the plugin, build-info-extractor resumed maven central starting with https://repo1.maven.org/maven2/org/jfrog/buildinfo/build-info-extractor 2.25.4

https://repo1.maven.org/maven2/org/jfrog/buildinfo/build-info-extractor-gradle

matrei commented 1 month ago

@codeconsole The problem is when building groovy

codeconsole commented 1 month ago

:(

codeconsole commented 1 month ago

@matrei didn't this just work not too long ago? Can we update the build script to use a tag instead of a branch?

codeconsole commented 1 month ago

That was added on Jun 23, 2023

https://github.com/apache/groovy/blame/c49baf0e5762c8c9e0634c01ed139108099afaec/build.gradle

then taken out Jun 23, 2023

How did it work 3 months ago without it?

A temporary resolution from one of the other repos? https://github.com/apache/groovy/blame/61fbb3ca70beb47c0cc483186c07ee54531be438/build.gradle#L21-L34

matrei commented 1 month ago

How did it work 3 months ago without it? @codeconsole Yes, I'm wondering that as well.

What we could do, is to not build the groovy snapshot ourselves, but instead use the published snapshot.

codeconsole commented 1 month ago

@matrei not a bad idea, but seems like we don't have much luck with snapshots deploy. lol. Do their snapshots always deploy?

codeconsole commented 1 month ago

Not sure how much work should be wasted on this considering with Groovy 3 is on its way out.