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

allow test with pekko 1.0.x snapshot #333

Merged
merged 7 commits into from
Oct 29, 2023

Conversation

pjfanning
Copy link
Contributor

@pjfanning pjfanning commented Oct 18, 2023

  • adjusts the tagNumber logic to treat build numbers without an RC or M tag as newer than ones that have them
  • example
sbt -Dpekko.http.build.pekko.version=1.0.x package

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

I am already testing this locally (and yes there is a regression in 1.0.x, I will make a revert commit), have one comment.

project/PekkoDependency.scala Outdated Show resolved Hide resolved
@mdedetrich
Copy link
Contributor

@pjfanning Do you want to get this over the finish line? I am happy with the change, just need want to change from snapshot-1.0.x to just 1.0.x.

I can also update the PR branch myself if you have time constraints.

@pjfanning
Copy link
Contributor Author

@pjfanning Do you want to get this over the finish line? I am happy with the change, just need want to change from snapshot-1.0.x to just 1.0.x.

I can also update the PR branch myself if you have time constraints.

I've committed a change to call it 1.0.x.

@mdedetrich
Copy link
Contributor

@@ -114,11 +116,12 @@ object PekkoDependency {
ep.toInt,
maj.toInt,
min.toInt,
Option(tagNumber).map(_.toInt),
Option(tagNumber).map(_.toInt).getOrElse(Integer.MAX_VALUE),
Copy link
Contributor

@mdedetrich mdedetrich Oct 29, 2023

Choose a reason for hiding this comment

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

Why was this change needed? Is that part of

adjusts the tagNumber logic to treat build numbers without an RC or M tag as newer than ones that have then?

Don't see how using Integer.MAX_VALUE is correct for what its doing (i.e. testing against latest found snapshot)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes - this is related to adjusts the tagNumber logic to treat build numbers without an RC or M tag as newer than ones that have them

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, but how is Integer.MAX_VALUE going to provide a correct value here, or am I missing something? Is it just some sentinel value that will get ignored later (if so add a comment because logic/reasoning behind it is unclear).

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh nvm, its for ordering and not the actual value. @pjfanning Can you just add a comment explaining that its there to fix ordering and then ill approve PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The values are used only in sorting.

  • -RC1- will eval as 1
  • no -RC or -M will now eval as MAX-INT
  • MAX-INT > 1 so sorting will treat non-RC/non-milestone releases as newer

Old logic:

  • -RC1- will eval as Some(1)
  • no -RC or -M will eval as None
  • None < Some(1) so sorting will treat non-RC/non-milestone releases as older

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood, just add a comment in the code quickly explaining this because on first glance its misleading.

@mdedetrich
Copy link
Contributor

I found something else, i.e. #333 (comment) . Also PR needs to be rebased/merge conflict against main since there are conflicts.

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

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

lgtm, lets see how this runs

@pjfanning pjfanning merged commit a7676ef into apache:main Oct 29, 2023
9 of 10 checks passed
@pjfanning pjfanning deleted the allow-test-with-pekko-10x-snapshot branch October 29, 2023 22:20
@mdedetrich
Copy link
Contributor

@pjfanning Good news its working, i.e. you can check the latest run at https://github.com/apache/incubator-pekko-http/actions/runs/6687481949 and to further confirm if you check the job at https://github.com/apache/incubator-pekko-http/actions/runs/6687481949/job/18168181064 you can see its picking up the latest 1.0.x snapshot, i.e.

[info] Building Pekko HTTP 1.1.0-M0+18-a7676ef1+20231030-0213-SNAPSHOT against Pekko 1.0.1+49-f1f6285b-SNAPSHOT on Scala 2.13.11

He-Pin pushed a commit to He-Pin/incubator-pekko-http that referenced this pull request Dec 24, 2023
* allow test with pekko 1.0.x snapshot

* Update PekkoDependency.scala

* Update PekkoDependency.scala

* rename config value to `1.0.x`

* Update nightly.yml to include 1.0.x run

* Update PekkoDependency.scala
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.

2 participants