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

allure: init at 2.7.0 #47376

Closed

Conversation

jraygauthier
Copy link
Member

Motivation for this change

Missing package.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

src = fetchurl {
url = "https://dl.bintray.com/qameta/generic/io/qameta/allure/${pname}/${version}/${pname}-${version}.tgz";
sha256 = "181996wayplpmss5x4kiilpr4wg1mnbzbv88kr8kv3j22gwygx0g";
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is an open source project and the source code is available, we generally prefer to build from source instead of downloading and re-distributing binaries.

https://github.com/allure-framework/allure-java

There ought to be a handful of other gradle built projects floating around, but IIRC the Java toolchain in Nix could use some love and improvement to bring it up to speed with the other languages. (There's also maven2nix for maven project generation.)

Copy link
Member Author

Choose a reason for hiding this comment

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

You picked the wrong project, that was the java integration/listener for allure. Here's the one for this PR: https://github.com/allure-framework/allure2.

However as there are no clear build from source instruction, I'm not sure it is worth the time finding a way to build this and most likely other java packages bundled with it. If you just take a look at the lib folder:

allure-2.7.0/lib]$ find .
.
./slf4j-log4j12-1.7.25.jar
./flexmark-0.34.8.jar
./jackson-module-jaxb-annotations-2.9.6.jar
./allure-commandline-2.7.0.jar
./jcommander-1.72.jar
./tika-core-1.18.jar
./jetty-http-9.4.11.v20180605.jar
./commons-codec-1.10.jar
./commons-beanutils-1.9.3.jar
./jackson-core-2.9.6.jar
./jackson-databind-2.9.6.jar
./slf4j-api-1.7.25.jar
./commons-io-2.6.jar
./jackson-dataformat-xml-2.9.6.jar
./javax.servlet-api-3.1.0.jar
./woodstox-core-5.0.3.jar
./allure2-model-api-1.0.0.jar
./jackson-dataformat-yaml-2.9.6.jar
./commons-logging-1.2.jar
./allure1-model-1.0.jar
./allure-plugin-api-2.7.0.jar
./stax2-api-3.1.4.jar
./properties-2.0.RC5.jar
./commons-collections-3.2.2.jar
./allure-generator-2.7.0.jar
./snakeyaml-1.18.jar
./httpcore-4.4.10.jar
./jetty-server-9.4.11.v20180605.jar
./jaxb-utils-1.0.jar
./jackson-annotations-2.9.0.jar
./log4j-1.2.17.jar
./jaxb-api-2.3.0.jar
./allure2-model-jackson-1.0.0.jar
./flexmark-util-0.34.8.jar
./commons-lang3-3.7.jar
./jetty-util-9.4.11.v20180605.jar
./commons-collections4-4.1.jar
./commons-text-1.4.jar
./freemarker-2.3.28.jar
./opencsv-4.2.jar
./jetty-io-9.4.11.v20180605.jar
./config
./config/jetty-logging.properties
./config/log4j.properties
./httpclient-4.5.6.jar
./allure2-model-pojo-1.0.0.jar

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm just attempting a build and can see the build process depends on nodejs as well as yarn + it download tons of packages during this step. I'm not sure even where to being nixifying all these. Unless there is some tools like pypi2nix, I do not know even where to begin.

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 build step ($ nix-shell -p gradle -p jdk -p nodejs --run './gradlew build') however succeed after all the downloads. I'm struggling with the $ nix-shell -p gradle -p jdk -p nodejs --run './gradlew release' step now.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems the release steps requires to operate on an actual git repository. I git init && git add . && git commit -m Init and then $ nix-shell -p gradle -p jdk -p nodejs --run './gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=2.7.0 -Prelease.newVersion=2.7.0'. The thing finished with success.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now, nothing looks like the finished *.tar.gz content I packaged. Any idea?

Copy link
Member Author

Choose a reason for hiding this comment

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

Found it, you can list the tasks using gradle tasks. Is is possible to generate a tarbar which seem pretty much identical to what I have as a source using $ nix-shell -p gradle -p jdk -p nodejs --run './gradlew distTar' which ends under allure-commandline/build/distributions/allure-2.7.0.tgz and there is an installDist command as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now, there is the bunch of about 250 java packages which get downloaded to a ~/.gradle cache:

# ...
Download https://jcenter.bintray.com/net/researchgate/gradle-release/2.6.0/gradle-release-2.6.0.pom
Download https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.8.0/gradle-bintray-plugin-1.8.0.pom
Download https://jcenter.bintray.com/io/spring/gradle/dependency-management-plugin/1.0.5.RELEASE/dependency-management-plugin-1.0.5.RELEASE.pom
Download https://jcenter.bintray.com/ru/vyarus/gradle-quality-plugin/3.1.0/gradle-quality-plugin-3.1.0.pom
Download https://jcenter.bintray.com/com/bmuschko/gradle-docker-plugin/3.2.4/gradle-docker-plugin-3.2.4.pom
# ...

and the yarn package which are downloaded somewhere:

# ...
> Task :allure-generator:yarn
yarn install v0.24.6
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 10.19s.

> Task :allure-generator:buildWeb
yarn run v0.24.6
$ webpack --optimize-minimize 
Node#moveTo was deprecated. Use Container#append.
Hash: b014d3d4d9822dab681e
Version: webpack 3.11.0
Time: 15875ms
# ...

That seems like quite a lot of impurities to address, unless this can be automated. Any idea?

Copy link
Member Author

Choose a reason for hiding this comment

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

#17342 : Seems to be related to this (that is, if we really want to go with the sources approach).

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 source approach would depends on a yet to be developed gradle2nix tool. So for the time being, I believe the jar route is the way forward.

@mmahut
Copy link
Member

mmahut commented Aug 10, 2019

Are there any updates on this pull request, please?

@jraygauthier
Copy link
Member Author

@mmahut: Any actions required on my behalf? I'm actually awaiting for a merge in the actual state (non source) as #17342 is not yet fixed.

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@jraygauthier
Copy link
Member Author

Still important to me.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 13, 2020
Comment on lines +1 to +3

#url = https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.tgz;
{ lib, stdenv, makeWrapper, fetchurl, jre }:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#url = https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.tgz;
{ lib, stdenv, makeWrapper, fetchurl, jre }:
{ lib, stdenv, makeWrapper, fetchurl, jre }:

stdenv.mkDerivation rec {
version = "2.7.0";
pname = "allure";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name = "${pname}-${version}";

Comment on lines +6 to +7
version = "2.7.0";
pname = "allure";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version = "2.7.0";
pname = "allure";
pname = "allure";
version = "2.7.0";

version = "2.7.0";
pname = "allure";
name = "${pname}-${version}";
share-app-dir = name;
Copy link
Member

Choose a reason for hiding this comment

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

What is this?

meta = with lib; {
homepage = "https://docs.qameta.io/allure/";
description = ''
A flexible lightweight multi-language test report tool
Copy link
Member

Choose a reason for hiding this comment

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

This is to long for description.

@jraygauthier
Copy link
Member Author

No longer need this package.

@happysalada
Copy link
Contributor

I'm interested in this. I don't think I'll be able to compile from source, I still think it's a valuable addition to nixpkgs. I do hope that someone with java experience can improve it down the line. Will have a go at it tomorrow.

@happysalada
Copy link
Contributor

added in #165011
not yet building from source, but I'm hoping some java wizard will improve it in the future.
I think nixpkgs is more attractive from having such a popular package available.

@jraygauthier
Copy link
Member Author

@happysalada : Excellent, happy you took it on you to update and test, this is effectively a nice piece of software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants