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

Address some deprecation warnings in build definition #156

Merged

Conversation

johannesduesing
Copy link
Collaborator

@johannesduesing johannesduesing commented Nov 14, 2023

This PR addresses some of the deprecation warnings the showed up in SBT when execution cleanBuild (and other tasks). In particular, the following issues have been dealt with:

  • warning: lazy value itSettings in object Defaults is deprecated (since 1.9.0): [..]
  • [warn] Ignored unknown package option FixedTimestamp
  • [warn] sbt 0.13 shell syntax is deprecated; use slash syntax instead

@johannesduesing johannesduesing added the enhancement New feature or request label Nov 14, 2023
@johannesduesing johannesduesing self-assigned this Nov 14, 2023
@errt errt marked this pull request as ready for review November 14, 2023 14:47
@errt errt marked this pull request as draft November 14, 2023 14:47
errt
errt previously approved these changes Nov 14, 2023
Copy link
Collaborator

@errt errt left a comment

Choose a reason for hiding this comment

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

Looks good to me

@johannesduesing
Copy link
Collaborator Author

/it:test

@johannesduesing johannesduesing marked this pull request as ready for review November 14, 2023 15:21
@johannesduesing
Copy link
Collaborator Author

Weird things are happening with the integration test, git fails to checkout the current commit and exists with code 1.

/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/feature/sbt-deprecation-warnings*:refs/remotes/origin/feature/sbt-deprecation-warnings* +refs/tags/feature/sbt-deprecation-warnings*:refs/tags/feature/sbt-deprecation-warnings*
The process '/usr/bin/git' failed with exit code 1
Waiting 14 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/feature/sbt-deprecation-warnings*:refs/remotes/origin/feature/sbt-deprecation-warnings* +refs/tags/feature/sbt-deprecation-warnings*:refs/tags/feature/sbt-deprecation-warnings*
Error: The process '/usr/bin/git' failed with exit code 1

I've re-run this three times with the same result ... I'll retry again tomorrow, maybe there's an issue with GitHub and / or the runner. If you've seen this before @errt please let me know.

@errt
Copy link
Collaborator

errt commented Nov 14, 2023

Weird. I haven't seen this before. Maybe a restart of the runner could help. @TorunR ?

@TorunR
Copy link
Collaborator

TorunR commented Nov 14, 2023

A restart won't help. The problem is that the runner tries to check out the branch from johannes' fork. I think we have to fix that in the action somehow. Learnt that here: (WeblateOrg/weblate#6240 (comment))
I don't have time to look into this further. sorry

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

/it:test

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

@johannesduesing
Copy link
Collaborator Author

That's too bad .. i'll keep looking for a better solution - if there is none i'll at least revert to the old one since the current state doesn't work at all

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

I see two options: Either find out whether you can find out the PR ref that is on origin so that it looks like a regular PR Action: like this
Or use the repository argument with the checkout:

- uses: actions/checkout@v4
  with:
    # Repository name with owner. For example, actions/checkout
    # Default: ${{ github.repository }}
    repository: '

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

While we are changing the actions anyway, do we need to use the slash syntax there as well?

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

/it:test

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

@johannesduesing
Copy link
Collaborator Author

Hm very odd, the arguments don't even seem to make it to the actual Action invocation - i'll keep looking for a fix

@TorunR
Copy link
Collaborator

TorunR commented Nov 15, 2023

I think the arguments make it there, but the comment stuff is run on develop. That's the reason we use the action in the first step, to get the ref to the pr branch.
EDIT: Oh, I think you are right. Maybe we need to update action?

@johannesduesing
Copy link
Collaborator Author

johannesduesing commented Nov 15, 2023

I'll try updating to v4 later today, maybe that helps. Only other thing i can imagine is that the interpolation with ${{ }} is wrong for github API calls .. in line 11 we use if github.event.issue.pull_request without any interpolation syntax, but i am not confident that is the same thing.

EDIT: Nvm i think i know what the problem is. The action triggeres on issue_comment, which provides an API interface that only has very limited PR information available (via github.event.issue.pull_request), see here. What i was looking at was the API interface for pull_request which is not available here. I am not confident that it is possible to do what we plan this way, but i'll try some more this afternoon

@johannesduesing
Copy link
Collaborator Author

/it:test

1 similar comment
@johannesduesing
Copy link
Collaborator Author

/it:test

@TorunR
Copy link
Collaborator

TorunR commented Nov 16, 2023

Maybe we should remove the comment stuff and figure out whether https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow using the UI works better

@johannesduesing
Copy link
Collaborator Author

Sounds like a good plan - let's discuss that in tomorrows meeting maybe? I'll test some more on a dedicated repo, so i don't have to spam additional PRs here anymore.

@johannesduesing
Copy link
Collaborator Author

/it:test

@johannesduesing
Copy link
Collaborator Author

@TorunR The issue seems to be resolved, finally. The Logs show that this time the correct HEAD has been checked out, and setting the commit status seems to be working as it did before. I'll let this run finish so the PR can be merged.

@TorunR TorunR force-pushed the feature/sbt-deprecation-warnings branch from 7f7a327 to 26b0689 Compare November 16, 2023 14:10
@TorunR TorunR enabled auto-merge November 16, 2023 14:10
TorunR
TorunR previously approved these changes Nov 16, 2023
@TorunR
Copy link
Collaborator

TorunR commented Nov 16, 2023

Thank you for this. Sorry that this was way harder than anticipated.

I still have this question:

While we are changing the actions anyway, do we need to use the slash syntax there as well?

@TorunR TorunR disabled auto-merge November 16, 2023 14:12
@johannesduesing
Copy link
Collaborator Author

Ah right sorry i forgot about that. Sure we can do that, do you want that to be changed only in the actual call inside the workflow, or also for the magic phrase itself?

@TorunR
Copy link
Collaborator

TorunR commented Nov 16, 2023

It think the workflows are enough

@johannesduesing johannesduesing added this pull request to the merge queue Nov 17, 2023
Merged via the queue into opalj:develop with commit ab46772 Nov 17, 2023
2 checks passed
@johannesduesing johannesduesing deleted the feature/sbt-deprecation-warnings branch February 23, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants